X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=advent.h;h=b9b2e0c996608e9eb309197ae727ee1eaf72e94f;hb=346bcf9458c408b5bd2a6fb5679a2e86bd3952fb;hp=a8d53f23c17ca5eeca0301be892858cebc01882d;hpb=d23111dabab46a8bcdf7e453ec099e4521d1cad6;p=open-adventure.git diff --git a/advent.h b/advent.h index a8d53f2..b9b2e0c 100644 --- a/advent.h +++ b/advent.h @@ -19,6 +19,7 @@ #define PANICTIME 15 // time left after closing #define BATTERYLIFE 2500 // turn limit increment from batteries #define WORD_NOT_FOUND -1 // "Word not found" flag value for the vocab hash functions. +#define NOT_YET_FOUND -1 // 'Not found" state of treasures */ #define CARRIED -1 // Player is toting it #define READ_MODE "rb" // b is not needed for POSIX but harmless #define WRITE_MODE "wb" // b is not needed for POSIX but harmless @@ -163,6 +164,16 @@ struct game_t { long prop[NOBJECTS + 1]; }; +/* + * Game application settings - settings, but not state of the game, per se. + * This data is not saved in a saved game. + */ +struct settings_t { + FILE *logfp; + bool oldstyle; + bool prompt; +}; + struct command_t { enum speechpart part; vocab_t verb; @@ -172,8 +183,7 @@ struct command_t { }; extern struct game_t game; -extern FILE *logfp; -extern bool oldstyle, prompt; +extern struct settings_t settings; extern char* xstrdup(const char* s); extern void* xmalloc(size_t size); @@ -218,7 +228,6 @@ extern int restore(FILE *); extern long initialise(void); extern int action(struct command_t *command); -/* Alas, declaring this static confuses the coverage analyzer */ void bug(enum bugtype, const char *) __attribute__((__noreturn__)); /* end */