aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2013-03-19 10:47:38 -0400
committerMatthew Hoops2013-04-16 21:53:43 -0400
commit918920b47a85934ef94b3b2409a121617af6ca2e (patch)
treebb21ce3caee8ea83216d68b3e9cbeed53c5b0f04
parentc99f3213deffe820d9e178a89629eae63cac3972 (diff)
downloadscummvm-rg350-918920b47a85934ef94b3b2409a121617af6ca2e.tar.gz
scummvm-rg350-918920b47a85934ef94b3b2409a121617af6ca2e.tar.bz2
scummvm-rg350-918920b47a85934ef94b3b2409a121617af6ca2e.zip
PEGASUS: Add DVD raise/lower sounds for the inventory/biochip panels
Thanks to Keith Kaisershot (blitter)
-rw-r--r--engines/pegasus/interface.cpp30
-rw-r--r--engines/pegasus/interface.h3
2 files changed, 33 insertions, 0 deletions
diff --git a/engines/pegasus/interface.cpp b/engines/pegasus/interface.cpp
index d9d3865192..f2429bf36a 100644
--- a/engines/pegasus/interface.cpp
+++ b/engines/pegasus/interface.cpp
@@ -186,6 +186,11 @@ void Interface::validateInventoryPanel() {
_inventoryLid.setDisplayOrder(kInventoryLidOrder);
_inventoryLid.startDisplaying();
+ if (((PegasusEngine *)g_engine)->isDVD()) {
+ _inventoryOpenSound.initFromAIFFFile("Sounds/Items/Inventory Panel Open.aif");
+ _inventoryCloseSound.initFromAIFFFile("Sounds/Items/Inventory Panel Close.aif");
+ }
+
_inventoryPushCallBack.initCallBack(&_inventoryPush, kCallBackAtExtremes);
_inventoryLidCallBack.initCallBack(&_inventoryLid, kCallBackAtExtremes);
@@ -231,6 +236,11 @@ void Interface::validateBiochipPanel() {
_biochipLid.setDisplayOrder(kBiochipLidOrder);
_biochipLid.startDisplaying();
+ if (((PegasusEngine *)g_engine)->isDVD()) {
+ _biochipOpenSound.initFromAIFFFile("Sounds/Items/Biochip Panel Open.aif");
+ _biochipCloseSound.initFromAIFFFile("Sounds/Items/Biochip Panel Close.aif");
+ }
+
_biochipPushCallBack.initCallBack(&_biochipPush, kCallBackAtExtremes);
_biochipLidCallBack.initCallBack(&_biochipLid, kCallBackAtExtremes);
@@ -385,6 +395,11 @@ void Interface::raiseInventoryDrawer(const bool doCallBacks) {
_inventoryLid.show();
_inventoryPush.show();
_inventoryLid.start();
+
+ if (((PegasusEngine *)g_engine)->isDVD()) {
+ _inventoryCloseSound.stopSound();
+ _inventoryOpenSound.playSound();
+ }
}
void Interface::playEndMessage() {
@@ -446,6 +461,11 @@ void Interface::lowerInventoryDrawer(const bool doCallBacks) {
FaderMoveSpec moveSpec;
moveSpec.makeTwoKnotFaderSpec(60, 0, 1000, 15, 0);
_inventoryPush.startFader(moveSpec);
+
+ if (((PegasusEngine *)g_engine)->isDVD()) {
+ _inventoryOpenSound.stopSound();
+ _inventoryCloseSound.playSound();
+ }
}
}
@@ -487,6 +507,11 @@ void Interface::raiseBiochipDrawer(const bool doCallBacks) {
_biochipLid.show();
_biochipPush.show();
_biochipLid.start();
+
+ if (((PegasusEngine *)g_engine)->isDVD()) {
+ _biochipCloseSound.stopSound();
+ _biochipOpenSound.playSound();
+ }
}
void Interface::biochipLidOpen(const bool doCallBacks) {
@@ -521,6 +546,11 @@ void Interface::lowerBiochipDrawer(const bool doCallBacks) {
FaderMoveSpec moveSpec;
moveSpec.makeTwoKnotFaderSpec(60, 0, 1000, 9, 0);
_biochipPush.startFader(moveSpec);
+
+ if (((PegasusEngine *)g_engine)->isDVD()) {
+ _biochipOpenSound.stopSound();
+ _biochipCloseSound.playSound();
+ }
}
}
diff --git a/engines/pegasus/interface.h b/engines/pegasus/interface.h
index a65d9a595a..5f04f98df0 100644
--- a/engines/pegasus/interface.h
+++ b/engines/pegasus/interface.h
@@ -29,6 +29,7 @@
#include "pegasus/hotspot.h"
#include "pegasus/input.h"
#include "pegasus/notification.h"
+#include "pegasus/sound.h"
#include "pegasus/surface.h"
#include "pegasus/transition.h"
#include "pegasus/items/inventorypicture.h"
@@ -125,6 +126,7 @@ protected:
NotificationCallBack _inventoryLidCallBack;
InventoryItemsPicture _inventoryPanel;
bool _inventoryUp, _inventoryRaised;
+ Sound _inventoryOpenSound, _inventoryCloseSound;
Push _biochipPush;
SpriteSequence _biochipLid;
@@ -132,6 +134,7 @@ protected:
NotificationCallBack _biochipLidCallBack;
BiochipPicture _biochipPanel;
bool _biochipUp, _biochipRaised;
+ Sound _biochipOpenSound, _biochipCloseSound;
Hotspot _currentItemSpot;
Hotspot _currentBiochipSpot;