mirror of
https://github.com/raysan5/raylib.git
synced 2026-07-31 04:38:54 +00:00
Merge branch 'master' of https://github.com/raysan5/raylib
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"))
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user