From 44d4ff4d03c74f04ea2e32a22b325ae3f43bd31b Mon Sep 17 00:00:00 2001 From: Duncan Frost Date: Thu, 4 Jun 2015 17:47:39 +0100 Subject: [PATCH] Fix cross hatching graphical glitch. Forgot to Xor the value before clearing it. Fixes #1177 --- src/drawing/rect.c | 8 ++++---- src/windows/cheats.c | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/drawing/rect.c b/src/drawing/rect.c index e5a4b1e483..a410d2309d 100644 --- a/src/drawing/rect.c +++ b/src/drawing/rect.c @@ -51,9 +51,9 @@ void gfx_fill_rect(rct_drawpixelinfo *dpi, int left, int top, int right, int bot uint16 cross_pattern = 0; int start_x = left - dpi->x; - if (start_x < 0){ - start_x = 0; + if (start_x < 0){ cross_pattern ^= start_x; + start_x = 0; } int end_x = right - dpi->x; @@ -64,9 +64,9 @@ void gfx_fill_rect(rct_drawpixelinfo *dpi, int left, int top, int right, int bot int width = end_x - start_x; int start_y = top - dpi->y; - if (start_y < 0){ - start_y = 0; + if (start_y < 0){ cross_pattern ^= start_y; + start_y = 0; } int end_y = bottom - dpi->y; end_y++; diff --git a/src/windows/cheats.c b/src/windows/cheats.c index 957c9b13f4..0632daa1ce 100644 --- a/src/windows/cheats.c +++ b/src/windows/cheats.c @@ -771,7 +771,6 @@ static void window_cheats_paint() gfx_draw_string(dpi, (char*)language_get_string(STR_CHEAT_TIP_LARGE_TRAM_GUESTS), 0, w->x + XPL(0) + TXTO, w->y + YPL(2) + TXTO); gfx_draw_string(dpi, (char*)language_get_string(STR_CHEAT_TIP_NAUSEA), 0, w->x + XPL(0) + TXTO, w->y + YPL(4) + TXTO); } - } static void window_cheats_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w)