From: Eric S. Raymond Date: Mon, 23 Sep 2024 02:06:02 +0000 (-0400) Subject: Clean up some comments. X-Git-Tag: 1.20~10 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=354e56a69ba6671cf56a0e51950162abb2542bfd;p=open-adventure.git Clean up some comments. --- diff --git a/advent.h b/advent.h index 17e02eb..9f306c1 100644 --- a/advent.h +++ b/advent.h @@ -257,7 +257,7 @@ struct game_t { bool32_t found; // has the location of this object been found? #endif loc_t fixed; // fixed location of object (if not IS_FREE) - int32_t prop; // object state */ + int32_t prop; // object state loc_t place; // location of object } objects[NOBJECTS + 1]; struct { diff --git a/init.c b/init.c index b4ee643..372e494 100644 --- a/init.c +++ b/init.c @@ -77,7 +77,7 @@ int initialise(void) { * STATE_FOUND the first time they are described. game.tally * keeps track of how many are not yet found, so we know when to * close the cave. - * (ESR) Non-trreasures are set to STATE_FOUND explicity so we + * (ESR) Non-treasures are set to STATE_FOUND explicitly so we * don't rely on the value of uninitialized storage. This is to * make translation to future languages easier. */ for (int object = 1; object <= NOBJECTS; object++) { diff --git a/misc.c b/misc.c index 7760cc5..9fddfd5 100644 --- a/misc.c +++ b/misc.c @@ -622,11 +622,9 @@ void move(obj_t object, loc_t where) { } void put(obj_t object, loc_t where, int pval) { - /* put() is the same as move(), except it returns a value used to set - * up the negated game.prop values for the repository objects. */ + /* put() is the same as move(), except the object is stashed and + * can no longer be picked up. */ move(object, where); - /* (ESR) Read this in combination with the macro defintions in advent.h. - */ game.objects[object].prop = PROP_STASHIFY(pval); #ifdef OBJECT_SET_SEEN OBJECT_SET_SEEN(object);