mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-11-04 18:29:41 +01:00
Add special case to color gray Warp Zone entities gray
The only reason why gray Warp Zone entities were green originally was because there is a giant concatenated list of tileset+tilecol combinations, and by using tileset 3 tilecol 6 you're using the entry of tileset 4 tilecol 0, which is the green Ship tileset. So without interfering with the green Ship tileset's entry, I've decided that the best thing to do is to just add special cases. The enemy color was easy enough to fix. The platform color was also easy to fix. However, there exist no existing textures for gray conveyors, so at that point I decided to just tint the existing green one gray, and then I did the same for platforms.
This commit is contained in:
parent
584f73f0a4
commit
d4592cd6b3
2 changed files with 32 additions and 1 deletions
|
@ -1163,6 +1163,15 @@ void entityclass::createentity( float xp, float yp, int t, float vx /*= 0*/, flo
|
||||||
//Rule 4 is a horizontal line, 5 is vertical
|
//Rule 4 is a horizontal line, 5 is vertical
|
||||||
//Rule 6 is a crew member
|
//Rule 6 is a crew member
|
||||||
|
|
||||||
|
#if !defined(NO_CUSTOM_LEVELS)
|
||||||
|
// Special case for gray Warp Zone tileset!
|
||||||
|
int room = game.roomx-100 + (game.roomy-100) * ed.maxwidth;
|
||||||
|
bool custom_gray = room >= 0 && room < 400
|
||||||
|
&& ed.level[room].tileset == 3 && ed.level[room].tilecol == 6;
|
||||||
|
#else
|
||||||
|
bool custom_gray = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
entclass entity;
|
entclass entity;
|
||||||
entity.xp = xp;
|
entity.xp = xp;
|
||||||
entity.yp = yp;
|
entity.yp = yp;
|
||||||
|
@ -2004,6 +2013,10 @@ void entityclass::createentity( float xp, float yp, int t, float vx /*= 0*/, flo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(custom_gray){
|
||||||
|
entity.colour = 18;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1566,6 +1566,15 @@ void Graphics::drawentities()
|
||||||
|
|
||||||
SDL_Rect drawRect;
|
SDL_Rect drawRect;
|
||||||
|
|
||||||
|
#if !defined(NO_CUSTOM_LEVELS)
|
||||||
|
// Special case for gray Warp Zone tileset!
|
||||||
|
int room = game.roomx-100 + (game.roomy-100) * ed.maxwidth;
|
||||||
|
bool custom_gray = room >= 0 && room < 400
|
||||||
|
&& ed.level[room].tileset == 3 && ed.level[room].tilecol == 6;
|
||||||
|
#else
|
||||||
|
bool custom_gray = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
std::vector<SDL_Surface*> *tilesvec;
|
std::vector<SDL_Surface*> *tilesvec;
|
||||||
if (map.custommode && !map.finalmode)
|
if (map.custommode && !map.finalmode)
|
||||||
{
|
{
|
||||||
|
@ -1698,8 +1707,17 @@ void Graphics::drawentities()
|
||||||
drawRect.x += tpoint.x;
|
drawRect.x += tpoint.x;
|
||||||
drawRect.y += tpoint.y;
|
drawRect.y += tpoint.y;
|
||||||
drawRect.x += 8 * ii;
|
drawRect.x += 8 * ii;
|
||||||
|
if (custom_gray)
|
||||||
|
{
|
||||||
|
colourTransform temp_ct;
|
||||||
|
temp_ct.colour = 0xFFFFFFFF;
|
||||||
|
BlitSurfaceTinted((*tilesvec)[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, temp_ct);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
BlitSurfaceStandard((*tilesvec)[obj.entities[i].drawframe],NULL, backBuffer, &drawRect);
|
BlitSurfaceStandard((*tilesvec)[obj.entities[i].drawframe],NULL, backBuffer, &drawRect);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3: // Big chunky pixels!
|
case 3: // Big chunky pixels!
|
||||||
|
|
Loading…
Reference in a new issue