From 2df0a0a2e18049da5c1b6822ebc5c98f521ac3bd Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Mon, 1 Oct 2012 07:44:58 +0000 Subject: NEVERHOOD: Change sound stuff in Module1500 --- engines/neverhood/module1500.cpp | 14 ++++---------- engines/neverhood/module1500.h | 1 - 2 files changed, 4 insertions(+), 11 deletions(-) (limited to 'engines/neverhood') 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; -- cgit v1.2.3