changed whitespace to be the incorrect way

This commit is contained in:
Reonu 2024-04-22 21:06:31 +01:00
parent 7325bfcece
commit 8a1e9aa6d1

View file

@ -61,17 +61,17 @@ ultramodern::gfx_callbacks_t::gfx_data_t create_gfx() {
#if defined(__linux__) #if defined(__linux__)
SDL_Surface *LoadImage(char* filename) SDL_Surface *LoadImage(char* filename)
{ {
// Read data // Read data
int width, height, bytesPerPixel; int width, height, bytesPerPixel;
void* data = stbi_load(filename, &width, &height, &bytesPerPixel, 0); void* data = stbi_load(filename, &width, &height, &bytesPerPixel, 0);
// Calculate pitch // Calculate pitch
int pitch; int pitch;
pitch = width * bytesPerPixel; pitch = width * bytesPerPixel;
pitch = (pitch + 3) & ~3; pitch = (pitch + 3) & ~3;
// Setup relevance bitmask // Setup relevance bitmask
int Rmask, Gmask, Bmask, Amask; int Rmask, Gmask, Bmask, Amask;
#if SDL_BYTEORDER == SDL_LIL_ENDIAN #if SDL_BYTEORDER == SDL_LIL_ENDIAN
Rmask = 0x000000FF; Rmask = 0x000000FF;
@ -86,14 +86,14 @@ SDL_Surface *LoadImage(char* filename)
Amask = 0x000000FF >> s; Amask = 0x000000FF >> s;
#endif #endif
SDL_Surface* surface = SDL_CreateRGBSurfaceFrom(data, width, height, bytesPerPixel*8, pitch, Rmask, Gmask, SDL_Surface* surface = SDL_CreateRGBSurfaceFrom(data, width, height, bytesPerPixel*8, pitch, Rmask, Gmask,
Bmask, Amask); Bmask, Amask);
if (!surface) if (!surface)
{ {
// NOTE: Should free stbi_load 'data' variable here // NOTE: Should free stbi_load 'data' variable here
return NULL; return NULL;
} }
return surface; return surface;
} }
#endif #endif