Review code formatting
This commit is contained in:
parent
3d1a05d588
commit
8f1d81df0f
4 changed files with 101 additions and 106 deletions
|
@ -4961,8 +4961,7 @@ static void WindowSizeCallback(GLFWwindow *window, int width, int height)
|
|||
CORE.Window.currentFbo.height = height;
|
||||
CORE.Window.resizedLastFrame = true;
|
||||
|
||||
if(IsWindowFullscreen())
|
||||
return;
|
||||
if (IsWindowFullscreen()) return;
|
||||
|
||||
// Set current screen size
|
||||
CORE.Window.screen.width = width;
|
||||
|
|
14
src/models.c
14
src/models.c
|
@ -4025,10 +4025,7 @@ static bool GLTFReadValue(cgltf_accessor* acc, unsigned int index, void* variabl
|
|||
{
|
||||
if (acc->count == 2)
|
||||
{
|
||||
if (index > 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (index > 1) return false;
|
||||
|
||||
memcpy(variable, index == 0 ? acc->min : acc->max, elements*size);
|
||||
return true;
|
||||
|
@ -4037,8 +4034,7 @@ static bool GLTFReadValue(cgltf_accessor* acc, unsigned int index, void* variabl
|
|||
unsigned int stride = size*elements;
|
||||
memset(variable, 0, stride);
|
||||
|
||||
if(acc->buffer_view == NULL || acc->buffer_view->buffer == NULL || acc->buffer_view->buffer->data == NULL)
|
||||
return false;
|
||||
if (acc->buffer_view == NULL || acc->buffer_view->buffer == NULL || acc->buffer_view->buffer->data == NULL) return false;
|
||||
|
||||
void* readPosition = ((char *)acc->buffer_view->buffer->data) + (index*stride) + acc->buffer_view->offset + acc->offset;
|
||||
memcpy(variable, readPosition, stride);
|
||||
|
@ -4631,7 +4627,7 @@ static ModelAnimation *LoadGLTFModelAnimations(const char *fileName, int *animCo
|
|||
ModelAnimation *output = animations + a;
|
||||
|
||||
// 30 frames sampled per second
|
||||
const float TIMESTEP = (1.0f / 30.0f);
|
||||
const float timeStep = (1.0f/30.0f);
|
||||
float animationDuration = 0.0f;
|
||||
|
||||
// Getting the max animation time to consider for animation duration
|
||||
|
@ -4647,7 +4643,7 @@ static ModelAnimation *LoadGLTFModelAnimations(const char *fileName, int *animCo
|
|||
}
|
||||
}
|
||||
|
||||
output->frameCount = (int)(animationDuration / TIMESTEP);
|
||||
output->frameCount = (int)(animationDuration / timeStep);
|
||||
output->boneCount = (int)data->nodes_count;
|
||||
output->bones = RL_MALLOC(output->boneCount*sizeof(BoneInfo));
|
||||
output->framePoses = RL_MALLOC(output->frameCount*sizeof(Transform *));
|
||||
|
@ -4688,7 +4684,7 @@ static ModelAnimation *LoadGLTFModelAnimations(const char *fileName, int *animCo
|
|||
bool shouldSkipFurtherTransformation = true;
|
||||
int outputMin = 0;
|
||||
int outputMax = 0;
|
||||
float frameTime = frame * TIMESTEP;
|
||||
float frameTime = frame*timeStep;
|
||||
float lerpPercent = 0.0f;
|
||||
|
||||
// For this transformation:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue