PEGASUS: Add DVD raise/lower sounds for the inventory/biochip panels
Thanks to Keith Kaisershot (blitter)
This commit is contained in:
parent
c99f3213de
commit
918920b47a
2 changed files with 33 additions and 0 deletions
|
@ -186,6 +186,11 @@ void Interface::validateInventoryPanel() {
|
||||||
_inventoryLid.setDisplayOrder(kInventoryLidOrder);
|
_inventoryLid.setDisplayOrder(kInventoryLidOrder);
|
||||||
_inventoryLid.startDisplaying();
|
_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);
|
_inventoryPushCallBack.initCallBack(&_inventoryPush, kCallBackAtExtremes);
|
||||||
_inventoryLidCallBack.initCallBack(&_inventoryLid, kCallBackAtExtremes);
|
_inventoryLidCallBack.initCallBack(&_inventoryLid, kCallBackAtExtremes);
|
||||||
|
|
||||||
|
@ -231,6 +236,11 @@ void Interface::validateBiochipPanel() {
|
||||||
_biochipLid.setDisplayOrder(kBiochipLidOrder);
|
_biochipLid.setDisplayOrder(kBiochipLidOrder);
|
||||||
_biochipLid.startDisplaying();
|
_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);
|
_biochipPushCallBack.initCallBack(&_biochipPush, kCallBackAtExtremes);
|
||||||
_biochipLidCallBack.initCallBack(&_biochipLid, kCallBackAtExtremes);
|
_biochipLidCallBack.initCallBack(&_biochipLid, kCallBackAtExtremes);
|
||||||
|
|
||||||
|
@ -385,6 +395,11 @@ void Interface::raiseInventoryDrawer(const bool doCallBacks) {
|
||||||
_inventoryLid.show();
|
_inventoryLid.show();
|
||||||
_inventoryPush.show();
|
_inventoryPush.show();
|
||||||
_inventoryLid.start();
|
_inventoryLid.start();
|
||||||
|
|
||||||
|
if (((PegasusEngine *)g_engine)->isDVD()) {
|
||||||
|
_inventoryCloseSound.stopSound();
|
||||||
|
_inventoryOpenSound.playSound();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interface::playEndMessage() {
|
void Interface::playEndMessage() {
|
||||||
|
@ -446,6 +461,11 @@ void Interface::lowerInventoryDrawer(const bool doCallBacks) {
|
||||||
FaderMoveSpec moveSpec;
|
FaderMoveSpec moveSpec;
|
||||||
moveSpec.makeTwoKnotFaderSpec(60, 0, 1000, 15, 0);
|
moveSpec.makeTwoKnotFaderSpec(60, 0, 1000, 15, 0);
|
||||||
_inventoryPush.startFader(moveSpec);
|
_inventoryPush.startFader(moveSpec);
|
||||||
|
|
||||||
|
if (((PegasusEngine *)g_engine)->isDVD()) {
|
||||||
|
_inventoryOpenSound.stopSound();
|
||||||
|
_inventoryCloseSound.playSound();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -487,6 +507,11 @@ void Interface::raiseBiochipDrawer(const bool doCallBacks) {
|
||||||
_biochipLid.show();
|
_biochipLid.show();
|
||||||
_biochipPush.show();
|
_biochipPush.show();
|
||||||
_biochipLid.start();
|
_biochipLid.start();
|
||||||
|
|
||||||
|
if (((PegasusEngine *)g_engine)->isDVD()) {
|
||||||
|
_biochipCloseSound.stopSound();
|
||||||
|
_biochipOpenSound.playSound();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interface::biochipLidOpen(const bool doCallBacks) {
|
void Interface::biochipLidOpen(const bool doCallBacks) {
|
||||||
|
@ -521,6 +546,11 @@ void Interface::lowerBiochipDrawer(const bool doCallBacks) {
|
||||||
FaderMoveSpec moveSpec;
|
FaderMoveSpec moveSpec;
|
||||||
moveSpec.makeTwoKnotFaderSpec(60, 0, 1000, 9, 0);
|
moveSpec.makeTwoKnotFaderSpec(60, 0, 1000, 9, 0);
|
||||||
_biochipPush.startFader(moveSpec);
|
_biochipPush.startFader(moveSpec);
|
||||||
|
|
||||||
|
if (((PegasusEngine *)g_engine)->isDVD()) {
|
||||||
|
_biochipOpenSound.stopSound();
|
||||||
|
_biochipCloseSound.playSound();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "pegasus/hotspot.h"
|
#include "pegasus/hotspot.h"
|
||||||
#include "pegasus/input.h"
|
#include "pegasus/input.h"
|
||||||
#include "pegasus/notification.h"
|
#include "pegasus/notification.h"
|
||||||
|
#include "pegasus/sound.h"
|
||||||
#include "pegasus/surface.h"
|
#include "pegasus/surface.h"
|
||||||
#include "pegasus/transition.h"
|
#include "pegasus/transition.h"
|
||||||
#include "pegasus/items/inventorypicture.h"
|
#include "pegasus/items/inventorypicture.h"
|
||||||
|
@ -125,6 +126,7 @@ protected:
|
||||||
NotificationCallBack _inventoryLidCallBack;
|
NotificationCallBack _inventoryLidCallBack;
|
||||||
InventoryItemsPicture _inventoryPanel;
|
InventoryItemsPicture _inventoryPanel;
|
||||||
bool _inventoryUp, _inventoryRaised;
|
bool _inventoryUp, _inventoryRaised;
|
||||||
|
Sound _inventoryOpenSound, _inventoryCloseSound;
|
||||||
|
|
||||||
Push _biochipPush;
|
Push _biochipPush;
|
||||||
SpriteSequence _biochipLid;
|
SpriteSequence _biochipLid;
|
||||||
|
@ -132,6 +134,7 @@ protected:
|
||||||
NotificationCallBack _biochipLidCallBack;
|
NotificationCallBack _biochipLidCallBack;
|
||||||
BiochipPicture _biochipPanel;
|
BiochipPicture _biochipPanel;
|
||||||
bool _biochipUp, _biochipRaised;
|
bool _biochipUp, _biochipRaised;
|
||||||
|
Sound _biochipOpenSound, _biochipCloseSound;
|
||||||
|
|
||||||
Hotspot _currentItemSpot;
|
Hotspot _currentItemSpot;
|
||||||
Hotspot _currentBiochipSpot;
|
Hotspot _currentBiochipSpot;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue