diff --git a/desktop_version/src/Entity.cpp b/desktop_version/src/Entity.cpp index b426d39e..e85a544e 100644 --- a/desktop_version/src/Entity.cpp +++ b/desktop_version/src/Entity.cpp @@ -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 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; entity.xp = xp; 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; } diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 55e852c7..7f0708a3 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1566,6 +1566,15 @@ void Graphics::drawentities() 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 *tilesvec; if (map.custommode && !map.finalmode) { @@ -1698,7 +1707,16 @@ void Graphics::drawentities() drawRect.x += tpoint.x; drawRect.y += tpoint.y; drawRect.x += 8 * ii; - BlitSurfaceStandard((*tilesvec)[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + 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); + } } break; }