From bcfe5026472e504b0e6f68dc4af8586541f406bd Mon Sep 17 00:00:00 2001 From: Duncan Frost Date: Tue, 16 Sep 2014 22:09:47 +0100 Subject: [PATCH] Fixes half drawn doors in scenery window --- src/window_scenery.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/window_scenery.c b/src/window_scenery.c index 886fd5b083..3ed8744b9e 100644 --- a/src/window_scenery.c +++ b/src/window_scenery.c @@ -1088,6 +1088,12 @@ void window_scenery_scrollpaint() if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_SECONDARY_COLOUR) { imageId |= (window_scenery_secondary_colour << 24) | 0x80000000; } + gfx_draw_sprite(clipdpi, imageId, 0x2F, (sceneryEntry->wall.height * 2) + 0x32, + tertiaryColour); + + imageId = (sceneryEntry->image + 0x40000006) | (window_scenery_primary_colour << 19); + gfx_draw_sprite(clipdpi, imageId, 0x2F, (sceneryEntry->wall.height * 2) + 0x32, + tertiaryColour); } else { imageId |= (window_scenery_primary_colour << 19) | 0x20000000; @@ -1100,11 +1106,17 @@ void window_scenery_scrollpaint() tertiaryColour = window_scenery_tertiary_colour; } + } + gfx_draw_sprite(clipdpi, imageId, 0x2F, (sceneryEntry->wall.height * 2) + 0x32, + tertiaryColour); + + if (sceneryEntry->wall.flags & WALL_SCENERY_FLAG5){ + gfx_draw_sprite(clipdpi, imageId + 1, 0x2F, (sceneryEntry->wall.height * 2) + 0x32, + tertiaryColour); } } - gfx_draw_sprite(clipdpi, imageId, 0x2F, (sceneryEntry->wall.height * 2) + 0x32, - tertiaryColour); + rct2_free(clipdpi); } }