aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/people.cpp
diff options
context:
space:
mode:
authorD G Turner2012-05-31 05:16:10 +0100
committerD G Turner2012-05-31 05:16:10 +0100
commit628cfa3d47fb7ebad8dd26cb59f485e5c70dacb5 (patch)
tree7b716023a8833fb58d3baee66647b918b37afd1b /engines/dreamweb/people.cpp
parent8860a83bf8a3dc02394a210b29aa6871928a7914 (diff)
downloadscummvm-rg350-628cfa3d47fb7ebad8dd26cb59f485e5c70dacb5.tar.gz
scummvm-rg350-628cfa3d47fb7ebad8dd26cb59f485e5c70dacb5.tar.bz2
scummvm-rg350-628cfa3d47fb7ebad8dd26cb59f485e5c70dacb5.zip
DREAMWEB: Objectify Sound functions & data into DreamWebSound class.
This change should have no functional change, but makes the sound code more decoupled, modular and readable, prior to attempting a fix for bug #3528164 - "DREAMWEB: missing sound effects/music cues during main title".
Diffstat (limited to 'engines/dreamweb/people.cpp')
-rw-r--r--engines/dreamweb/people.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index dfb5c62618..36a756a49b 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -20,6 +20,7 @@
*
*/
+#include "dreamweb/sound.h"
#include "dreamweb/dreamweb.h"
namespace DreamWeb {
@@ -149,7 +150,7 @@ void DreamWebEngine::madmanText() {
if (hasSpeech()) {
if (_speechCount > 15)
return;
- if (_channel1Playing != 255)
+ if (_sound->isChannel1Playing())
return;
origCount = _speechCount;
++_speechCount;
@@ -250,7 +251,7 @@ bool DreamWebEngine::checkSpeed(ReelRoutine &routine) {
void DreamWebEngine::sparkyDrip(ReelRoutine &routine) {
if (checkSpeed(routine))
- playChannel0(14, 0);
+ _sound->playChannel0(14, 0);
}
void DreamWebEngine::genericPerson(ReelRoutine &routine) {
@@ -430,7 +431,7 @@ void DreamWebEngine::drinker(ReelRoutine &routine) {
void DreamWebEngine::alleyBarkSound(ReelRoutine &routine) {
uint16 prevReelPointer = routine.reelPointer() - 1;
if (prevReelPointer == 0) {
- playChannel1(14);
+ _sound->playChannel1(14);
routine.setReelPointer(1000);
} else {
routine.setReelPointer(prevReelPointer);
@@ -523,7 +524,7 @@ void DreamWebEngine::gates(ReelRoutine &routine) {
if (checkSpeed(routine)) {
uint16 nextReelPointer = routine.reelPointer() + 1;
if (nextReelPointer == 116)
- playChannel1(17);
+ _sound->playChannel1(17);
if (nextReelPointer >= 110)
routine.period = 2;
if (nextReelPointer == 120) {
@@ -579,12 +580,12 @@ void DreamWebEngine::carParkDrip(ReelRoutine &routine) {
if (!checkSpeed(routine))
return; // cantdrip2
- playChannel1(14);
+ _sound->playChannel1(14);
}
void DreamWebEngine::foghornSound(ReelRoutine &routine) {
if (randomNumber() == 198)
- playChannel1(13);
+ _sound->playChannel1(13);
}
void DreamWebEngine::train(ReelRoutine &routine) {
@@ -1027,8 +1028,7 @@ void DreamWebEngine::endGameSeq(ReelRoutine &routine) {
fadeScreenDownHalf();
} else if (nextReelPointer == 324) {
fadeScreenDowns();
- _volumeTo = 7;
- _volumeDirection = 1;
+ _sound->volumeChange(7, 1);
}
if (nextReelPointer == 340)