mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp.git
synced 2026-04-29 13:41:51 +00:00
changed whitespace to be the incorrect way
This commit is contained in:
parent
7325bfcece
commit
8a1e9aa6d1
1 changed files with 12 additions and 12 deletions
|
|
@ -61,17 +61,17 @@ ultramodern::gfx_callbacks_t::gfx_data_t create_gfx() {
|
|||
#if defined(__linux__)
|
||||
SDL_Surface *LoadImage(char* filename)
|
||||
{
|
||||
// Read data
|
||||
int width, height, bytesPerPixel;
|
||||
void* data = stbi_load(filename, &width, &height, &bytesPerPixel, 0);
|
||||
// Read data
|
||||
int width, height, bytesPerPixel;
|
||||
void* data = stbi_load(filename, &width, &height, &bytesPerPixel, 0);
|
||||
|
||||
// Calculate pitch
|
||||
int pitch;
|
||||
// Calculate pitch
|
||||
int pitch;
|
||||
pitch = width * bytesPerPixel;
|
||||
pitch = (pitch + 3) & ~3;
|
||||
|
||||
// Setup relevance bitmask
|
||||
int Rmask, Gmask, Bmask, Amask;
|
||||
int Rmask, Gmask, Bmask, Amask;
|
||||
|
||||
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||
Rmask = 0x000000FF;
|
||||
|
|
@ -86,14 +86,14 @@ SDL_Surface *LoadImage(char* filename)
|
|||
Amask = 0x000000FF >> s;
|
||||
#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);
|
||||
if (!surface)
|
||||
{
|
||||
// NOTE: Should free stbi_load 'data' variable here
|
||||
return NULL;
|
||||
if (!surface)
|
||||
{
|
||||
// NOTE: Should free stbi_load 'data' variable here
|
||||
return NULL;
|
||||
}
|
||||
return surface;
|
||||
return surface;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue