X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=advent.h;h=98a52d250e4f57376322a1ad7a365383f1e99d84;hp=cca1dbab1d328e310643fc1f389639d03444f0c4;hb=f3dae6ff83cad7d5bf3cbf5db523af7ca6629941;hpb=294f2b8a6d0afeb1d209f5cd7baa6509710f0bc0 diff --git a/advent.h b/advent.h index cca1dba..98a52d2 100644 --- a/advent.h +++ b/advent.h @@ -27,7 +27,13 @@ /* Special object-state values - integers > 0 are object-specific */ #define STATE_NOTFOUND -1 // 'Not found" state of treasures */ -#define STATE_GROUND 0 // After discovered, before messed with +#define STATE_FOUND 0 // After discovered, before messed with +#define STATE_IN_CAVITY 1 // State value common to all gemstones + +/* 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. */ +#define STASHED(obj) (-1 - game.prop[obj]) /* * MOD(N,M) = Arithmetic modulus @@ -185,7 +191,7 @@ struct command_t { token_t wd2; long id1; long id2; - char raw1[BUFSIZ], raw2[BUFSIZ]; + char raw1[LINESIZE], raw2[LINESIZE]; }; extern struct game_t game;