odd Windows lighting in lit rooms (issue #929)
bkglyph variable gets initialized to GLYPH_UNEXPLORED so ends up being returned by get_bk_glyph() if something more interesting wasn't chosen in the switch statement. The Windows win32 interface will then use the tile mapped to GLYPH_UNEXPLORED as a background. The tile is 16x16 all black pixels. That looked very odd. Treat GLYPH_UNEXPLORED as an out-of-range value. Closes #929
This commit is contained in:
+3
-1
@@ -861,7 +861,9 @@ paintTile(PNHMapWindow data, int i, int j, RECT * rect)
|
|||||||
DeleteObject(blackBrush);
|
DeleteObject(blackBrush);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bkglyph != NO_GLYPH) {
|
if (bkglyph != NO_GLYPH
|
||||||
|
/* Don't use all black GLYPH_UNEXPLORED tile as a background */
|
||||||
|
&& bkglyph != GLYPH_UNEXPLORED) {
|
||||||
ntile = data->bkmap[i][j].gm.tileidx;
|
ntile = data->bkmap[i][j].gm.tileidx;
|
||||||
t_x = TILEBMP_X(ntile);
|
t_x = TILEBMP_X(ntile);
|
||||||
t_y = TILEBMP_Y(ntile);
|
t_y = TILEBMP_Y(ntile);
|
||||||
|
|||||||
Reference in New Issue
Block a user