X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=actions1.c;h=791e0c2addc4c55a3f09bb352b853ffb8835caaa;hp=0a1155d800c355058c63506e76519b8c2b7f0891;hb=43aef9ceb16d0e2821c5ee81ea9d7c2f7ace84bb;hpb=cf219e920bb038c9ac2c879adcfd048dc13bf3bc diff --git a/actions1.c b/actions1.c index 0a1155d..791e0c2 100644 --- a/actions1.c +++ b/actions1.c @@ -1,9 +1,8 @@ #include #include -#include "misc.h" -#include "main.h" -#include "share.h" +#include "advent.h" #include "funcs.h" +#include "database.h" /* This stuff was broken off as part of an effort to get the main program * to compile without running out of memory. We're called with a number @@ -65,7 +64,6 @@ L4000: VERB=K; case 31: goto L8320; /* FLY */ case 32: goto L8330; /* LISTEN */ case 33: goto L8340; /* ZZZZ */ - case 34: goto L8350; /* SEED */ } BUG(23); @@ -106,7 +104,6 @@ L4090: switch (VERB-1) { case 31: goto L9320; /* FLY */ case 32: return(2011); /* LISTEN */ case 33: goto L8340; /* ZZZZ */ - case 34: goto L8350; /* SEED */ } BUG(24); @@ -524,7 +521,7 @@ L8300: SPK=201; /* This next part is shared with the "resume" code. The two cases are * distinguished by the value of kk (-1 for suspend, +1 for resume). */ -L8305: DATIME(I,K); +L8305: DATIME(&I,&K); K=I+650*K; SAVWRD(KK,K); K=VRSION; @@ -557,7 +554,7 @@ L8305: DATIME(I,K); SAVWRD(KK,K); if(K != 0) goto L8318; K=NUL; - ZZWORD=RNDVOC(3,ZZWORD-MESH*2)+MESH*2; + ZZWORD=RNDVOC(3,ZZWORD); if(KK > 0) return(8); RSPEAK(266); exit(0); @@ -604,7 +601,7 @@ L8330: SPK=228; RSPEAK(IABS(K)); if(K < 0) return(2012); SPK=0; -L8332: SETPRM(1,ZZWORD-MESH*2,0); +L8332: SETPRM(1,ZZWORD,0); /* 8335 */ for (I=1; I<=100; I++) { if(!HERE(I) || OBJSND[I] == 0 || PROP[I] < 0) goto L8335; PSPEAK(I,OBJSND[I]+PROP[I]); @@ -625,14 +622,4 @@ L8340: if(!AT(RESER) && LOC != FIXED[RESER]-1) return(2011); RSPEAK(241); return(2); -/* Seed. Expected in game logs to replicate the LCG state */ - -L8350: { - long sv; - int n; - n = sscanf(raw_input, "seed %ld\n", &sv); - if (n >= 1) - set_seed(sv); - return(2); - } }