From fda1abed97075962560d2e2d12d1a8d931ed371d Mon Sep 17 00:00:00 2001 From: "Jason S. Ninneman" Date: Mon, 29 May 2017 13:34:34 -0700 Subject: [PATCH] Remove an obfuscation scheme for the reservoir magic word. --- actions1.c | 4 ++-- main.c | 6 +++--- share.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/actions1.c b/actions1.c index c82a7bc..5ef0953 100644 --- a/actions1.c +++ b/actions1.c @@ -556,7 +556,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); @@ -603,7 +603,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]); diff --git a/main.c b/main.c index 65726e1..7a065b2 100644 --- a/main.c +++ b/main.c @@ -30,7 +30,7 @@ long ABBNUM, AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD, BONUS, I, INVENT, IGO, IWEST, J, JADE, K, K2, KEYS, KK, KNFLOC, KNIFE, KQ, L, LAMP, LIMIT, LL, LMWARN, LOC, LOCK, LOOK, - MAGZIN, MAXDIE, MAXTRS, MESH = 123456789, + MAGZIN, MAXDIE, MAXTRS, MESSAG, MIRROR, MXSCOR, NEWLOC, NOVICE, NUGGET, NUL, NUMDIE, OBJ, ODLOC[7], OGRE, OIL, OLDLC2, OLDLOC, OLDOBJ, OYSTER, @@ -131,7 +131,7 @@ int main(int argc, char *argv[]) { L1: SETUP= -1; I=0; - ZZWORD=RNDVOC(3,0)+MESH*2; + ZZWORD=RNDVOC(3,0); NOVICE=YES(stdin, 65,1,0); NEWLOC=1; LOC=1; @@ -156,7 +156,7 @@ static bool fallback_handler(signed char *buf) set_seed(sv); printf("Seed set to %ld\n", sv); // here we reconfigure any global game state that uses random numbers - ZZWORD=RNDVOC(3,0)+MESH*2; + ZZWORD=RNDVOC(3,0); return true; } return false; diff --git a/share.h b/share.h index 5c1759c..4fd867c 100644 --- a/share.h +++ b/share.h @@ -10,7 +10,7 @@ extern long ABBNUM, AMBER, ATTACK, AXE, BACK, BATTER, BEAR, I, INVENT, IGO, IWEST, J, JADE, K, K2, KEYS, KK, KNFLOC, KNIFE, KQ, L, LAMP, LIMIT, LL, LMWARN, LOC, LOCK, LOOK, - MAGZIN, MAXDIE, MAXTRS, MESH, MESSAG, MIRROR, MXSCOR, + MAGZIN, MAXDIE, MAXTRS, MESSAG, MIRROR, MXSCOR, NEWLOC, NOVICE, NUGGET, NUL, NUMDIE, OBJ, ODLOC[], OGRE, OIL, OLDLC2, OLDLOC, OLDOBJ, OYSTER, PANIC, PEARL, PILLOW, PLANT, PLANT2, PROP[], PYRAM, -- 2.31.1