mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 18:04:09 +03:00
Re-color one-way tiles to match their tileset
One-ways have always had this problem where they're always yellow. That means unless you specifically use yellow, it'll never match the tileset. The best way to fix this without requiring new graphics or changing existing ones is to simply re-tint the one-way with the given color of the room. That way, the black part of the tile is still black, but the yellow is now some other color.
This commit is contained in:
@@ -636,8 +636,20 @@ void Graphics::drawtile( int x, int y, int t )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_Rect rect = { Sint16(x), Sint16(y), tiles_rect.w, tiles_rect.h };
|
||||
BlitSurfaceStandard(tiles[t], NULL, backBuffer, &rect);
|
||||
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
if (t >= 14 && t <= 17)
|
||||
{
|
||||
colourTransform thect = {ed.getonewaycol()};
|
||||
BlitSurfaceTinted(tiles[t], NULL, backBuffer, &rect, thect);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
BlitSurfaceStandard(tiles[t], NULL, backBuffer, &rect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -647,8 +659,20 @@ void Graphics::drawtile2( int x, int y, int t )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_Rect rect = { Sint16(x), Sint16(y), tiles_rect.w, tiles_rect.h };
|
||||
BlitSurfaceStandard(tiles2[t], NULL, backBuffer, &rect);
|
||||
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
if (t >= 14 && t <= 17)
|
||||
{
|
||||
colourTransform thect = {ed.getonewaycol()};
|
||||
BlitSurfaceTinted(tiles2[t], NULL, backBuffer, &rect, thect);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
BlitSurfaceStandard(tiles2[t], NULL, backBuffer, &rect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3088,14 +3112,36 @@ void Graphics::drawforetile(int x, int y, int t)
|
||||
{
|
||||
SDL_Rect rect;
|
||||
setRect(rect, x,y,tiles_rect.w, tiles_rect.h);
|
||||
BlitSurfaceStandard(tiles[t],NULL, foregroundBuffer, &rect );
|
||||
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
if (t >= 14 && t <= 17)
|
||||
{
|
||||
colourTransform thect = {ed.getonewaycol()};
|
||||
BlitSurfaceTinted(tiles[t], NULL, foregroundBuffer, &rect, thect);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
BlitSurfaceStandard(tiles[t],NULL, foregroundBuffer, &rect );
|
||||
}
|
||||
}
|
||||
|
||||
void Graphics::drawforetile2(int x, int y, int t)
|
||||
{
|
||||
SDL_Rect rect;
|
||||
setRect(rect, x,y,tiles_rect.w, tiles_rect.h);
|
||||
BlitSurfaceStandard(tiles2[t],NULL, foregroundBuffer, &rect );
|
||||
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
if (t >= 14 && t <= 17)
|
||||
{
|
||||
colourTransform thect = {ed.getonewaycol()};
|
||||
BlitSurfaceTinted(tiles2[t], NULL, foregroundBuffer, &rect, thect);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
BlitSurfaceStandard(tiles2[t],NULL, foregroundBuffer, &rect );
|
||||
}
|
||||
}
|
||||
|
||||
void Graphics::drawforetile3(int x, int y, int t, int off)
|
||||
|
||||
Reference in New Issue
Block a user