aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorjohndoe1232012-09-24 11:15:34 +0000
committerWillem Jan Palenstijn2013-05-08 20:43:42 +0200
commitba991fe7021df572fd003ddda2f7f090081fd299 (patch)
treedd56dddbd6134d297e3169101350c3a82a9965cb /engines
parenta2bc19291216fd137a09fe6f9a9f5e6321e7b67e (diff)
downloadscummvm-rg350-ba991fe7021df572fd003ddda2f7f090081fd299.tar.gz
scummvm-rg350-ba991fe7021df572fd003ddda2f7f090081fd299.tar.bz2
scummvm-rg350-ba991fe7021df572fd003ddda2f7f090081fd299.zip
NEVERHOOD: Fix addSound in AsScene2609Water and add a destructor
Diffstat (limited to 'engines')
-rw-r--r--engines/neverhood/module2600.cpp6
-rw-r--r--engines/neverhood/module2600.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/engines/neverhood/module2600.cpp b/engines/neverhood/module2600.cpp
index 7cdfb69ed8..43c55ea49b 100644
--- a/engines/neverhood/module2600.cpp
+++ b/engines/neverhood/module2600.cpp
@@ -277,13 +277,17 @@ AsScene2609Water::AsScene2609Water(NeverhoodEngine *vm)
setDoDeltaX(1);
createSurface1(0x9C210C90, 1200);
setClipRect(260, 260, 400, 368);
- _vm->_soundMan->addSound(0xDC2769B0, true);
+ _vm->_soundMan->addSound(0x08526C36, 0xDC2769B0);
SetUpdateHandler(&AnimatedSprite::update);
SetMessageHandler(&AsScene2609Water::handleMessage);
if (getGlobalVar(0x4E0BE910))
sendMessage(this, 0x2002, 0);
}
+AsScene2609Water::~AsScene2609Water() {
+ _vm->_soundMan->deleteSoundGroup(0x08526C36);
+}
+
uint32 AsScene2609Water::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
switch (messageNum) {
diff --git a/engines/neverhood/module2600.h b/engines/neverhood/module2600.h
index d6580a6c7a..04c78008f0 100644
--- a/engines/neverhood/module2600.h
+++ b/engines/neverhood/module2600.h
@@ -57,6 +57,7 @@ protected:
class AsScene2609Water : public AnimatedSprite {
public:
AsScene2609Water(NeverhoodEngine *vm);
+ virtual ~AsScene2609Water();
protected:
uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
};