projects
/
open-adventure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ef78c36
)
Comment polishing.
author
Eric S. Raymond
<esr@thyrsus.com>
Sat, 15 Apr 2023 14:00:23 +0000
(10:00 -0400)
committer
Eric S. Raymond
<esr@thyrsus.com>
Sat, 15 Apr 2023 14:00:23 +0000
(10:00 -0400)
advent.h
patch
|
blob
|
history
main.c
patch
|
blob
|
history
diff --git
a/advent.h
b/advent.h
index 4188b1707d22616dfddb8e144ed1e3ae5184d29f..946fcae266de938cdbddbe10ebbe25f4a377c3e1 100644
(file)
--- a/
advent.h
+++ b/
advent.h
@@
-64,10
+64,11
@@
*
* PROP_STASHED is supposed to map a state property value to a
* negative range, where the object cannot be picked up but the value
*
* PROP_STASHED 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 p
e
operty when
+ * can be recovered later. Various objects get this p
r
operty when
* the cave starts to close. On;y seems to be signifucant for the bird
* and readable objects, notably the clam/oyster - but the code around
* the cave starts to close. On;y seems to be signifucant for the bird
* and readable objects, notably the clam/oyster - but the code around
- * those test is difficult to read. */
+ * those test is difficult to read.
+ */
#define PROP_STASHIFY(n) (-1 - (n))
#define PROP_IS_STASHED(obj) (game.objects[obj].prop < STATE_NOTFOUND)
#define PROP_IS_NOTFOUND(obj) (game.objects[obj].prop == STATE_NOTFOUND)
#define PROP_STASHIFY(n) (-1 - (n))
#define PROP_IS_STASHED(obj) (game.objects[obj].prop < STATE_NOTFOUND)
#define PROP_IS_NOTFOUND(obj) (game.objects[obj].prop == STATE_NOTFOUND)
diff --git
a/main.c
b/main.c
index c688018d3e97ec31ef9b1f4dfc5b6da52205313b..cbaf92c320378cd28dfaef359d07acc060628ff5 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-1098,10
+1098,11
@@
static bool do_command(void)
while (command.state <= GIVEN) {
if (game.closed) {
while (command.state <= GIVEN) {
if (game.closed) {
- /* If closing time, check for any objects being toted with
- * game.prop < 0 and stash them. This way objects won't be
- * described until they've been picked up and put down
- * separate from their respective piles. */
+ /* If closing time, check for any stashed objects
+ * being toted and unstash them. This way objects
+ * won't be described until they've been picked up
+ * and put down separate from their respective
+ * piles. */
if ((PROP_IS_NOTFOUND(OYSTER) || PROP_IS_STASHED(OYSTER)) && TOTING(OYSTER))
pspeak(OYSTER, look, true, 1);
for (size_t i = 1; i <= NOBJECTS; i++) {
if ((PROP_IS_NOTFOUND(OYSTER) || PROP_IS_STASHED(OYSTER)) && TOTING(OYSTER))
pspeak(OYSTER, look, true, 1);
for (size_t i = 1; i <= NOBJECTS; i++) {