mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Whiten texture only after loading surface
This fixes a regression where the red channel 0 glitch didn't work, because the surface was always whitened, because LoadSprites would whiten the image before converting it to surface. This regression happened because of #923. Fixes #962.
This commit is contained in:
parent
78128222e9
commit
8f23261134
1 changed files with 4 additions and 4 deletions
|
@ -237,15 +237,15 @@ static void LoadSprites(const char* filename, SDL_Texture** texture, SDL_Surface
|
|||
unsigned char* data;
|
||||
SDL_Surface* loadedImage = LoadImageRaw(filename, &data);
|
||||
|
||||
*texture = LoadTextureFromRaw(filename, loadedImage, TEX_WHITE);
|
||||
if (*texture == NULL)
|
||||
*surface = LoadSurfaceFromRaw(loadedImage);
|
||||
if (*surface == NULL)
|
||||
{
|
||||
vlog_error("Image not found: %s", filename);
|
||||
SDL_assert(0 && "Image not found! See stderr.");
|
||||
}
|
||||
|
||||
*surface = LoadSurfaceFromRaw(loadedImage);
|
||||
if (*surface == NULL)
|
||||
*texture = LoadTextureFromRaw(filename, loadedImage, TEX_WHITE);
|
||||
if (*texture == NULL)
|
||||
{
|
||||
vlog_error("Image not found: %s", filename);
|
||||
SDL_assert(0 && "Image not found! See stderr.");
|
||||
|
|
Loading…
Reference in a new issue