X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=actions.c;h=b079bd352f863da9e3dab42a30da543b34efa5a9;hp=9ddbb56bde703c52e54c2a378b852c98775d785e;hb=1c4fcaf43edea3d1a29fe6f4949f6397c314c67e;hpb=eba8015059c1ad2d20e55be9ed69c22aec1871be diff --git a/actions.c b/actions.c index 9ddbb56..b079bd3 100644 --- a/actions.c +++ b/actions.c @@ -1,5 +1,6 @@ #include #include +#include #include "advent.h" #include "dungeon.h" @@ -983,7 +984,7 @@ static int read(struct command_t command) } if (DARK(game.loc)) { - rspeak(NO_SEE, command.wd1, command.wd1x); + sspeak(NO_SEE, command.raw1); } else if (command.obj == OYSTER && !game.clshnt && game.closed) { game.clshnt = yes(arbitrary_messages[CLUE_QUERY], arbitrary_messages[WAYOUT_CLUE], arbitrary_messages[OK_MAN]); } else if (objects[command.obj].texts[0] == NULL || @@ -1037,11 +1038,11 @@ static int rub(token_t verb, token_t obj) static int say(struct command_t *command) /* Say. Echo WD2 (or WD1 if no WD2 (SAY WHAT?, etc.).) Magic words override. */ { - long a = command->wd1, b = command->wd1x; + long a = command->wd1; if (command->wd2 > 0) { a = command->wd2; - b = command->wd2x; command->wd1 = command->wd2; + strcpy(command->raw1, command->raw2); } char word1[TOKLEN+1]; packed_to_token(command->wd1, word1); @@ -1056,7 +1057,7 @@ static int say(struct command_t *command) wordclear(&command->wd2); return GO_LOOKUP; } - rspeak(OKEY_DOKEY, a, b); + sspeak(OKEY_DOKEY, command->raw1); return GO_CLEAROBJ; } @@ -1240,7 +1241,7 @@ int action(struct command_t *command) command->verb == INVENTORY) && command->wd2 <= 0) /* FALL THROUGH */; else { - rspeak(NO_SEE, command->wd1, command->wd1x); + sspeak(NO_SEE, command->raw1); return GO_CLEAROBJ; } @@ -1437,7 +1438,7 @@ int action(struct command_t *command) } case unknown: /* Unknown verb, couldn't deduce object - might need hint */ - rspeak(WHAT_DO, command->wd1, command->wd1x); + sspeak(WHAT_DO, command->raw1); return GO_CHECKHINT; default: BUG(SPEECHPART_NOT_TRANSITIVE_OR_INTRANSITIVE_OR_UNKNOWN); // LCOV_EXCL_LINE