Rationalize names of structure array sizes.
[open-adventure.git] / init.c
diff --git a/init.c b/init.c
index 1ed9df6c4561f3700f3abc2ad2c5e68b0ec4310d..c197143eef49085194b3a8f4dd6cacb553bc27fb 100644 (file)
--- a/init.c
+++ b/init.c
  *     12600 words of message text (LINES, LINSIZ).
  *     885 travel options (TRAVEL, TRVSIZ).
  *     330 vocabulary words (KTAB, ATAB, TABSIZ).
- *     185 locations (LTEXT, STEXT, KEY, COND, game.abbrev, game.atloc,
- *                   LOCSND, LOCSIZ).
+ *     185 locations (KEY, COND, game.abbrev, game.atloc, LOCSIZ).
  *     100 objects (PLAC, game.place, FIXD, game.fixed, game.link (twice),
- *                   PTEXT, game.prop, OBJSND, OBJTXT).
+ *                   ogame.prop).
  *      35 "action" verbs (ACTSPK, VRBSIZ).
- *     277 random messages (RTEXT, RTXSIZ).
  *      12 different player classifications (CTEXT, CVAL, CLSMAX).
  *      20 hints (game.hintlc, game.hinted, HINTS, HNTSIZ).
- *        5 "# of turns" threshholds (TTEXT, TRNVAL, TRNSIZ).
+ *        5 "# of turns" threshholds (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,
  *  so there can't be more than 1000 words.)  These upper limits are:
  *     bit; see section 9), the number of turns he must be at the right loc(s)
  *     before triggering the hint, the points deducted for taking the hint,
  *     the message number (section 6) of the question, and the message number
- *     of the hint.  These values are stashed in the "hints" array.  HNTMAX is
- *     set to the max hint number (<= HNTSIZ).
+ *     of the hint.  These values are stashed in the "hints" array.
  *  Section 12: Unused in this version.
  *  Section 13: Sounds and text.  Each line contains either 2 or 3 numbers.  If
  *     2 (call them N and S), N is a location and message ABS(S) from section
@@ -226,7 +223,7 @@ void initialise(void)
     /*  Clear the hint stuff.  game.hintlc[i] is how long he's been at LOC
      *  with cond bit i.  game.hinted[i] is true iff hint i has been
      *  used. */
-    for (int i = 0; i < HINT_COUNT; i++) {
+    for (int i = 0; i < NHINTS; i++) {
         game.hinted[i] = false;
         game.hintlc[i] = 0;
     }
@@ -350,7 +347,7 @@ void initialise(void)
      * game.iwest      How many times he's said "west" instead of "w"
      * game.knfloc     0 if no knife here, loc if knife here, -1 after caveat
      * game.limit      Lifetime of lamp (not set here)
-     * maximum_deaths          Number of reincarnation messages available (up to 5)
+     * NDEATHS         Number of reincarnation messages available (up to 5)
      * game.numdie     Number of times killed so far
      * game.trnluz     # points lost so far due to number of turns used
      * game.turns      Tallies how many commands he's given (ignores yes/no)
@@ -377,17 +374,4 @@ void initialise(void)
     game.clshnt = false;
     game.novice = false;
     game.blklin = true;
-
-#ifdef ODEBUG
-# define NEWFLAGS      ((1<<COND_ABOVE)|(1<<COND_FOREST)|(1<<COND_DEEP));
-    int mismatches = 0;
-    for (int i = 0; i < LOCSIZ; i++) {
-       long condbits = conditions[i] & ~NEWFLAGS;
-       if (condbits == COND[i] || COND[i] == 2 && condbits == 0)
-           continue;
-       ++mismatches;
-       printf("Mismatch at %ld: COND=%x consitions=%x\n", COND[i], condbits);
-    }
-    printf("%d condbit mismatches\n", mismatches);
-#endif
 }