From 95e701cd01649170531bd07c1d9e51fd46f507d3 Mon Sep 17 00:00:00 2001 From: Bart House Date: Sun, 25 Nov 2018 20:31:50 -0800 Subject: [PATCH] Fix map clearing when in tile mode and tile is set to NO_GLYPH. --- win/win32/mhmap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/win/win32/mhmap.c b/win/win32/mhmap.c index 8e61aea8c..49c2a4e4e 100644 --- a/win/win32/mhmap.c +++ b/win/win32/mhmap.c @@ -746,6 +746,12 @@ paintTile(PNHMapWindow data, int i, int j, RECT * rect) glyph = data->map[i][j]; bkglyph = data->bkmap[i][j]; + if (glyph == NO_GLYPH && bkglyph == NO_GLYPH) { + HBRUSH blackBrush = CreateSolidBrush(RGB(0, 0, 0)); + FillRect(data->backBufferDC, rect, blackBrush); + DeleteObject(blackBrush); + } + if (bkglyph != NO_GLYPH) { ntile = glyph2tile[bkglyph]; t_x = TILEBMP_X(ntile);