From 222b4c002370c738fba5e0552f9131581391742a Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 9 May 2015 10:59:10 -0400 Subject: [PATCH] don't break other ports use of tilemap.c The modifications made for supporting monster-looking tiles may not be supported on platforms other than windows yet. --- win/share/tilemap.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/win/share/tilemap.c b/win/share/tilemap.c index 497f1d378..071b58244 100644 --- a/win/share/tilemap.c +++ b/win/share/tilemap.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 tilemap.c $NHDT-Date: 1430621065 2015/05/03 02:44:25 $ $NHDT-Branch: master $:$NHDT-Revision: 1.19 $ */ +/* NetHack 3.6 tilemap.c $NHDT-Date: 1431183539 2015/05/09 14:58:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.22 $ */ /* SCCS Id: @(#)tilemap.c 3.5 2000/06/04 */ /* NetHack may be freely redistributed. See license for details. */ @@ -21,6 +21,10 @@ extern void FDECL(exit, (int)); #endif #endif +#if defined(WIN32) +#define STATUES_LOOK_LIKE_MONSTERS +#endif + #define MON_GLYPH 1 #define OBJ_GLYPH 2 #define OTH_GLYPH 3 /* fortunately unnecessary */ @@ -237,7 +241,12 @@ int set, entry; #endif short tilemap[MAX_GLYPH]; + +#ifdef STATUES_LOOK_LIKE_MONSTERS int lastmontile, lastobjtile, lastothtile, laststatuetile; +#else +int lastmontile, lastobjtile, lastothtile; +#endif /* Number of tiles for invisible monsters */ #define NUM_INVIS_TILES 1 @@ -356,8 +365,17 @@ init_tilemap() tilenum++; } +#ifndef STATUES_LOOK_LIKE_MONSTERS + /* statue patch: statues still use the same glyph as in vanilla */ + + for ( i = 0; i < NUMMONS; i++) { + tilemap[GLYPH_STATUE_OFF+i] = tilemap[GLYPH_OBJ_OFF+STATUE]; + } +#endif + lastothtile = tilenum - 1; +#ifdef STATUES_LOOK_LIKE_MONSTERS /* skip over the substitutes to get to the grayscale statues */ for (i = 0; i < SIZE(substitutes); i++) { tilenum += substitutes[i].last_glyph - substitutes[i].first_glyph + 1; @@ -375,6 +393,8 @@ init_tilemap() } } laststatuetile = tilenum - 1; +#endif + } const char *prolog[] = {