Skip to content

Commit

Permalink
chore: update submodules, prerelease tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Anut-py committed Oct 22, 2024
1 parent 44a0607 commit 8c54f82
Show file tree
Hide file tree
Showing 13 changed files with 176 additions and 103 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ Changes ported from the upstream raylib code are not mentioned unless they are b

h-raylib's version numbers do not follow the usual format. The first two numbers in the version track the underlying C raylib version. For example, `5.1.x.x` versions use raylib 5.1 under the hood. The third number represents breaking changes (renamed/deleted functions or modules). The last number represents non-breaking changes (new functions or modules, bug fixes, etc). The safest version bound format to use is `h-raylib >=x.y.z.w && <x.y.(z+1)` (instead of the usual `^>=` bound).

## Version 5.5.2.0
_21 October 2024_

- **BREAKING CHANGE**: `is*Ready` functions renamed to `is*Valid` (upstream change in raylib)
- **BREAKING CHANGE**: `setGamepadVibration` takes a fourth argument, `duration` (upstream change in raylib)
- Loosened the version bound on `base`

## Version 5.5.1.0
_11 October 2024_

Expand Down
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
}:
mkDerivation {
pname = "h-raylib";
version = "5.5.1.0";
version = "5.5.2.0";
src = ./.;
isLibrary = true;
isExecutable = buildExamples;
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
forAllSystems' = nixpkgs.lib.genAttrs;
forAllSystems = forAllSystems' supportedSystems;

raylibRev = "f5328a9bb63a0e0eca7dead15cfa01a3ec1417c2";
raylibHash = "sha256-gAv1jfMdbKWnlIqqBddVn+WE0BOIARMmagpK61bxVnU=";
raylibRev = "2a0963ce0936abe0cd3ec32882638d860e435d16";
raylibHash = "sha256-4p3nq04irS8AFojH88Bh1r8KiOjQhZf7nFmQhf1EDU8=";
rayguiRev = "1e03efca48c50c5ea4b4a053d5bf04bad58d3e43";
rayguiHash = "sha256-PzQZxCz63EPd7sVFBYY0T1s9jA5kOAxF9K4ojRoIMz4=";

Expand Down
4 changes: 2 additions & 2 deletions h-raylib.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: h-raylib
version: 5.5.1.0
version: 5.5.2.0
synopsis: Raylib bindings for Haskell
category: graphics
description:
Expand Down Expand Up @@ -239,7 +239,7 @@ library
Raylib.Internal.Web.Processable

build-depends:
, base >=4.0 && <4.20
, base >=4.0 && <4.21
, bytestring >=0.11.0 && <0.13
, containers >=0.6.0 && <0.7.0
, exceptions >=0.10.4 && <0.10.8
Expand Down
63 changes: 39 additions & 24 deletions lib/rl_bindings.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ RLBIND Shader *LoadShaderFromMemory_(char *a, char *b)
return ptr;
}

RLBIND bool IsShaderReady_(Shader *a)
RLBIND bool IsShaderValid_(Shader *a)
{
return IsShaderReady(*a);
return IsShaderValid(*a);
}

RLBIND int GetShaderLocation_(Shader *a, char *b)
Expand Down Expand Up @@ -678,9 +678,9 @@ RLBIND Image *LoadImageFromScreen_()
return ptr;
}

RLBIND bool IsImageReady_(Image *a)
RLBIND bool IsImageValid_(Image *a)
{
return IsImageReady(*a);
return IsImageValid(*a);
}

RLBIND void UnloadImage_(Image *a)
Expand Down Expand Up @@ -993,19 +993,19 @@ RLBIND RenderTexture *LoadRenderTexture_(int a, int b)
return ptr;
}

RLBIND bool IsTextureReady_(Texture *a)
RLBIND bool IsTextureValid_(Texture *a)
{
return IsTextureReady(*a);
return IsTextureValid(*a);
}

RLBIND void UnloadTexture_(Texture *a)
{
UnloadTexture(*a);
}

RLBIND bool IsRenderTextureReady_(RenderTexture *a)
RLBIND bool IsRenderTextureValid_(RenderTexture *a)
{
return IsRenderTextureReady(*a);
return IsRenderTextureValid(*a);
}

RLBIND void UnloadRenderTexture_(RenderTexture *a)
Expand Down Expand Up @@ -1227,9 +1227,9 @@ RLBIND Image *GenImageFontAtlas_(GlyphInfo *a, Rectangle **b, int c, int d, int
return ptr;
}

RLBIND bool IsFontReady_(Font *a)
RLBIND bool IsFontValid_(Font *a)
{
return IsFontReady(*a);
return IsFontValid(*a);
}

RLBIND void UnloadFont_(Font *a)
Expand Down Expand Up @@ -1407,9 +1407,9 @@ RLBIND Model *LoadModelFromMesh_(Mesh *a)
return ptr;
}

RLBIND bool IsModelReady_(Model *a)
RLBIND bool IsModelValid_(Model *a)
{
return IsModelReady(*a);
return IsModelValid(*a);
}

RLBIND void UnloadModel_(Model *a)
Expand Down Expand Up @@ -1595,9 +1595,9 @@ RLBIND Material *LoadMaterialDefault_()
return ptr;
}

RLBIND bool IsMaterialReady_(Material *a)
RLBIND bool IsMaterialValid_(Material *a)
{
return IsMaterialReady(*a);
return IsMaterialValid(*a);
}

RLBIND void UnloadMaterial_(Material *a)
Expand Down Expand Up @@ -1720,19 +1720,19 @@ RLBIND void UpdateSound_(Sound *a, const void *b, int c)
UpdateSound(*a, b, c);
}

RLBIND bool IsWaveReady_(Wave *a)
RLBIND bool IsWaveValid_(Wave *a)
{
return IsWaveReady(*a);
return IsWaveValid(*a);
}

RLBIND void UnloadWave_(Wave *a)
{
UnloadWave(*a);
}

RLBIND bool IsSoundReady_(Sound *a)
RLBIND bool IsSoundValid_(Sound *a)
{
return IsSoundReady(*a);
return IsSoundValid(*a);
}

RLBIND void UnloadSound_(Sound *a)
Expand Down Expand Up @@ -1821,9 +1821,9 @@ RLBIND Music *LoadMusicStreamFromMemory_(char *a, unsigned char *b, int c)
return ptr;
}

RLBIND bool IsMusicReady_(Music *a)
RLBIND bool IsMusicValid_(Music *a)
{
return IsMusicReady(*a);
return IsMusicValid(*a);
}

RLBIND void UnloadMusicStream_(Music *a)
Expand Down Expand Up @@ -1898,9 +1898,9 @@ RLBIND AudioStream *LoadAudioStream_(unsigned int a, unsigned int b, unsigned in
return ptr;
}

RLBIND bool IsAudioStreamReady_(AudioStream *a)
RLBIND bool IsAudioStreamValid_(AudioStream *a)
{
return IsAudioStreamReady(*a);
return IsAudioStreamValid(*a);
}

RLBIND void UnloadAudioStream_(AudioStream *a)
Expand Down Expand Up @@ -2554,6 +2554,21 @@ RLBIND unsigned char *DecodeDataBase64_(const unsigned char *a, int *b)
return DecodeDataBase64(a, b);
}

RLBIND unsigned int ComputeCRC32_(unsigned char *a, int b)
{
return ComputeCRC32(a, b);
}

RLBIND unsigned int *ComputeMD5_(unsigned char *a, int b)
{
return ComputeMD5(a, b);
}

RLBIND unsigned int *ComputeSHA1_(unsigned char *a, int b)
{
return ComputeSHA1(a, b);
}

RLBIND void SetAutomationEventList_(AutomationEventList *a)
{
SetAutomationEventList(a);
Expand Down Expand Up @@ -2664,9 +2679,9 @@ RLBIND int SetGamepadMappings_(const char *a)
return SetGamepadMappings(a);
}

RLBIND void SetGamepadVibration_(int a, float b, float c)
RLBIND void SetGamepadVibration_(int a, float b, float c, float d)
{
SetGamepadVibration(a, b, c);
SetGamepadVibration(a, b, c, d);
}

RLBIND bool IsMouseButtonPressed_(int a)
Expand Down
30 changes: 18 additions & 12 deletions lib/rl_bindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Shader *LoadShader_(char *a, char *b);

Shader *LoadShaderFromMemory_(char *a, char *b);

bool IsShaderReady_(Shader *a);
bool IsShaderValid_(Shader *a);

int GetShaderLocation_(Shader *a, char *b);

Expand Down Expand Up @@ -250,7 +250,7 @@ Image *LoadImageFromTexture_(Texture *a);

Image *LoadImageFromScreen_();

bool IsImageReady_(Image *a);
bool IsImageValid_(Image *a);

void UnloadImage_(Image *a);

Expand Down Expand Up @@ -360,11 +360,11 @@ Texture *LoadTextureCubemap_(Image *a, int b);

RenderTexture *LoadRenderTexture_(int a, int b);

bool IsTextureReady_(Texture *a);
bool IsTextureValid_(Texture *a);

void UnloadTexture_(Texture *a);

bool IsRenderTextureReady_(RenderTexture *a);
bool IsRenderTextureValid_(RenderTexture *a);

void UnloadRenderTexture_(RenderTexture *a);

Expand Down Expand Up @@ -426,7 +426,7 @@ Font *LoadFontFromMemory_(char *a, unsigned char *b, int c, int d, int *e, int f

Image *GenImageFontAtlas_(GlyphInfo *a, Rectangle **b, int c, int d, int e, int f);

bool IsFontReady_(Font *a);
bool IsFontValid_(Font *a);

void UnloadFont_(Font *a);

Expand Down Expand Up @@ -498,7 +498,7 @@ Model *LoadModel_(char *a);

Model *LoadModelFromMesh_(Mesh *a);

bool IsModelReady_(Model *a);
bool IsModelValid_(Model *a);

void UnloadModel_(Model *a);

Expand Down Expand Up @@ -562,7 +562,7 @@ Mesh *GenMeshCubicmap_(Image *a, Vector3 *b);

Material *LoadMaterialDefault_();

bool IsMaterialReady_(Material *a);
bool IsMaterialValid_(Material *a);

void UnloadMaterial_(Material *a);

Expand Down Expand Up @@ -604,11 +604,11 @@ Sound *LoadSoundAlias_(Sound *a);

void UpdateSound_(Sound *a, const void *b, int c);

bool IsWaveReady_(Wave *a);
bool IsWaveValid_(Wave *a);

void UnloadWave_(Wave *a);

bool IsSoundReady_(Sound *a);
bool IsSoundValid_(Sound *a);

void UnloadSound_(Sound *a);

Expand Down Expand Up @@ -642,7 +642,7 @@ Music *LoadMusicStream_(char *a);

Music *LoadMusicStreamFromMemory_(char *a, unsigned char *b, int c);

bool IsMusicReady_(Music *a);
bool IsMusicValid_(Music *a);

void UnloadMusicStream_(Music *a);

Expand Down Expand Up @@ -672,7 +672,7 @@ float GetMusicTimePlayed_(Music *a);

AudioStream *LoadAudioStream_(unsigned int a, unsigned int b, unsigned int c);

bool IsAudioStreamReady_(AudioStream *a);
bool IsAudioStreamValid_(AudioStream *a);

void UnloadAudioStream_(AudioStream *a);

Expand Down Expand Up @@ -930,6 +930,12 @@ char *EncodeDataBase64_(const unsigned char *a, int b, int *c);

unsigned char *DecodeDataBase64_(const unsigned char *a, int *b);

unsigned int ComputeCRC32_(unsigned char *a, int b);

unsigned int *ComputeMD5_(unsigned char *a, int b);

unsigned int *ComputeSHA1_(unsigned char *a, int b);

void SetAutomationEventList_(AutomationEventList *a);

void SetAutomationEventBaseFrame_(int a);
Expand Down Expand Up @@ -974,7 +980,7 @@ float GetGamepadAxisMovement_(int a, int b);

int SetGamepadMappings_(const char *a);

void SetGamepadVibration_(int a, float b, float c);
void SetGamepadVibration_(int a, float b, float c, float d);

bool IsMouseButtonPressed_(int a);

Expand Down
Loading

0 comments on commit 8c54f82

Please sign in to comment.