This commit is contained in:
Ray
2026-07-26 16:58:14 +02:00
14 changed files with 51 additions and 50 deletions

View File

@@ -212,12 +212,12 @@ static void UpdateModelAnimationBones(Model *model, ModelAnimation *anim0, int f
if (frame1 < 0) frame1 = 0;
// Get bone count (use minimum of all to be safe)
int boneCount = model->skeleton.boneCount;
unsigned int boneCount = model->skeleton.boneCount;
if (anim0->boneCount < boneCount) boneCount = anim0->boneCount;
if (anim1->boneCount < boneCount) boneCount = anim1->boneCount;
// Blend each bone
for (int boneIndex = 0; boneIndex < boneCount; boneIndex++)
for (unsigned int boneIndex = 0; boneIndex < boneCount; boneIndex++)
{
// Determine blend factor for this bone
float boneBlendFactor = blend;

View File

@@ -252,7 +252,7 @@ int main(void)
GuiSetStyle(LABEL, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);
GuiSetStyle(DEFAULT, TEXT_SIZE, GuiGetFont().baseSize*2);
GuiLabel((Rectangle){ 0, GetScreenHeight() - 100.0f, GetScreenWidth(), 40 }, "PRESS SPACE to START BLENDING");
GuiLabel((Rectangle){ 0, GetScreenHeight() - 100.0f, (float)GetScreenWidth(), 40 }, "PRESS SPACE to START BLENDING");
GuiSetStyle(DEFAULT, TEXT_SIZE, GuiGetFont().baseSize);
GuiSetStyle(LABEL, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT);

View File

@@ -103,7 +103,7 @@ int main(void)
if (collision.hit && (collision.distance < closestDistance))
{
closestDistance = collision.distance;
closestVoxelPosition = (Vector3){ x, y, z };
closestVoxelPosition = (Vector3){ (float)x, (float)y, (float)z };
voxelFound = true;
}
}

View File

@@ -64,7 +64,7 @@ int main(void)
int boneSocketIndex[BONE_SOCKETS] = { -1, -1, -1 };
// Search bones for sockets
for (int i = 0; i < characterModel.skeleton.boneCount; i++)
for (unsigned int i = 0; i < characterModel.skeleton.boneCount; i++)
{
if (TextIsEqual(characterModel.skeleton.bones[i].name, "socket_hat"))
{

View File

@@ -119,7 +119,7 @@ static void DrawModelSkeleton(ModelSkeleton skeleton, ModelAnimPose pose, float
{
// Loop to (boneCount - 1) because the last one is a special "no bone" bone,
// needed to workaround buggy models without a -1, a cube is always drawn at the origin
for (int i = 0; i < skeleton.boneCount - 1; i++)
for (unsigned int i = 0; i < skeleton.boneCount - 1; i++)
{
// Display the frame-pose skeleton
DrawCube(pose[i].translation, scale*0.05f, scale*0.05f, scale*0.05f, color);