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:
08c40bc
)
Remove unneeded vocabulary lookup.
author
Eric S. Raymond
<esr@thyrsus.com>
Thu, 20 Jul 2017 14:13:15 +0000
(10:13 -0400)
committer
Eric S. Raymond
<esr@thyrsus.com>
Thu, 20 Jul 2017 14:13:15 +0000
(10:13 -0400)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index 1a1f25d63bf90f02ae97554860138ddc12159bdb..fd8a29817a63a8b4d81a04163b259718fb5d6735 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-1024,7
+1024,6
@@
static bool do_command()
/* Get and execute a command */
{
static struct command_t command;
/* Get and execute a command */
{
static struct command_t command;
- char word1[TOKLEN + 1];
command.verb = 0;
command.verb = 0;
@@
-1156,10
+1155,6
@@
Lookup:
if (++game.igo == 10)
rspeak(GO_UNNEEDED);
}
if (++game.igo == 10)
rspeak(GO_UNNEEDED);
}
- packed_to_token(command.wd1, word1);
- long defn;
- enum wordtype type;
- get_vocab_metadata(word1, &defn, &type);
if (command.id1 == WORD_NOT_FOUND) {
if (fallback_handler(command))
continue;
if (command.id1 == WORD_NOT_FOUND) {
if (fallback_handler(command))
continue;
@@
-1167,7
+1162,7
@@
Lookup:
sspeak(DONT_KNOW, command.raw1);
goto Lclearobj;
}
sspeak(DONT_KNOW, command.raw1);
goto Lclearobj;
}
- switch (
type
) {
+ switch (
command.type1
) {
case NO_WORD_TYPE: // FIXME: treating NO_WORD_TYPE as a motion word is confusing
case MOTION:
playermove(command.id1);
case NO_WORD_TYPE: // FIXME: treating NO_WORD_TYPE as a motion word is confusing
case MOTION:
playermove(command.id1);
@@
-1178,7
+1173,7
@@
Lookup:
break;
case ACTION:
command.part = intransitive;
break;
case ACTION:
command.part = intransitive;
- command.verb =
defn
;
+ command.verb =
command.id1
;
break;
case SPECIAL:
speak(specials[command.id1].message);
break;
case SPECIAL:
speak(specials[command.id1].message);