Switch fully over to YAML generation of condition bits. COND is gone.

This commit is contained in:
Eric S. Raymond 2017-06-22 17:28:39 -04:00
parent 537c4511e2
commit 7f7f49b739
6 changed files with 27 additions and 20 deletions

16
init.c
View file

@ -184,7 +184,8 @@ void initialise(void)
game.abbrev[i] = 0;
if (!(locations[i].description.big == 0 || KEY[i] == 0)) {
int k = KEY[i];
if (MOD(labs(TRAVEL[k]), 1000) == 1)COND[i] = 2;
if (MOD(labs(TRAVEL[k]), 1000) == 1)
conditions[i] = 2;
}
game.atloc[i] = 0;
}
@ -376,4 +377,17 @@ void initialise(void)
game.clshnt = false;
game.novice = false;
game.blklin = true;
#ifdef ODEBUG
# define NEWFLAGS ((1<<COND_ABOVE)|(1<<COND_FOREST)|(1<<COND_DEEP));
int mismatches = 0;
for (int i = 0; i < LOCSIZ; i++) {
long condbits = conditions[i] & ~NEWFLAGS;
if (condbits == COND[i] || COND[i] == 2 && condbits == 0)
continue;
++mismatches;
printf("Mismatch at %ld: COND=%x consitions=%x\n", COND[i], condbits);
}
printf("%d condbit mismatches\n", mismatches);
#endif
}