aboutsummaryrefslogtreecommitdiff
path: root/engines/illusions
diff options
context:
space:
mode:
authorEric Fry2018-06-08 23:03:21 +1000
committerEugene Sandulenko2018-07-20 06:43:33 +0000
commit0793272dfa574d48c28e94181993c3c7ab5afb60 (patch)
treef169d481bc904a8e563957591d7f6df93e16526e /engines/illusions
parent4a42aba1fdf35515d253e588e98a0223bec1d78d (diff)
downloadscummvm-rg350-0793272dfa574d48c28e94181993c3c7ab5afb60.tar.gz
scummvm-rg350-0793272dfa574d48c28e94181993c3c7ab5afb60.tar.bz2
scummvm-rg350-0793272dfa574d48c28e94181993c3c7ab5afb60.zip
ILLUSIONS: Wire up sfx to menus
Diffstat (limited to 'engines/illusions')
-rw-r--r--engines/illusions/duckman/menusystem_duckman.cpp10
-rw-r--r--engines/illusions/duckman/menusystem_duckman.h1
-rw-r--r--engines/illusions/menusystem.cpp4
-rw-r--r--engines/illusions/menusystem.h1
4 files changed, 12 insertions, 4 deletions
diff --git a/engines/illusions/duckman/menusystem_duckman.cpp b/engines/illusions/duckman/menusystem_duckman.cpp
index e7565189cc..8a9e1cce47 100644
--- a/engines/illusions/duckman/menusystem_duckman.cpp
+++ b/engines/illusions/duckman/menusystem_duckman.cpp
@@ -97,7 +97,7 @@ BaseMenu *DuckmanMenuSystem::createMainMenu() {
BaseMenu *menu = new BaseMenu(this, 0x00120003, 12, 17, 11, 27, 0);
menu->addMenuItem(new MenuItem("Start New Game", new MenuActionReturnChoice(this, 11)));
menu->addMenuItem(new MenuItem("Load Saved Game", new MenuActionLoadGame(this, 1)));
- // TODO menu->addMenuItem(new MenuItem("Options", new MenuActionEnterMenu(this, kDuckmanOptionsMenu)));
+ menu->addMenuItem(new MenuItem("Options", new MenuActionEnterMenu(this, kDuckmanOptionsMenu)));
menu->addMenuItem(new MenuItem("Quit Game", new MenuActionEnterQueryMenu(this, kDuckmanQueryQuitMenu, 12)));
return menu;
}
@@ -156,7 +156,7 @@ BaseMenu *DuckmanMenuSystem::createSaveCompleteMenu() {
BaseMenu *DuckmanMenuSystem::createDebugMenu() {
// TODO
BaseMenu *menu = new BaseMenu(this, 0x00120002, 0, 0, 0, 17, 1);
- menu->addText("Debug Pause Menu");
+ menu->addText("Debug Menu");
menu->addText("-----------------");
return menu;
}
@@ -167,6 +167,7 @@ BaseMenu *DuckmanMenuSystem::createDebugPauseMenu() {
menu->addText("-----------------");
menu->addMenuItem(new MenuItem("Return to Game", new MenuActionReturnChoice(this, 1)));
menu->addMenuItem(new MenuItem("Add/Remove Inventory", new MenuActionEnterMenu(this, kDuckmanAddRemoveInventoryMenu)));
+ // TODO quit to debug menu.
return menu;
}
@@ -209,6 +210,7 @@ BaseMenu *DuckmanMenuSystem::createAddRemoveInventoryMenu() {
for(int i=0;i < 21;i++) {
menu->addMenuItem(new MenuItem(kDebugInventoryItems[i].name, new MenuActionInventoryAddRemove(this, _vm, i)));
}
+ menu->addMenuItem(new MenuItem("Back", new MenuActionLeaveMenu(this)));
return menu;
}
@@ -266,6 +268,10 @@ void DuckmanMenuSystem::setGameState(int gameState) {
_vm->_cursor._gameState = gameState;
}
+void DuckmanMenuSystem::playSoundEffect(int sfxId) {
+ _vm->playSoundEffect(sfxId);
+}
+
MenuActionInventoryAddRemove::MenuActionInventoryAddRemove(BaseMenuSystem *menuSystem, IllusionsEngine_Duckman *vm, uint choiceIndex)
: BaseMenuAction(menuSystem), _choiceIndex(choiceIndex), _vm(vm) {
}
diff --git a/engines/illusions/duckman/menusystem_duckman.h b/engines/illusions/duckman/menusystem_duckman.h
index 787ced350b..2921277630 100644
--- a/engines/illusions/duckman/menusystem_duckman.h
+++ b/engines/illusions/duckman/menusystem_duckman.h
@@ -71,6 +71,7 @@ public://protected:
virtual int getGameState();
virtual void setGameState(int gameState);
virtual void setMenuCursorNum(int cursorNum);
+ virtual void playSoundEffect(int sfxId);
};
class MenuActionInventoryAddRemove : public BaseMenuAction {
diff --git a/engines/illusions/menusystem.cpp b/engines/illusions/menusystem.cpp
index 3330cb727a..e1aacf78ee 100644
--- a/engines/illusions/menusystem.cpp
+++ b/engines/illusions/menusystem.cpp
@@ -100,11 +100,11 @@ BaseMenuSystem::~BaseMenuSystem() {
}
void BaseMenuSystem::playSoundEffect13() {
- // TODO
+ playSoundEffect(13);
}
void BaseMenuSystem::playSoundEffect14() {
- // TODO
+ playSoundEffect(14);
}
void BaseMenuSystem::selectMenuChoiceIndex(uint choiceIndex) {
diff --git a/engines/illusions/menusystem.h b/engines/illusions/menusystem.h
index d9961f82d5..0a7f432e99 100644
--- a/engines/illusions/menusystem.h
+++ b/engines/illusions/menusystem.h
@@ -163,6 +163,7 @@ protected:
void hideActorTextColorRect();
virtual BaseMenu *getMenuById(int menuId) = 0;
+ virtual void playSoundEffect(int sfxId) = 0;
};
/*