From: Jason S. Ninneman Date: Mon, 19 Jun 2017 03:02:03 +0000 (-0700) Subject: Abolish MAXDIE in favor of maximum_deaths. X-Git-Tag: 1.1~230 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F104%2Fhead;p=open-adventure.git Abolish MAXDIE in favor of maximum_deaths. --- diff --git a/dungeon.c b/dungeon.c index 0d82fb6..9aeda54 100644 --- a/dungeon.c +++ b/dungeon.c @@ -502,14 +502,6 @@ static void write_hints(FILE* header_file, long matrix[][HINTLEN], long dim1, lo static void write_file(FILE* header_file) { - int MAXDIE; - for (int i = 0; i <= 4; i++) { - long x = 2 * i + 81; - if (RTEXT[x] != 0) - MAXDIE = i + 1; - } - - fprintf(header_file, "#ifndef DATABASE_H\n"); fprintf(header_file, "#define DATABASE_H\n"); fprintf(header_file, "\n"); @@ -518,7 +510,6 @@ static void write_file(FILE* header_file) fprintf(header_file, "#define TABSIZ 330\n"); fprintf(header_file, "#define HNTSIZ 20\n"); fprintf(header_file, "#define TOKLEN %d\n", TOKLEN); - fprintf(header_file, "#define MAXDIE %d\n", MAXDIE); fprintf(header_file, "\n"); fprintf(header_file, "\n"); diff --git a/init.c b/init.c index addf418..c0bd560 100644 --- a/init.c +++ b/init.c @@ -350,7 +350,7 @@ void initialise(void) * game.iwest How many times he's said "west" instead of "w" * game.knfloc 0 if no knife here, loc if knife here, -1 after caveat * game.limit Lifetime of lamp (not set here) - * MAXDIE Number of reincarnation messages available (up to 5) + * maximum_deaths Number of reincarnation messages available (up to 5) * game.numdie Number of times killed so far * game.thresh Next #turns threshhold (-1 if none) * game.trndex Index in TRNVAL of next threshold (db section 14) diff --git a/main.c b/main.c index 7e30f4e..c188036 100644 --- a/main.c +++ b/main.c @@ -470,7 +470,7 @@ static bool dwarfmove(void) /* "You're dead, Jim." * * If the current loc is zero, it means the clown got himself killed. - * We'll allow this maxdie times. MAXDIE is automatically set based + * We'll allow this maxdie times. maximum_deaths is automatically set based * on the number of snide messages available. Each death results in * a message (81, 83, etc.) which offers reincarnation; if accepted, * this results in message 82, 84, etc. The last time, if he wants diff --git a/score.c b/score.c index 1bee09b..3091413 100644 --- a/score.c +++ b/score.c @@ -50,14 +50,14 @@ long score(enum termination mode) } } - /* Now look at how he finished and how far he got. MAXDIE and + /* Now look at how he finished and how far he got. maximum_deaths and * game.numdie tell us how well he survived. game.dflag will tell us * if he ever got suitably deep into the cave. game.closng still * indicates whether he reached the endgame. And if he got as far as * "cave closed" (indicated by "game.closed"), then bonus is zero for * mundane exits or 133, 134, 135 if he blew it (so to speak). */ - score += (MAXDIE - game.numdie) * 10; - mxscor += MAXDIE * 10; + score += (maximum_deaths - game.numdie) * 10; + mxscor += maximum_deaths * 10; if (mode == endgame) score += 4; mxscor += 4;