diff options
author | Eugene Sandulenko | 2016-01-21 15:58:55 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-14 17:12:51 +0100 |
commit | 02374868f7ff8ea8bc3992aa1b6941cdccd44703 (patch) | |
tree | f43ab38064b05f4f13b1f0d64ed71f5843f2db29 | |
parent | 2dc5841fcc843a5c3657acf86c0cdbcc516f9940 (diff) | |
download | scummvm-rg350-02374868f7ff8ea8bc3992aa1b6941cdccd44703.tar.gz scummvm-rg350-02374868f7ff8ea8bc3992aa1b6941cdccd44703.tar.bz2 scummvm-rg350-02374868f7ff8ea8bc3992aa1b6941cdccd44703.zip |
WAGE: Implement handleAimCommand()
-rw-r--r-- | engines/wage/script.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp index 7ede7eafa4..b6a44d1340 100644 --- a/engines/wage/script.cpp +++ b/engines/wage/script.cpp @@ -1145,8 +1145,25 @@ void Script::handleDropCommand(const char *target) { } } -void Script::handleAimCommand(const char *target) { - warning("STUB: handleAimCommand"); +void Script::handleAimCommand(const char *t) { + bool wasHandled = true; + Common::String target(t); + + if (target.contains("head")) { + _callbacks->_aim = Chr::HEAD; + } else if (target.contains("chest")) { + _callbacks->_aim = Chr::CHEST; + } else if (target.contains("side")) { + _callbacks->_aim = Chr::SIDE; + } else { + wasHandled = false; + appendText((char *)"Please aim for the head, chest, or side."); + } + + if (wasHandled) + _handled = true; + + _callbacks->_commandWasQuick = true; } void Script::handleWearCommand(const char *target) { |