From be8eea9edadea82395b0ebec1c8afddbed129641 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 8 Oct 2023 18:10:05 +0200 Subject: [PATCH] Format tweaks --- parser/raylib_parser.c | 4 ++-- src/config.h | 4 +--- src/raylib.h | 2 +- src/rlgl.h | 2 +- src/rmodels.c | 8 ++++---- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/parser/raylib_parser.c b/parser/raylib_parser.c index e1ff3791..678b64d6 100644 --- a/parser/raylib_parser.c +++ b/parser/raylib_parser.c @@ -447,11 +447,11 @@ int main(int argc, char* argv[]) { if (isFloat) { - defines[defineIndex].type = linePtr[j-1] == 'f' ? FLOAT : DOUBLE; + defines[defineIndex].type = (linePtr[j-1] == 'f')? FLOAT : DOUBLE; } else { - defines[defineIndex].type = linePtr[j-1] == 'L' ? LONG : INT; + defines[defineIndex].type = (linePtr[j-1] == 'L')? LONG : INT; defines[defineIndex].isHex = isHex; } } diff --git a/src/config.h b/src/config.h index 37083761..7886aeeb 100644 --- a/src/config.h +++ b/src/config.h @@ -55,9 +55,7 @@ // Use busy wait loop for timing sync, if not defined, a high-resolution timer is set up and used //#define SUPPORT_BUSY_WAIT_LOOP 1 // Use a partial-busy wait loop, in this case frame sleeps for most of the time, but then runs a busy loop at the end for accuracy -#define SUPPORT_PARTIALBUSY_WAIT_LOOP -// Wait for events passively (sleeping while no events) instead of polling them actively every frame -//#define SUPPORT_EVENTS_WAITING 1 +#define SUPPORT_PARTIALBUSY_WAIT_LOOP 1 // Allow automatic screen capture of current screen pressing F12, defined in KeyCallback() #define SUPPORT_SCREEN_CAPTURE 1 // Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback() diff --git a/src/raylib.h b/src/raylib.h index f52f3460..5fa66bd0 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -938,8 +938,8 @@ extern "C" { // Prevents name mangling of functions // Window-related functions RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context -RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed RLAPI void CloseWindow(void); // Close window and unload OpenGL context +RLAPI bool WindowShouldClose(void); // Check if application should close (KEY_ESCAPE pressed or windows close icon clicked) RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully RLAPI bool IsWindowFullscreen(void); // Check if window is currently fullscreen RLAPI bool IsWindowHidden(void); // Check if window is currently hidden (only PLATFORM_DESKTOP) diff --git a/src/rlgl.h b/src/rlgl.h index 7a0d7f86..40e7b478 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -4248,7 +4248,7 @@ void rlBindImageTexture(unsigned int id, unsigned int index, int format, bool re unsigned int glInternalFormat = 0, glFormat = 0, glType = 0; rlGetGlTextureFormats(format, &glInternalFormat, &glFormat, &glType); - glBindImageTexture(index, id, 0, 0, 0, readonly ? GL_READ_ONLY : GL_READ_WRITE, glInternalFormat); + glBindImageTexture(index, id, 0, 0, 0, readonly? GL_READ_ONLY : GL_READ_WRITE, glInternalFormat); #endif } diff --git a/src/rmodels.c b/src/rmodels.c index 27fe4d85..490eac55 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -1202,7 +1202,7 @@ void UploadMesh(Mesh *mesh, bool dynamic) // NOTE: Vertex attributes must be uploaded considering default locations points and available vertex data // Enable vertex attributes: position (shader-location = 0) - void *vertices = mesh->animVertices != NULL ? mesh->animVertices : mesh->vertices; + void *vertices = (mesh->animVertices != NULL)? mesh->animVertices : mesh->vertices; mesh->vboId[0] = rlLoadVertexBuffer(vertices, mesh->vertexCount*3*sizeof(float), dynamic); rlSetVertexAttribute(0, 3, RL_FLOAT, 0, 0, 0); rlEnableVertexAttribute(0); @@ -1218,7 +1218,7 @@ void UploadMesh(Mesh *mesh, bool dynamic) if (mesh->normals != NULL) { // Enable vertex attributes: normals (shader-location = 2) - void *normals = mesh->animNormals != NULL ? mesh->animNormals : mesh->normals; + void *normals = (mesh->animNormals != NULL)? mesh->animNormals : mesh->normals; mesh->vboId[2] = rlLoadVertexBuffer(normals, mesh->vertexCount*3*sizeof(float), dynamic); rlSetVertexAttribute(2, 3, RL_FLOAT, 0, 0, 0); rlEnableVertexAttribute(2); @@ -5585,7 +5585,7 @@ static Model LoadM3D(const char *fileName) if (!m3d || M3D_ERR_ISFATAL(m3d->errcode)) { - TRACELOG(LOG_WARNING, "MODEL: [%s] Failed to load M3D data, error code %d", fileName, m3d ? m3d->errcode : -2); + TRACELOG(LOG_WARNING, "MODEL: [%s] Failed to load M3D data, error code %d", fileName, m3d? m3d->errcode : -2); if (m3d) m3d_free(m3d); UnloadFileData(fileData); return model; @@ -5910,7 +5910,7 @@ static ModelAnimation *LoadModelAnimationsM3D(const char *fileName, int *animCou if (!m3d || M3D_ERR_ISFATAL(m3d->errcode)) { - TRACELOG(LOG_WARNING, "MODEL: [%s] Failed to load M3D data, error code %d", fileName, m3d ? m3d->errcode : -2); + TRACELOG(LOG_WARNING, "MODEL: [%s] Failed to load M3D data, error code %d", fileName, m3d? m3d->errcode : -2); UnloadFileData(fileData); return NULL; }