aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-04-10 22:34:26 -0400
committerPaul Gilbert2014-04-10 22:34:26 -0400
commita30e78137e326c49d7de09f4fb2293bedfdd4a30 (patch)
tree239825e25efb88cfe976fe3449895535956b87fe /engines
parent39c66afe6698faaa5ccac78e6cbb85b11c1118b3 (diff)
downloadscummvm-rg350-a30e78137e326c49d7de09f4fb2293bedfdd4a30.tar.gz
scummvm-rg350-a30e78137e326c49d7de09f4fb2293bedfdd4a30.tar.bz2
scummvm-rg350-a30e78137e326c49d7de09f4fb2293bedfdd4a30.zip
MADS: Added method stub for unhandled action method
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/game.h5
-rw-r--r--engines/mads/nebular/game_nebular.cpp6
-rw-r--r--engines/mads/nebular/game_nebular.h2
3 files changed, 12 insertions, 1 deletions
diff --git a/engines/mads/game.h b/engines/mads/game.h
index 56593660b5..c7cb66081d 100644
--- a/engines/mads/game.h
+++ b/engines/mads/game.h
@@ -156,6 +156,11 @@ public:
virtual void doObjectAction() = 0;
/**
+ * Fallback handler for any action that isn't explicitly handled
+ */
+ virtual void unhandledAction() = 0;
+
+ /**
* Global game step
*/
virtual void step() = 0;
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index 467f3c3c6b..ed7d976635 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -376,7 +376,7 @@ void GameNebular::doObjectAction() {
_objects.addToInventory(OBJ_COMBINATION);
dialogs.showPicture(OBJ_COMBINATION, 851);
} else if ((action.isAction(VERB_LOOK) || action.isAction(NOUN_READ)) &&
- ((id = _objects.getIdFromDesc(action._activeAction._objectNameId)) != 0 ||
+ ((id = _objects.getIdFromDesc(action._activeAction._objectNameId)) > 0 ||
(action._activeAction._indirectObjectId > 0 &&
(id = _objects.getIdFromDesc(action._activeAction._indirectObjectId))))) {
if (id == OBJ_REPAIR_LIST) {
@@ -565,6 +565,10 @@ void GameNebular::doObjectAction() {
action._inProgress = false;
}
+void GameNebular::unhandledAction() {
+ warning("TODO: unhandledAction");
+}
+
void GameNebular::step() {
if (_player._visible && _player._stepEnabled && !_player._moving &&
(_player._facing == _player._turnToFacing)) {
diff --git a/engines/mads/nebular/game_nebular.h b/engines/mads/nebular/game_nebular.h
index e4f4efcd8a..4d011c2f4a 100644
--- a/engines/mads/nebular/game_nebular.h
+++ b/engines/mads/nebular/game_nebular.h
@@ -67,6 +67,8 @@ public:
virtual void doObjectAction();
+ virtual void unhandledAction();
+
virtual void step();
};