summaryrefslogtreecommitdiffhomepage
path: root/src/raylib.h
diff options
context:
space:
mode:
authorRyan Roden-Corrent <[email protected]>2021-09-22 07:04:10 -0400
committerGitHub <[email protected]>2021-09-22 13:04:10 +0200
commit9607ea5c0a28d1a3f5812c6fdc4822ab4b48cde2 (patch)
tree417a1fae8e1f791359f24435dde31efd035eb186 /src/raylib.h
parent8a434b4fd4dc8d59697ed005a7ef85346bd474e9 (diff)
downloadraylib-9607ea5c0a28d1a3f5812c6fdc4822ab4b48cde2.tar.gz
raylib-9607ea5c0a28d1a3f5812c6fdc4822ab4b48cde2.zip
Use unsigned int for animation count. (#2002)
LoadModelAnimations takes an `int` for the animation count parameter. The animation count should never be negative, so it makes sense to specify it as unsigned in the API. This matches the API for UnloadModelAnimations, which expects an unsigned int. Both GLTF and IQMM also store the animation count internally as unsigned, and we were casting to a signed int for no reason. GLTF actually uses `size_t` internally, so we're technically risking overflow, but having 2^32 animations seems unlikely.
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/raylib.h b/src/raylib.h
index b8d320b0..83e84a4f 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -1436,7 +1436,7 @@ RLAPI void SetMaterialTexture(Material *material, int mapType, Texture2D texture
RLAPI void SetModelMeshMaterial(Model *model, int meshId, int materialId); // Set material for a mesh
// Model animations loading/unloading functions
-RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); // Load model animations from file
+RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, unsigned int *animCount); // Load model animations from file
RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose
RLAPI void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
RLAPI void UnloadModelAnimations(ModelAnimation* animations, unsigned int count); // Unload animation array data