@@ -1155,6 +1155,7 @@ extern void dump_glyphids(void);
|
||||
extern void clear_all_glyphmap_colors(void);
|
||||
extern void reset_customcolors(void);
|
||||
extern int glyph_to_cmap(int);
|
||||
extern void maybe_shuffle_customizations(void);
|
||||
|
||||
/* ### hack.c ### */
|
||||
|
||||
|
||||
@@ -254,6 +254,7 @@ struct instance_flags {
|
||||
boolean remember_getpos; /* save getpos() positioning in do-again queue */
|
||||
boolean sad_feeling; /* unseen pet is dying */
|
||||
boolean showdamage; /* extra message reporting damage hero has taken */
|
||||
boolean pending_customizations; /* at least one custom. was specified */
|
||||
xint8 debug_fuzzer; /* fuzz testing */
|
||||
int at_midnight; /* only valid during end of game disclosure */
|
||||
int at_night; /* also only valid during end of game disclosure */
|
||||
|
||||
@@ -178,6 +178,8 @@ moveloop_core(void)
|
||||
#ifdef POSITIONBAR
|
||||
do_positionbar();
|
||||
#endif
|
||||
if (iflags.pending_customizations)
|
||||
maybe_shuffle_customizations();
|
||||
|
||||
dobjsfree();
|
||||
|
||||
|
||||
13
src/glyphs.c
13
src/glyphs.c
@@ -568,15 +568,22 @@ apply_customizations(
|
||||
}
|
||||
}
|
||||
}
|
||||
if (at_least_one) {
|
||||
shuffle_customizations();
|
||||
}
|
||||
iflags.pending_customizations = at_least_one;
|
||||
}
|
||||
|
||||
/* Shuffle the customizations to match shuffled object descriptions,
|
||||
* so a red potion isn't displayed with a blue customization, and so on.
|
||||
*/
|
||||
|
||||
void
|
||||
maybe_shuffle_customizations(void)
|
||||
{
|
||||
if (iflags.pending_customizations) {
|
||||
shuffle_customizations();
|
||||
iflags.pending_customizations = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
staticfn void
|
||||
shuffle_customizations(void)
|
||||
|
||||
Reference in New Issue
Block a user