Move MAXDIE computation to dungeonmaker.
This commit is contained in:
parent
fa2fb48436
commit
ed80d6dd2f
5 changed files with 13 additions and 7 deletions
2
advent.h
2
advent.h
|
@ -145,5 +145,5 @@ extern long AMBER, ATTACK, AXE, BACK, BATTER, BEAR,
|
||||||
STEPS, STICK, STREAM, THROW, TRIDNT, TROLL, TROLL2,
|
STEPS, STICK, STREAM, THROW, TRIDNT, TROLL, TROLL2,
|
||||||
URN, VASE, VEND, VOLCAN, WATER;
|
URN, VASE, VEND, VOLCAN, WATER;
|
||||||
/* evrything else */
|
/* evrything else */
|
||||||
extern long I, J, K, L, MAXDIE, SPK, V1, V2, VRSION, WD1, WD1X, WD2, WD2X;
|
extern long I, J, K, L, SPK, V1, V2, VRSION, WD1, WD1X, WD2, WD2X;
|
||||||
|
|
||||||
|
|
|
@ -1764,6 +1764,7 @@
|
||||||
78 You can't pour that.
|
78 You can't pour that.
|
||||||
79 Watch it!
|
79 Watch it!
|
||||||
80 Which way?
|
80 Which way?
|
||||||
|
# Sequence of the death & reincarnation messages must not be altered
|
||||||
81 Oh dear, you seem to have gotten yourself killed. I might be able to
|
81 Oh dear, you seem to have gotten yourself killed. I might be able to
|
||||||
81 help you out, but I've never really done this before. Do you want me
|
81 help you out, but I've never really done this before. Do you want me
|
||||||
81 to try to reincarnate you?
|
81 to try to reincarnate you?
|
||||||
|
@ -1779,6 +1780,7 @@
|
||||||
85 me to do a decent reincarnation without any orange smoke, do you?
|
85 me to do a decent reincarnation without any orange smoke, do you?
|
||||||
86 Okay, if you're so smart, do it yourself! I'm leaving!
|
86 Okay, if you're so smart, do it yourself! I'm leaving!
|
||||||
90 >>> messages 81 thru 90 are reserved for "obituaries". <<<
|
90 >>> messages 81 thru 90 are reserved for "obituaries". <<<
|
||||||
|
# Death & reincarnation messages end here
|
||||||
91 Sorry, but I no longer seem to remember how it was you got here.
|
91 Sorry, but I no longer seem to remember how it was you got here.
|
||||||
92 You can't carry anything more. You'll have to drop something first.
|
92 You can't carry anything more. You'll have to drop something first.
|
||||||
93 You can't go through a locked steel grate!
|
93 You can't go through a locked steel grate!
|
||||||
|
|
|
@ -33,6 +33,7 @@ static long LNLENG;
|
||||||
static long LNPOSN;
|
static long LNPOSN;
|
||||||
static char INLINE[LINESIZE+1];
|
static char INLINE[LINESIZE+1];
|
||||||
static long OLDLOC;
|
static long OLDLOC;
|
||||||
|
static long MAXDIE;
|
||||||
|
|
||||||
// Storage for what comes out of the database
|
// Storage for what comes out of the database
|
||||||
long LINUSE;
|
long LINUSE;
|
||||||
|
@ -556,6 +557,13 @@ void write_hints(FILE* c_file, FILE* header_file, long matrix[][HINTLEN], long d
|
||||||
|
|
||||||
void write_files(FILE* c_file, FILE* header_file)
|
void write_files(FILE* c_file, FILE* header_file)
|
||||||
{
|
{
|
||||||
|
int i, MAXDIE;
|
||||||
|
for (i=0; i<=4; i++) {
|
||||||
|
long x = 2*i+81;
|
||||||
|
if(RTEXT[x] != 0)
|
||||||
|
MAXDIE=i+1;
|
||||||
|
}
|
||||||
|
|
||||||
// preprocessor defines for the header
|
// preprocessor defines for the header
|
||||||
fprintf(header_file, "#include \"sizes.h\"\n");
|
fprintf(header_file, "#include \"sizes.h\"\n");
|
||||||
fprintf(header_file, "#define RTXSIZ 277\n");
|
fprintf(header_file, "#define RTXSIZ 277\n");
|
||||||
|
@ -568,6 +576,7 @@ void write_files(FILE* c_file, FILE* header_file)
|
||||||
fprintf(header_file, "#define TRVSIZ 885\n");
|
fprintf(header_file, "#define TRVSIZ 885\n");
|
||||||
fprintf(header_file, "#define TOKLEN %d\n", TOKLEN);
|
fprintf(header_file, "#define TOKLEN %d\n", TOKLEN);
|
||||||
fprintf(header_file, "#define HINTLEN %d\n", HINTLEN);
|
fprintf(header_file, "#define HINTLEN %d\n", HINTLEN);
|
||||||
|
fprintf(header_file, "#define MAXDIE %d\n", MAXDIE);
|
||||||
fprintf(header_file, "\n");
|
fprintf(header_file, "\n");
|
||||||
|
|
||||||
// include the header in the C file
|
// include the header in the C file
|
||||||
|
|
5
init.c
5
init.c
|
@ -369,11 +369,6 @@ void initialise(void)
|
||||||
game.knfloc=0;
|
game.knfloc=0;
|
||||||
game.detail=0;
|
game.detail=0;
|
||||||
game.abbnum=5;
|
game.abbnum=5;
|
||||||
for (i=0; i<=4; i++) {
|
|
||||||
long x = 2*i+81;
|
|
||||||
if(RTEXT[x] != 0)
|
|
||||||
MAXDIE=i+1;
|
|
||||||
}
|
|
||||||
game.numdie=0;
|
game.numdie=0;
|
||||||
game.holdng=0;
|
game.holdng=0;
|
||||||
game.dkill=0;
|
game.dkill=0;
|
||||||
|
|
2
main.c
2
main.c
|
@ -22,7 +22,7 @@ long AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD,
|
||||||
CLAM, COINS, DOOR, DPRSSN, DRAGON, DWARF, EGGS,
|
CLAM, COINS, DOOR, DPRSSN, DRAGON, DWARF, EGGS,
|
||||||
EMRALD, ENTER, ENTRNC, FIND, FISSUR, FOOD,
|
EMRALD, ENTER, ENTRNC, FIND, FISSUR, FOOD,
|
||||||
GRATE, HINT, I, INVENT, J, JADE, K, KEYS,
|
GRATE, HINT, I, INVENT, J, JADE, K, KEYS,
|
||||||
KNIFE, L, LAMP, LOCK, LOOK, MAGZIN, MAXDIE,
|
KNIFE, L, LAMP, LOCK, LOOK, MAGZIN,
|
||||||
MESSAG, MIRROR, NUGGET, NUL, OGRE, OIL, OYSTER,
|
MESSAG, MIRROR, NUGGET, NUL, OGRE, OIL, OYSTER,
|
||||||
PEARL, PILLOW, PLANT, PLANT2, PYRAM, RESER, ROD, ROD2,
|
PEARL, PILLOW, PLANT, PLANT2, PYRAM, RESER, ROD, ROD2,
|
||||||
RUBY, RUG, SAPPH, SAY, SECT, SIGN, SNAKE, SPK,
|
RUBY, RUG, SAPPH, SAY, SECT, SIGN, SNAKE, SPK,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue