aboutsummaryrefslogtreecommitdiff
path: root/engines/wage
diff options
context:
space:
mode:
authorEugene Sandulenko2016-02-02 20:04:37 +0100
committerEugene Sandulenko2016-02-14 17:12:57 +0100
commit6e3cd0bcb27c82dd042c191ff65f211cfc136094 (patch)
tree84366b8019cd576520c859de4b675d79e92a75c8 /engines/wage
parent12f02969beb3b16f1f9f7b887a622ff5ff018dfc (diff)
downloadscummvm-rg350-6e3cd0bcb27c82dd042c191ff65f211cfc136094.tar.gz
scummvm-rg350-6e3cd0bcb27c82dd042c191ff65f211cfc136094.tar.bz2
scummvm-rg350-6e3cd0bcb27c82dd042c191ff65f211cfc136094.zip
WAGE: Better processing of direction abbreviations
Diffstat (limited to 'engines/wage')
-rw-r--r--engines/wage/script.cpp8
-rw-r--r--engines/wage/wage.cpp13
2 files changed, 16 insertions, 5 deletions
diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp
index bc43f2978b..1ee669af18 100644
--- a/engines/wage/script.cpp
+++ b/engines/wage/script.cpp
@@ -164,13 +164,13 @@ bool Script::execute(World *world, int loopCount, Common::String *inputText, Des
_handled = true;
} else if (!input.empty()) {
input.toLowercase();
- if (input.equals("n") || input.contains("north")) {
+ if (input.contains("north")) {
_handled = _engine->handleMoveCommand(NORTH, "north");
- } else if (input.equals("e") || input.contains("east")) {
+ } else if (input.contains("east")) {
_handled = _engine->handleMoveCommand(EAST, "east");
- } else if (input.equals("s") || input.contains("south")) {
+ } else if (input.contains("south")) {
_handled = _engine->handleMoveCommand(SOUTH, "south");
- } else if (input.equals("w") || input.contains("west")) {
+ } else if (input.contains("west")) {
_handled = _engine->handleMoveCommand(WEST, "west");
} else if (input.hasPrefix("take ")) {
_handled = _engine->handleTakeCommand(&input.c_str()[5]);
diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp
index 48f3c8078c..b4819cba9d 100644
--- a/engines/wage/wage.cpp
+++ b/engines/wage/wage.cpp
@@ -453,7 +453,18 @@ void WageEngine::processTurn(Common::String *textInput, Designed *clickInput) {
_commandWasQuick = false;
Scene *prevScene = _world->_player->_currentScene;
Chr *prevMonster = getMonster();
- processTurnInternal(textInput, clickInput);
+ Common::String input(*textInput);
+ input.toLowercase();
+ if (input.equals("e"))
+ input = "east";
+ else if (input.equals("w"))
+ input = "west";
+ else if (input.equals("n"))
+ input = "north";
+ else if (input.equals("s"))
+ input = "south";
+
+ processTurnInternal(&input, clickInput);
Scene *playerScene = _world->_player->_currentScene;
if (prevScene != playerScene && playerScene != _world->_storageScene) {