Show ghost elements as white on mini-map

Also fixes refresh of map when using OpenGL drawing engine
This commit is contained in:
Ted John committed 2019-05-08 21:37:33 +01:00
1 parent 80a9cf8670
commit 710da039a4
2 files changed
+10 -3

No files matched your search

+1
View File
@@ -9,6 +9,7 @@
- Feature: [#8963] Add missing Czech letters to sprite font, use sprite font for Czech.
- Feature: [#9154] Change map toolbar icon with current viewport rotation.
- Change: [#7877] Files are now sorted in logical rather than dictionary order.
- Change: [#8427] Ghost elements now show up as white on the mini-map.
- Change: [#8688] Move common actions from debug menu into cheats menu.
- Fix: [#5103] OpenGL: ride track preview not rendered.
- Fix: [#5889] Giant screenshot does not work while using OpenGL renderer.
+9 -3
View File
@@ -877,6 +877,7 @@ static void window_map_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_
g1temp.x_offset = -8;
g1temp.y_offset = -8;
gfx_set_g1_element(SPR_TEMP, &g1temp);
drawing_engine_invalidate_image(SPR_TEMP);
gfx_draw_sprite(dpi, SPR_TEMP, 0, 0, 0);
if (w->selected_tab == PAGE_PEEPS)
@@ -1551,7 +1552,10 @@ static uint16_t map_window_get_pixel_colour_peep(CoordsXY c)
while (!(tileElement++)->IsLastForTile())
{
if (tileElement->IsGhost())
continue;
{
colour = MAP_COLOUR(PALETTE_INDEX_21);
break;
}
int32_t tileElementType = tileElement->GetType() >> 2;
if (tileElementType >= maxSupportedTileElementType)
@@ -1568,7 +1572,6 @@ static uint16_t map_window_get_pixel_colour_peep(CoordsXY c)
static uint16_t map_window_get_pixel_colour_ride(CoordsXY c)
{
Ride* ride;
// ~Mikroscopic: do we need two separate colour variables here?
uint16_t colourA = 0; // highlight colour
uint16_t colourB = MAP_COLOUR(PALETTE_INDEX_13); // surface colour (dark grey)
@@ -1577,7 +1580,10 @@ static uint16_t map_window_get_pixel_colour_ride(CoordsXY c)
do
{
if (tileElement->IsGhost())
continue;
{
colourA = MAP_COLOUR(PALETTE_INDEX_21);
break;
}
switch (tileElement->GetType())
{