From: Jason S. Ninneman Date: Mon, 29 May 2017 00:21:04 +0000 (-0700) Subject: Apply further polish and add in a couple of missing size variables. X-Git-Tag: seed~28 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=d6b59a1c12ad8829de004dc3b478fde2a7ff197d;p=open-adventure.git Apply further polish and add in a couple of missing size variables. --- diff --git a/database.c b/database.c index cacd79d..2753966 100644 --- a/database.c +++ b/database.c @@ -1,36 +1,29 @@ #include "database.h" -const long RTXSIZ = 277; -const long CLSMAX = 12; -const long LOCSIZ = 185; -const long LINSIZ = 12500; -const long TRNSIZ = 5; -const long TABSIZ = 330; -const long VRBSIZ = 35; long LINUSE; long TRVS; long CLSSES; long TRNVLS; long TABNDX; long HNTMAX; -long PTEXT[101]; -long RTEXT[278]; -long CTEXT[13]; -long OBJSND[101]; -long OBJTXT[101]; -long STEXT[186]; -long LTEXT[186]; -long COND[186]; -long KEY[186]; -long LOCSND[186]; -long LINES[12500]; -long CVAL[13]; -long TTEXT[6]; -long TRNVAL[6]; -long TRAVEL[886]; -long KTAB[331]; -long ATAB[331]; -long PLAC[101]; -long FIXD[101]; -long ACTSPK[36]; -long HINTS[21][5]; +long PTEXT[]; +long RTEXT[]; +long CTEXT[]; +long OBJSND[]; +long OBJTXT[]; +long STEXT[]; +long LTEXT[]; +long COND[]; +long KEY[]; +long LOCSND[]; +long LINES[]; +long CVAL[]; +long TTEXT[]; +long TRNVAL[]; +long TRAVEL[]; +long KTAB[]; +long ATAB[]; +long PLAC[]; +long FIXD[]; +long ACTSPK[]; +long HINTS[][5]; diff --git a/database.h b/database.h index c9b5167..0c25331 100644 --- a/database.h +++ b/database.h @@ -1,10 +1,13 @@ -extern const long RTXSIZ; -extern const long CLSMAX; -extern const long LOCSIZ; -extern const long LINSIZ; -extern const long TRNSIZ; -extern const long TABSIZ; -extern const long VRBSIZ; +#define RTXSIZ 277 +#define CLSMAX 12 +#define LOCSIZ 185 +#define LINSIZ 12500 +#define TRNSIZ 5 +#define TABSIZ 330 +#define VRBSIZ 35 +#define HNTSIZ 20 +#define TRVSIZ 885 + extern long LINUSE; extern long TRVS; extern long CLSSES; @@ -12,23 +15,23 @@ extern long TRNVLS; extern long TABNDX; extern long HNTMAX; extern long PTEXT[101]; -extern long RTEXT[278]; -extern long CTEXT[13]; +extern long RTEXT[RTXSIZ + 1]; +extern long CTEXT[CLSMAX + 1]; extern long OBJSND[101]; extern long OBJTXT[101]; -extern long STEXT[186]; -extern long LTEXT[186]; -extern long COND[186]; -extern long KEY[186]; -extern long LOCSND[186]; -extern long LINES[12500]; -extern long CVAL[13]; -extern long TTEXT[6]; -extern long TRNVAL[6]; -extern long TRAVEL[886]; -extern long KTAB[331]; -extern long ATAB[331]; +extern long STEXT[LOCSIZ + 1]; +extern long LTEXT[LOCSIZ + 1]; +extern long COND[LOCSIZ + 1]; +extern long KEY[LOCSIZ + 1]; +extern long LOCSND[LOCSIZ + 1]; +extern long LINES[LINSIZ + 1]; +extern long CVAL[CLSMAX + 1]; +extern long TTEXT[TRNSIZ + 1]; +extern long TRNVAL[TRNSIZ + 1]; +extern long TRAVEL[TRVSIZ + 1]; +extern long KTAB[TABSIZ + 1]; +extern long ATAB[TABSIZ + 1]; extern long PLAC[101]; extern long FIXD[101]; -extern long ACTSPK[36]; -extern long HINTS[21][5]; +extern long ACTSPK[VRBSIZ + 1]; +extern long HINTS[HNTSIZ + 1][5]; diff --git a/main.c b/main.c index a72d3b5..e2c24e5 100644 --- a/main.c +++ b/main.c @@ -26,7 +26,7 @@ long ABBNUM, AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD, BONUS, DKILL, DOOR, DPRSSN, DRAGON, DSEEN[7], DTOTAL, DWARF, EGGS, EMRALD, ENTER, ENTRNC, FIND, FISSUR, FOOBAR, FOOD, GRATE, HINT, HINTED[21], HINTLC[21], - HNTSIZ = 20, I, INVENT, IGO, IWEST, J, JADE, K, K2, KEYS, KK, + I, INVENT, IGO, IWEST, J, JADE, K, K2, KEYS, KK, KNFLOC, KNIFE, KQ, L, LAMP, LIMIT, LL, LMWARN, LOC, LOCK, LOOK, MAGZIN, MAXDIE, MAXTRS, MESH = 123456789, @@ -38,7 +38,7 @@ long ABBNUM, AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD, BONUS, SCORE, SECT, SIGN, SNAKE, SPK, STEPS, STICK, STREAM, TALLY, THRESH, THROW, TK[21], TRIDNT, TRNDEX, TRNLUZ, TROLL, TROLL2, - TRVSIZ = 885, TURNS, URN, V1, V2, VASE, VEND, VERB, + TURNS, URN, V1, V2, VASE, VEND, VERB, VOLCAN, VRSION = 25, WATER, WD1, WD1X, WD2, WD2X, WZDARK = false, ZZWORD; FILE *logfp; diff --git a/share.h b/share.h index 59ef9bb..5c1759c 100644 --- a/share.h +++ b/share.h @@ -7,7 +7,7 @@ extern long ABBNUM, AMBER, ATTACK, AXE, BACK, BATTER, BEAR, DKILL, DOOR, DPRSSN, DRAGON, DSEEN[], DTOTAL, DWARF, EGGS, EMRALD, ENTER, ENTRNC, FIND, FISSUR, FOOBAR, FOOD, GRATE, HINT, HINTED[], HINTLC[], - HNTSIZ, I, INVENT, IGO, IWEST, J, JADE, K, K2, KEYS, KK, + I, INVENT, IGO, IWEST, J, JADE, K, K2, KEYS, KK, KNFLOC, KNIFE, KQ, L, LAMP, LIMIT, LL, LMWARN, LOC, LOCK, LOOK, MAGZIN, MAXDIE, MAXTRS, MESH, MESSAG, MIRROR, MXSCOR, @@ -18,7 +18,7 @@ extern long ABBNUM, AMBER, ATTACK, AXE, BACK, BATTER, BEAR, SCORE, SECT, SETUP, SIGN, SNAKE, SPK, STEPS, STICK, STREAM, TALLY, THRESH, THROW, TK[], TRIDNT, TRNDEX, TRNLUZ, TROLL, TROLL2, - TRVSIZ, TURNS, URN, V1, V2, VASE, VEND, VERB, + TURNS, URN, V1, V2, VASE, VEND, VERB, VOLCAN, VRSION, WATER, WD1, WD1X, WD2, WD2X, WZDARK, ZZWORD;