X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=advent.h;h=321e0363417c332f079e4a00da1ad0cb930eaa98;hp=788d65934e8b88cea5019e40136927f5ed261456;hb=7bb2cda986e7357547ffff85268c765b53257111;hpb=9e2cb3c19196a26af8e20803314f42b69dc0e014 diff --git a/advent.h b/advent.h index 788d659..321e036 100644 --- a/advent.h +++ b/advent.h @@ -8,9 +8,9 @@ /* LCG PRNG parameters tested against * Knuth vol. 2. by the original authors */ -#define LCG_A 1093 -#define LCG_C 221587 -#define LCG_M 1048576 +#define LCG_A 1093L +#define LCG_C 221587L +#define LCG_M 1048576L #define LINESIZE 1024 #define TOKLEN 5 // № sigificant characters in a token */ @@ -107,6 +107,9 @@ enum phase_codes { GO_MOVE, GO_TOP, GO_CLEAROBJ, + GO_CHECKHINT, + GO_CHECKFOO, + GO_LOOKUP, GO_WORD2, GO_UNKNOWN, GO_DWARFWAKE, @@ -119,7 +122,7 @@ typedef long loc_t; // index into the locations array */ typedef long turn_t; // turn counter or threshold */ struct game_t { - int64_t lcg_x; + int32_t lcg_x; long abbnum; // How often to print long descriptions score_t bonus; // What kind of finishing bonus we are getting loc_t chloc; // pirate chest location @@ -232,7 +235,7 @@ extern int restore(FILE *); extern long initialise(void); extern int action(command_t command); extern void state_change(obj_t, int); - +extern bool is_valid(struct game_t); void bug(enum bugtype, const char *) __attribute__((__noreturn__));