From 30fe65b5e02624ee9c7f61dbfe10c3b34b9ab912 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 28 Dec 2020 09:14:39 -0500 Subject: [PATCH] fix tilemap.c compile when STATUES_LOOK_LIKE_MONSTERS wasn't defined --- doc/fixes37.0 | 3 +++ win/share/tilemap.c | 21 +++++++++------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 90e698172..95e1a491e 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -459,6 +459,9 @@ splitting #if MAIL into #if MAIL_STRUCTURES and #if MAIL made it possible to to read such a scroll issued impossible "What weird effect is this?" remove M2_MALE flag that was unintentionally left on dwarf lord/lady/leader entry and was preventing female incarnations +tilemap.c wasn't building if STATUES_LOOK_LIKE_MONSTERS wasn't defined; also, + to match the code that should be defined so change the preprocessor + test to 'ifndef STATUES_DONT_LOOK_LIKE_MONSTERS' curses: 'msg_window' option wasn't functional for curses unless the binary also included tty support diff --git a/win/share/tilemap.c b/win/share/tilemap.c index c7766a63b..9351756f4 100644 --- a/win/share/tilemap.c +++ b/win/share/tilemap.c @@ -42,10 +42,6 @@ extern void FDECL(exit, (int)); #endif #endif -#if defined(MSDOS) || defined(WIN32) || defined(X11_GRAPHICS) -#define STATUES_LOOK_LIKE_MONSTERS -#endif - enum {MON_GLYPH, OBJ_GLYPH, OTH_GLYPH, TERMINATOR = -1}; #define EXTRA_SCROLL_DESCR_COUNT ((SCR_BLANK_PAPER - SCR_STINKING_CLOUD) - 1) @@ -279,7 +275,7 @@ struct tilemap_t { } tilemap[MAX_GLYPH]; -#ifdef STATUES_LOOK_LIKE_MONSTERS +#ifndef STATUES_DONT_LOOK_LIKE_MONSTERS int lastmontile, lastobjtile, lastothtile, laststatuetile; #else int lastmontile, lastobjtile, lastothtile; @@ -514,11 +510,12 @@ init_tilemap() file_entry++; } -#ifndef STATUES_LOOK_LIKE_MONSTERS - /* statue patch: statues still use the same glyph as in vanilla */ +#ifndef STATUES_DONT_LOOK_LIKE_MONSTERS + /* statue patch: statues still use the same glyph as in 3.4.x */ for (i = 0; i < NUMMONS; i++) { - tilemap[GLYPH_STATUE_OFF + i].tilenum = tilemap[GLYPH_OBJ_OFF + STATUE]; + tilemap[GLYPH_STATUE_OFF + i].tilenum + = tilemap[GLYPH_OBJ_OFF + STATUE].tilenum; #ifdef OBTAIN_TILEMAP Sprintf(tilemap[GLYPH_STATUE_OFF + i].name, "%s (%d)", tilename(OTH_GLYPH, file_entry, 0), file_entry); @@ -528,7 +525,7 @@ init_tilemap() lastothtile = tilenum - 1; -#ifdef STATUES_LOOK_LIKE_MONSTERS +#ifndef STATUES_DONT_LOOK_LIKE_MONSTERS file_entry = 0; /* fast-forward over the substitutes to grayscale statues loc */ for (i = 0; i < SIZE(substitutes); i++) { @@ -557,7 +554,7 @@ init_tilemap() file_entry += 2; } laststatuetile = tilenum - 2; -#endif /* STATUES_LOOK_LIKE_MONSTERS */ +#endif /* STATUES_DONT_LOOK_LIKE_MONSTERS */ #ifdef OBTAIN_TILEMAP for (i = 0; i < MAX_GLYPH; ++i) { Fprintf(tilemap_file, "[%04d] [%04d] %-80s\n", @@ -638,7 +635,7 @@ FILE *ofp; } lastothtile = start - 1; -#ifdef STATUES_LOOK_LIKE_MONSTERS +#ifndef STATUES_DONT_LOOK_LIKE_MONSTERS start = laststatuetile + 1; #endif Fprintf(ofp, "\nint total_tiles_used = %d;\n", start); @@ -688,7 +685,7 @@ main() Fprintf(ofp, "\n#define MAXMONTILE %d\n", lastmontile); Fprintf(ofp, "#define MAXOBJTILE %d\n", lastobjtile); Fprintf(ofp, "#define MAXOTHTILE %d\n", lastothtile); -#ifdef STATUES_LOOK_LIKE_MONSTERS +#ifndef STATUES_DONT_LOOK_LIKE_MONSTERS Fprintf(ofp, "/* #define MAXSTATUETILE %d */\n", laststatuetile); #endif Fprintf(ofp, "\n/*tile.c*/\n"); -- 2.50.1