diff options
Diffstat (limited to 'engines/pegasus/neighborhood/caldoria')
5 files changed, 53 insertions, 1 deletions
diff --git a/engines/pegasus/neighborhood/caldoria/caldoria.cpp b/engines/pegasus/neighborhood/caldoria/caldoria.cpp index 0b3e1ee040..9d2d6723a9 100644 --- a/engines/pegasus/neighborhood/caldoria/caldoria.cpp +++ b/engines/pegasus/neighborhood/caldoria/caldoria.cpp @@ -196,6 +196,8 @@ void Caldoria::start() { if (!pullbackMovie->loadFile("Images/Caldoria/Pullback.movie")) error("Could not load pullback movie"); + pullbackMovie->setVolume(MIN<uint>(_vm->getSoundFXLevel(), 0xFF)); + // Draw the first frame so we can fade to it const Graphics::Surface *frame = pullbackMovie->decodeNextFrame(); assert(frame); @@ -386,54 +388,72 @@ void Caldoria::startSpotOnceOnly(TimeValue startTime, TimeValue stopTime) { if (!_privateFlags.getFlag(kCaldoriaPrivateSeen13CarFlag) && _vm->getRandomBit() == 0) { _privateFlags.setFlag(kCaldoriaPrivateSeen13CarFlag, true); Neighborhood::startSpotOnceOnly(startTime, stopTime); + } else { + showViewFrame(getViewTime(GameState.getCurrentRoom(), GameState.getCurrentDirection())); } break; case MakeRoomView(kCaldoria14, kEast): if (!_privateFlags.getFlag(kCaldoriaPrivateSeen14CarFlag) && _vm->getRandomBit() == 0) { _privateFlags.setFlag(kCaldoriaPrivateSeen14CarFlag, true); Neighborhood::startSpotOnceOnly(startTime, stopTime); + } else { + showViewFrame(getViewTime(GameState.getCurrentRoom(), GameState.getCurrentDirection())); } break; case MakeRoomView(kCaldoria18, kWest): if (!_privateFlags.getFlag(kCaldoriaPrivateSeen18CarFlag) && _vm->getRandomBit() == 0) { _privateFlags.setFlag(kCaldoriaPrivateSeen18CarFlag, true); Neighborhood::startSpotOnceOnly(startTime, stopTime); + } else { + showViewFrame(getViewTime(GameState.getCurrentRoom(), GameState.getCurrentDirection())); } break; case MakeRoomView(kCaldoria23, kSouth): if (!_privateFlags.getFlag(kCaldoriaPrivateSeen23CarFlag) && _vm->getRandomBit() == 0) { _privateFlags.setFlag(kCaldoriaPrivateSeen23CarFlag, true); Neighborhood::startSpotOnceOnly(startTime, stopTime); + } else { + showViewFrame(getViewTime(GameState.getCurrentRoom(), GameState.getCurrentDirection())); } break; case MakeRoomView(kCaldoria33, kSouth): if (!_privateFlags.getFlag(kCaldoriaPrivateSeen33CarFlag) && _vm->getRandomBit() == 0) { _privateFlags.setFlag(kCaldoriaPrivateSeen33CarFlag, true); Neighborhood::startSpotOnceOnly(startTime, stopTime); + } else { + showViewFrame(getViewTime(GameState.getCurrentRoom(), GameState.getCurrentDirection())); } break; case MakeRoomView(kCaldoria36, kNorth): if (!_privateFlags.getFlag(kCaldoriaPrivateSeen36CarFlag) && _vm->getRandomBit() == 0) { _privateFlags.setFlag(kCaldoriaPrivateSeen36CarFlag, true); Neighborhood::startSpotOnceOnly(startTime, stopTime); + } else { + showViewFrame(getViewTime(GameState.getCurrentRoom(), GameState.getCurrentDirection())); } break; case MakeRoomView(kCaldoria41, kNorth): if (!_privateFlags.getFlag(kCaldoriaPrivateSeen41NorthCarFlag) && _vm->getRandomBit() == 0) { _privateFlags.setFlag(kCaldoriaPrivateSeen41NorthCarFlag, true); Neighborhood::startSpotOnceOnly(startTime, stopTime); + } else { + showViewFrame(getViewTime(GameState.getCurrentRoom(), GameState.getCurrentDirection())); } break; case MakeRoomView(kCaldoria41, kEast): if (!_privateFlags.getFlag(kCaldoriaPrivateSeen41EastCarFlag) && _vm->getRandomBit() == 0) { _privateFlags.setFlag(kCaldoriaPrivateSeen41EastCarFlag, true); Neighborhood::startSpotOnceOnly(startTime, stopTime); + } else { + showViewFrame(getViewTime(GameState.getCurrentRoom(), GameState.getCurrentDirection())); } break; case MakeRoomView(kCaldoria41, kWest): if (!_privateFlags.getFlag(kCaldoriaPrivateSeen41WestCarFlag) && _vm->getRandomBit() == 0) { _privateFlags.setFlag(kCaldoriaPrivateSeen41WestCarFlag, true); Neighborhood::startSpotOnceOnly(startTime, stopTime); + } else { + showViewFrame(getViewTime(GameState.getCurrentRoom(), GameState.getCurrentDirection())); } break; default: @@ -889,7 +909,7 @@ void Caldoria::arriveAtCaldoria49() { setCurrentAlternate(kAltCaldoriaNormal); // Need to force the loop to play. - if (GameState.getCurrentDirection() == kNorth) { + if (GameState.getCurrentDirection() == kNorth && !GameState.getCaldoriaSinclairShot()) { GameState.setCaldoriaFuseTimeLimit(kSinclairShootsTimeLimit); startExtraSequence(kCa49NorthVoiceAnalysis, kExtraCompletedFlag, kFilterNoInput); } @@ -1898,10 +1918,13 @@ uint Caldoria::getNumHints() { numHints = 1; } break; +#if 0 + // The hint file is missing case MakeRoomView(kCaldoria49, kEast): case MakeRoomView(kCaldoria54, kEast): numHints = 1; break; +#endif case MakeRoomView(kCaldoria49, kNorth): numHints = 1; break; @@ -1932,9 +1955,12 @@ Common::String Caldoria::getHintMovie(uint hintNum) { } return "Images/AI/Globals/XGLOB1A"; +#if 0 + // The hint file is missing case MakeRoomView(kCaldoria49, kEast): case MakeRoomView(kCaldoria54, kEast): return "Images/AI/Caldoria/X49E"; +#endif case MakeRoomView(kCaldoria49, kNorth): return "Images/AI/Caldoria/X49NB2"; } diff --git a/engines/pegasus/neighborhood/caldoria/caldoriabomb.cpp b/engines/pegasus/neighborhood/caldoria/caldoriabomb.cpp index abf34d3863..c964e3458b 100644 --- a/engines/pegasus/neighborhood/caldoria/caldoriabomb.cpp +++ b/engines/pegasus/neighborhood/caldoria/caldoriabomb.cpp @@ -1167,6 +1167,18 @@ CaldoriaBomb::~CaldoriaBomb() { delete[] _bombLevel[i]; } +void CaldoriaBomb::setSoundFXLevel(const uint16) { + // The transition sounds between levels are ambience, so overwrite what + // Neighborhood::setSoundFXLevel does and keep using the ambience volume level + if (_timer.isRunning()) + _owner->_navMovie.setVolume(((PegasusEngine *)g_engine)->getAmbienceLevel()); +} + +void CaldoriaBomb::setAmbienceLevel(const uint16 level) { + if (_timer.isRunning()) + _owner->_navMovie.setVolume(level); +} + void CaldoriaBomb::openInteraction() { _grid.moveElementTo(kCaldoriaBombGridLeft, kCaldoriaBombGridTop); _grid.setDisplayOrder(kCaldoriaBombGridOrder); @@ -1234,6 +1246,7 @@ void CaldoriaBomb::receiveNotification(Notification *notification, const Notific _timer.start(); _currentLevel = 0; _lastVertex = -1; + _owner->_navMovie.setVolume(((PegasusEngine *)g_engine)->getAmbienceLevel()); startBombAmbient("Sounds/Caldoria/BmbLoop1.22K.AIFF"); break; case kCaldoria56BombStage2: @@ -1258,6 +1271,7 @@ void CaldoriaBomb::receiveNotification(Notification *notification, const Notific _grid.hide(); _timer.stop(); _timer.hide(); + _owner->_navMovie.setVolume(((PegasusEngine *)g_engine)->getSoundFXLevel()); _owner->loadLoopSound1(""); _owner->playDeathExtra(kCaldoria56BombExplodes, kDeathNuclearExplosion); } @@ -1411,6 +1425,7 @@ void CaldoriaBomb::handleInput(const Input &input, const Hotspot *hotspot) { _timer.stop(); _grid.hide(); _timer.hide(); + _owner->_navMovie.setVolume(((PegasusEngine *)g_engine)->getSoundFXLevel()); _owner->startExtraSequence(kCaldoria56BombStage7, kExtraCompletedFlag, kFilterNoInput); break; } diff --git a/engines/pegasus/neighborhood/caldoria/caldoriabomb.h b/engines/pegasus/neighborhood/caldoria/caldoriabomb.h index 5bb39b4122..ba6d1e8998 100644 --- a/engines/pegasus/neighborhood/caldoria/caldoriabomb.h +++ b/engines/pegasus/neighborhood/caldoria/caldoriabomb.h @@ -122,6 +122,9 @@ public: CaldoriaBomb(Neighborhood *, NotificationManager *); virtual ~CaldoriaBomb(); + void setSoundFXLevel(const uint16); + void setAmbienceLevel(const uint16); + long getNumHints(); Common::String getHintMovie(uint); void doSolve(); diff --git a/engines/pegasus/neighborhood/caldoria/caldoriamessages.cpp b/engines/pegasus/neighborhood/caldoria/caldoriamessages.cpp index a3ce97d438..2ae990d775 100644 --- a/engines/pegasus/neighborhood/caldoria/caldoriamessages.cpp +++ b/engines/pegasus/neighborhood/caldoria/caldoriamessages.cpp @@ -24,6 +24,7 @@ */ #include "pegasus/gamestate.h" +#include "pegasus/pegasus.h" #include "pegasus/neighborhood/neighborhood.h" #include "pegasus/neighborhood/caldoria/caldoria.h" #include "pegasus/neighborhood/caldoria/caldoriamessages.h" @@ -45,6 +46,10 @@ void CaldoriaMessages::openInteraction() { _messageNumber = 1; } +void CaldoriaMessages::setSoundFXLevel(const uint16 fxLevel) { + _messageMovie.setVolume(fxLevel); +} + void CaldoriaMessages::initInteraction() { GameInteraction::_owner->startExtraSequence(kCaBedroomVidPhone, kExtraCompletedFlag, kFilterNoInput); } @@ -101,6 +106,7 @@ void CaldoriaMessages::play1Message(uint messageNumber) { GameState.setCaldoriaSeenMessages(true); } + _messageMovie.setVolume(((PegasusEngine *)g_engine)->getSoundFXLevel()); _messageMovie.moveElementTo(kCaldoriaMessageLeft, kCaldoriaMessageTop); _messageMovie.setDisplayOrder(kCaldoriaMessagesOrder); _messageMovie.startDisplaying(); diff --git a/engines/pegasus/neighborhood/caldoria/caldoriamessages.h b/engines/pegasus/neighborhood/caldoria/caldoriamessages.h index 955fe10ce9..b2fc7c3bf9 100644 --- a/engines/pegasus/neighborhood/caldoria/caldoriamessages.h +++ b/engines/pegasus/neighborhood/caldoria/caldoriamessages.h @@ -41,6 +41,8 @@ public: CaldoriaMessages(Neighborhood *, const NotificationID, NotificationManager *); virtual ~CaldoriaMessages() {} + void setSoundFXLevel(const uint16); + protected: void openInteraction(); void initInteraction(); |