Use LOC_* constants for locations. Clean up some ARB_* constants.
[open-adventure.git] / init.c
diff --git a/init.c b/init.c
index aae770424558e6f21c1ada2f4099bb4f1df5d97b..37827102bd0be64a775a951e1f1cc4c18b0ea2a1 100644 (file)
--- a/init.c
+++ b/init.c
@@ -5,6 +5,7 @@
 
 #include "advent.h"
 #include "database.h"
+#include "newdb.h"
 
 /*
  * Initialisation
@@ -183,7 +184,7 @@ void initialise(void)
 
     for (i=1; i<=LOCSIZ; i++) {
        game.abbrev[i]=0;
-       if (!(LTEXT[i] == 0 || KEY[i] == 0)) {
+       if (!(locations[i].description.big == 0 || KEY[i] == 0)) {
            k=KEY[i];
            if(MOD(labs(TRAVEL[k]),1000) == 1)COND[i]=2;
        }
@@ -218,7 +219,7 @@ void initialise(void)
      *  not yet found, so we know when to close the cave. */
     game.tally=0;
     for (i=MINTRS; i<=MAXTRS; i++) {
-       if(PTEXT[i] != 0)
+       if(object_descriptions[i].inventory != 0)
            game.prop[i]= -1;
        game.tally=game.tally-game.prop[i];
     }
@@ -323,17 +324,17 @@ void initialise(void)
      *  chest's eventual location inside the maze.  This loc is saved
      *  in game.chloc for ref.  the dead end in the other maze has its
      *  loc stored in game.chloc2. */
-    game.chloc=114;
-    game.chloc2=140;
+    game.chloc = LOC_114;
+    game.chloc2 = LOC_140;
     for (i=1; i<=NDWARVES; i++) {
        game.dseen[i]=false;
     }
     game.dflag=0;
-    game.dloc[1]=19;
-    game.dloc[2]=27;
-    game.dloc[3]=33;
-    game.dloc[4]=44;
-    game.dloc[5]=64;
+    game.dloc[1] = LOC_19;
+    game.dloc[2] = LOC_27;
+    game.dloc[3] = LOC_33;
+    game.dloc[4] = LOC_44;
+    game.dloc[5] = LOC_64;
     game.dloc[6]=game.chloc;
 
     /*  Other random flags and counters, as follows:
@@ -382,6 +383,5 @@ void initialise(void)
     game.closed=false;
     game.clshnt=false;
     game.novice=false;
-    game.setup=1;
     game.blklin=true;
 }