瀏覽代碼

Format tweaks

pull/3392/head
Ray 1 年之前
父節點
當前提交
be8eea9eda
共有 5 個檔案被更改,包括 9 行新增11 行删除
  1. +2
    -2
      parser/raylib_parser.c
  2. +1
    -3
      src/config.h
  3. +1
    -1
      src/raylib.h
  4. +1
    -1
      src/rlgl.h
  5. +4
    -4
      src/rmodels.c

+ 2
- 2
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 = p">(linePtr[j-1] == 'f' class="p">)? FLOAT : DOUBLE;
}
else
{
defines[defineIndex].type = linePtr[j-1] == 'L' ? LONG : INT;
defines[defineIndex].type = p">(linePtr[j-1] == 'L' class="p">)? LONG : INT;
defines[defineIndex].isHex = isHex;
}
}

+ 1
- 3
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()

+ 1
- 1
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)

+ 1
- 1
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
}

+ 4
- 4
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 = p">(mesh->animVertices != NULL class="p">)? 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 = p">(mesh->animNormals != NULL class="p">)? 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;
}

Loading…
取消
儲存