mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Add being able to override the one-way recolor
Disabling the one-way recolor if assets are mounted is needed to make existing levels not look bad, but what about levels that want to use the recolor anyway? The best solution here is to just introduce another bool into the XML, and make the re-color opt-in and only present if assets are mounted if that tag is present.
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 && !FILESYSTEM_assetsmounted)
|
||||
if (t >= 14 && t <= 17 && (!FILESYSTEM_assetsmounted || ed.onewaycol_override))
|
||||
{
|
||||
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 && !FILESYSTEM_assetsmounted)
|
||||
if (t >= 14 && t <= 17 && (!FILESYSTEM_assetsmounted || ed.onewaycol_override))
|
||||
{
|
||||
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 && !FILESYSTEM_assetsmounted)
|
||||
if (t >= 14 && t <= 17 && (!FILESYSTEM_assetsmounted || ed.onewaycol_override))
|
||||
{
|
||||
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 && !FILESYSTEM_assetsmounted)
|
||||
if (t >= 14 && t <= 17 && (!FILESYSTEM_assetsmounted || ed.onewaycol_override))
|
||||
{
|
||||
colourTransform thect = {ed.getonewaycol()};
|
||||
BlitSurfaceTinted(tiles2[t], NULL, foregroundBuffer, &rect, thect);
|
||||
|
||||
Reference in New Issue
Block a user