Remove an unneeded layer of macro indirection.

This commit is contained in:
Eric S. Raymond 2024-09-22 22:21:47 -04:00
parent 354e56a69b
commit 0157e58668
3 changed files with 3 additions and 4 deletions

View file

@ -407,7 +407,7 @@ static phase_codes_t vcarry(verb_t verb, obj_t obj) {
}
if ((obj == BIRD || obj == CAGE) &&
(game.objects[BIRD].prop == BIRD_CAGED ||
OBJECT_STASHED(BIRD) == BIRD_CAGED)) {
PROP_STASHIFY(game.objects[BIRD].prop) == BIRD_CAGED)) {
/* expression maps BIRD to CAGE and CAGE to BIRD */
carry(BIRD + CAGE - obj, game.loc);
}

View file

@ -61,7 +61,7 @@
* STATE_NOTFOUND is only set on treasures. Non-treasures start the
* game in STATE_FOUND.
*
* OBJECT_STASHED is supposed to map a state property value to a
* PROP_STASHIFY is supposed to map a state property value to a
* negative range, where the object cannot be picked up but the value
* can be recovered later. Various objects get this property when
* the cave starts to close. Only seems to be significant for the bird
@ -100,7 +100,6 @@
#define OBJECT_IS_NOTFOUND2(g, o) (!g.objects[o].found)
#define OBJECT_SET_SEEN(obj) game.objects[object].found = true
#endif
#define OBJECT_STASHED(obj) PROP_STASHIFY(game.objects[obj].prop)
#define PROMPT "> "

2
main.c
View file

@ -1276,7 +1276,7 @@ static bool do_command(void) {
(OBJECT_IS_NOTFOUND(i) ||
OBJECT_IS_STASHED(i))) {
game.objects[i].prop =
OBJECT_STASHED(i);
PROP_STASHIFY(game.objects[i].prop);
}
}
}