aboutsummaryrefslogtreecommitdiff
path: root/engines/wage/script.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-01-21 15:58:55 +0100
committerEugene Sandulenko2016-02-14 17:12:51 +0100
commit02374868f7ff8ea8bc3992aa1b6941cdccd44703 (patch)
treef43ab38064b05f4f13b1f0d64ed71f5843f2db29 /engines/wage/script.cpp
parent2dc5841fcc843a5c3657acf86c0cdbcc516f9940 (diff)
downloadscummvm-rg350-02374868f7ff8ea8bc3992aa1b6941cdccd44703.tar.gz
scummvm-rg350-02374868f7ff8ea8bc3992aa1b6941cdccd44703.tar.bz2
scummvm-rg350-02374868f7ff8ea8bc3992aa1b6941cdccd44703.zip
WAGE: Implement handleAimCommand()
Diffstat (limited to 'engines/wage/script.cpp')
-rw-r--r--engines/wage/script.cpp21
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) {