-#include "main.h"
-#include "database/database.h"
-#include "misc.h"
-
-long ABB[186], ATLOC[186], BLKLIN = true, DFLAG,
- DLOC[7], FIXED[101], HOLDNG,
- LINK[201], LNLENG, LNPOSN,
- PARMS[26], PLACE[101],
- SETUP = 0;
-signed char rawbuf[LINESIZE], INLINE[LINESIZE+1], MAP1[129], MAP2[129];
-
-long ABBNUM, AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD, BONUS,
- BOTTLE, CAGE, CAVE, CAVITY, CHAIN, CHASM, CHEST, CHLOC, CHLOC2,
- CLAM, CLOCK1, CLOCK2, CLOSED, CLOSNG, CLSHNT,
- COINS, CONDS, DALTLC, DETAIL,
- DKILL, DOOR, DPRSSN, DRAGON, DSEEN[7], DTOTAL, DWARF, EGGS,
- EMRALD, ENTER, ENTRNC, FIND, FISSUR, FOOBAR, FOOD,
+#include <time.h>
+#include "advent.h"
+#include "database.h"
+
+struct game_t game;
+
+long ATLOC[186], FIXED[NOBJECTS+1],
+ LINK[NOBJECTS*2 + 1], LNLENG, LNPOSN,
+ PARMS[26], PLACE[NOBJECTS+1];
+char rawbuf[LINESIZE], INLINE[LINESIZE+1], MAP1[129], MAP2[129];
+
+long AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD,
+ BOTTLE, CAGE, CAVE, CAVITY, CHAIN, CHASM, CHEST,
+ CLAM, COINS, DALTLC, DOOR, DPRSSN, DRAGON, DWARF, EGGS,
+ EMRALD, ENTER, ENTRNC, FIND, FISSUR, FOOD,