From 6b3c1148bfbcd354dc7e6c825fb1e452c6e0fbfd Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 9 Jun 2024 13:16:18 +0200 Subject: [PATCH 1/4] REVIEWED: Animation name being NULL #4037 --- src/rmodels.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/rmodels.c b/src/rmodels.c index 57059a017..14cfc64aa 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -5772,8 +5772,11 @@ static ModelAnimation *LoadModelAnimationsGLTF(const char *fileName, int *animCo animDuration = (t > animDuration)? t : animDuration; } - strncpy(animations[i].name, animData.name, sizeof(animations[i].name)); - animations[i].name[sizeof(animations[i].name) - 1] = '\0'; + if (animData.name != NULL) + { + strncpy(animations[i].name, animData.name, sizeof(animations[i].name)); + animations[i].name[sizeof(animations[i].name) - 1] = '\0'; + } animations[i].frameCount = (int)(animDuration*1000.0f/GLTF_ANIMDELAY) + 1; animations[i].framePoses = RL_MALLOC(animations[i].frameCount*sizeof(Transform *)); @@ -5823,7 +5826,7 @@ static ModelAnimation *LoadModelAnimationsGLTF(const char *fileName, int *animCo BuildPoseFromParentJoints(animations[i].bones, animations[i].boneCount, animations[i].framePoses[j]); } - TRACELOG(LOG_INFO, "MODEL: [%s] Loaded animation: %s (%d frames, %fs)", fileName, animData.name, animations[i].frameCount, animDuration); + TRACELOG(LOG_INFO, "MODEL: [%s] Loaded animation: %s (%d frames, %fs)", fileName, (animData.name != NULL)? animData.name : "NULL", animations[i].frameCount, animDuration); RL_FREE(boneChannels); } } From 8cbde7f84c345b9c8ae9d226ed9ba315f14658b4 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 9 Jun 2024 13:16:29 +0200 Subject: [PATCH 2/4] tweaks --- src/rcore.c | 2 +- src/rtext.c | 19 +++++-------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/rcore.c b/src/rcore.c index 3aa5a7a65..a4fc4d675 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -2251,7 +2251,7 @@ bool IsFileNameValid(const char *fileName) if ((fileName != NULL) && (fileName[0] != '\0')) { - int length = strlen(fileName); + int length = (int)strlen(fileName); bool allPeriods = true; for (int i = 0; i < length; i++) diff --git a/src/rtext.c b/src/rtext.c index 118a559d6..6ad0f90a0 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -1807,10 +1807,7 @@ const char *TextToSnake(const char *text) } buffer[i] = text[j] + 32; } - else - { - buffer[i] = text[j]; - } + else buffer[i] = text[j]; } } @@ -1827,23 +1824,17 @@ const char *TextToCamel(const char *text) if (text != NULL) { // Lower case first character - if ((text[0] >= 'A') && (text[0] <= 'Z')) - buffer[0] = text[0] + 32; - else - buffer[0] = text[0]; + if ((text[0] >= 'A') && (text[0] <= 'Z')) buffer[0] = text[0] + 32; + else buffer[0] = text[0]; // Check for next separator to upper case another character for (int i = 1, j = 1; (i < MAX_TEXT_BUFFER_LENGTH - 1) && (text[j] != '\0'); i++, j++) { - if (text[j] != '_') - buffer[i] = text[j]; + if (text[j] != '_') buffer[i] = text[j]; else { j++; - if ((text[j] >= 'a') && (text[j] <= 'z')) - { - buffer[i] = text[j] - 32; - } + if ((text[j] >= 'a') && (text[j] <= 'z')) buffer[i] = text[j] - 32; } } } From a0a81fddee9365657015b300ed1b892db74acff5 Mon Sep 17 00:00:00 2001 From: carverdamien Date: Sun, 9 Jun 2024 13:29:09 +0200 Subject: [PATCH 3/4] Make addRaylib use options.opengl_version (#4049) --- src/build.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/build.zig b/src/build.zig index 51a8ab7b0..35622a462 100644 --- a/src/build.zig +++ b/src/build.zig @@ -22,6 +22,7 @@ pub fn addRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std. .platform_drm = options.platform_drm, .shared = options.shared, .linux_display_backend = options.linux_display_backend, + .opengl_version = options.opengl_version, }); const raylib = raylib_dep.artifact("raylib"); From 29ac31f40980d48087db36072693e62743c96ce1 Mon Sep 17 00:00:00 2001 From: MrScautHD <65916181+MrScautHD@users.noreply.github.com> Date: Sun, 9 Jun 2024 18:03:05 +0200 Subject: [PATCH 4/4] Removed Raylib.NET (#4050) --- BINDINGS.md | 1 - 1 file changed, 1 deletion(-) diff --git a/BINDINGS.md b/BINDINGS.md index 9ec8c3c3c..d24bf67c7 100644 --- a/BINDINGS.md +++ b/BINDINGS.md @@ -13,7 +13,6 @@ Some people ported raylib to other languages in the form of bindings or wrappers | [Raylib-CsLo](https://github.com/NotNotTech/Raylib-CsLo) | 4.2 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MPL-2.0 | | [Raylib-CSharp-Vinculum](https://github.com/ZeroElectric/Raylib-CSharp-Vinculum) | **5.0** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MPL-2.0 | | [Raylib-CSharp](https://github.com/MrScautHD/Raylib-CSharp) | **5.1-dev** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MIT | -| [Raylib.NET](https://github.com/Odex64/Raylib.NET) | **5.0** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MIT | | [cl-raylib](https://github.com/longlene/cl-raylib) | 4.0 | [Common Lisp](https://common-lisp.net) | MIT | | [claylib/wrap](https://github.com/defun-games/claylib) | 4.5 | [Common Lisp](https://common-lisp.net) | Zlib | | [claw-raylib](https://github.com/bohonghuang/claw-raylib) | **auto** | [Common Lisp](https://common-lisp.net) | Apache-2.0 |