Localize V1 and V2 in main.c
[open-adventure.git] / main.c
diff --git a/main.c b/main.c
index 28f171200a04c73e0ec8da1aca3d02606e094d9c..0d00266f52e68f6585e5c92304afade1b0a54573 100644 (file)
--- a/main.c
+++ b/main.c
@@ -14,7 +14,7 @@
 
 struct game_t game;
 
-long LNLENG, LNPOSN, PARMS[26];
+long LNLENG, LNPOSN, PARMS[MAXPARMS+1];
 char rawbuf[LINESIZE], INLINE[LINESIZE+1], MAP1[129], MAP2[129];
 
 long AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD,
@@ -27,7 +27,7 @@ long AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD,
                PEARL, PILLOW, PLANT, PLANT2, PYRAM, RESER, ROD, ROD2,
                RUBY, RUG, SAPPH, SAY, SECT, SIGN, SNAKE, SPK,
                STEPS, STICK, STREAM, THROW, TRIDNT, TROLL, TROLL2,
-               URN, V1, V2, VASE, VEND,
+               URN, VASE, VEND,
                VOLCAN, VRSION = 25, WATER, WD1, WD1X, WD2, WD2X;
 FILE  *logfp;
 bool oldstyle = false;
@@ -90,8 +90,6 @@ int main(int argc, char *argv[]) {
  *  game.panic says whether he's found out he's trapped in the cave
  *  game.wzdark says whether the loc he's leaving was dark */
 
-#include "funcs.h"
-
 /* Initialize our LCG PRNG with parameters tested against Knuth vol. 2. by the original authors */
 
        lcgstate.a = 1093;
@@ -153,7 +151,7 @@ static bool fallback_handler(char *buf)
 }
 
 static bool do_command(FILE *cmdin) {
-       long LL, KQ, VERB, KK, K2;
+       long LL, KQ, VERB, KK, K2, V1, V2;
        long obj;
        long TK[21];
        static long IGO = 0;