Move a few prototypes and static'ed a few functions
[open-adventure.git] / init.c
diff --git a/init.c b/init.c
index 5b1558c86f90a9cbaf5dc780d6a57029dc9180c7..ca9d1940ae9f121fb48c104f5ceaff3a1f21cd59 100644 (file)
--- a/init.c
+++ b/init.c
@@ -176,8 +176,8 @@ void initialise(void)
        printf("Initialising...\n");
 
     for (int i=1; i<=NOBJECTS; i++) {
-       game.place[i]=0;
-       game.prop[i]=0;
+       game.place[i] = NOWHERE;
+       game.prop[i] = 0;
        game.link[i+NOBJECTS]=game.link[i]=0;
     }
 
@@ -217,10 +217,10 @@ void initialise(void)
      *  they are described.  game.tally keeps track of how many are
      *  not yet found, so we know when to close the cave. */
     game.tally=0;
-    for (int i=MINTRS; i<=MAXTRS; i++) {
-       if(object_descriptions[i].inventory != 0)
-           game.prop[i]= -1;
-       game.tally=game.tally-game.prop[i];
+    for (int treasure=MINTRS; treasure<=MAXTRS; treasure++) {
+       if(object_descriptions[treasure].inventory != 0)
+           game.prop[treasure]= -1;
+       game.tally=game.tally-game.prop[treasure];
     }
 
     /*  Clear the hint stuff.  game.hintlc[i] is how long he's been at LOC
@@ -323,17 +323,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 = LOC_114;
-    game.chloc2 = LOC_140;
+    game.chloc = LOC_DEADEND12;
+    game.chloc2 = LOC_DEADEND13;
     for (int i=1; i<=NDWARVES; i++) {
        game.dseen[i]=false;
     }
     game.dflag=0;
-    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[1] = LOC_KINGHALL;
+    game.dloc[2] = LOC_WESTBANK;
+    game.dloc[3] = LOC_Y2;
+    game.dloc[4] = LOC_ALIKE3;
+    game.dloc[5] = LOC_COMPLEX;
     game.dloc[6]=game.chloc;
 
     /*  Other random flags and counters, as follows: