endif
OBJS=main.o init.o actions1.o actions2.o score.o misc.o database.o
-SOURCES=$(OBJS:.o=.c) COPYING NEWS README TODO adventure.text advent.text control misc.h main.h share.h funcs.h
+SOURCES=$(OBJS:.o=.c) COPYING NEWS README TODO adventure.text advent.text control advent.h funcs.h
.c.o:
$(CC) $(CCFLAGS) -O $(DBX) -c $<
advent: $(OBJS) database.o
$(CC) $(CCFLAGS) -O $(DBX) -o advent $(OBJS) $(LIBS)
-main.o: main.h misc.h funcs.h database.h
+main.o: advent.h funcs.h database.h
-init.o: misc.h main.h share.h funcs.h database.h
+init.o: advent.h funcs.h database.h
-actions1.o: misc.h main.h share.h funcs.h database.h
+actions1.o: advent.h funcs.h database.h
-actions2.o: misc.h main.h share.h funcs.h
+actions2.o: advent.h funcs.h
-score.o: misc.h main.h share.h database.h
+score.o: advent.h database.h
-misc.o: misc.h main.h database.h
+misc.o: advent.h database.h
database.o: database.h
#include <stdlib.h>
#include <stdbool.h>
-#include "misc.h"
-#include "main.h"
-#include "share.h"
+#include "advent.h"
#include "funcs.h"
#include "database.h"
-#include "misc.h"
-#include "main.h"
-#include "share.h"
+#include "advent.h"
#include "funcs.h"
/* Carry an object. Special cases for bird and cage (if bird in cage, can't
--- /dev/null
+#include <stdio.h>
+#include <stdbool.h>
+
+#define LINESIZE 100
+
+typedef struct lcg_state
+{
+ unsigned long a, c, m, x;
+} lcg_state;
+
+extern long ABB[], ATLOC[], BLKLIN, DFLAG, DLOC[], FIXED[], HOLDNG,
+ LINK[], LNLENG, LNPOSN,
+ PARMS[], PLACE[];
+extern char rawbuf[LINESIZE], INLINE[LINESIZE+1], MAP1[], MAP2[];
+extern FILE *logfp;
+extern bool oldstyle;
+extern lcg_state lcgstate;
+
+/* b is not needed for POSIX but harmless */
+#define READ_MODE "rb"
+#define WRITE_MODE "wb"
+
+extern void fSPEAK(long);
+#define SPEAK(N) fSPEAK(N)
+extern void fPSPEAK(long,long);
+#define PSPEAK(MSG,SKIP) fPSPEAK(MSG,SKIP)
+extern void fRSPEAK(long);
+#define RSPEAK(I) fRSPEAK(I)
+extern void fSETPRM(long,long,long);
+#define SETPRM(FIRST,P1,P2) fSETPRM(FIRST,P1,P2)
+extern bool fGETIN(FILE *,long*,long*,long*,long*);
+#define GETIN(input,WORD1,WORD1X,WORD2,WORD2X) fGETIN(input,&WORD1,&WORD1X,&WORD2,&WORD2X)
+extern long fYES(FILE *,long,long,long);
+#define YES(input,X,Y,Z) fYES(input,X,Y,Z)
+extern long fGETNUM(FILE *);
+#define GETNUM(K) fGETNUM(K)
+extern long fGETTXT(long,long,long);
+#define GETTXT(SKIP,ONEWRD,UPPER) fGETTXT(SKIP,ONEWRD,UPPER)
+extern long fMAKEWD(long);
+#define MAKEWD(LETTRS) fMAKEWD(LETTRS)
+extern void fPUTTXT(long,long*,long);
+#define PUTTXT(WORD,STATE,CASE) fPUTTXT(WORD,&STATE,CASE)
+extern void fSHFTXT(long,long);
+#define SHFTXT(FROM,DELTA) fSHFTXT(FROM,DELTA)
+extern void fTYPE0();
+#define TYPE0() fTYPE0()
+extern void fSAVWDS(long*,long*,long*,long*,long*,long*,long*);
+#define SAVWDS(W1,W2,W3,W4,W5,W6,W7) fSAVWDS(&W1,&W2,&W3,&W4,&W5,&W6,&W7)
+extern void fSAVARR(long*,long);
+#define SAVARR(ARR,N) fSAVARR(ARR,N)
+extern void fSAVWRD(long,long*);
+#define SAVWRD(OP,WORD) fSAVWRD(OP,&WORD)
+extern long fVOCAB(long,long);
+#define VOCAB(ID,INIT) fVOCAB(ID,INIT)
+extern void fDSTROY(long);
+#define DSTROY(OBJECT) fDSTROY(OBJECT)
+extern void fJUGGLE(long);
+#define JUGGLE(OBJECT) fJUGGLE(OBJECT)
+extern void fMOVE(long,long);
+#define MOVE(OBJECT,WHERE) fMOVE(OBJECT,WHERE)
+extern long fPUT(long,long,long);
+#define PUT(OBJECT,WHERE,PVAL) fPUT(OBJECT,WHERE,PVAL)
+extern void fCARRY(long,long);
+#define CARRY(OBJECT,WHERE) fCARRY(OBJECT,WHERE)
+extern void fDROP(long,long);
+#define DROP(OBJECT,WHERE) fDROP(OBJECT,WHERE)
+extern long fATDWRF(long);
+#define ATDWRF(WHERE) fATDWRF(WHERE)
+extern long fSETBIT(long);
+#define SETBIT(BIT) fSETBIT(BIT)
+extern long fTSTBIT(long,long);
+#define TSTBIT(MASK,BIT) fTSTBIT(MASK,BIT)
+extern long fRNDVOC(long,long);
+#define RNDVOC(CHAR,FORCE) fRNDVOC(CHAR,FORCE)
+extern void fBUG(long);
+#define BUG(NUM) fBUG(NUM)
+extern void fMAPLIN(FILE *);
+#define MAPLIN(FIL) fMAPLIN(FIL)
+extern void fTYPE();
+#define TYPE() fTYPE()
+extern void fMPINIT();
+#define MPINIT() fMPINIT()
+extern void fSAVEIO(long,long,long*);
+#define SAVEIO(OP,IN,ARR) fSAVEIO(OP,IN,ARR)
+extern void DATIME(long*, long*);
+extern long fIABS(long);
+#define IABS(N) fIABS(N)
+extern long fMOD(long,long);
+#define MOD(N,M) fMOD(N,M)
+extern void set_seed(long);
+extern unsigned long get_next_lcg_value(void);
+extern long randrange(long);
+
+extern void score(long);
+extern 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[], DTOTAL, DWARF, EGGS,
+ EMRALD, ENTER, ENTRNC, FIND, FISSUR, FOOBAR, FOOD,
+ GRATE, HINT, HINTED[], HINTLC[],
+ I, INVENT, IGO, IWEST, J, JADE, K, K2, KEYS, KK,
+ KNFLOC, KNIFE, KQ, L, LAMP, LIMIT, LL,
+ LMWARN, LOC, LOCK, LOOK,
+ MAGZIN, MAXDIE, MAXTRS, MESSAG, MIRROR, MXSCOR,
+ NEWLOC, NOVICE, NUGGET, NUL, NUMDIE, OBJ,
+ ODLOC[], OGRE, OIL, OLDLC2, OLDLOC, OLDOBJ, OYSTER,
+ PANIC, PEARL, PILLOW, PLANT, PLANT2, PROP[], PYRAM,
+ RESER, ROD, ROD2, RUBY, RUG, SAPPH, SAVED, SAY,
+ SCORE, SECT, SETUP, SIGN, SNAKE, SPK, STEPS, STICK,
+ STREAM, TALLY, THRESH, THROW, TK[], TRIDNT,
+ TRNDEX, TRNLUZ, TROLL, TROLL2,
+ TURNS, URN, V1, V2, VASE, VEND, VERB,
+ VOLCAN, VRSION, WATER, WD1, WD1X, WD2, WD2X,
+ WZDARK, ZZWORD;
+
#include <stdio.h>
#include <stdbool.h>
-#include "misc.h"
-#include "main.h"
-#include "share.h"
+#include "advent.h"
#include "funcs.h"
#include "database.h"
#include <getopt.h>
#include <signal.h>
#include <time.h>
-#include "main.h"
+#include "advent.h"
#include "database.h"
-#include "misc.h"
long ABB[186], ATLOC[186], BLKLIN = true, DFLAG,
DLOC[7], FIXED[101], HOLDNG,
+++ /dev/null
-#include <stdbool.h>
-
-#define LINESIZE 100
-
-typedef struct lcg_state
-{
- unsigned long a, c, m, x;
-} lcg_state;
-
-extern long ABB[], ATLOC[], BLKLIN, DFLAG, DLOC[], FIXED[], HOLDNG,
- LINK[], LNLENG, LNPOSN,
- PARMS[], PLACE[];
-extern char rawbuf[LINESIZE], INLINE[LINESIZE+1], MAP1[], MAP2[];
-extern FILE *logfp;
-extern bool oldstyle;
-extern lcg_state lcgstate;
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
-#include "main.h"
-#include "share.h" /* for SETUP */
-#include "misc.h"
+#include "advent.h"
#include "funcs.h"
#include "database.h"
+++ /dev/null
-#include <stdio.h>
-#include <stdbool.h>
-
-/* b is not needed for POSIX but harmless */
-#define READ_MODE "rb"
-#define WRITE_MODE "wb"
-
-extern void fSPEAK(long);
-#define SPEAK(N) fSPEAK(N)
-extern void fPSPEAK(long,long);
-#define PSPEAK(MSG,SKIP) fPSPEAK(MSG,SKIP)
-extern void fRSPEAK(long);
-#define RSPEAK(I) fRSPEAK(I)
-extern void fSETPRM(long,long,long);
-#define SETPRM(FIRST,P1,P2) fSETPRM(FIRST,P1,P2)
-extern bool fGETIN(FILE *,long*,long*,long*,long*);
-#define GETIN(input,WORD1,WORD1X,WORD2,WORD2X) fGETIN(input,&WORD1,&WORD1X,&WORD2,&WORD2X)
-extern long fYES(FILE *,long,long,long);
-#define YES(input,X,Y,Z) fYES(input,X,Y,Z)
-extern long fGETNUM(FILE *);
-#define GETNUM(K) fGETNUM(K)
-extern long fGETTXT(long,long,long);
-#define GETTXT(SKIP,ONEWRD,UPPER) fGETTXT(SKIP,ONEWRD,UPPER)
-extern long fMAKEWD(long);
-#define MAKEWD(LETTRS) fMAKEWD(LETTRS)
-extern void fPUTTXT(long,long*,long);
-#define PUTTXT(WORD,STATE,CASE) fPUTTXT(WORD,&STATE,CASE)
-extern void fSHFTXT(long,long);
-#define SHFTXT(FROM,DELTA) fSHFTXT(FROM,DELTA)
-extern void fTYPE0();
-#define TYPE0() fTYPE0()
-extern void fSAVWDS(long*,long*,long*,long*,long*,long*,long*);
-#define SAVWDS(W1,W2,W3,W4,W5,W6,W7) fSAVWDS(&W1,&W2,&W3,&W4,&W5,&W6,&W7)
-extern void fSAVARR(long*,long);
-#define SAVARR(ARR,N) fSAVARR(ARR,N)
-extern void fSAVWRD(long,long*);
-#define SAVWRD(OP,WORD) fSAVWRD(OP,&WORD)
-extern long fVOCAB(long,long);
-#define VOCAB(ID,INIT) fVOCAB(ID,INIT)
-extern void fDSTROY(long);
-#define DSTROY(OBJECT) fDSTROY(OBJECT)
-extern void fJUGGLE(long);
-#define JUGGLE(OBJECT) fJUGGLE(OBJECT)
-extern void fMOVE(long,long);
-#define MOVE(OBJECT,WHERE) fMOVE(OBJECT,WHERE)
-extern long fPUT(long,long,long);
-#define PUT(OBJECT,WHERE,PVAL) fPUT(OBJECT,WHERE,PVAL)
-extern void fCARRY(long,long);
-#define CARRY(OBJECT,WHERE) fCARRY(OBJECT,WHERE)
-extern void fDROP(long,long);
-#define DROP(OBJECT,WHERE) fDROP(OBJECT,WHERE)
-extern long fATDWRF(long);
-#define ATDWRF(WHERE) fATDWRF(WHERE)
-extern long fSETBIT(long);
-#define SETBIT(BIT) fSETBIT(BIT)
-extern long fTSTBIT(long,long);
-#define TSTBIT(MASK,BIT) fTSTBIT(MASK,BIT)
-extern long fRNDVOC(long,long);
-#define RNDVOC(CHAR,FORCE) fRNDVOC(CHAR,FORCE)
-extern void fBUG(long);
-#define BUG(NUM) fBUG(NUM)
-extern void fMAPLIN(FILE *);
-#define MAPLIN(FIL) fMAPLIN(FIL)
-extern void fTYPE();
-#define TYPE() fTYPE()
-extern void fMPINIT();
-#define MPINIT() fMPINIT()
-extern void fSAVEIO(long,long,long*);
-#define SAVEIO(OP,IN,ARR) fSAVEIO(OP,IN,ARR)
-extern void DATIME(long*, long*);
-extern long fIABS(long);
-#define IABS(N) fIABS(N)
-extern long fMOD(long,long);
-#define MOD(N,M) fMOD(N,M)
-extern void set_seed(long);
-extern unsigned long get_next_lcg_value(void);
-extern long randrange(long);
#include <stdlib.h>
-#include "misc.h"
-#include "main.h"
-#include "share.h"
+#include "advent.h"
#include "database.h"
/*
+++ /dev/null
-extern void score(long);
-extern 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[], DTOTAL, DWARF, EGGS,
- EMRALD, ENTER, ENTRNC, FIND, FISSUR, FOOBAR, FOOD,
- GRATE, HINT, HINTED[], HINTLC[],
- I, INVENT, IGO, IWEST, J, JADE, K, K2, KEYS, KK,
- KNFLOC, KNIFE, KQ, L, LAMP, LIMIT, LL,
- LMWARN, LOC, LOCK, LOOK,
- MAGZIN, MAXDIE, MAXTRS, MESSAG, MIRROR, MXSCOR,
- NEWLOC, NOVICE, NUGGET, NUL, NUMDIE, OBJ,
- ODLOC[], OGRE, OIL, OLDLC2, OLDLOC, OLDOBJ, OYSTER,
- PANIC, PEARL, PILLOW, PLANT, PLANT2, PROP[], PYRAM,
- RESER, ROD, ROD2, RUBY, RUG, SAPPH, SAVED, SAY,
- SCORE, SECT, SETUP, SIGN, SNAKE, SPK, STEPS, STICK,
- STREAM, TALLY, THRESH, THROW, TK[], TRIDNT,
- TRNDEX, TRNLUZ, TROLL, TROLL2,
- TURNS, URN, V1, V2, VASE, VEND, VERB,
- VOLCAN, VRSION, WATER, WD1, WD1X, WD2, WD2X,
- WZDARK, ZZWORD;
-