diff options
author | Eugene Sandulenko | 2015-12-24 18:11:47 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-27 15:41:01 +0100 |
commit | 9902ac2454561dc8abd37551539a8ad2cda2d538 (patch) | |
tree | 6c78817f8ebf9e4b931110015882e3ec1db48725 /engines | |
parent | 370c1932f608085c94cb37be15487ccdfc0163da (diff) | |
download | scummvm-rg350-9902ac2454561dc8abd37551539a8ad2cda2d538.tar.gz scummvm-rg350-9902ac2454561dc8abd37551539a8ad2cda2d538.tar.bz2 scummvm-rg350-9902ac2454561dc8abd37551539a8ad2cda2d538.zip |
WAGE: Implement handleLookCommand()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wage/script.cpp | 15 | ||||
-rw-r--r-- | engines/wage/script.h | 1 | ||||
-rw-r--r-- | engines/wage/wage.cpp | 4 |
3 files changed, 18 insertions, 2 deletions
diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp index 547a850f45..3be3d599a0 100644 --- a/engines/wage/script.cpp +++ b/engines/wage/script.cpp @@ -832,9 +832,22 @@ void Script::handleMoveCommand(Scene::Directions dir, const char *dirName) { } void Script::handleLookCommand() { - warning("STUB: handleLookCommand"); + appendText(_world->_player->_currentScene->_text); + + Common::String *items = getGroundItemsList(_world->_player->_currentScene); + if (items != NULL) { + appendText(*items); + + delete items; + } } +Common::String *Script::getGroundItemsList(Scene *scene) { + warning("STUB: getGroundItemsList"); + return NULL; +} + + void Script::handleInventoryCommand() { warning("STUB: handleInventoryCommand"); } diff --git a/engines/wage/script.h b/engines/wage/script.h index fde7395298..10612196e6 100644 --- a/engines/wage/script.h +++ b/engines/wage/script.h @@ -166,6 +166,7 @@ private: void appendText(String str); void handleMoveCommand(Scene::Directions dir, const char *dirName); void handleLookCommand(); + Common::String *getGroundItemsList(Scene *scene); void handleInventoryCommand(); void handleStatusCommand(); void handleRestCommand(); diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp index f91b5fa02b..1a8c85cdcd 100644 --- a/engines/wage/wage.cpp +++ b/engines/wage/wage.cpp @@ -111,6 +111,8 @@ Common::Error WageEngine::run() { Common::Rect r(0, 0, screen.w, screen.h); Common::String input("look"); + + _world->_player->_currentScene = _world->_orderedScenes[1]; _world->_globalScript->print(); _world->_globalScript->execute(_world, 1, &input, NULL, this); @@ -148,7 +150,7 @@ void WageEngine::setMenu(String soundName) { } void WageEngine::appendText(String str) { - warning("STUB: appendText"); + warning("STUB: appendText(%s)", str.c_str()); } Obj *WageEngine::getOffer() { |