summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2020-03-25 19:41:51 +0100
committerraysan5 <[email protected]>2020-03-25 19:41:51 +0100
commit7ae7a87f8ae10ed9c68f308a62d7d7b0dc31a55a (patch)
tree06f37bbdc5e36b7246222541a6cda655fdf9dbb3 /src
parent3d41c1b6cd5e42e2334798fe6af9394a93c89713 (diff)
downloadraylib-7ae7a87f8ae10ed9c68f308a62d7d7b0dc31a55a.tar.gz
raylib-7ae7a87f8ae10ed9c68f308a62d7d7b0dc31a55a.zip
Remove trail spaces
Diffstat (limited to 'src')
-rw-r--r--src/core.c20
-rw-r--r--src/raudio.c6
-rw-r--r--src/rlgl.h4
-rw-r--r--src/text.c6
-rw-r--r--src/textures.c18
-rw-r--r--src/utils.c2
6 files changed, 28 insertions, 28 deletions
diff --git a/src/core.c b/src/core.c
index b732ad32..f318f234 100644
--- a/src/core.c
+++ b/src/core.c
@@ -148,7 +148,7 @@
#if defined(SUPPORT_GIF_RECORDING)
#define RGIF_MALLOC RL_MALLOC
#define RGIF_FREE RL_FREE
-
+
#define RGIF_IMPLEMENTATION
#include "external/rgif.h" // Support GIF recording
#endif
@@ -168,7 +168,7 @@
#if (defined(PLATFORM_DESKTOP) || defined(PLATFORM_UWP)) && defined(_WIN32) && (defined(_MSC_VER) || defined(__TINYC__))
#define DIRENT_MALLOC RL_MALLOC
#define DIRENT_FREE RL_FREE
-
+
#include "external/dirent.h" // Required for: DIR, opendir(), closedir() [Used in GetDirectoryFiles()]
#else
#include <dirent.h> // Required for: DIR, opendir(), closedir() [Used in GetDirectoryFiles()]
@@ -2537,7 +2537,7 @@ bool IsMouseButtonReleased(int button)
bool released = false;
if ((CORE.Input.Mouse.currentButtonState[button] == 0) && (CORE.Input.Mouse.previousButtonState[button] == 1)) released = true;
-
+
// Map touches to mouse buttons checking
if ((CORE.Input.Touch.currentTouchState[button] == 0) && (CORE.Input.Touch.previousTouchState[button] == 1)) released = true;
@@ -3971,7 +3971,7 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
}
#endif // SUPPORT_SCREEN_CAPTURE
}
- else
+ else
{
// WARNING: GLFW could return GLFW_REPEAT, we need to consider it as 1
// to work properly with our implementation (IsKeyDown/IsKeyUp checks)
@@ -3983,10 +3983,10 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
// GLFW3 Mouse Button Callback, runs on mouse button pressed
static void MouseButtonCallback(GLFWwindow *window, int button, int action, int mods)
{
- // WARNING: GLFW could only return GLFW_PRESS (1) or GLFW_RELEASE (0) for now,
+ // WARNING: GLFW could only return GLFW_PRESS (1) or GLFW_RELEASE (0) for now,
// but future releases may add more actions (i.e. GLFW_REPEAT)
CORE.Input.Mouse.currentButtonState[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 };
@@ -3994,7 +3994,7 @@ static void MouseButtonCallback(GLFWwindow *window, int button, int action, int
// Register touch actions
if ((CORE.Input.Mouse.currentButtonState[button] == 1) && (CORE.Input.Mouse.previousButtonState[button] == 0)) gestureEvent.touchAction = TOUCH_DOWN;
else if ((CORE.Input.Mouse.currentButtonState[button] == 0) && (CORE.Input.Mouse.previousButtonState[button] == 1)) gestureEvent.touchAction = TOUCH_UP;
-
+
// NOTE: TOUCH_MOVE event is registered in MouseCursorPosCallback()
// Assign a pointer ID
@@ -4021,7 +4021,7 @@ static void MouseCursorPosCallback(GLFWwindow *window, double x, double y)
CORE.Input.Mouse.position.x = (float)x;
CORE.Input.Mouse.position.y = (float)y;
CORE.Input.Touch.position[0] = CORE.Input.Mouse.position;
-
+
#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
// Process mouse events as touches to be able to use mouse-gestures
GestureEvent gestureEvent = { 0 };
@@ -4413,7 +4413,7 @@ static EM_BOOL EmscriptenMouseCallback(int eventType, const EmscriptenMouseEvent
// Register touch input events
static EM_BOOL EmscriptenTouchCallback(int eventType, const EmscriptenTouchEvent *touchEvent, void *userData)
{
- for (int i = 0; i < touchEvent->numTouches; i++)
+ for (int i = 0; i < touchEvent->numTouches; i++)
{
if (eventType == EMSCRIPTEN_EVENT_TOUCHSTART) CORE.Input.Touch.currentTouchState[i] = 1;
else if (eventType == EMSCRIPTEN_EVENT_TOUCHEND) CORE.Input.Touch.currentTouchState[i] = 0;
@@ -4561,7 +4561,7 @@ static void ProcessKeyboard(void)
// Reset pressed keys array (it will be filled below)
for (int i = 0; i < 512; i++) CORE.Input.Keyboard.currentKeyState[i] = 0;
-
+
// Check keys from event input workers (This is the new keyboard reading method)
//for (int i = 0; i < 512; i++) CORE.Input.Keyboard.currentKeyState[i] = CORE.Input.Keyboard.currentKeyStateEvdev[i];
diff --git a/src/raudio.c b/src/raudio.c
index 2d2e1f3c..2d1c29a9 100644
--- a/src/raudio.c
+++ b/src/raudio.c
@@ -184,7 +184,7 @@ typedef struct tagBITMAPINFOHEADER {
#if defined(SUPPORT_FILEFORMAT_XM)
#define JARXM_MALLOC RL_MALLOC
#define JARXM_FREE RL_FREE
-
+
#define JAR_XM_IMPLEMENTATION
#include "external/jar_xm.h" // XM loading functions
#endif
@@ -192,7 +192,7 @@ typedef struct tagBITMAPINFOHEADER {
#if defined(SUPPORT_FILEFORMAT_MOD)
#define JARMOD_MALLOC RL_MALLOC
#define JARMOD_FREE RL_FREE
-
+
#define JAR_MOD_IMPLEMENTATION
#include "external/jar_mod.h" // MOD loading functions
#endif
@@ -211,7 +211,7 @@ typedef struct tagBITMAPINFOHEADER {
#define DRMP3_MALLOC RL_MALLOC
#define DRMP3_REALLOC RL_REALLOC
#define DRMP3_FREE RL_FREE
-
+
#define DR_MP3_IMPLEMENTATION
#include "external/dr_mp3.h" // MP3 loading functions
#endif
diff --git a/src/rlgl.h b/src/rlgl.h
index 6df8b0b7..cbadb034 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -652,7 +652,7 @@ RLAPI int GetPixelDataSize(int width, int height, int format);// Get pixel data
#else
#define GLAD_REALLOC RL_REALLOC
#define GLAD_FREE RL_FREE
-
+
#define GLAD_IMPLEMENTATION
#if defined(RLGL_STANDALONE)
#include "glad.h" // GLAD extensions loading library, includes OpenGL headers
@@ -4631,7 +4631,7 @@ char *LoadFileText(const char *fileName)
// Zero-terminate the string
text[count] = '\0';
-
+
TRACELOG(LOG_INFO, "[%s] Text file loaded successfully", fileName);
}
else TRACELOG(LOG_WARNING, "[%s] Text file could not be read", fileName);
diff --git a/src/text.c b/src/text.c
index bce0e6f9..1563952f 100644
--- a/src/text.c
+++ b/src/text.c
@@ -506,7 +506,7 @@ CharInfo *LoadFontData(const char *fileName, int fontSize, int *fontChars, int c
{
int genFontChars = false;
stbtt_fontinfo fontInfo = { 0 };
-
+
if (stbtt_InitFont(&fontInfo, fileData, 0)) // Init font for data reading
{
// Calculate font scale factor
@@ -1352,8 +1352,8 @@ const char *TextToUpper(const char *text)
{
buffer[i] = (char)toupper(text[i]);
//if ((text[i] >= 'a') && (text[i] <= 'z')) buffer[i] = text[i] - 32;
-
- // TODO: Support Utf8 diacritics!
+
+ // TODO: Support Utf8 diacritics!
//if ((text[i] >= 'à') && (text[i] <= 'ý')) buffer[i] = text[i] - 32;
}
else { buffer[i] = '\0'; break; }
diff --git a/src/textures.c b/src/textures.c
index 1a6b72ec..dc9491e3 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -127,7 +127,7 @@
#define STBIW_MALLOC RL_MALLOC
#define STBIW_FREE RL_FREE
#define STBIW_REALLOC RL_REALLOC
-
+
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "external/stb_image_write.h" // Required for: stbi_write_*()
#endif
@@ -135,7 +135,7 @@
#if defined(SUPPORT_IMAGE_MANIPULATION)
#define STBIR_MALLOC(size,c) ((void)(c), RL_MALLOC(size))
#define STBIR_FREE(ptr,c) ((void)(c), RL_FREE(ptr))
-
+
#define STB_IMAGE_RESIZE_IMPLEMENTATION
#include "external/stb_image_resize.h" // Required for: stbir_resize_uint8() [ImageResize()]
#endif
@@ -1966,17 +1966,17 @@ Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Co
textOffsetX = 0.0f;
}
else
- {
+ {
if ((codepoint != ' ') && (codepoint != '\t'))
{
Rectangle rec = { textOffsetX + font.chars[index].offsetX, textOffsetY + font.chars[index].offsetY, font.recs[index].width, font.recs[index].height };
ImageDraw(&imText, font.chars[index].image, (Rectangle){ 0, 0, font.chars[index].image.width, font.chars[index].image.height }, rec, tint);
}
-
+
if (font.chars[index].advanceX == 0) textOffsetX += (int)(font.recs[index].width + spacing);
else textOffsetX += font.chars[index].advanceX + (int)spacing;
}
-
+
i += (codepointByteCount - 1); // Move text bytes counter to next codepoint
}
@@ -2021,7 +2021,7 @@ void ImageClearBackground(Image *dst, Color color)
}
// Draw pixel within an image
-void ImageDrawPixel(Image *dst, Vector2 position, Color color)
+void ImageDrawPixel(Image *dst, Vector2 position, Color color)
{
ImageDrawRectangle(dst, (Rectangle){ position.x, position.y, 1.0f, 1.0f }, color);
}
@@ -2043,7 +2043,7 @@ void ImageDrawCircle(Image *dst, Vector2 center, int radius, Color color)
ImageDrawPixel(dst, (Vector2){ xc + y, yc - x }, color);
ImageDrawPixel(dst, (Vector2){ xc - y, yc - x }, color);
x++;
-
+
if (decesionParameter > 0)
{
y--;
@@ -2061,13 +2061,13 @@ void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, Color color)
int slopeError = m - (x2 - x1);
for (int x = x1, y = y1; x <= x2; x++)
- {
+ {
ImageDrawPixel(dst, (Vector2){ x, y }, color);
slopeError += m;
if (slopeError >= 0)
{
- y++;
+ y++;
slopeError -= 2*(x2 - x1);
}
}
diff --git a/src/utils.c b/src/utils.c
index f26be95d..587627bf 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -256,7 +256,7 @@ char *LoadFileText(const char *fileName)
// Zero-terminate the string
text[count] = '\0';
-
+
TRACELOG(LOG_INFO, "[%s] Text file loaded successfully", fileName);
}
else TRACELOG(LOG_WARNING, "[%s] Text file could not be read", fileName);