X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=dungeon.c;h=9aeda54ef6deff74051a03cdc5d0642894549601;hp=544fce8ede90585d317a4b61c4f8b101ce97315e;hb=18a9be501ff8f0c57c5d540d0f5cd080c0438cd0;hpb=fd02259c7f5d3b0fb245575981031a63bfb8b6de diff --git a/dungeon.c b/dungeon.c index 544fce8..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"); @@ -554,6 +545,12 @@ static void write_file(FILE* header_file) fprintf(header_file, "#endif\n"); } +void bug(enum bugtype num, const char *error_string) +{ + fprintf(stderr, "Fatal error %d, %s.\n", num, error_string); + exit(EXIT_FAILURE); +} + int main(void) { FILE* database = fopen("adventure.text", "r");