Skip to content

Commit

Permalink
Review tabs and trail-spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Aug 10, 2023
1 parent f1c31be commit 93f59a6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/raudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ typedef struct tagBITMAPINFOHEADER {
#define QOA_IMPLEMENTATION
#include "external/qoa.h" // QOA loading and saving functions
#include "external/qoaplay.c" // QOA stream playing helper functions

#if defined(_MSC_VER)
#pragma warning(pop) // Disable MSVC warning suppression
#endif
Expand Down Expand Up @@ -920,7 +920,7 @@ Sound LoadSoundFromWave(Wave wave)
}

// Clone sound from existing sound data, clone does not own wave data
// Wave data must
// Wave data must
// NOTE: Wave data must be unallocated manually and will be shared across all clones
Sound LoadSoundAlias(Sound source)
{
Expand Down
6 changes: 3 additions & 3 deletions src/raymath.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,11 @@ RMAPI float Vector2DistanceSqr(Vector2 v1, Vector2 v2)
RMAPI float Vector2Angle(Vector2 v1, Vector2 v2)
{
float result = 0.0f;

float dot = v1.x*v2.x + v1.y*v2.y;
float det = v1.x*v2.y - v1.y*v2.x;
result = -atan2f(det, dot);

return result;
}

Expand All @@ -329,7 +329,7 @@ RMAPI float Vector2Angle(Vector2 v1, Vector2 v2)
RMAPI float Vector2LineAngle(Vector2 start, Vector2 end)
{
float result = 0.0f;

result = atan2f(end.y - start.y, end.x - start.x);

return result;
Expand Down
2 changes: 1 addition & 1 deletion src/rcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -4434,7 +4434,7 @@ static bool InitGraphicsDevice(int width, int height)
#if defined(PLATFORM_WEB)
emscripten_set_window_title((CORE.Window.title != 0)? CORE.Window.title : " ");
#endif

// Set window callback events
glfwSetWindowSizeCallback(CORE.Window.handle, WindowSizeCallback); // NOTE: Resizing not allowed by default!
#if !defined(PLATFORM_WEB)
Expand Down
4 changes: 2 additions & 2 deletions src/rtext.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ Image GenImageFontAtlas(const GlyphInfo *chars, Rectangle **charRecs, int glyphC
RL_FREE(nodes);
RL_FREE(context);
}

#if defined(SUPPORT_FONT_ATLAS_WHITE_REC)
// Add a 3x3 white rectangle at the bottom-right corner of the generated atlas,
// useful to use as the white texture to draw shapes with raylib, using this rectangle
Expand All @@ -865,7 +865,7 @@ Image GenImageFontAtlas(const GlyphInfo *chars, Rectangle **charRecs, int glyphC
k -= atlas.width;
}
#endif

// Convert image data from GRAYSCALE to GRAY_ALPHA
unsigned char *dataGrayAlpha = (unsigned char *)RL_MALLOC(atlas.width*atlas.height*sizeof(unsigned char)*2); // Two channels

Expand Down
16 changes: 8 additions & 8 deletions src/rtextures.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
#pragma warning(push)
#pragma warning(disable : 4267)
#endif

#define QOI_IMPLEMENTATION
#include "external/qoi.h"

Expand Down Expand Up @@ -3300,13 +3300,13 @@ void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color)
{
memcpy(pSrcPixel + x*bytesPerPixel, pSrcPixel, bytesPerPixel);
}
// Repeat the first row data for all other rows
int bytesPerRow = bytesPerPixel * (int)rec.width;
for (int y = 1; y < (int)rec.height; y++)
{
memcpy(pSrcPixel + (y*dst->width)*bytesPerPixel, pSrcPixel, bytesPerRow);
}

// Repeat the first row data for all other rows
int bytesPerRow = bytesPerPixel * (int)rec.width;
for (int y = 1; y < (int)rec.height; y++)
{
memcpy(pSrcPixel + (y*dst->width)*bytesPerPixel, pSrcPixel, bytesPerRow);
}
}

// Draw rectangle lines within an image
Expand Down

0 comments on commit 93f59a6

Please sign in to comment.