This commit is contained in:
Ray 2026-07-06 19:14:22 +02:00
commit d631a5a466
8 changed files with 18 additions and 18 deletions

View file

@ -409,7 +409,7 @@ typedef struct BoneInfo {
// Skeleton, animation bones hierarchy // Skeleton, animation bones hierarchy
typedef struct ModelSkeleton { typedef struct ModelSkeleton {
int boneCount; // Number of bones unsigned int boneCount; // Number of bones
BoneInfo *bones; // Bones information (skeleton) BoneInfo *bones; // Bones information (skeleton)
ModelAnimPose bindPose; // Bones base transformation (Transform[]) ModelAnimPose bindPose; // Bones base transformation (Transform[])
} ModelSkeleton; } ModelSkeleton;
@ -436,7 +436,7 @@ typedef struct Model {
typedef struct ModelAnimation { typedef struct ModelAnimation {
char name[32]; // Animation name char name[32]; // Animation name
int boneCount; // Number of bones (per pose) unsigned int boneCount; // Number of bones (per pose)
int keyframeCount; // Number of animation key frames int keyframeCount; // Number of animation key frames
ModelAnimPose *keyframePoses; // Animation sequence keyframe poses [keyframe][pose] ModelAnimPose *keyframePoses; // Animation sequence keyframe poses [keyframe][pose]
} ModelAnimation; } ModelAnimation;

View file

@ -3378,10 +3378,10 @@ unsigned int *ComputeSHA1(const unsigned char *data, int dataSize)
unsigned int w[80] = { 0 }; unsigned int w[80] = { 0 };
for (int i = 0; i < 16; i++) for (int i = 0; i < 16; i++)
{ {
w[i] = (msg[offset + (i*4) + 0] << 24) | w[i] = ((unsigned int)msg[offset + (i*4) + 0] << 24) |
(msg[offset + (i*4) + 1] << 16) | ((unsigned int)msg[offset + (i*4) + 1] << 16) |
(msg[offset + (i*4) + 2] << 8) | ((unsigned int)msg[offset + (i*4) + 2] << 8) |
(msg[offset + (i*4) + 3]); ((unsigned int)msg[offset + (i*4) + 3]);
} }
// Message schedule: extend the sixteen 32-bit words into eighty 32-bit words: // Message schedule: extend the sixteen 32-bit words into eighty 32-bit words:

View file

@ -5369,9 +5369,9 @@ static Image LoadImageFromCgltfImage(cgltf_image *cgltfImage, const char *texPat
} }
// Load bone info from GLTF skin data // Load bone info from GLTF skin data
static BoneInfo *LoadBoneInfoGLTF(cgltf_skin skin, int *boneCount) static BoneInfo *LoadBoneInfoGLTF(cgltf_skin skin, unsigned int *boneCount)
{ {
*boneCount = (int)skin.joints_count; *boneCount = skin.joints_count;
BoneInfo *bones = (BoneInfo *)RL_CALLOC(skin.joints_count, sizeof(BoneInfo)); BoneInfo *bones = (BoneInfo *)RL_CALLOC(skin.joints_count, sizeof(BoneInfo));
for (unsigned int i = 0; i < skin.joints_count; i++) for (unsigned int i = 0; i < skin.joints_count; i++)

View file

@ -968,7 +968,7 @@
"description": "Skeleton, animation bones hierarchy", "description": "Skeleton, animation bones hierarchy",
"fields": [ "fields": [
{ {
"type": "int", "type": "unsigned int",
"name": "boneCount", "name": "boneCount",
"description": "Number of bones" "description": "Number of bones"
}, },
@ -1045,7 +1045,7 @@
"description": "Animation name" "description": "Animation name"
}, },
{ {
"type": "int", "type": "unsigned int",
"name": "boneCount", "name": "boneCount",
"description": "Number of bones (per pose)" "description": "Number of bones (per pose)"
}, },

View file

@ -968,7 +968,7 @@ return {
description = "Skeleton, animation bones hierarchy", description = "Skeleton, animation bones hierarchy",
fields = { fields = {
{ {
type = "int", type = "unsigned int",
name = "boneCount", name = "boneCount",
description = "Number of bones" description = "Number of bones"
}, },
@ -1045,7 +1045,7 @@ return {
description = "Animation name" description = "Animation name"
}, },
{ {
type = "int", type = "unsigned int",
name = "boneCount", name = "boneCount",
description = "Number of bones (per pose)" description = "Number of bones (per pose)"
}, },

View file

@ -611,7 +611,7 @@
((name "ModelSkeleton") ((name "ModelSkeleton")
(description "Skeleton, animation bones hierarchy") (description "Skeleton, animation bones hierarchy")
(fields (fields
((type "int") ((type "unsigned int")
(name "boneCount") (name "boneCount")
(description "Number of bones")) (description "Number of bones"))
((type "BoneInfo *") ((type "BoneInfo *")
@ -658,7 +658,7 @@
((type "char[32]") ((type "char[32]")
(name "name") (name "name")
(description "Animation name")) (description "Animation name"))
((type "int") ((type "unsigned int")
(name "boneCount") (name "boneCount")
(description "Number of bones (per pose)")) (description "Number of bones (per pose)"))
((type "int") ((type "int")

View file

@ -448,7 +448,7 @@ Struct 20: BoneInfo (2 fields)
Struct 21: ModelSkeleton (3 fields) Struct 21: ModelSkeleton (3 fields)
Name: ModelSkeleton Name: ModelSkeleton
Description: Skeleton, animation bones hierarchy Description: Skeleton, animation bones hierarchy
Field[1]: int boneCount // Number of bones Field[1]: unsigned int boneCount // Number of bones
Field[2]: BoneInfo * bones // Bones information (skeleton) Field[2]: BoneInfo * bones // Bones information (skeleton)
Field[3]: ModelAnimPose bindPose // Bones base transformation (Transform[]) Field[3]: ModelAnimPose bindPose // Bones base transformation (Transform[])
Struct 22: Model (9 fields) Struct 22: Model (9 fields)
@ -467,7 +467,7 @@ Struct 23: ModelAnimation (4 fields)
Name: ModelAnimation Name: ModelAnimation
Description: ModelAnimation, contains a full animation sequence Description: ModelAnimation, contains a full animation sequence
Field[1]: char[32] name // Animation name Field[1]: char[32] name // Animation name
Field[2]: int boneCount // Number of bones (per pose) Field[2]: unsigned int boneCount // Number of bones (per pose)
Field[3]: int keyframeCount // Number of animation key frames Field[3]: int keyframeCount // Number of animation key frames
Field[4]: ModelAnimPose * keyframePoses // Animation sequence keyframe poses [keyframe][pose] Field[4]: ModelAnimPose * keyframePoses // Animation sequence keyframe poses [keyframe][pose]
Struct 24: Ray (2 fields) Struct 24: Ray (2 fields)

View file

@ -201,7 +201,7 @@
<Field type="int" name="parent" desc="Bone parent" /> <Field type="int" name="parent" desc="Bone parent" />
</Struct> </Struct>
<Struct name="ModelSkeleton" fieldCount="3" desc="Skeleton, animation bones hierarchy"> <Struct name="ModelSkeleton" fieldCount="3" desc="Skeleton, animation bones hierarchy">
<Field type="int" name="boneCount" desc="Number of bones" /> <Field type="unsigned int" name="boneCount" desc="Number of bones" />
<Field type="BoneInfo *" name="bones" desc="Bones information (skeleton)" /> <Field type="BoneInfo *" name="bones" desc="Bones information (skeleton)" />
<Field type="ModelAnimPose" name="bindPose" desc="Bones base transformation (Transform[])" /> <Field type="ModelAnimPose" name="bindPose" desc="Bones base transformation (Transform[])" />
</Struct> </Struct>
@ -218,7 +218,7 @@
</Struct> </Struct>
<Struct name="ModelAnimation" fieldCount="4" desc="ModelAnimation, contains a full animation sequence"> <Struct name="ModelAnimation" fieldCount="4" desc="ModelAnimation, contains a full animation sequence">
<Field type="char[32]" name="name" desc="Animation name" /> <Field type="char[32]" name="name" desc="Animation name" />
<Field type="int" name="boneCount" desc="Number of bones (per pose)" /> <Field type="unsigned int" name="boneCount" desc="Number of bones (per pose)" />
<Field type="int" name="keyframeCount" desc="Number of animation key frames" /> <Field type="int" name="keyframeCount" desc="Number of animation key frames" />
<Field type="ModelAnimPose *" name="keyframePoses" desc="Animation sequence keyframe poses [keyframe][pose]" /> <Field type="ModelAnimPose *" name="keyframePoses" desc="Animation sequence keyframe poses [keyframe][pose]" />
</Struct> </Struct>