From 2d95c3f4f5cf2d92149be9c4b43bbcc6d36c2de7 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 7 Jun 2017 07:10:07 -0400 Subject: [PATCH] Finish moving state arrays into game structure block. --- actions1.c | 118 ++++++++++++++++++++++++++--------------------------- actions2.c | 116 ++++++++++++++++++++++++++-------------------------- advent.h | 8 ++-- dungeon.c | 4 +- funcs.h | 4 +- init.c | 28 ++++++------- main.c | 116 ++++++++++++++++++++++++++-------------------------- misc.c | 4 +- score.c | 4 +- 9 files changed, 200 insertions(+), 202 deletions(-) diff --git a/actions1.c b/actions1.c index 9c4978b..55bfb11 100644 --- a/actions1.c +++ b/actions1.c @@ -127,10 +127,10 @@ L5100: if(K != GRATE) goto L5110; if(K != GRATE) return(8); L5110: if(K == DWARF && ATDWRF(LOC) > 0) goto L5010; if((LIQ(0) == K && HERE(BOTTLE)) || K == LIQLOC(LOC)) goto L5010; - if(OBJ != OIL || !HERE(URN) || PROP[URN] == 0) goto L5120; + if(OBJ != OIL || !HERE(URN) || game.prop[URN] == 0) goto L5120; OBJ=URN; goto L5010; -L5120: if(OBJ != PLANT || !AT(PLANT2) || PROP[PLANT2] == 0) goto L5130; +L5120: if(OBJ != PLANT || !AT(PLANT2) || game.prop[PLANT2] == 0) goto L5130; OBJ=PLANT2; goto L5010; L5130: if(OBJ != KNIFE || game.knfloc != LOC) goto L5140; @@ -193,7 +193,7 @@ L8040: SPK=28; L9040: if(OBJ == CLAM || OBJ == OYSTER) goto L9046; if(OBJ == DOOR)SPK=111; - if(OBJ == DOOR && PROP[DOOR] == 1)SPK=54; + if(OBJ == DOOR && game.prop[DOOR] == 1)SPK=54; if(OBJ == CAGE)SPK=32; if(OBJ == KEYS)SPK=55; if(OBJ == GRATE || OBJ == CHAIN)SPK=31; @@ -205,10 +205,10 @@ L9040: if(OBJ == CLAM || OBJ == OYSTER) goto L9046; game.panic=true; return(2010); -L9043: K=34+PROP[GRATE]; - PROP[GRATE]=1; - if(VERB == LOCK)PROP[GRATE]=0; - K=K+2*PROP[GRATE]; +L9043: K=34+game.prop[GRATE]; + game.prop[GRATE]=1; + if(VERB == LOCK)game.prop[GRATE]=0; + K=K+2*game.prop[GRATE]; return(2010); /* Clam/Oyster. */ @@ -227,49 +227,49 @@ L9046: K=0; /* Chain. */ L9048: if(VERB == LOCK) goto L9049; SPK=171; - if(PROP[BEAR] == 0)SPK=41; - if(PROP[CHAIN] == 0)SPK=37; + if(game.prop[BEAR] == 0)SPK=41; + if(game.prop[CHAIN] == 0)SPK=37; if(SPK != 171) return(2011); - PROP[CHAIN]=0; + game.prop[CHAIN]=0; game.fixed[CHAIN]=0; - if(PROP[BEAR] != 3)PROP[BEAR]=2; - game.fixed[BEAR]=2-PROP[BEAR]; + if(game.prop[BEAR] != 3)game.prop[BEAR]=2; + game.fixed[BEAR]=2-game.prop[BEAR]; return(2011); L9049: SPK=172; - if(PROP[CHAIN] != 0)SPK=34; + if(game.prop[CHAIN] != 0)SPK=34; if(LOC != PLAC[CHAIN])SPK=173; if(SPK != 172) return(2011); - PROP[CHAIN]=2; + game.prop[CHAIN]=2; if(TOTING(CHAIN))DROP(CHAIN,LOC); game.fixed[CHAIN]= -1; return(2011); /* Light. Applicable only to lamp and urn. */ -L8070: if(HERE(LAMP) && PROP[LAMP] == 0 && game.limit >= 0)OBJ=LAMP; - if(HERE(URN) && PROP[URN] == 1)OBJ=OBJ*NOBJECTS+URN; +L8070: if(HERE(LAMP) && game.prop[LAMP] == 0 && game.limit >= 0)OBJ=LAMP; + if(HERE(URN) && game.prop[URN] == 1)OBJ=OBJ*NOBJECTS+URN; if(OBJ == 0 || OBJ > NOBJECTS) return(8000); L9070: if(OBJ == URN) goto L9073; if(OBJ != LAMP) return(2011); SPK=184; if(game.limit < 0) return(2011); - PROP[LAMP]=1; + game.prop[LAMP]=1; RSPEAK(39); if(game.wzdark) return(2000); return(2012); L9073: SPK=38; - if(PROP[URN] == 0) return(2011); + if(game.prop[URN] == 0) return(2011); SPK=209; - PROP[URN]=2; + game.prop[URN]=2; return(2011); /* Extinguish. Lamp, urn, dragon/volcano (nice try). */ -L8080: if(HERE(LAMP) && PROP[LAMP] == 1)OBJ=LAMP; - if(HERE(URN) && PROP[URN] == 2)OBJ=OBJ*NOBJECTS+URN; +L8080: if(HERE(LAMP) && game.prop[LAMP] == 1)OBJ=LAMP; + if(HERE(URN) && game.prop[URN] == 2)OBJ=OBJ*NOBJECTS+URN; if(OBJ == 0 || OBJ > NOBJECTS) return(8000); L9080: if(OBJ == URN) goto L9083; @@ -277,11 +277,11 @@ L9080: if(OBJ == URN) goto L9083; if(OBJ == DRAGON || OBJ == VOLCAN)SPK=146; return(2011); -L9083: PROP[URN]=PROP[URN]/2; +L9083: game.prop[URN]=game.prop[URN]/2; SPK=210; return(2011); -L9086: PROP[LAMP]=0; +L9086: game.prop[LAMP]=0; RSPEAK(40); if(DARK(0))RSPEAK(16); return(2012); @@ -291,17 +291,17 @@ L9086: PROP[LAMP]=0; L9090: if((!TOTING(OBJ)) && (OBJ != ROD || !TOTING(ROD2)))SPK=29; if(OBJ != ROD || !TOTING(OBJ) || (!HERE(BIRD) && (game.closng || !AT(FISSUR)))) return(2011); - if(HERE(BIRD))SPK=206+MOD(PROP[BIRD],2); - if(SPK == 206 && LOC == game.place[STEPS] && PROP[JADE] < 0) goto L9094; + if(HERE(BIRD))SPK=206+MOD(game.prop[BIRD],2); + if(SPK == 206 && LOC == game.place[STEPS] && game.prop[JADE] < 0) goto L9094; if(game.closed) return(18999); if(game.closng || !AT(FISSUR)) return(2011); if(HERE(BIRD))RSPEAK(SPK); - PROP[FISSUR]=1-PROP[FISSUR]; - PSPEAK(FISSUR,2-PROP[FISSUR]); + game.prop[FISSUR]=1-game.prop[FISSUR]; + PSPEAK(FISSUR,2-game.prop[FISSUR]); return(2012); L9094: DROP(JADE,LOC); - PROP[JADE]=0; + game.prop[JADE]=0; game.tally=game.tally-1; SPK=208; return(2011); @@ -318,8 +318,8 @@ L9130: if(OBJ == BOTTLE || OBJ == 0)OBJ=LIQ(0); if(!TOTING(OBJ)) return(2011); SPK=78; if(OBJ != OIL && OBJ != WATER) return(2011); - if(HERE(URN) && PROP[URN] == 0) goto L9134; - PROP[BOTTLE]=1; + if(HERE(URN) && game.prop[URN] == 0) goto L9134; + game.prop[BOTTLE]=1; game.place[OBJ]=0; SPK=77; if(!(AT(PLANT) || AT(DOOR))) return(2011); @@ -327,15 +327,15 @@ L9130: if(OBJ == BOTTLE || OBJ == 0)OBJ=LIQ(0); if(AT(DOOR)) goto L9132; SPK=112; if(OBJ != WATER) return(2011); - PSPEAK(PLANT,PROP[PLANT]+3); - PROP[PLANT]=MOD(PROP[PLANT]+1,3); - PROP[PLANT2]=PROP[PLANT]; + PSPEAK(PLANT,game.prop[PLANT]+3); + game.prop[PLANT]=MOD(game.prop[PLANT]+1,3); + game.prop[PLANT2]=game.prop[PLANT]; K=NUL; return(8); -L9132: PROP[DOOR]=0; - if(OBJ == OIL)PROP[DOOR]=1; - SPK=113+PROP[DOOR]; +L9132: game.prop[DOOR]=0; + if(OBJ == OIL)game.prop[DOOR]=1; + SPK=113+game.prop[DOOR]; return(2011); L9134: OBJ=URN; @@ -363,13 +363,13 @@ L9150: if(OBJ == 0 && LIQLOC(LOC) != WATER && (LIQ(0) != WATER || !HERE(BOTTLE)) if(OBJ == BLOOD) goto L9153; if(OBJ != 0 && OBJ != WATER)SPK=110; if(SPK == 110 || LIQ(0) != WATER || !HERE(BOTTLE)) return(2011); - PROP[BOTTLE]=1; + game.prop[BOTTLE]=1; game.place[WATER]=0; SPK=74; return(2011); L9153: DSTROY(BLOOD); - PROP[DRAGON]=2; + game.prop[DRAGON]=2; OBJSND[BIRD]=OBJSND[BIRD]+3; SPK=240; return(2011); @@ -377,10 +377,10 @@ L9153: DSTROY(BLOOD); /* Rub. Yields various snide remarks except for lit urn. */ L9160: if(OBJ != LAMP)SPK=76; - if(OBJ != URN || PROP[URN] != 2) return(2011); + if(OBJ != URN || game.prop[URN] != 2) return(2011); DSTROY(URN); DROP(AMBER,LOC); - PROP[AMBER]=1; + game.prop[AMBER]=1; game.tally=game.tally-1; DROP(CAVITY,LOC); SPK=216; @@ -425,7 +425,7 @@ L9220: return(fill()); /* Blast. No effect unless you've got dynamite, which is a neat trick! */ -L9230: if(PROP[ROD2] < 0 || !game.closed) return(2011); +L9230: if(game.prop[ROD2] < 0 || !game.closed) return(2011); game.bonus=133; if(LOC == 115)game.bonus=134; if(HERE(ROD2))game.bonus=135; @@ -440,7 +440,7 @@ L8240: score(-1); RSPEAK(259); return(2012); -/* FEE FIE FOE FOO (AND FUM). ADVANCE TO NEXT STATE IF GIVEN IN PROPER ORDER. +/* FEE FIE FOE FOO (AND FUM). ADVANCE TO NEXT STATE IF GIVEN IN game.propER ORDER. * LOOK UP WD1 IN SECTION 3 OF VOCAB TO DETERMINE WHICH WORD WE'VE GOT. LAST * WORD ZIPS THE EGGS BACK TO THE GIANT ROOM (UNLESS ALREADY THERE). */ @@ -456,8 +456,8 @@ L8252: game.foobar=K; if(game.place[EGGS] == PLAC[EGGS] || (TOTING(EGGS) && LOC == PLAC[EGGS])) return(2011); /* Bring back troll if we steal the eggs back from him before crossing. */ - if(game.place[EGGS] == 0 && game.place[TROLL] == 0 && PROP[TROLL] == - 0)PROP[TROLL]=1; + if(game.place[EGGS] == 0 && game.place[TROLL] == 0 && game.prop[TROLL] == + 0)game.prop[TROLL]=1; K=2; if(HERE(EGGS))K=1; if(LOC == PLAC[EGGS])K=0; @@ -475,14 +475,14 @@ L8260: SPK=156; /* Read. Print stuff based on objtxt. Oyster (?) is special case. */ L8270: for (I=1; I<=NOBJECTS; I++) { - if(HERE(I) && OBJTXT[I] != 0 && PROP[I] >= 0)OBJ=OBJ*NOBJECTS+I; + if(HERE(I) && OBJTXT[I] != 0 && game.prop[I] >= 0)OBJ=OBJ*NOBJECTS+I; } /* end loop */ if(OBJ > NOBJECTS || OBJ == 0 || DARK(0)) return(8000); L9270: if(DARK(0)) goto L5190; - if(OBJTXT[OBJ] == 0 || PROP[OBJ] < 0) return(2011); + if(OBJTXT[OBJ] == 0 || game.prop[OBJ] < 0) return(2011); if(OBJ == OYSTER && !game.clshnt) goto L9275; - PSPEAK(OBJ,OBJTXT[OBJ]+PROP[OBJ]); + PSPEAK(OBJ,OBJTXT[OBJ]+game.prop[OBJ]); return(2012); L9275: game.clshnt=YES(input,192,193,54); @@ -491,14 +491,14 @@ L9275: game.clshnt=YES(input,192,193,54); /* Break. Only works for mirror in repository and, of course, the vase. */ L9280: if(OBJ == MIRROR)SPK=148; - if(OBJ == VASE && PROP[VASE] == 0) goto L9282; + if(OBJ == VASE && game.prop[VASE] == 0) goto L9282; if(OBJ != MIRROR || !game.closed) return(2011); SPK=197; return(18999); L9282: SPK=198; if(TOTING(VASE))DROP(VASE,LOC); - PROP[VASE]=2; + game.prop[VASE]=2; game.fixed[VASE]= -1; return(2011); @@ -546,11 +546,11 @@ L8305: DATIME(&I,&K); SAVARR(game.dseen,NDWARVES); SAVARR(game.fixed,NOBJECTS); SAVARR(game.hinted,HNTSIZ); - SAVARR(HINTLC,HNTSIZ); + SAVARR(game.hintlc,HNTSIZ); SAVARR(game.link,NOBJECTS*2); SAVARR(game.odloc,NDWARVES); SAVARR(game.place,NOBJECTS); - SAVARR(PROP,NOBJECTS); + SAVARR(game.prop,NOBJECTS); SAVWRD(KK,K); if(K != 0) goto L8318; K=NUL; @@ -577,19 +577,19 @@ L8318: RSPEAK(270); /* Fly. Snide remarks unless hovering rug is here. */ -L8320: if(PROP[RUG] != 2)SPK=224; +L8320: if(game.prop[RUG] != 2)SPK=224; if(!HERE(RUG))SPK=225; if(SPK/2 == 112) return(2011); OBJ=RUG; L9320: if(OBJ != RUG) return(2011); SPK=223; - if(PROP[RUG] != 2) return(2011); + if(game.prop[RUG] != 2) return(2011); game.oldlc2=game.oldloc; game.oldloc=LOC; game.newloc=game.place[RUG]+game.fixed[RUG]-LOC; SPK=226; - if(PROP[SAPPH] >= 0)SPK=227; + if(game.prop[SAPPH] >= 0)SPK=227; RSPEAK(SPK); return(2); @@ -603,10 +603,10 @@ L8330: SPK=228; SPK=0; L8332: SETPRM(1,game.zzword,0); /* 8335 */ for (I=1; I<=NOBJECTS; I++) { - if(!HERE(I) || OBJSND[I] == 0 || PROP[I] < 0) goto L8335; - PSPEAK(I,OBJSND[I]+PROP[I]); + if(!HERE(I) || OBJSND[I] == 0 || game.prop[I] < 0) goto L8335; + PSPEAK(I,OBJSND[I]+game.prop[I]); SPK=0; - if(I == BIRD && OBJSND[I]+PROP[I] == 8)DSTROY(BIRD); + if(I == BIRD && OBJSND[I]+game.prop[I] == 8)DSTROY(BIRD); L8335: /*etc*/ ; } /* end loop */ return(2011); @@ -614,8 +614,8 @@ L8335: /*etc*/ ; /* Z'ZZZ (word gets recomputed at startup; different each game). */ L8340: if(!AT(RESER) && LOC != game.fixed[RESER]-1) return(2011); - PSPEAK(RESER,PROP[RESER]+1); - PROP[RESER]=1-PROP[RESER]; + PSPEAK(RESER,game.prop[RESER]+1); + game.prop[RESER]=1-game.prop[RESER]; if(AT(RESER)) return(2012); game.oldlc2=LOC; game.newloc=0; diff --git a/actions2.c b/actions2.c index 043913e..3de30be 100644 --- a/actions2.c +++ b/actions2.c @@ -8,13 +8,13 @@ int carry(void) { if(TOTING(OBJ)) return(2011); SPK=25; - if(OBJ == PLANT && PROP[PLANT] <= 0)SPK=115; - if(OBJ == BEAR && PROP[BEAR] == 1)SPK=169; - if(OBJ == CHAIN && PROP[BEAR] != 0)SPK=170; + if(OBJ == PLANT && game.prop[PLANT] <= 0)SPK=115; + if(OBJ == BEAR && game.prop[BEAR] == 1)SPK=169; + if(OBJ == CHAIN && game.prop[BEAR] != 0)SPK=170; if(OBJ == URN)SPK=215; if(OBJ == CAVITY)SPK=217; if(OBJ == BLOOD)SPK=239; - if(OBJ == RUG && PROP[RUG] == 2)SPK=222; + if(OBJ == RUG && game.prop[RUG] == 2)SPK=222; if(OBJ == SIGN)SPK=196; if(OBJ != MESSAG) goto L9011; SPK=190; @@ -24,26 +24,26 @@ L9011: if(game.fixed[OBJ] != 0) return(2011); K=OBJ; OBJ=BOTTLE; if(HERE(BOTTLE) && LIQ(0) == K) goto L9017; - if(TOTING(BOTTLE) && PROP[BOTTLE] == 1) return(fill()); - if(PROP[BOTTLE] != 1)SPK=105; + if(TOTING(BOTTLE) && game.prop[BOTTLE] == 1) return(fill()); + if(game.prop[BOTTLE] != 1)SPK=105; if(!TOTING(BOTTLE))SPK=104; return(2011); L9017: SPK=92; if(game.holdng >= 7) return(2011); - if(OBJ != BIRD || PROP[BIRD] == 1 || -1-PROP[BIRD] == 1) goto L9014; - if(PROP[BIRD] == 2) goto L9015; + if(OBJ != BIRD || game.prop[BIRD] == 1 || -1-game.prop[BIRD] == 1) goto L9014; + if(game.prop[BIRD] == 2) goto L9015; if(!TOTING(CAGE))SPK=27; if(TOTING(ROD))SPK=26; if(SPK/2 == 13) return(2011); - PROP[BIRD]=1; -L9014: if((OBJ == BIRD || OBJ == CAGE) && (PROP[BIRD] == 1 || -1-PROP[BIRD] == + game.prop[BIRD]=1; +L9014: if((OBJ == BIRD || OBJ == CAGE) && (game.prop[BIRD] == 1 || -1-game.prop[BIRD] == 1))CARRY(BIRD+CAGE-OBJ,LOC); CARRY(OBJ,LOC); K=LIQ(0); if(OBJ == BOTTLE && K != 0)game.place[K]= -1; - if(!GSTONE(OBJ) || PROP[OBJ] == 0) return(2009); - PROP[OBJ]=0; - PROP[CAVITY]=1; + if(!GSTONE(OBJ) || game.prop[OBJ] == 0) return(2009); + game.prop[OBJ]=0; + game.prop[CAVITY]=1; return(2009); L9015: SPK=238; @@ -63,31 +63,31 @@ int discard(bool just_do_it) { RSPEAK(30); if(game.closed) return(19000); DSTROY(SNAKE); -/* SET PROP FOR USE BY TRAVEL OPTIONS */ - PROP[SNAKE]=1; +/* SET game.prop FOR USE BY TRAVEL OPTIONS */ + game.prop[SNAKE]=1; L9021: K=LIQ(0); if(K == OBJ)OBJ=BOTTLE; if(OBJ == BOTTLE && K != 0)game.place[K]=0; - if(OBJ == CAGE && PROP[BIRD] == 1)DROP(BIRD,LOC); + if(OBJ == CAGE && game.prop[BIRD] == 1)DROP(BIRD,LOC); DROP(OBJ,LOC); if(OBJ != BIRD) return(2012); - PROP[BIRD]=0; - if(FOREST(LOC))PROP[BIRD]=2; + game.prop[BIRD]=0; + if(FOREST(LOC))game.prop[BIRD]=2; return(2012); -L9023: if(!(GSTONE(OBJ) && AT(CAVITY) && PROP[CAVITY] != 0)) goto L9024; +L9023: if(!(GSTONE(OBJ) && AT(CAVITY) && game.prop[CAVITY] != 0)) goto L9024; RSPEAK(218); - PROP[OBJ]=1; - PROP[CAVITY]=0; - if(!HERE(RUG) || !((OBJ == EMRALD && PROP[RUG] != 2) || (OBJ == RUBY && - PROP[RUG] == 2))) goto L9021; + game.prop[OBJ]=1; + game.prop[CAVITY]=0; + if(!HERE(RUG) || !((OBJ == EMRALD && game.prop[RUG] != 2) || (OBJ == RUBY && + game.prop[RUG] == 2))) goto L9021; SPK=219; if(TOTING(RUG))SPK=220; if(OBJ == RUBY)SPK=221; RSPEAK(SPK); if(SPK == 220) goto L9021; - K=2-PROP[RUG]; - PROP[RUG]=K; + K=2-game.prop[RUG]; + game.prop[RUG]=K; if(K == 2)K=PLAC[SAPPH]; MOVE(RUG+NOBJECTS,K); goto L9021; @@ -98,10 +98,10 @@ L9024: if(OBJ != COINS || !HERE(VEND)) goto L9025; PSPEAK(BATTER,0); return(2012); -L9025: if(OBJ != BIRD || !AT(DRAGON) || PROP[DRAGON] != 0) goto L9026; +L9025: if(OBJ != BIRD || !AT(DRAGON) || game.prop[DRAGON] != 0) goto L9026; RSPEAK(154); DSTROY(BIRD); - PROP[BIRD]=0; + game.prop[BIRD]=0; return(2012); L9026: if(OBJ != BEAR || !AT(TROLL)) goto L9027; @@ -111,17 +111,17 @@ L9026: if(OBJ != BEAR || !AT(TROLL)) goto L9027; MOVE(TROLL2,PLAC[TROLL]); MOVE(TROLL2+NOBJECTS,FIXD[TROLL]); JUGGLE(CHASM); - PROP[TROLL]=2; + game.prop[TROLL]=2; goto L9021; L9027: if(OBJ == VASE && LOC != PLAC[PILLOW]) goto L9028; RSPEAK(54); goto L9021; -L9028: PROP[VASE]=2; - if(AT(PILLOW))PROP[VASE]=0; - PSPEAK(VASE,PROP[VASE]+1); - if(PROP[VASE] != 0)game.fixed[VASE]= -1; +L9028: game.prop[VASE]=2; + if(AT(PILLOW))game.prop[VASE]=0; + PSPEAK(VASE,game.prop[VASE]+1); + if(game.prop[VASE] != 0)game.fixed[VASE]= -1; goto L9021; } @@ -134,10 +134,10 @@ int attack(FILE *input) { if(OBJ != 0) goto L9124; if(I > 0)OBJ=DWARF; if(HERE(SNAKE))OBJ=OBJ*NOBJECTS+SNAKE; - if(AT(DRAGON) && PROP[DRAGON] == 0)OBJ=OBJ*NOBJECTS+DRAGON; + if(AT(DRAGON) && game.prop[DRAGON] == 0)OBJ=OBJ*NOBJECTS+DRAGON; if(AT(TROLL))OBJ=OBJ*NOBJECTS+TROLL; if(AT(OGRE))OBJ=OBJ*NOBJECTS+OGRE; - if(HERE(BEAR) && PROP[BEAR] == 0)OBJ=OBJ*NOBJECTS+BEAR; + if(HERE(BEAR) && game.prop[BEAR] == 0)OBJ=OBJ*NOBJECTS+BEAR; if(OBJ > NOBJECTS) return(8000); if(OBJ != 0) goto L9124; /* CAN'T ATTACK BIRD OR MACHINE BY THROWING AXE. */ @@ -150,12 +150,12 @@ L9124: if(OBJ == BIRD) { SPK=137; if(game.closed) return(2011); DSTROY(BIRD); - PROP[BIRD]=0; + game.prop[BIRD]=0; SPK=45; } L9125: if(OBJ != VEND) goto L9126; - PSPEAK(VEND,PROP[VEND]+2); - PROP[VEND]=3-PROP[VEND]; + PSPEAK(VEND,game.prop[VEND]+2); + game.prop[VEND]=3-game.prop[VEND]; return(2012); L9126: if(OBJ == 0)SPK=44; @@ -167,9 +167,9 @@ L9126: if(OBJ == 0)SPK=44; if(OBJ == TROLL)SPK=157; if(OBJ == OGRE)SPK=203; if(OBJ == OGRE && I > 0) goto L9128; - if(OBJ == BEAR)SPK=165+(PROP[BEAR]+1)/2; - if(OBJ != DRAGON || PROP[DRAGON] != 0) return(2011); -/* Fun stuff for dragon. If he insists on attacking it, win! Set PROP to dead, + if(OBJ == BEAR)SPK=165+(game.prop[BEAR]+1)/2; + if(OBJ != DRAGON || game.prop[DRAGON] != 0) return(2011); +/* Fun stuff for dragon. If he insists on attacking it, win! Set game.prop to dead, * move dragon to central loc (still fixed), move rug there (not fixed), and * move him there, too. Then do a null motion to get new description. */ RSPEAK(49); @@ -178,8 +178,8 @@ L9126: if(OBJ == 0)SPK=44; GETIN(input,WD1,WD1X,WD2,WD2X); if(WD1 != MAKEWD(25) && WD1 != MAKEWD(250519)) return(2607); PSPEAK(DRAGON,3); - PROP[DRAGON]=1; - PROP[RUG]=0; + game.prop[DRAGON]=1; + game.prop[RUG]=0; K=(PLAC[DRAGON]+FIXD[DRAGON])/2; MOVE(DRAGON+NOBJECTS,-1); MOVE(RUG+NOBJECTS,0); @@ -222,12 +222,12 @@ int throw(FILE *cmdin) { I=ATDWRF(LOC); if(I > 0) goto L9172; SPK=152; - if(AT(DRAGON) && PROP[DRAGON] == 0) goto L9175; + if(AT(DRAGON) && game.prop[DRAGON] == 0) goto L9175; SPK=158; if(AT(TROLL)) goto L9175; SPK=203; if(AT(OGRE)) goto L9175; - if(HERE(BEAR) && PROP[BEAR] == 0) goto L9176; + if(HERE(BEAR) && game.prop[BEAR] == 0) goto L9176; OBJ=0; return(attack(cmdin)); @@ -247,7 +247,7 @@ L9175: RSPEAK(SPK); L9176: SPK=164; DROP(AXE,LOC); game.fixed[AXE]= -1; - PROP[AXE]=1; + game.prop[AXE]=1; JUGGLE(BEAR); return(2011); @@ -276,12 +276,12 @@ int feed() { L9212: if(OBJ != SNAKE && OBJ != DRAGON && OBJ != TROLL) goto L9213; SPK=102; - if(OBJ == DRAGON && PROP[DRAGON] != 0)SPK=110; + if(OBJ == DRAGON && game.prop[DRAGON] != 0)SPK=110; if(OBJ == TROLL)SPK=182; if(OBJ != SNAKE || game.closed || !HERE(BIRD)) return(2011); SPK=101; DSTROY(BIRD); - PROP[BIRD]=0; + game.prop[BIRD]=0; return(2011); L9213: if(OBJ != DWARF) goto L9214; @@ -291,13 +291,13 @@ L9213: if(OBJ != DWARF) goto L9214; return(2011); L9214: if(OBJ != BEAR) goto L9215; - if(PROP[BEAR] == 0)SPK=102; - if(PROP[BEAR] == 3)SPK=110; + if(game.prop[BEAR] == 0)SPK=102; + if(game.prop[BEAR] == 3)SPK=110; if(!HERE(FOOD)) return(2011); DSTROY(FOOD); - PROP[BEAR]=1; + game.prop[BEAR]=1; game.fixed[AXE]=0; - PROP[AXE]=0; + game.prop[AXE]=0; SPK=168; return(2011); @@ -318,10 +318,10 @@ int fill() { if(OBJ == 0 && !HERE(BOTTLE)) return(8000); SPK=107; if(LIQLOC(LOC) == 0)SPK=106; - if(HERE(URN) && PROP[URN] != 0)SPK=214; + if(HERE(URN) && game.prop[URN] != 0)SPK=214; if(LIQ(0) != 0)SPK=105; if(SPK != 107) return(2011); - PROP[BOTTLE]=MOD(COND[LOC],4)/2*2; + game.prop[BOTTLE]=MOD(COND[LOC],4)/2*2; K=LIQ(0); if(TOTING(BOTTLE))game.place[K]= -1; if(K == OIL)SPK=108; @@ -331,18 +331,18 @@ L9222: SPK=29; if(LIQLOC(LOC) == 0)SPK=144; if(LIQLOC(LOC) == 0 || !TOTING(VASE)) return(2011); RSPEAK(145); - PROP[VASE]=2; + game.prop[VASE]=2; game.fixed[VASE]= -1; return(discard(true)); L9224: SPK=213; - if(PROP[URN] != 0) return(2011); + if(game.prop[URN] != 0) return(2011); SPK=144; K=LIQ(0); if(K == 0 || !HERE(BOTTLE)) return(2011); game.place[K]=0; - PROP[BOTTLE]=1; - if(K == OIL)PROP[URN]=1; - SPK=211+PROP[URN]; + game.prop[BOTTLE]=1; + if(K == OIL)game.prop[URN]=1; + SPK=211+game.prop[URN]; return(2011); } diff --git a/advent.h b/advent.h index ed39d8e..12942d0 100644 --- a/advent.h +++ b/advent.h @@ -62,6 +62,8 @@ struct game_t { long link[NOBJECTS*2 + 1]; long place[NOBJECTS+1]; long hinted[HNTSIZ+1]; + long hintlc[HNTSIZ+1]; + long prop[NOBJECTS+1]; }; extern struct game_t game; @@ -132,12 +134,10 @@ extern long AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD, BOTTLE, CAGE, CAVE, CAVITY, CHAIN, CHASM, CHEST, CLAM, COINS, DALTLC, DOOR, DPRSSN, DRAGON, DWARF, EGGS, EMRALD, ENTER, ENTRNC, FIND, FISSUR, FOOD, - GRATE, HINT, HINTLC[], - I, INVENT, IGO, J, JADE, K, K2, KEYS, KK, + GRATE, HINT, I, INVENT, IGO, J, JADE, K, K2, KEYS, KK, KNIFE, KQ, L, LAMP, LL, LOC, LOCK, LOOK, MAGZIN, MAXDIE, MAXTRS, MESSAG, MIRROR, MXSCOR, NUGGET, NUL, OBJ, - OGRE, OIL, OLDOBJ, OYSTER, - PANIC, PEARL, PILLOW, PLANT, PLANT2, PROP[], PYRAM, + OGRE, OIL, OLDOBJ, OYSTER, PANIC, PEARL, PILLOW, PLANT, PLANT2, PYRAM, RESER, ROD, ROD2, RUBY, RUG, SAPPH, SAY, SCORE, SECT, SIGN, SNAKE, SPK, STEPS, STICK, STREAM, THROW, TK[], TRIDNT, TROLL, TROLL2, diff --git a/dungeon.c b/dungeon.c index 7f6d8ed..535eb41 100644 --- a/dungeon.c +++ b/dungeon.c @@ -262,7 +262,7 @@ int read_database(FILE* database) { * the word following the end of the line). The pointer is negative if this is * first line of a message. The text-pointer arrays contain indices of * pointer-words in lines. STEXT(N) is short description of location N. - * LTEXT(N) is long description. PTEXT(N) points to message for PROP(N)=0. + * LTEXT(N) is long description. PTEXT(N) points to message for game.prop(N)=0. * Successive prop messages are found by chasing pointers. RTEXT contains * section 6's stuff. CTEXT(N) points to a player-class message. TTEXT is for * section 14. We also clear COND (see description of section 9 for details). */ @@ -507,7 +507,7 @@ void read_sound_text(FILE* database) /* Finish constructing internal data format */ /* Having read in the database, certain things are now constructed. - * PROPS are set to zero. We finish setting up COND by checking for + * game.propS are set to zero. We finish setting up COND by checking for * forced-motion travel entries. The PLAC and FIXD arrays are used * to set up game.atloc(N) as the first object at location N, and * game.link(OBJ) as the next object at the same location as OBJ. diff --git a/funcs.h b/funcs.h index 6630396..abad0eb 100644 --- a/funcs.h +++ b/funcs.h @@ -19,11 +19,11 @@ #define AT(OBJ) (game.place[OBJ] == LOC || game.fixed[OBJ] == LOC) #define HERE(OBJ) (AT(OBJ) || TOTING(OBJ)) #define LIQ2(PBOTL) ((1-(PBOTL))*WATER+((PBOTL)/2)*(WATER+OIL)) -#define LIQ(DUMMY) (LIQ2(PROP[BOTTLE]<0 ? -1-PROP[BOTTLE] : PROP[BOTTLE])) +#define LIQ(DUMMY) (LIQ2(game.prop[BOTTLE]<0 ? -1-game.prop[BOTTLE] : game.prop[BOTTLE])) #define LIQLOC(LOC) (LIQ2((MOD(COND[LOC]/2*2,8)-5)*MOD(COND[LOC]/4,2)+1)) #define CNDBIT(L,N) (TSTBIT(COND[L],N)) #define FORCED(LOC) (COND[LOC] == 2) -#define DARK(DUMMY) ((!CNDBIT(LOC,0)) && (PROP[LAMP] == 0 || !HERE(LAMP))) +#define DARK(DUMMY) ((!CNDBIT(LOC,0)) && (game.prop[LAMP] == 0 || !HERE(LAMP))) #define PCT(N) (randrange(100) < (N)) #define GSTONE(OBJ) ((OBJ) == EMRALD || (OBJ) == RUBY || (OBJ) == AMBER || (OBJ) == SAPPH) #define FOREST(LOC) ((LOC) >= 145 && (LOC) <= 166) diff --git a/init.c b/init.c index 316655d..87e8da2 100644 --- a/init.c +++ b/init.c @@ -16,12 +16,12 @@ * 885 travel options (TRAVEL, TRVSIZ). * 330 vocabulary words (KTAB, ATAB, TABSIZ). * 185 locations (LTEXT, STEXT, KEY, COND, abbrev, game.atloc, LOCSND, LOCSIZ). - * 100 objects (PLAC, game.place, FIXD, game.fixed, game.link (TWICE), PTEXT, PROP, + * 100 objects (PLAC, game.place, FIXD, game.fixed, game.link (TWICE), PTEXT, game.prop, * OBJSND, OBJTXT). * 35 "action" verbs (ACTSPK, VRBSIZ). * 277 random messages (RTEXT, RTXSIZ). * 12 different player classifications (CTEXT, CVAL, CLSMAX). - * 20 hints (HINTLC, game.hinted, HINTS, HNTSIZ). + * 20 hints (game.hintlc, game.hinted, HINTS, HNTSIZ). * 5 "# of turns" threshholds (TTEXT, TRNVAL, TRNSIZ). * There are also limits which cannot be exceeded due to the structure of * the database. (E.G., The vocabulary uses n/1000 to determine word type, @@ -62,9 +62,9 @@ * If M=100 unconditional, but forbidden to dwarves. * If 100= 0) goto L6030; + if(LOC == game.chloc || game.prop[CHEST] >= 0) goto L6030; K=0; /* 6020 */ for (J=50; J<=MAXTRS; J++) { /* Pirate won't take pyramid from plover room or dark room (too easy!). */ @@ -260,7 +258,7 @@ L6016: TK[J]=game.odloc[I]; if(TOTING(J)) goto L6021; L6020: if(HERE(J))K=1; } /* end loop */ - if(game.tally == 1 && K == 0 && game.place[CHEST] == 0 && HERE(LAMP) && PROP[LAMP] + if(game.tally == 1 && K == 0 && game.place[CHEST] == 0 && HERE(LAMP) && game.prop[LAMP] == 1) goto L6025; if(game.odloc[6] != game.dloc[6] && PCT(20))RSPEAK(127); goto L6030; @@ -338,9 +336,9 @@ L2001: if(TOTING(BEAR))RSPEAK(141); /* Print out descriptions of objects at this location. If not closing and * property value is negative, tally off another treasure. Rug is special - * case; once seen, its PROP is 1 (dragon on it) till dragon is killed. - * Similarly for chain; PROP is initially 1 (locked to bear). These hacks - * are because PROP=0 is needed to get full score. */ + * case; once seen, its game.prop is 1 (dragon on it) till dragon is killed. + * Similarly for chain; game.prop is initially 1 (locked to bear). These hacks + * are because game.prop=0 is needed to get full score. */ if(DARK(0)) goto L2012; game.abbrev[LOC]=game.abbrev[LOC]+1; @@ -349,10 +347,10 @@ L2004: if(I == 0) goto L2012; OBJ=I; if(OBJ > NOBJECTS)OBJ=OBJ-NOBJECTS; if(OBJ == STEPS && TOTING(NUGGET)) goto L2008; - if(PROP[OBJ] >= 0) goto L2006; + if(game.prop[OBJ] >= 0) goto L2006; if(game.closed) goto L2008; - PROP[OBJ]=0; - if(OBJ == RUG || OBJ == CHAIN)PROP[OBJ]=1; + game.prop[OBJ]=0; + if(OBJ == RUG || OBJ == CHAIN)game.prop[OBJ]=1; game.tally=game.tally-1; /* Note: There used to be a test here to see whether the player had blown it * so badly that he could never ever see the remaining treasures, and if so @@ -365,7 +363,7 @@ L2004: if(I == 0) goto L2012; * or trident, and the effects propagate. So the whole thing was flushed. * anyone who makes such a gross blunder isn't likely to find everything * else anyway (so goes the rationalisation). */ -L2006: KK=PROP[OBJ]; +L2006: KK=game.prop[OBJ]; if(OBJ == STEPS && LOC == game.fixed[STEPS])KK=1; PSPEAK(OBJ,KK); L2008: I=game.link[I]; @@ -387,21 +385,21 @@ L2012: VERB=0; L2600: if(COND[LOC] < game.conds) goto L2603; /* 2602 */ for (HINT=1; HINT<=HNTMAX; HINT++) { if(game.hinted[HINT]) goto L2602; - if(!CNDBIT(LOC,HINT+10))HINTLC[HINT]= -1; - HINTLC[HINT]=HINTLC[HINT]+1; - if(HINTLC[HINT] >= HINTS[HINT][1]) goto L40000; + if(!CNDBIT(LOC,HINT+10))game.hintlc[HINT]= -1; + game.hintlc[HINT]=game.hintlc[HINT]+1; + if(game.hintlc[HINT] >= HINTS[HINT][1]) goto L40000; L2602: /*etc*/ ; } /* end loop */ -/* If closing time, check for any objects being toted with PROP < 0 and set - * the prop to -1-PROP. This way objects won't be described until they've +/* If closing time, check for any objects being toted with game.prop < 0 and set + * the prop to -1-game.prop. This way objects won't be described until they've * been picked up and put down separate from their respective piles. Don't * tick game.clock1 unless well into cave (and not at Y2). */ L2603: if(!game.closed) goto L2605; - if(PROP[OYSTER] < 0 && TOTING(OYSTER))PSPEAK(OYSTER,1); + if(game.prop[OYSTER] < 0 && TOTING(OYSTER))PSPEAK(OYSTER,1); for (I=1; I<=NOBJECTS; I++) { - if(TOTING(I) && PROP[I] < 0)PROP[I]= -1-PROP[I]; + if(TOTING(I) && game.prop[I] < 0)game.prop[I]= -1-game.prop[I]; } /* end loop */ L2605: game.wzdark=DARK(0); if(game.knfloc > 0 && game.knfloc != LOC)game.knfloc=0; @@ -428,8 +426,8 @@ L2607: game.foobar=(game.foobar>0 ? -game.foobar : 0); if(game.clock1 == 0) goto L10000; if(game.clock1 < 0)game.clock2=game.clock2-1; if(game.clock2 == 0) goto L11000; - if(PROP[LAMP] == 1)game.limit=game.limit-1; - if(game.limit <= 30 && HERE(BATTER) && PROP[BATTER] == 0 && HERE(LAMP)) goto + if(game.prop[LAMP] == 1)game.limit=game.limit-1; + if(game.limit <= 30 && HERE(BATTER) && game.prop[BATTER] == 0 && HERE(LAMP)) goto L12000; if(game.limit == 0) goto L12400; if(game.limit <= 30) goto L12200; @@ -536,7 +534,7 @@ L10: LL=LL/1000; L11: game.newloc=LL/1000; K=MOD(game.newloc,100); /* ESR: an instance of NOBJECTS? */ if(game.newloc <= 300) goto L13; - if(PROP[K] != game.newloc/100-3) goto L16; + if(game.prop[K] != game.newloc/100-3) goto L16; L12: if(TRAVEL[KK] < 0)BUG(25); KK=KK+1; game.newloc=labs(TRAVEL[KK])/1000; @@ -584,12 +582,12 @@ L30200: DROP(EMRALD,LOC); /* Travel 303. Troll bridge. Must be done only as special motion so that * dwarves won't wander across and encounter the bear. (They won't follow the * player there because that region is forbidden to the pirate.) If - * PROP(TROLL)=1, he's crossed since paying, so step out and block him. - * (standard travel entries check for PROP(TROLL)=0.) Special stuff for bear. */ + * game.prop(TROLL)=1, he's crossed since paying, so step out and block him. + * (standard travel entries check for game.prop(TROLL)=0.) Special stuff for bear. */ -L30300: if(PROP[TROLL] != 1) goto L30310; +L30300: if(game.prop[TROLL] != 1) goto L30310; PSPEAK(TROLL,1); - PROP[TROLL]=0; + game.prop[TROLL]=0; MOVE(TROLL2,0); MOVE(TROLL2+NOBJECTS,0); MOVE(TROLL,PLAC[TROLL]); @@ -599,14 +597,14 @@ L30300: if(PROP[TROLL] != 1) goto L30310; return true; L30310: game.newloc=PLAC[TROLL]+FIXD[TROLL]-LOC; - if(PROP[TROLL] == 0)PROP[TROLL]=1; + if(game.prop[TROLL] == 0)game.prop[TROLL]=1; if(!TOTING(BEAR)) return true; RSPEAK(162); - PROP[CHASM]=1; - PROP[TROLL]=2; + game.prop[CHASM]=1; + game.prop[TROLL]=2; DROP(BEAR,game.newloc); game.fixed[BEAR]= -1; - PROP[BEAR]=3; + game.prop[BEAR]=3; game.oldlc2=game.newloc; goto L99; @@ -707,7 +705,7 @@ L99: if(game.closng) goto L95; if(game.numdie == MAXDIE) score(0); game.place[WATER]=0; game.place[OIL]=0; - if(TOTING(LAMP))PROP[LAMP]=0; + if(TOTING(LAMP))game.prop[LAMP]=0; /* 98 */ for (J=1; J<=NOBJECTS; J++) { I=NOBJECTS + 1 - J; if(!TOTING(I)) goto L98; @@ -734,7 +732,7 @@ L95: RSPEAK(131); /* Come here if he's been long enough at required loc(s) for some unused hint. * hint number is in variable "hint". Branch to quick test for additional * conditions, then come back to do neat stuff. Goto 40010 if conditions are - * met and we want to offer the hint. Goto 40020 to clear HINTLC back to zero, + * met and we want to offer the hint. Goto 40020 to clear game.hintlc back to zero, * 40030 to take no action yet. */ L40000: switch (HINT-1) { case 0: goto L40100; case 1: goto L40200; case 2: goto @@ -745,18 +743,18 @@ L40000: switch (HINT-1) { case 0: goto L40100; case 1: goto L40200; case 2: g * JADE */ BUG(27); -L40010: HINTLC[HINT]=0; +L40010: game.hintlc[HINT]=0; if(!YES(cmdin,HINTS[HINT][3],0,54)) goto L2602; SETPRM(1,HINTS[HINT][2],HINTS[HINT][2]); RSPEAK(261); game.hinted[HINT]=YES(cmdin,175,HINTS[HINT][4],54); if(game.hinted[HINT] && game.limit > 30)game.limit=game.limit+30*HINTS[HINT][2]; -L40020: HINTLC[HINT]=0; +L40020: game.hintlc[HINT]=0; L40030: goto L2602; /* Now for the quick tests. See database description for one-line notes. */ -L40100: if(PROP[GRATE] == 0 && !HERE(KEYS)) goto L40010; +L40100: if(game.prop[GRATE] == 0 && !HERE(KEYS)) goto L40010; goto L40020; L40200: if(game.place[BIRD] == LOC && TOTING(ROD) && game.oldobj == BIRD) goto L40010; @@ -769,7 +767,7 @@ L40400: if(game.atloc[LOC] == 0 && game.atloc[game.oldloc] == 0 && game.atloc[ga 1) goto L40010; goto L40020; -L40500: if(PROP[EMRALD] != -1 && PROP[PYRAM] == -1) goto L40010; +L40500: if(game.prop[EMRALD] != -1 && game.prop[PYRAM] == -1) goto L40010; goto L40020; L40600: goto L40010; @@ -786,7 +784,7 @@ L40900: I=ATDWRF(LOC); if(HERE(OGRE) && I == 0) goto L40010; goto L40030; -L41000: if(game.tally == 1 && PROP[JADE] < 0) goto L40010; +L41000: if(game.tally == 1 && game.prop[JADE] < 0) goto L40010; goto L40020; @@ -825,8 +823,8 @@ L41000: if(game.tally == 1 && PROP[JADE] < 0) goto L40010; * gotten the pearl, so we know the bivalve is an oyster. *And*, the dwarves * must have been activated, since we've found chest. */ -L10000: PROP[GRATE]=0; - PROP[FISSUR]=0; +L10000: game.prop[GRATE]=0; + game.prop[FISSUR]=0; for (I=1; I<=NDWARVES; I++) { game.dseen[I]=false; game.dloc[I]=0; @@ -836,10 +834,10 @@ L10000: PROP[GRATE]=0; MOVE(TROLL2,PLAC[TROLL]); MOVE(TROLL2+NOBJECTS,FIXD[TROLL]); JUGGLE(CHASM); - if(PROP[BEAR] != 3)DSTROY(BEAR); - PROP[CHAIN]=0; + if(game.prop[BEAR] != 3)DSTROY(BEAR); + game.prop[CHAIN]=0; game.fixed[CHAIN]=0; - PROP[AXE]=0; + game.prop[AXE]=0; game.fixed[AXE]=0; RSPEAK(129); game.clock1= -1; @@ -858,13 +856,13 @@ L10000: PROP[GRATE]=0; * objects he might be carrying (lest he have some which could cause trouble, * such as the keys). We describe the flash of light and trundle back. */ -L11000: PROP[BOTTLE]=PUT(BOTTLE,115,1); - PROP[PLANT]=PUT(PLANT,115,0); - PROP[OYSTER]=PUT(OYSTER,115,0); +L11000: game.prop[BOTTLE]=PUT(BOTTLE,115,1); + game.prop[PLANT]=PUT(PLANT,115,0); + game.prop[OYSTER]=PUT(OYSTER,115,0); OBJTXT[OYSTER]=3; - PROP[LAMP]=PUT(LAMP,115,0); - PROP[ROD]=PUT(ROD,115,0); - PROP[DWARF]=PUT(DWARF,115,0); + game.prop[LAMP]=PUT(LAMP,115,0); + game.prop[ROD]=PUT(ROD,115,0); + game.prop[DWARF]=PUT(DWARF,115,0); LOC=115; game.oldloc=115; game.newloc=115; @@ -874,13 +872,13 @@ L11000: PROP[BOTTLE]=PUT(BOTTLE,115,1); I=PUT(GRATE,116,0); I=PUT(SIGN,116,0); OBJTXT[SIGN]=OBJTXT[SIGN]+1; - PROP[SNAKE]=PUT(SNAKE,116,1); - PROP[BIRD]=PUT(BIRD,116,1); - PROP[CAGE]=PUT(CAGE,116,0); - PROP[ROD2]=PUT(ROD2,116,0); - PROP[PILLOW]=PUT(PILLOW,116,0); + game.prop[SNAKE]=PUT(SNAKE,116,1); + game.prop[BIRD]=PUT(BIRD,116,1); + game.prop[CAGE]=PUT(CAGE,116,0); + game.prop[ROD2]=PUT(ROD2,116,0); + game.prop[PILLOW]=PUT(PILLOW,116,0); - PROP[MIRROR]=PUT(MIRROR,115,0); + game.prop[MIRROR]=PUT(MIRROR,115,0); game.fixed[MIRROR]=116; for (I=1; I<=NOBJECTS; I++) { @@ -899,7 +897,7 @@ L11000: PROP[BOTTLE]=PUT(BOTTLE,115,1); * out. Even then, he can explore outside for a while if desired. */ L12000: RSPEAK(188); - PROP[BATTER]=1; + game.prop[BATTER]=1; if(TOTING(BATTER))DROP(BATTER,LOC); game.limit=game.limit+2500; game.lmwarn=false; @@ -909,12 +907,12 @@ L12200: if(game.lmwarn || !HERE(LAMP)) goto L19999; game.lmwarn=true; SPK=187; if(game.place[BATTER] == 0)SPK=183; - if(PROP[BATTER] == 1)SPK=189; + if(game.prop[BATTER] == 1)SPK=189; RSPEAK(SPK); goto L19999; L12400: game.limit= -1; - PROP[LAMP]=0; + game.prop[LAMP]=0; if(HERE(LAMP))RSPEAK(184); goto L19999; diff --git a/misc.c b/misc.c index eb3d060..e89442d 100644 --- a/misc.c +++ b/misc.c @@ -115,7 +115,7 @@ void PSPEAK(vocab_t MSG,int SKIP) { long I, M; /* Find the skip+1st message from msg and print it. MSG should be the index of - * the inventory message for object. (INVEN+N+1 message is PROP=N message). */ + * the inventory message for object. (INVEN+N+1 message is game.prop=N message). */ M=PTEXT[MSG]; @@ -537,7 +537,7 @@ long PUT(long OBJECT, long WHERE, long PVAL) { long X; /* PUT is the same as MOVE, except it returns a value used to set up the - * negated PROP values for the repository objects. */ + * negated game.prop values for the repository objects. */ MOVE(OBJECT,WHERE); X=(-1)-PVAL; diff --git a/score.c b/score.c index 2d89757..ef80e68 100644 --- a/score.c +++ b/score.c @@ -39,8 +39,8 @@ void score(long MODE) { K=12; if(I == CHEST)K=14; if(I > CHEST)K=16; - if(PROP[I] >= 0)SCORE=SCORE+2; - if(game.place[I] == 3 && PROP[I] == 0)SCORE=SCORE+K-2; + if(game.prop[I] >= 0)SCORE=SCORE+2; + if(game.place[I] == 3 && game.prop[I] == 0)SCORE=SCORE+K-2; MXSCOR=MXSCOR+K; L20010: /*etc*/ ; } /* end loop */ -- 2.31.1