Refactor scoring so score() does not conditionally exit.
[open-adventure.git] / advent.h
index c5abaa6661cc917ec9fb1ad25687ba624ae512e0..043dd6bb66cdd743c636e6b256eb9fe8e0eab0ac 100644 (file)
--- a/advent.h
+++ b/advent.h
@@ -14,6 +14,7 @@
 #define INTRANSITIVE   -1              /* illegal object number */
 #define SPECIALBASE    300             /* base number of special rooms */
 #define WARNTIME       30              /* late game starts at game.limit-this */
+#define PANICTIME      15              /* time left after closing */
 
 typedef long token_t;  /* word token - someday this will be char[TOKLEN+1] */
 typedef long vocab_t;  /* index into a vocabulary array */
@@ -113,7 +114,8 @@ enum termination {endgame, quitgame, scoregame};
 extern void set_seed(long);
 extern unsigned long get_next_lcg_value(void);
 extern long randrange(long);
-extern void score(enum termination);
+extern long score(enum termination);
+extern void terminate(enum termination) __attribute__((noreturn));
 extern int suspend(FILE *);
 extern int resume(FILE *);
 extern int restore(FILE *);