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");
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");
* 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)
/* "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
}
}
- /* 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;