trunk only: preserving context (src files)

Pat Rankin wrote:
> collect them all into some new struct and
> save that separately rather than jamming more non-option stuff
> into struct flags.

This patch:
- collects all context/tracking related fields from flags
  into a new structure called "context."
It also adds the following to the new structure:
- stethoscope turn support
- victual support
- tin support
This commit is contained in:
nethack.allison
2003-09-21 11:52:54 +00:00
parent 74b834c774
commit 22ce5ed6f2
58 changed files with 571 additions and 567 deletions

View File

@@ -73,7 +73,7 @@ amulet()
}
}
if (!flags.no_of_wizards)
if (!context.no_of_wizards)
return;
/* find Wizard, and wake him if necessary */
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
@@ -260,7 +260,7 @@ strategy(mtmp)
break;
}
if(flags.made_amulet)
if(context.made_amulet)
if((strat = target_on(M3_WANTSAMUL, mtmp)) != STRAT_NONE)
return(strat);
@@ -468,7 +468,7 @@ resurrect()
long elapsed;
const char *verb;
if (!flags.no_of_wizards) {
if (!context.no_of_wizards) {
/* make a new Wizard */
verb = "kill";
mtmp = makemon(&mons[PM_WIZARD_OF_YENDOR], u.ux, u.uy, MM_NOWAIT);
@@ -537,7 +537,7 @@ intervene()
void
wizdead()
{
flags.no_of_wizards--;
context.no_of_wizards--;
if (!u.uevent.udemigod) {
u.uevent.udemigod = TRUE;
u.udg_cnt = rn1(250, 50);