From 7405d1fa0595cb6a39c6ae2c414d3e09a3369ec9 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 11 Oct 2021 13:36:10 -0400 Subject: [PATCH] fix misaligned potion colors Misaligned potion colors due to lack of reset_glyphmap() following obj shuffle. This issue only impacted a new game --- doc/fixes37.0 | 2 ++ include/display.h | 5 +++-- src/allmain.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 3f8066990..6d83d901f 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -842,6 +842,8 @@ segfault if gremlin fled weaponless hero wearing gold dragon scales/mail wasn't incremented, allowing incompatable save files to be restored restore the boulder exception for piletops that had been unintentionally removed during the expanded-glyphs changes +misaligned potion colors due to lack of reset_glyphmap() following obj shuffle; + this issue only impacted a new game curses: 'msg_window' option wasn't functional for curses unless the binary also included tty support diff --git a/include/display.h b/include/display.h index ac3971b38..569f127bd 100644 --- a/include/display.h +++ b/include/display.h @@ -339,8 +339,9 @@ enum altar_types { enum level_walls { main_walls, mines_walls, gehennom_walls, knox_walls, sokoban_walls }; enum { GM_FLAGS, GM_TTYCHAR, GM_COLOR, NUM_GLYPHMOD }; /* glyphmod entries */ -enum glyphmap_change_triggers { gm_nochange, gm_levelchange, gm_optionchange, - gm_symchange, gm_accessibility_change }; +enum glyphmap_change_triggers { gm_nochange, gm_newgame, gm_levelchange, + gm_optionchange, gm_symchange, + gm_accessibility_change }; #define NUM_ZAP 8 /* number of zap beam types */ /* diff --git a/src/allmain.c b/src/allmain.c index 92f25d34b..e0286fb99 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -671,7 +671,7 @@ newgame(void) u_init(); l_nhcore_init(); - + reset_glyphmap(gm_newgame); #ifndef NO_SIGNAL (void) signal(SIGINT, (SIG_RET_TYPE) done1); #endif