mirror of https://github.com/raysan5/raylib
Review tabs and trail-spaces
This commit is contained in:
parent
f1c31bee27
commit
93f59a6f59
|
@ -237,7 +237,7 @@ typedef struct tagBITMAPINFOHEADER {
|
||||||
#define QOA_IMPLEMENTATION
|
#define QOA_IMPLEMENTATION
|
||||||
#include "external/qoa.h" // QOA loading and saving functions
|
#include "external/qoa.h" // QOA loading and saving functions
|
||||||
#include "external/qoaplay.c" // QOA stream playing helper functions
|
#include "external/qoaplay.c" // QOA stream playing helper functions
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#pragma warning(pop) // Disable MSVC warning suppression
|
#pragma warning(pop) // Disable MSVC warning suppression
|
||||||
#endif
|
#endif
|
||||||
|
@ -920,7 +920,7 @@ Sound LoadSoundFromWave(Wave wave)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clone sound from existing sound data, clone does not own wave data
|
// 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
|
// NOTE: Wave data must be unallocated manually and will be shared across all clones
|
||||||
Sound LoadSoundAlias(Sound source)
|
Sound LoadSoundAlias(Sound source)
|
||||||
{
|
{
|
||||||
|
|
|
@ -315,11 +315,11 @@ RMAPI float Vector2DistanceSqr(Vector2 v1, Vector2 v2)
|
||||||
RMAPI float Vector2Angle(Vector2 v1, Vector2 v2)
|
RMAPI float Vector2Angle(Vector2 v1, Vector2 v2)
|
||||||
{
|
{
|
||||||
float result = 0.0f;
|
float result = 0.0f;
|
||||||
|
|
||||||
float dot = v1.x*v2.x + v1.y*v2.y;
|
float dot = v1.x*v2.x + v1.y*v2.y;
|
||||||
float det = v1.x*v2.y - v1.y*v2.x;
|
float det = v1.x*v2.y - v1.y*v2.x;
|
||||||
result = -atan2f(det, dot);
|
result = -atan2f(det, dot);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ RMAPI float Vector2Angle(Vector2 v1, Vector2 v2)
|
||||||
RMAPI float Vector2LineAngle(Vector2 start, Vector2 end)
|
RMAPI float Vector2LineAngle(Vector2 start, Vector2 end)
|
||||||
{
|
{
|
||||||
float result = 0.0f;
|
float result = 0.0f;
|
||||||
|
|
||||||
result = atan2f(end.y - start.y, end.x - start.x);
|
result = atan2f(end.y - start.y, end.x - start.x);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -4434,7 +4434,7 @@ static bool InitGraphicsDevice(int width, int height)
|
||||||
#if defined(PLATFORM_WEB)
|
#if defined(PLATFORM_WEB)
|
||||||
emscripten_set_window_title((CORE.Window.title != 0)? CORE.Window.title : " ");
|
emscripten_set_window_title((CORE.Window.title != 0)? CORE.Window.title : " ");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Set window callback events
|
// Set window callback events
|
||||||
glfwSetWindowSizeCallback(CORE.Window.handle, WindowSizeCallback); // NOTE: Resizing not allowed by default!
|
glfwSetWindowSizeCallback(CORE.Window.handle, WindowSizeCallback); // NOTE: Resizing not allowed by default!
|
||||||
#if !defined(PLATFORM_WEB)
|
#if !defined(PLATFORM_WEB)
|
||||||
|
|
|
@ -852,7 +852,7 @@ Image GenImageFontAtlas(const GlyphInfo *chars, Rectangle **charRecs, int glyphC
|
||||||
RL_FREE(nodes);
|
RL_FREE(nodes);
|
||||||
RL_FREE(context);
|
RL_FREE(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SUPPORT_FONT_ATLAS_WHITE_REC)
|
#if defined(SUPPORT_FONT_ATLAS_WHITE_REC)
|
||||||
// Add a 3x3 white rectangle at the bottom-right corner of the generated atlas,
|
// 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
|
// useful to use as the white texture to draw shapes with raylib, using this rectangle
|
||||||
|
@ -865,7 +865,7 @@ Image GenImageFontAtlas(const GlyphInfo *chars, Rectangle **charRecs, int glyphC
|
||||||
k -= atlas.width;
|
k -= atlas.width;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Convert image data from GRAYSCALE to GRAY_ALPHA
|
// 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
|
unsigned char *dataGrayAlpha = (unsigned char *)RL_MALLOC(atlas.width*atlas.height*sizeof(unsigned char)*2); // Two channels
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4267)
|
#pragma warning(disable : 4267)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define QOI_IMPLEMENTATION
|
#define QOI_IMPLEMENTATION
|
||||||
#include "external/qoi.h"
|
#include "external/qoi.h"
|
||||||
|
|
||||||
|
@ -3300,13 +3300,13 @@ void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color)
|
||||||
{
|
{
|
||||||
memcpy(pSrcPixel + x*bytesPerPixel, pSrcPixel, bytesPerPixel);
|
memcpy(pSrcPixel + x*bytesPerPixel, pSrcPixel, bytesPerPixel);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Repeat the first row data for all other rows
|
// Repeat the first row data for all other rows
|
||||||
int bytesPerRow = bytesPerPixel * (int)rec.width;
|
int bytesPerRow = bytesPerPixel * (int)rec.width;
|
||||||
for (int y = 1; y < (int)rec.height; y++)
|
for (int y = 1; y < (int)rec.height; y++)
|
||||||
{
|
{
|
||||||
memcpy(pSrcPixel + (y*dst->width)*bytesPerPixel, pSrcPixel, bytesPerRow);
|
memcpy(pSrcPixel + (y*dst->width)*bytesPerPixel, pSrcPixel, bytesPerRow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw rectangle lines within an image
|
// Draw rectangle lines within an image
|
||||||
|
|
Loading…
Reference in New Issue