X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=advent.h;h=470e79ff5879d1a369dd30e308cf6f06a9d29789;hb=40ff648431dc1f2cb1e330d1f9a665c5f0a7cb68;hp=98a52d250e4f57376322a1ad7a365383f1e99d84;hpb=abf820bb5c8bcf51207ef941dbe00b7c425bf023;p=open-adventure.git diff --git a/advent.h b/advent.h index 98a52d2..470e79f 100644 --- a/advent.h +++ b/advent.h @@ -30,6 +30,10 @@ #define STATE_FOUND 0 // After discovered, before messed with #define STATE_IN_CAVITY 1 // State value common to all gemstones +/* Special fixed object-state values - integers > 0 are location */ +#define IS_FIXED -1 +#define IS_FREE 0 + /* Map a state property value to a negative range, where the object cannot be * picked up but the value can be recovered later. Avoid colliding with -1, * which has its own meaning. */ @@ -238,6 +242,8 @@ extern int resume(void); extern int restore(FILE *); extern long initialise(void); extern int action(struct command_t *command); +extern void state_change(long obj, long state); + void bug(enum bugtype, const char *) __attribute__((__noreturn__));