Condition in alternative state-management macros.

These do not entirely work yet. #define FOUNDBOOL to enable them.

All tests pass, 100% coverage.
This commit is contained in:
Eric S. Raymond 2023-04-10 18:46:47 -04:00
parent 1af01ff91f
commit 82c3ae5e65
2 changed files with 28 additions and 5 deletions

5
misc.c
View file

@ -600,7 +600,12 @@ void put(obj_t object, loc_t where, int pval)
* negated game.prop values for the repository objects. */
{
move(object, where);
#ifndef FOUNDBOOL
game.objects[object].prop = (-1) - pval;; // Needs to stay synchronized with PROP_STASHED
#else
game.objects[object].prop = - pval;; // Needs to stay synchronized with PROP_STASHED
game.objects[object].found = true;
#endif
}
void carry(obj_t object, loc_t where)