Remove unneeded vocabulary lookup.
This commit is contained in:
parent
08c40bc999
commit
78ba0fac6a
1 changed files with 2 additions and 7 deletions
9
main.c
9
main.c
|
@ -1024,7 +1024,6 @@ static bool do_command()
|
||||||
/* Get and execute a command */
|
/* Get and execute a command */
|
||||||
{
|
{
|
||||||
static struct command_t 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)
|
if (++game.igo == 10)
|
||||||
rspeak(GO_UNNEEDED);
|
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 (command.id1 == WORD_NOT_FOUND) {
|
||||||
if (fallback_handler(command))
|
if (fallback_handler(command))
|
||||||
continue;
|
continue;
|
||||||
|
@ -1167,7 +1162,7 @@ Lookup:
|
||||||
sspeak(DONT_KNOW, command.raw1);
|
sspeak(DONT_KNOW, command.raw1);
|
||||||
goto Lclearobj;
|
goto Lclearobj;
|
||||||
}
|
}
|
||||||
switch (type) {
|
switch (command.type1) {
|
||||||
case NO_WORD_TYPE: // FIXME: treating NO_WORD_TYPE as a motion word is confusing
|
case NO_WORD_TYPE: // FIXME: treating NO_WORD_TYPE as a motion word is confusing
|
||||||
case MOTION:
|
case MOTION:
|
||||||
playermove(command.id1);
|
playermove(command.id1);
|
||||||
|
@ -1178,7 +1173,7 @@ Lookup:
|
||||||
break;
|
break;
|
||||||
case ACTION:
|
case ACTION:
|
||||||
command.part = intransitive;
|
command.part = intransitive;
|
||||||
command.verb = defn;
|
command.verb = command.id1;
|
||||||
break;
|
break;
|
||||||
case SPECIAL:
|
case SPECIAL:
|
||||||
speak(specials[command.id1].message);
|
speak(specials[command.id1].message);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue