mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 18:04:09 +03:00
Only re-color one-ways if assets are not mounted
Some levels (like Unshackled) have decided to manually re-color the one-way tiles on their own, and us overriding their re-color is not something they would want. This does mean custom levels with custom assets don't get to take advantage of the re-color, but it's the exact same behavior as before, so it shouldn't really matter that much. I would've liked to specifically detect if a custom tiles.png or tiles2.png was in play, rather than simply disabling it if any asset was mounted, but it seems that detecting if a specific file was mounted from a specific zip isn't really PHYSFS's strong suit.
This commit is contained in:
@@ -640,7 +640,7 @@ void Graphics::drawtile( int x, int y, int t )
|
||||
SDL_Rect rect = { Sint16(x), Sint16(y), tiles_rect.w, tiles_rect.h };
|
||||
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
if (t >= 14 && t <= 17)
|
||||
if (t >= 14 && t <= 17 && !FILESYSTEM_assetsmounted)
|
||||
{
|
||||
colourTransform thect = {ed.getonewaycol()};
|
||||
BlitSurfaceTinted(tiles[t], NULL, backBuffer, &rect, thect);
|
||||
@@ -663,7 +663,7 @@ void Graphics::drawtile2( int x, int y, int t )
|
||||
SDL_Rect rect = { Sint16(x), Sint16(y), tiles_rect.w, tiles_rect.h };
|
||||
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
if (t >= 14 && t <= 17)
|
||||
if (t >= 14 && t <= 17 && !FILESYSTEM_assetsmounted)
|
||||
{
|
||||
colourTransform thect = {ed.getonewaycol()};
|
||||
BlitSurfaceTinted(tiles2[t], NULL, backBuffer, &rect, thect);
|
||||
@@ -3119,7 +3119,7 @@ void Graphics::drawforetile(int x, int y, int t)
|
||||
setRect(rect, x,y,tiles_rect.w, tiles_rect.h);
|
||||
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
if (t >= 14 && t <= 17)
|
||||
if (t >= 14 && t <= 17 && !FILESYSTEM_assetsmounted)
|
||||
{
|
||||
colourTransform thect = {ed.getonewaycol()};
|
||||
BlitSurfaceTinted(tiles[t], NULL, foregroundBuffer, &rect, thect);
|
||||
@@ -3142,7 +3142,7 @@ void Graphics::drawforetile2(int x, int y, int t)
|
||||
setRect(rect, x,y,tiles_rect.w, tiles_rect.h);
|
||||
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
if (t >= 14 && t <= 17)
|
||||
if (t >= 14 && t <= 17 && !FILESYSTEM_assetsmounted)
|
||||
{
|
||||
colourTransform thect = {ed.getonewaycol()};
|
||||
BlitSurfaceTinted(tiles2[t], NULL, foregroundBuffer, &rect, thect);
|
||||
|
||||
Reference in New Issue
Block a user