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.
This commit is contained in:
nhmall
2015-05-09 10:59:10 -04:00
parent 9d54b5e43e
commit 222b4c0023

View File

@@ -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[] = {