X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=advent.h;h=3802c83f5799baff57f35caf092b9071888cb030;hp=1f2bd8c893d18c1ef40a0009992b67c1746bef6b;hb=a57d93ce35ccdea6fa4f260bf004d6f8f9924b2f;hpb=1b5ab6c80848dd7241469a18f33b6b4ed6d515e9 diff --git a/advent.h b/advent.h index 1f2bd8c..3802c83 100644 --- a/advent.h +++ b/advent.h @@ -132,7 +132,7 @@ extern int saveresume(FILE *, bool); * TOTING(OBJ) = true if the OBJ is being carried */ #define MOD(N,M) ((N) % (M)) -#define TOTING(OBJ) (game.place[OBJ] == -1) +#define TOTING(OBJ) (game.place[OBJ] == CARRIED) #define AT(OBJ) (game.place[OBJ] == game.loc || game.fixed[OBJ] == game.loc) #define HERE(OBJ) (AT(OBJ) || TOTING(OBJ)) #define LIQ2(PBOTL) ((1-(PBOTL))*WATER+((PBOTL)/2)*(WATER+OIL)) @@ -207,6 +207,10 @@ enum speechpart {unknown, intransitive, transitive}; #define HOGRE 19 /* Trying to deal with ogre */ #define HJADE 20 /* Found all treasures except jade */ +/* Special object statuses in game.place - can also be a location number (> 0) */ +#define CARRIED -1 /* Player is toting it */ +#define NOWHERE 0 /* It's destroyed */ + /* hack to ignore GCC Unused Result */ #define IGNORE(r) do{if (r){}}while(0)