aboutsummaryrefslogtreecommitdiff
path: root/engines/neverhood
diff options
context:
space:
mode:
authorjohndoe1232012-10-01 07:44:58 +0000
committerWillem Jan Palenstijn2013-05-08 20:43:44 +0200
commit2df0a0a2e18049da5c1b6822ebc5c98f521ac3bd (patch)
tree91d7b2b95c6dd7187ec92c9310bbf87fc8d4c5fb /engines/neverhood
parentb119efd5ed8e210fdaedcdd5e9cda58f59d63148 (diff)
downloadscummvm-rg350-2df0a0a2e18049da5c1b6822ebc5c98f521ac3bd.tar.gz
scummvm-rg350-2df0a0a2e18049da5c1b6822ebc5c98f521ac3bd.tar.bz2
scummvm-rg350-2df0a0a2e18049da5c1b6822ebc5c98f521ac3bd.zip
NEVERHOOD: Change sound stuff in Module1500
Diffstat (limited to 'engines/neverhood')
-rw-r--r--engines/neverhood/module1500.cpp14
-rw-r--r--engines/neverhood/module1500.h1
2 files changed, 4 insertions, 11 deletions
diff --git a/engines/neverhood/module1500.cpp b/engines/neverhood/module1500.cpp
index 76afb956ff..88b7e73da5 100644
--- a/engines/neverhood/module1500.cpp
+++ b/engines/neverhood/module1500.cpp
@@ -83,8 +83,7 @@ void Module1500::updateScene() {
// Scene1501
Scene1501::Scene1501(NeverhoodEngine *vm, Module *parentModule, uint32 backgroundFileHash, uint32 soundFileHash, int countdown2, int countdown3)
- : Scene(vm, parentModule, true), _soundResource(vm),
- _countdown3(countdown3), _countdown2(countdown2), _countdown1(0), _flag(false) {
+ : Scene(vm, parentModule, true), _countdown3(countdown3), _countdown2(countdown2), _countdown1(0), _flag(false) {
SetUpdateHandler(&Scene1501::update);
SetMessageHandler(&Scene1501::handleMessage);
@@ -98,13 +97,8 @@ Scene1501::Scene1501(NeverhoodEngine *vm, Module *parentModule, uint32 backgroun
_palette->addBasePalette(backgroundFileHash, 0, 256, 0);
_palette->startFadeToPalette(12);
- /*
- if (soundFileHash != 0) {
- _soundResource.set(soundFileHash);
- _soundResource.load();
- _soundResource.play();
- }
- */
+ if (soundFileHash != 0)
+ playSound(0, soundFileHash);
}
@@ -121,7 +115,7 @@ void Scene1501::update() {
_vm->_screen->clear();
leaveScene(0);
}
- } else if ((_countdown2 != 0 && (--_countdown2 == 0)) /*|| !_soundResource.isPlaying()*/) {
+ } else if ((_countdown2 != 0 && (--_countdown2 == 0)) || !isSoundPlaying(0)) {
_countdown1 = 12;
_palette->startFadeToBlack(11);
}
diff --git a/engines/neverhood/module1500.h b/engines/neverhood/module1500.h
index eeabec0618..c562a24615 100644
--- a/engines/neverhood/module1500.h
+++ b/engines/neverhood/module1500.h
@@ -45,7 +45,6 @@ class Scene1501 : public Scene {
public:
Scene1501(NeverhoodEngine *vm, Module *parentModule, uint32 backgroundFileHash, uint32 soundFileHash, int countdown2, int countdown3);
protected:
- SoundResource _soundResource;
int _countdown1;
int _countdown2;
int _countdown3;