mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
Remove trailing spaces
This commit is contained in:
@ -83,14 +83,14 @@
|
||||
// Works as long as the current file consistently references any X11 Font as X11Font
|
||||
// Since it is never referenced (as of writing), this does not pose an issue
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(_GLFW_WAYLAND)
|
||||
#define GLFW_EXPOSE_NATIVE_WAYLAND
|
||||
#endif
|
||||
|
||||
|
||||
#include "GLFW/glfw3native.h" // Include native header only once, regardless of how many backends are defined
|
||||
// Required for: glfwGetX11Window() and glfwGetWaylandWindow()
|
||||
|
||||
|
||||
#if defined(_GLFW_X11) // Clean up X11-specific hacks
|
||||
#undef Font // Revert hack and allow normal raylib Font usage
|
||||
#endif
|
||||
|
||||
@ -1495,8 +1495,8 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
|
||||
// WARNING: GLFW could return GLFW_REPEAT, we need to consider it as 1
|
||||
// to work properly with our implementation (IsKeyDown/IsKeyUp checks)
|
||||
if (action == GLFW_RELEASE) CORE.Input.Keyboard.currentKeyState[key] = 0;
|
||||
else if(action == GLFW_PRESS) CORE.Input.Keyboard.currentKeyState[key] = 1;
|
||||
else if(action == GLFW_REPEAT) CORE.Input.Keyboard.keyRepeatInFrame[key] = 1;
|
||||
else if (action == GLFW_PRESS) CORE.Input.Keyboard.currentKeyState[key] = 1;
|
||||
else if (action == GLFW_REPEAT) CORE.Input.Keyboard.keyRepeatInFrame[key] = 1;
|
||||
|
||||
// Check if there is space available in the key queue
|
||||
if ((CORE.Input.Keyboard.keyPressedQueueCount < MAX_KEY_PRESSED_QUEUE) && (action == GLFW_PRESS))
|
||||
|
||||
@ -2565,14 +2565,14 @@ unsigned char *DecompressData(const unsigned char *compData, int compDataSize, i
|
||||
unsigned char *data0 = (unsigned char *)RL_CALLOC(MAX_DECOMPRESSION_SIZE*1024*1024, 1);
|
||||
int size = sinflate(data0, MAX_DECOMPRESSION_SIZE*1024*1024, compData, compDataSize);
|
||||
|
||||
// WARNING: RL_REALLOC can make (and leave) data copies in memory,
|
||||
// WARNING: RL_REALLOC can make (and leave) data copies in memory,
|
||||
// that can be a security concern in case of compression of sensitive data
|
||||
// So, we use a second buffer to copy data manually, wiping original buffer memory
|
||||
data = (unsigned char *)RL_CALLOC(size, 1);
|
||||
memcpy(data, data0, size);
|
||||
memset(data0, 0, MAX_DECOMPRESSION_SIZE*1024*1024); // Wipe memory, is memset() safe?
|
||||
RL_FREE(data0);
|
||||
|
||||
|
||||
TRACELOG(LOG_INFO, "SYSTEM: Decompress data: Comp. size: %i -> Original size: %i", compDataSize, size);
|
||||
|
||||
*dataSize = size;
|
||||
@ -2689,7 +2689,7 @@ unsigned char *DecodeDataBase64(const char *text, int *outputSize)
|
||||
TRACELOG(LOG_WARNING, "BASE64: Decoding error: Output data size is too small");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
decodedData[outputCount + 0] = (octetPack >> 16) & 0xff;
|
||||
decodedData[outputCount + 1] = (octetPack >> 8) & 0xff;
|
||||
decodedData[outputCount + 2] = octetPack & 0xff;
|
||||
@ -3018,7 +3018,7 @@ AutomationEventList LoadAutomationEventList(const char *fileName)
|
||||
|
||||
char *result = fgets(buffer, 256, raeFile);
|
||||
if (result != buffer) TRACELOG(LOG_WARNING, "AUTOMATION: [%s] Issue reading line to buffer", fileName);
|
||||
|
||||
|
||||
while (!feof(raeFile))
|
||||
{
|
||||
switch (buffer[0])
|
||||
|
||||
@ -1432,7 +1432,7 @@ void DrawMesh(Mesh mesh, Material material, Matrix transform)
|
||||
else rlEnableStatePointer(GL_VERTEX_ARRAY, mesh.vertices);
|
||||
|
||||
rlEnableStatePointer(GL_TEXTURE_COORD_ARRAY, mesh.texcoords);
|
||||
|
||||
|
||||
if (mesh.animNormals) rlEnableStatePointer(GL_NORMAL_ARRAY, mesh.animNormals);
|
||||
else rlEnableStatePointer(GL_NORMAL_ARRAY, mesh.normals);
|
||||
|
||||
@ -5536,7 +5536,7 @@ static Model LoadGLTF(const char *fileName)
|
||||
cgltf_accessor *attribute = mesh->primitives[p].attributes[j].data;
|
||||
|
||||
// WARNING: SPECS: POSITION accessor MUST have its min and max properties defined
|
||||
|
||||
|
||||
if (model.meshes[meshIndex].vertices != NULL) TRACELOG(LOG_WARNING, "MODEL: [%s] Vertices attribute data already loaded", fileName);
|
||||
else
|
||||
{
|
||||
@ -5882,7 +5882,7 @@ static Model LoadGLTF(const char *fileName)
|
||||
};
|
||||
MatrixDecompose(worldMatrix, &(model.bindPose[i].translation), &(model.bindPose[i].rotation), &(model.bindPose[i].scale));
|
||||
}
|
||||
|
||||
|
||||
if (data->skins_count > 1) TRACELOG(LOG_WARNING, "MODEL: [%s] can only load one skin (armature) per model, but gltf skins_count == %i", fileName, data->skins_count);
|
||||
}
|
||||
|
||||
@ -6578,7 +6578,7 @@ static Model LoadM3D(const char *fileName)
|
||||
if (k + 1 >= model.meshCount)
|
||||
{
|
||||
model.meshCount++;
|
||||
|
||||
|
||||
// Create a second buffer for mesh re-allocation
|
||||
Mesh *tempMeshes = (Mesh *)RL_CALLOC(model.meshCount, sizeof(Mesh));
|
||||
memcpy(tempMeshes, model.meshes, (model.meshCount - 1)*sizeof(Mesh));
|
||||
|
||||
@ -760,7 +760,7 @@ GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSiz
|
||||
// NOTE: For optimum results, bitmap font should be generated at base pixel size
|
||||
for (int p = 0; p < cpWidth*cpHeight; p++)
|
||||
{
|
||||
if (((unsigned char *)glyphs[k].image.data)[p] < FONT_BITMAP_ALPHA_THRESHOLD)
|
||||
if (((unsigned char *)glyphs[k].image.data)[p] < FONT_BITMAP_ALPHA_THRESHOLD)
|
||||
((unsigned char *)glyphs[k].image.data)[p] = 0;
|
||||
else ((unsigned char *)glyphs[k].image.data)[p] = 255;
|
||||
}
|
||||
@ -774,7 +774,7 @@ GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSiz
|
||||
// WARNING: Glyph not found on font, optionally use a fallback glyph
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (glyphCounter < codepointCount) TRACELOG(LOG_WARNING, "FONT: Requested codepoints glyphs found: [%i/%i]", k, codepointCount);
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "FONT: Failed to process TTF font data");
|
||||
|
||||
@ -702,7 +702,7 @@ bool ExportImage(Image image, const char *fileName)
|
||||
result = SaveFileData(fileName, image.data, GetPixelDataSize(image.width, image.height, image.format));
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "IMAGE: Export image format requested not supported");
|
||||
|
||||
|
||||
if (allocatedData) RL_FREE(imgData);
|
||||
#endif // SUPPORT_IMAGE_EXPORT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user