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:
ffb8393
)
Start another round of magic_number removal, this time for motions.
author
Eric S. Raymond
<esr@thyrsus.com>
Thu, 29 Jun 2017 20:41:49 +0000
(16:41 -0400)
committer
Eric S. Raymond
<esr@thyrsus.com>
Thu, 29 Jun 2017 20:41:49 +0000
(16:41 -0400)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index 0a2ed9a0828b99405a30e8690c36666fdc3e6cb6..4ebe719b646947b0cb1e6d423559d8230a94e168 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-602,19
+602,19
@@
static bool playermove(token_t verb, int motion)
/* Couldn't find an entry matching the motion word passed
* in. Various messages depending on word given. */
int spk = CANT_APPLY;
/* Couldn't find an entry matching the motion word passed
* in. Various messages depending on word given. */
int spk = CANT_APPLY;
- if (motion >=
43 && motion <=
50)
+ if (motion >=
MOT_43 && motion <= MOT_
50)
spk = BAD_DIRECTION;
spk = BAD_DIRECTION;
- if (motion ==
29 || motion ==
30)
+ if (motion ==
MOT_29 || motion == MOT_
30)
spk = BAD_DIRECTION;
spk = BAD_DIRECTION;
- if (motion ==
7 || motion == 36 || motion ==
37)
+ if (motion ==
MOT_7 || motion == MOT_36 || motion == MOT_
37)
spk = UNSURE_FACING;
spk = UNSURE_FACING;
- if (motion ==
11 || motion ==
19)
+ if (motion ==
MOT_11 || motion == MOT_
19)
spk = NO_INOUT_HERE;
if (verb == FIND || verb == INVENTORY)
spk = NEARBY;
spk = NO_INOUT_HERE;
if (verb == FIND || verb == INVENTORY)
spk = NEARBY;
- if (motion ==
62 || motion ==
65)
+ if (motion ==
MOT_62 || motion == MOT_
65)
spk = NOTHING_HAPPENS;
spk = NOTHING_HAPPENS;
- if (motion == 17)
+ if (motion ==
MOT_
17)
spk = WHICH_WAY;
rspeak(spk);
return true;
spk = WHICH_WAY;
rspeak(spk);
return true;