Skip to content

Commit

Permalink
NEVERHOOD: Fix addSound in AsScene2609Water and add a destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoe123 authored and wjp committed May 8, 2013
1 parent a2bc192 commit ba991fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion engines/neverhood/module2600.cpp
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions engines/neverhood/module2600.h
Expand Up @@ -57,6 +57,7 @@ class SsScene2609Button : public StaticSprite {
class AsScene2609Water : public AnimatedSprite {
public:
AsScene2609Water(NeverhoodEngine *vm);
virtual ~AsScene2609Water();
protected:
uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
};
Expand Down

0 comments on commit ba991fe

Please sign in to comment.