diff --git a/include/context.h b/include/context.h index 589a80691..c207c5a8d 100644 --- a/include/context.h +++ b/include/context.h @@ -168,7 +168,7 @@ struct context_info { boolean bypasses; /* bypass flag is set on at least one fobj */ boolean door_opened; /* set to true if door was opened during test_move */ boolean resume_wish; /* game was exited while in wish prompt */ - boolean tips[NUM_TIPS]; + unsigned long tips; struct dig_info digging; struct victual_info victual; struct engrave_info engraving; diff --git a/include/patchlevel.h b/include/patchlevel.h index ee8e27342..5ee218653 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -17,7 +17,7 @@ * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ -#define EDITLEVEL 136 +#define EDITLEVEL 137 /* * Development status possibilities. diff --git a/src/hack.c b/src/hack.c index 360167541..ebdc126c2 100644 --- a/src/hack.c +++ b/src/hack.c @@ -1834,8 +1834,8 @@ handle_tip(int tip) if (!flags.tips) return FALSE; - if (tip >= 0 && tip < NUM_TIPS && !svc.context.tips[tip]) { - svc.context.tips[tip] = TRUE; + if (tip >= 0 && tip < NUM_TIPS && !(svc.context.tips & (1 << tip))) { + svc.context.tips |= (1 << tip); /* the "Tip:" prefix is a hint to use of OPTIONS=!tips to suppress */ switch (tip) { case TIP_ENHANCE: @@ -1886,7 +1886,7 @@ swim_move_danger(coordxy x, coordxy y) || liquid_wall) { if (svc.context.nopick) { /* moving with m-prefix */ - svc.context.tips[TIP_SWIM] = TRUE; + svc.context.tips |= (1 << TIP_SWIM); return FALSE; } else if (ParanoidSwim || liquid_wall) { You("avoid %s into the %s.", diff --git a/src/weapon.c b/src/weapon.c index bd21b93b2..81da05613 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -1330,7 +1330,7 @@ enhance_weapon_skill(void) boolean speedy = FALSE; /* player knows about #enhance, don't show tip anymore */ - svc.context.tips[TIP_ENHANCE] = TRUE; + svc.context.tips |= (1 << TIP_ENHANCE); if (wizard && y_n("Advance skills without practice?") == 'y') speedy = TRUE;