diff --git a/src/raylib.h b/src/raylib.h index b8d320b0d..83e84a4f9 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 diff --git a/src/rmodels.c b/src/rmodels.c index 8319814b4..13aa11670 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -128,11 +128,11 @@ static Model LoadOBJ(const char *fileName); // Load OBJ mesh data #endif #if defined(SUPPORT_FILEFORMAT_IQM) static Model LoadIQM(const char *fileName); // Load IQM mesh data -static ModelAnimation *LoadIQMModelAnimations(const char *fileName, int *animCount); // Load IQM animation data +static ModelAnimation *LoadIQMModelAnimations(const char *fileName, unsigned int *animCount); // Load IQM animation data #endif #if defined(SUPPORT_FILEFORMAT_GLTF) static Model LoadGLTF(const char *fileName); // Load GLTF mesh data -static ModelAnimation *LoadGLTFModelAnimations(const char *fileName, int *animCount); // Load GLTF animation data +static ModelAnimation *LoadGLTFModelAnimations(const char *fileName, unsigned int *animCount); // Load GLTF animation data static void LoadGLTFMaterial(Model *model, const char *fileName, const cgltf_data *data); static void LoadGLTFMesh(cgltf_data *data, cgltf_mesh *mesh, Model *outModel, Matrix currentTransform, int *primitiveIndex, const char *fileName); static void LoadGLTFNode(cgltf_data *data, cgltf_node *node, Model *outModel, Matrix currentTransform, int *primitiveIndex, const char *fileName); @@ -1607,7 +1607,7 @@ void SetModelMeshMaterial(Model *model, int meshId, int materialId) } // Load model animations from file -ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount) +ModelAnimation *LoadModelAnimations(const char *fileName, unsigned int *animCount) { ModelAnimation *animations = NULL; @@ -4072,7 +4072,7 @@ static Model LoadIQM(const char *fileName) } // Load IQM animation data -static ModelAnimation* LoadIQMModelAnimations(const char *fileName, int *animCount) +static ModelAnimation* LoadIQMModelAnimations(const char *fileName, unsigned int *animCount) { #define IQM_MAGIC "INTERQUAKEMODEL" // IQM file magic number #define IQM_VERSION 2 // only IQM version 2 supported @@ -5067,7 +5067,7 @@ static void BindGLTFPrimitiveToBones(Model *model, const cgltf_data *data, int p } // LoadGLTF loads in animation data from given filename -static ModelAnimation *LoadGLTFModelAnimations(const char *fileName, int *animCount) +static ModelAnimation *LoadGLTFModelAnimations(const char *fileName, unsigned int *animCount) { /*********************************************************************************** @@ -5102,7 +5102,7 @@ static ModelAnimation *LoadGLTFModelAnimations(const char *fileName, int *animCo result = cgltf_load_buffers(&options, data, fileName); if (result != cgltf_result_success) TRACELOG(LOG_WARNING, "MODEL: [%s] unable to load glTF animations data", fileName); animations = RL_MALLOC(data->animations_count*sizeof(ModelAnimation)); - *animCount = (int)data->animations_count; + *animCount = (unsigned int)data->animations_count; for (unsigned int a = 0; a < data->animations_count; a++) {