More collecting of globals.
[open-adventure.git] / compile.c
index f0306562bf9eb77c24b599be8a9ef6bc2aeae245..7f6d8ed0d487f22eb61e9490edc43bcabd48caa0 100644 (file)
--- a/compile.c
+++ b/compile.c
@@ -12,7 +12,6 @@
 #define TRNSIZ 5
 #define TABSIZ 330
 #define VRBSIZ 35
-#define HNTSIZ 20
 #define TRVSIZ 885
 #define TOKLEN 5
 #define HINTLEN 5
@@ -268,13 +267,18 @@ int read_database(FILE* database) {
  *  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). */
 
-  for (int I=1; I<=300; I++) {
-    if(I <= NOBJECTS) PTEXT[I] = 0;
-    if(I <= RTXSIZ) RTEXT[I] = 0;
-    if(I <= CLSMAX) CTEXT[I] = 0;
-    if(I <= NOBJECTS) OBJSND[I] = 0;
-    if(I <= NOBJECTS) OBJTXT[I] = 0;
-    if(I > LOCSIZ) break;
+  for (int I=1; I<=NOBJECTS; I++) {
+    PTEXT[I] = 0;
+    OBJSND[I] = 0;
+    OBJTXT[I] = 0;
+  }
+  for (int I=1; I<=RTXSIZ; I++) {
+    RTEXT[I] = 0;
+  }
+  for (int I=1; I<=CLSMAX; I++) {
+    CTEXT[I] = 0;
+  }
+  for (int I=1; I<=LOCSIZ; I++) {
     STEXT[I] = 0;
     LTEXT[I] = 0;
     COND[I] = 0;
@@ -505,9 +509,9 @@ void read_sound_text(FILE* database)
 /*  Having read in the database, certain things are now constructed.
  *  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 ATLOC(N) as the first object at location N, and
- *  LINK(OBJ) as the next object at the same location as OBJ.
- *  (OBJ>NOBJECTS indicates that FIXED(OBJ-NOBJECTS)=LOC; LINK(OBJ) is
+ *  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.
+ *  (OBJ>NOBJECTS indicates that game.fixed(OBJ-NOBJECTS)=LOC; game.link(OBJ) is
  *  still the correct link to use.)  game.abbrev is zeroed; it controls
  *  whether the abbreviated description is printed.  Counts modulo 5
  *  unless "LOOK" is used. */