aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2014-05-26 22:52:18 +0300
committerFilippos Karapetis2014-05-26 22:52:41 +0300
commit7579005ff1153d4eefe2914d0210a46ee3d88719 (patch)
tree70a627da37bbf9d3c74e802de946846699403b0f /engines
parentf0cdc47226db90ce99f2e83f0a2643e49d71d3ed (diff)
downloadscummvm-rg350-7579005ff1153d4eefe2914d0210a46ee3d88719.tar.gz
scummvm-rg350-7579005ff1153d4eefe2914d0210a46ee3d88719.tar.bz2
scummvm-rg350-7579005ff1153d4eefe2914d0210a46ee3d88719.zip
MADS: Implement the recipe showing functionality
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/nebular/game_nebular.cpp47
-rw-r--r--engines/mads/nebular/game_nebular.h2
2 files changed, 48 insertions, 1 deletions
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index c6fa60b19a..75d1ff169e 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -278,6 +278,51 @@ void GameNebular::checkShowDialog() {
}
}
+void GameNebular::showRecipe() {
+ Dialogs &dialogs = *_vm->_dialogs;
+ int count;
+
+ for (count = 0; count < 4; count++) {
+ switch(_globals[kIngredientQuantity + count]) {
+ case 0:
+ dialogs._indexList[count] = NOUN_DROP;
+ break;
+ case 1:
+ dialogs._indexList[count] = NOUN_DOLLOP;
+ break;
+ case 2:
+ dialogs._indexList[count] = NOUN_DASH;
+ break;
+ case 3:
+ dialogs._indexList[count] = NOUN_SPLASH;
+ break;
+ default:
+ break;
+ }
+ }
+
+ for (count = 0; count < 4; count++) {
+ switch(_globals[kIngredientList + count]) {
+ case 0:
+ dialogs._indexList[count + 4] = NOUN_ALCOHOL;
+ break;
+ case 1:
+ dialogs._indexList[count + 4] = NOUN_LECITHIN;
+ break;
+ case 2:
+ dialogs._indexList[count + 4] = NOUN_PETROX;
+ break;
+ case 3:
+ dialogs._indexList[count + 4] = NOUN_FORMALDEHYDE;
+ break;
+ default:
+ break;
+ }
+ }
+
+ _vm->_dialogs->show(401);
+}
+
void GameNebular::doObjectAction() {
Scene &scene = _scene;
MADSAction &action = _scene._action;
@@ -424,7 +469,7 @@ void GameNebular::doObjectAction() {
_objects.setRoom(OBJ_AUDIO_TAPE, OBJ_TAPE_PLAYER);
} else if (action.isAction(VERB_ACTIVATE, NOUN_TAPE_PLAYER) && _objects.isInInventory(OBJ_TAPE_PLAYER)) {
if (_objects[OBJ_AUDIO_TAPE]._roomNumber == OBJ_TAPE_PLAYER) {
- warning("TODO: Show the recipe");
+ showRecipe();
} else {
dialogs.show(406);
}
diff --git a/engines/mads/nebular/game_nebular.h b/engines/mads/nebular/game_nebular.h
index da252219f4..56bcf44a3f 100644
--- a/engines/mads/nebular/game_nebular.h
+++ b/engines/mads/nebular/game_nebular.h
@@ -117,6 +117,8 @@ public:
virtual void doObjectAction();
+ void showRecipe();
+
virtual void unhandledAction();
virtual void step();