Browse Source

Remove trailing spaces

pull/3894/head
Ray 8 months ago
parent
commit
646d70e93a
8 changed files with 23 additions and 23 deletions
  1. +1
    -1
      src/CMakeLists.txt
  2. +1
    -1
      src/platforms/rcore_desktop.c
  3. +4
    -4
      src/raudio.c
  4. +4
    -4
      src/raymath.h
  5. +6
    -6
      src/rcore.c
  6. +3
    -3
      src/rlgl.h
  7. +2
    -2
      src/rmodels.c
  8. +2
    -2
      src/utils.c

+ 1
- 1
src/CMakeLists.txt View File

@ -15,7 +15,7 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
endif()
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

+ 1
- 1
src/platforms/rcore_desktop.c View File

@ -1739,7 +1739,7 @@ static void MouseButtonCallback(GLFWwindow *window, int button, int action, int
// but future releases may add more actions (i.e. GLFW_REPEAT)
CORE.Input.Mouse.currentButtonState[button] = action;
CORE.Input.Touch.currentTouchState[button] = action;
#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
// Process mouse events as touches to be able to use mouse-gestures
GestureEvent gestureEvent = { 0 };

+ 4
- 4
src/raudio.c View File

@ -942,13 +942,13 @@ Sound LoadSoundAlias(Sound source)
if (source.stream.buffer->data != NULL)
{
AudioBuffer *audioBuffer = LoadAudioBuffer(AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, 0, AUDIO_BUFFER_USAGE_STATIC);
if (audioBuffer == NULL)
{
TRACELOG(LOG_WARNING, "SOUND: Failed to create buffer");
return sound; // Early return to avoid dereferencing the audioBuffer null pointer
}
audioBuffer->sizeInFrames = source.stream.buffer->sizeInFrames;
audioBuffer->volume = source.stream.buffer->volume;
audioBuffer->data = source.stream.buffer->data;
@ -1081,7 +1081,7 @@ bool ExportWaveAsCode(Wave wave, const char *fileName)
int waveDataSize = wave.frameCount*wave.channels*wave.sampleSize/8;
// NOTE: Text data buffer size is estimated considering wave data size in bytes
// and requiring 12 char bytes for every byte; the actual size varies, but
// and requiring 12 char bytes for every byte; the actual size varies, but
// the longest possible char being appended is "%.4ff,\n ", which is 12 bytes.
char *txtData = (char *)RL_CALLOC(waveDataSize*12 + 2000, sizeof(char));
@ -2752,7 +2752,7 @@ static bool SaveFileData(const char *fileName, void *data, int dataSize)
return false;
}
}
else
else
{
TRACELOG(LOG_WARNING, "FILEIO: File name provided is not valid");
return false;

+ 4
- 4
src/raymath.h View File

@ -777,7 +777,7 @@ RMAPI Vector3 Vector3Normalize(Vector3 v)
RMAPI Vector3 Vector3Project(Vector3 v1, Vector3 v2)
{
Vector3 result = { 0 };
float v1dv2 = (v1.x*v2.x + v1.y*v2.y + v1.z*v2.z);
float v2dv2 = (v2.x*v2.x + v2.y*v2.y + v2.z*v2.z);
@ -794,7 +794,7 @@ RMAPI Vector3 Vector3Project(Vector3 v1, Vector3 v2)
RMAPI Vector3 Vector3Reject(Vector3 v1, Vector3 v2)
{
Vector3 result = { 0 };
float v1dv2 = (v1.x*v2.x + v1.y*v2.y + v1.z*v2.z);
float v2dv2 = (v2.x*v2.x + v2.y*v2.y + v2.z*v2.z);
@ -1213,7 +1213,7 @@ RMAPI Vector3 Vector3Refract(Vector3 v, Vector3 n, float r)
RMAPI Vector4 Vector4Zero(void)
{
Vector4 result = { 0.0f, 0.0f, 0.0f, 0.0f };
return result;
return result;
}
RMAPI Vector4 Vector4One(void)
@ -1296,7 +1296,7 @@ RMAPI float Vector4Distance(Vector4 v1, Vector4 v2)
// Calculate square distance between two vectors
RMAPI float Vector4DistanceSqr(Vector4 v1, Vector4 v2)
{
float result =
float result =
(v1.x - v2.x)*(v1.x - v2.x) + (v1.y - v2.y)*(v1.y - v2.y) +
(v1.z - v2.z)*(v1.z - v2.z) + (v1.w - v2.w)*(v1.w - v2.w);

+ 6
- 6
src/rcore.c View File

@ -118,12 +118,12 @@
#if defined(SUPPORT_GESTURES_SYSTEM)
#define RGESTURES_IMPLEMENTATION
#include "rgestures.h" // Gestures detection functionality
#include "rgestures.h" // Gestures detection functionality
#endif
#if defined(SUPPORT_CAMERA_SYSTEM)
#define RCAMERA_IMPLEMENTATION
#include "rcamera.h" // Camera system functionality
#include "rcamera.h" // Camera system functionality
#endif
#if defined(SUPPORT_GIF_RECORDING)
@ -1799,7 +1799,7 @@ void TakeScreenshot(const char *fileName)
char path[512] = { 0 };
strcpy(path, TextFormat("%s/%s", CORE.Storage.basePath, GetFileName(fileName)));
ExportImage(image, path); // WARNING: Module required: rtextures
RL_FREE(imgData);
@ -1955,7 +1955,7 @@ const char *GetFileName(const char *filePath)
const char *GetFileNameWithoutExt(const char *filePath)
{
#define MAX_FILENAME_LENGTH 256
static char fileName[MAX_FILENAME_LENGTH] = { 0 };
memset(fileName, 0, MAX_FILENAME_LENGTH);
@ -1963,7 +1963,7 @@ const char *GetFileNameWithoutExt(const char *filePath)
{
strcpy(fileName, GetFileName(filePath)); // Get filename.ext without path
int size = (int)strlen(fileName); // Get size in bytes
for (int i = size; i > 0; i--) // Reverse search '.'
{
if (fileName[i] == '.')
@ -1974,7 +1974,7 @@ const char *GetFileNameWithoutExt(const char *filePath)
}
}
}
return fileName;
}

+ 3
- 3
src/rlgl.h View File

@ -623,7 +623,7 @@ RLAPI void rlDisableFramebuffer(void); // Disable render textur
RLAPI unsigned int rlGetActiveFramebuffer(void); // Get the currently active render texture (fbo), 0 for default framebuffer
RLAPI void rlActiveDrawBuffers(int count); // Activate multiple draw color buffers
RLAPI void rlBlitFramebuffer(int srcX, int srcY, int srcWidth, int srcHeight, int dstX, int dstY, int dstWidth, int dstHeight, int bufferMask); // Blit active framebuffer to main framebuffer
RLAPI void rlBindFramebuffer(unsigned int target, unsigned int framebuffer); // Bind framebuffer (FBO)
RLAPI void rlBindFramebuffer(unsigned int target, unsigned int framebuffer); // Bind framebuffer (FBO)
// General render state
RLAPI void rlEnableColorBlend(void); // Enable color blending
@ -3828,8 +3828,8 @@ void rlSetVertexAttribute(unsigned int index, int compSize, int type, bool norma
{
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
// NOTE: Data type could be: GL_BYTE, GL_UNSIGNED_BYTE, GL_SHORT, GL_UNSIGNED_SHORT, GL_INT, GL_UNSIGNED_INT
// Additional types (depends on OpenGL version or extensions):
// - GL_HALF_FLOAT, GL_FLOAT, GL_DOUBLE, GL_FIXED,
// Additional types (depends on OpenGL version or extensions):
// - GL_HALF_FLOAT, GL_FLOAT, GL_DOUBLE, GL_FIXED,
// - GL_INT_2_10_10_10_REV, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT_10F_11F_11F_REV
glVertexAttribPointer(index, compSize, type, normalized, stride, pointer);
#endif

+ 2
- 2
src/rmodels.c View File

@ -5804,7 +5804,7 @@ static Model LoadM3D(const char *fileName)
// If no map is provided, or we have colors defined, we allocate storage for vertex colors
// M3D specs only consider vertex colors if no material is provided, however raylib uses both and mixes the colors
if ((mi == M3D_UNDEF) || vcolor) model.meshes[k].colors = RL_CALLOC(model.meshes[k].vertexCount*4, sizeof(unsigned char));
// If no map is provided and we allocated vertex colors, set them to white
if ((mi == M3D_UNDEF) && (model.meshes[k].colors != NULL))
{
@ -6076,7 +6076,7 @@ static ModelAnimation *LoadModelAnimationsM3D(const char *fileName, int *animCou
animations[a].framePoses = RL_MALLOC(animations[a].frameCount*sizeof(Transform *));
strncpy(animations[a].name, m3d->action[a].name, sizeof(animations[a].name));
animations[a].name[sizeof(animations[a].name) - 1] = '\0';
TRACELOG(LOG_INFO, "MODEL: [%s] animation #%i: %i msec, %i frames", fileName, a, m3d->action[a].durationmsec, animations[a].frameCount);
for (i = 0; i < (int)m3d->numbone; i++)

+ 2
- 2
src/utils.c View File

@ -211,13 +211,13 @@ unsigned char *LoadFileData(const char *fileName, int *dataSize)
{
// NOTE: fread() returns number of read elements instead of bytes, so we read [1 byte, size elements]
size_t count = fread(data, sizeof(unsigned char), size, file);
// WARNING: fread() returns a size_t value, usually 'unsigned int' (32bit compilation) and 'unsigned long long' (64bit compilation)
// dataSize is unified along raylib as a 'int' type, so, for file-sizes > INT_MAX (2147483647 bytes) we have a limitation
if (count > 2147483647)
{
TRACELOG(LOG_WARNING, "FILEIO: [%s] File is bigger than 2147483647 bytes, avoid using LoadFileData()", fileName);
RL_FREE(data);
data = NULL;
}

Loading…
Cancel
Save