Bring SETUP variable into game state block
Saved separately because the kogic around this variable looks a bit dubious and may need review.
This commit is contained in:
parent
dda636bbc1
commit
7f4cff1188
4 changed files with 8 additions and 8 deletions
|
@ -536,7 +536,7 @@ L8305: DATIME(&I,&K);
|
|||
SAVWDS(game.abbnum,game.blklin,game.bonus,game.clock1,game.clock2,game.closed,game.closng);
|
||||
SAVWDS(game.detail,game.dflag,game.dkill,game.dtotal,game.foobar,game.holdng,game.iwest);
|
||||
SAVWDS(game.knfloc,game.limit,LL,game.lmwarn,LOC,game.newloc,game.numdie);
|
||||
SAVWDS(OBJ,game.oldlc2,game.oldloc,game.oldobj,game.panic,game.saved,SETUP);
|
||||
SAVWDS(OBJ,game.oldlc2,game.oldloc,game.oldobj,game.panic,game.saved,game.setup);
|
||||
SAVWDS(SPK,game.tally,game.thresh,game.trndex,game.trnluz,game.turns,OBJTXT[OYSTER]);
|
||||
SAVWDS(VERB,WD1,WD1X,WD2,game.wzdark,game.zzword,OBJSND[BIRD]);
|
||||
SAVWDS(OBJTXT[SIGN],game.clshnt,game.novice,K,K,K,K);
|
||||
|
|
3
advent.h
3
advent.h
|
@ -43,6 +43,7 @@ struct game_t {
|
|||
long oldobj;
|
||||
long panic;
|
||||
long saved;
|
||||
long setup;
|
||||
long tally;
|
||||
long thresh;
|
||||
long trndex;
|
||||
|
@ -133,7 +134,7 @@ extern long AMBER, ATTACK, AXE, BACK, BATTER, BEAR,
|
|||
OGRE, OIL, OLDOBJ, OYSTER,
|
||||
PANIC, PEARL, PILLOW, PLANT, PLANT2, PROP[], PYRAM,
|
||||
RESER, ROD, ROD2, RUBY, RUG, SAPPH, SAY,
|
||||
SCORE, SECT, SETUP, SIGN, SNAKE, SPK, STEPS, STICK,
|
||||
SCORE, SECT, SIGN, SNAKE, SPK, STEPS, STICK,
|
||||
STREAM, THROW, TK[], TRIDNT, TROLL, TROLL2,
|
||||
URN, V1, V2, VASE, VEND, VERB,
|
||||
VOLCAN, VRSION, WATER, WD1, WD1X, WD2, WD2X;
|
||||
|
|
2
init.c
2
init.c
|
@ -392,7 +392,7 @@ L1106: /*etc*/ ;
|
|||
game.closed=false;
|
||||
game.clshnt=false;
|
||||
game.novice=false;
|
||||
SETUP=1;
|
||||
game.setup=1;
|
||||
game.blklin=true;
|
||||
|
||||
/* if we can ever think of how, we should save it at this point */
|
||||
|
|
9
main.c
9
main.c
|
@ -16,8 +16,7 @@ struct game_t game;
|
|||
|
||||
long ATLOC[186], FIXED[NOBJECTS+1],
|
||||
LINK[NOBJECTS*2 + 1], LNLENG, LNPOSN,
|
||||
PARMS[26], PLACE[NOBJECTS+1],
|
||||
SETUP = 0;
|
||||
PARMS[26], PLACE[NOBJECTS+1];
|
||||
char rawbuf[LINESIZE], INLINE[LINESIZE+1], MAP1[129], MAP2[129];
|
||||
|
||||
long AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD,
|
||||
|
@ -110,8 +109,8 @@ int main(int argc, char *argv[]) {
|
|||
/* Read the database if we have not yet done so */
|
||||
|
||||
MAP2[1] = 0;
|
||||
if(!SETUP)initialise();
|
||||
if(SETUP > 0) goto L1;
|
||||
if (!game.setup)initialise();
|
||||
if(game.setup > 0) goto L1;
|
||||
|
||||
/* Unlike earlier versions, adventure is no longer restartable. (This
|
||||
* lets us get away with modifying things such as OBJSND(BIRD) without
|
||||
|
@ -123,7 +122,7 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
/* Start-up, dwarf stuff */
|
||||
|
||||
L1: SETUP= -1;
|
||||
L1: game.setup= -1;
|
||||
I=0;
|
||||
game.zzword=RNDVOC(3,0);
|
||||
game.novice=YES(stdin, 65,1,0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue