aboutsummaryrefslogtreecommitdiff
path: root/engines/neverhood
diff options
context:
space:
mode:
authorjohndoe1232012-09-23 12:12:37 +0000
committerWillem Jan Palenstijn2013-05-08 20:43:42 +0200
commitf5a8c9d90d66de98f7eba43a2de0c4fdf3517a0d (patch)
tree16f6521057937c1b333cc71e3ebaee4473b17727 /engines/neverhood
parentfc0e40db304aa489d4117299fcce1f80ba0b6379 (diff)
downloadscummvm-rg350-f5a8c9d90d66de98f7eba43a2de0c4fdf3517a0d.tar.gz
scummvm-rg350-f5a8c9d90d66de98f7eba43a2de0c4fdf3517a0d.tar.bz2
scummvm-rg350-f5a8c9d90d66de98f7eba43a2de0c4fdf3517a0d.zip
NEVERHOOD: Add most SoundMan remaining calls
Except for those which need a sound hash array (later)
Diffstat (limited to 'engines/neverhood')
-rw-r--r--engines/neverhood/gamemodule.cpp6
-rw-r--r--engines/neverhood/klayman.cpp6
-rw-r--r--engines/neverhood/module1600.cpp4
-rw-r--r--engines/neverhood/module1700.cpp10
-rw-r--r--engines/neverhood/module1800.cpp13
-rw-r--r--engines/neverhood/module1900.cpp2
-rw-r--r--engines/neverhood/module2000.cpp2
-rw-r--r--engines/neverhood/module2100.cpp6
-rw-r--r--engines/neverhood/module2200.cpp46
-rw-r--r--engines/neverhood/module2300.cpp22
-rw-r--r--engines/neverhood/module2400.cpp32
-rw-r--r--engines/neverhood/module2500.cpp6
-rw-r--r--engines/neverhood/module2600.cpp12
-rw-r--r--engines/neverhood/module2700.cpp22
-rw-r--r--engines/neverhood/module2800.cpp81
-rw-r--r--engines/neverhood/module3000.cpp60
-rw-r--r--engines/neverhood/navigationscene.cpp12
-rw-r--r--engines/neverhood/navigationscene.h1
18 files changed, 169 insertions, 174 deletions
diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp
index 7841e278c3..3cd7e1d3ed 100644
--- a/engines/neverhood/gamemodule.cpp
+++ b/engines/neverhood/gamemodule.cpp
@@ -51,13 +51,13 @@ GameModule::GameModule(NeverhoodEngine *vm)
// Other initializations moved to actual engine class
// TODO
- // TODO SoundMan_playSoundThree(0x2D0031, 0x8861079);
+ _vm->_soundMan->playSoundThree(0x002D0031, 0x8861079);
SetMessageHandler(&GameModule::handleMessage);
}
GameModule::~GameModule() {
- // TODO SoundMan_deleteSoundGroup(0x2D0031);
+ _vm->_soundMan->deleteSoundGroup(0x002D0031);
delete _childObject;
_childObject = NULL;
// TODO: Set palette to black but probably not neccessary
@@ -300,7 +300,7 @@ void GameModule::startup() {
// createModule(1500, 0); // Logos and intro video //Real
#if 1
_vm->gameState().sceneNum = 0;
- createModule(1400, -1);
+ createModule(1200, -1);
#endif
#if 0
_vm->gameState().sceneNum = 0;
diff --git a/engines/neverhood/klayman.cpp b/engines/neverhood/klayman.cpp
index 00008830e7..87ab6e00d2 100644
--- a/engines/neverhood/klayman.cpp
+++ b/engines/neverhood/klayman.cpp
@@ -4733,11 +4733,11 @@ void KmScene2205::sub423980() {
KmScene2206::KmScene2206(NeverhoodEngine *vm, Entity *parentScene, int16 x, int16 y)
: Klayman(vm, parentScene, x, y, 1000, 1000) {
- // TODO SoundMan_addSound(0x80101800, 0xD3B02847);
+ _vm->_soundMan->addSound(0x80101800, 0xD3B02847);
}
KmScene2206::~KmScene2206() {
- // TODO SoundMan_deleteSoundGroup(0x80101800);
+ _vm->_soundMan->deleteSoundGroup(0x80101800);
}
void KmScene2206::xUpdate() {
@@ -4852,7 +4852,7 @@ void KmScene2206::sub482490() {
SetUpdateHandler(&Klayman::update);
SetMessageHandler(&Klayman::handleMessage41D360);
SetSpriteUpdate(&KmScene2206::spriteUpdate482450);
- // TODO SoundMan_playSoundLooping(0xD3B02847);
+ _vm->_soundMan->playSoundLooping(0xD3B02847);
}
}
diff --git a/engines/neverhood/module1600.cpp b/engines/neverhood/module1600.cpp
index 77d135d4a6..5ff6cd017e 100644
--- a/engines/neverhood/module1600.cpp
+++ b/engines/neverhood/module1600.cpp
@@ -46,12 +46,12 @@ Module1600::Module1600(NeverhoodEngine *vm, Module *parentModule, int which)
// TODO SoundMan_addSoundList(0x1A008D8, dword_4B3BB0, true);
// TODO SoundMan_setSoundListParams(dword_4B3BB0, true, 50, 600, 5, 150);
- // TODO SoundMan_playTwoSounds(0x1A008D8, 0x41861371, 0x43A2507F, 0);
+ _vm->_soundMan->playTwoSounds(0x1A008D8, 0x41861371, 0x43A2507F, 0);
}
Module1600::~Module1600() {
- // TODO SoundMan_deleteGroup(0x1A008D8);
+ _vm->_soundMan->deleteGroup(0x1A008D8);
}
void Module1600::createScene(int sceneNum, int which) {
diff --git a/engines/neverhood/module1700.cpp b/engines/neverhood/module1700.cpp
index 696f646af1..005792679c 100644
--- a/engines/neverhood/module1700.cpp
+++ b/engines/neverhood/module1700.cpp
@@ -27,10 +27,10 @@ namespace Neverhood {
Module1700::Module1700(NeverhoodEngine *vm, Module *parentModule, int which)
: Module(vm, parentModule), _soundResource(vm) {
- // TODO SoundMan_addMusic(0x04212331);
+ _vm->_soundMan->addMusic(0x04212331, 0x31114225);
// TODO SoundMan_addSoundList(0x04212331, dword_4AE930, true);
// TODO SoundMan_setSoundListParams(dword_4AE930, true, 50, 600, 5, 150);
- // TODO SoundMan_playTwoSounds(0x04212331, 0x41861371, 0x43A2507F, 0);
+ _vm->_soundMan->playTwoSounds(0x04212331, 0x41861371, 0x43A2507F, 0);
if (which < 0) {
createScene(_vm->gameState().sceneNum, -1);
@@ -45,7 +45,7 @@ Module1700::Module1700(NeverhoodEngine *vm, Module *parentModule, int which)
}
Module1700::~Module1700() {
- // TODO SoundMan_deleteGroup(0x04212331);
+ _vm->_soundMan->deleteGroup(0x04212331);
}
void Module1700::createScene(int sceneNum, int which) {
@@ -68,7 +68,7 @@ void Module1700::createScene(int sceneNum, int which) {
break;
case 4:
// TODO SoundMan_setSoundListParams(dword_4AE930, false, 0, 0, 0, 0);
- // TODO SoundMan_startMusic(0x31114225, 0, 2, 1);
+ _vm->_soundMan->startMusic(0x31114225, 0, 2);
_childObject = new Scene1705(_vm, this, which);
break;
}
@@ -97,7 +97,7 @@ void Module1700::updateScene() {
createScene(1, 1);
} else if (_moduleResult == 2) {
if (!_soundResource.isPlaying()) {
- // TODO _soundResource.setVolume(60);
+ _soundResource.setVolume(60);
_soundResource.play(0x58B45E58);
}
createScene(2, 2);
diff --git a/engines/neverhood/module1800.cpp b/engines/neverhood/module1800.cpp
index 7526a3aa76..fc31b2d0c5 100644
--- a/engines/neverhood/module1800.cpp
+++ b/engines/neverhood/module1800.cpp
@@ -30,7 +30,7 @@ Module1800::Module1800(NeverhoodEngine *vm, Module *parentModule, int which)
// TODO SoundMan_addSoundList(0x04A14718, dword_4AFE70);
// TODO SoundMan_setSoundListParams(dword_4AFE70, true, 50, 600, 10, 150);
- // TODO SoundMan_playTwoSounds(0x04A14718, 0x8A382B55, 0x0C242F1D, 0);
+ _vm->_soundMan->playTwoSounds(0x04A14718, 0x8A382B55, 0x0C242F1D, 0);
if (which < 0) {
createScene(_vm->gameState().sceneNum, -1);
@@ -45,7 +45,7 @@ Module1800::Module1800(NeverhoodEngine *vm, Module *parentModule, int which)
}
Module1800::~Module1800() {
- // TODO SoundMan_deleteGroup(0x04A14718);
+ _vm->_soundMan->deleteGroup(0x04A14718);
}
void Module1800::createScene(int sceneNum, int which) {
@@ -73,7 +73,7 @@ void Module1800::createScene(int sceneNum, int which) {
createNavigationScene(0x004AFE40, which);
break;
case 6:
- // TODO SoundMan_deleteGroup(0x04A14718);
+ _vm->_soundMan->deleteGroup(0x04A14718);
createSmackerScene(0x08D84010, true, true, false);
break;
case 7:
@@ -156,12 +156,9 @@ void Module1800::updateScene() {
} else {
switch (_vm->gameState().sceneNum) {
case 0:
-#if 0 // TODO
- NavigationScene *navigationScene = (NavigationScene*)_childObject;
- if (navigationScene->soundFlag1 && navigationScene->index == 2) {
- // TODO SoundMan_setTwoSoundsPlayFlag(false);
+ if (navigationScene()->getSoundFlag1() && navigationScene()->getNavigationIndex() == 2) {
+ _vm->_soundMan->setTwoSoundsPlayFlag(false);
}
-#endif
break;
}
}
diff --git a/engines/neverhood/module1900.cpp b/engines/neverhood/module1900.cpp
index bf1aad6a49..d432bcb6e8 100644
--- a/engines/neverhood/module1900.cpp
+++ b/engines/neverhood/module1900.cpp
@@ -42,7 +42,7 @@ Module1900::Module1900(NeverhoodEngine *vm, Module *parentModule, int which)
}
Module1900::~Module1900() {
- // TODO SoundMan_deleteGroup(0x04E1C09C);
+ _vm->_soundMan->deleteGroup(0x04E1C09C);
}
void Module1900::createScene(int sceneNum, int which) {
diff --git a/engines/neverhood/module2000.cpp b/engines/neverhood/module2000.cpp
index e07129134c..d1d6b82577 100644
--- a/engines/neverhood/module2000.cpp
+++ b/engines/neverhood/module2000.cpp
@@ -40,7 +40,7 @@ Module2000::Module2000(NeverhoodEngine *vm, Module *parentModule, int which)
}
Module2000::~Module2000() {
- // TODO SoundMan_deleteGroup(0x81293110);
+ _vm->_soundMan->deleteGroup(0x81293110);
}
void Module2000::createScene(int sceneNum, int which) {
diff --git a/engines/neverhood/module2100.cpp b/engines/neverhood/module2100.cpp
index 33c9d23cbf..fd2a793a28 100644
--- a/engines/neverhood/module2100.cpp
+++ b/engines/neverhood/module2100.cpp
@@ -29,7 +29,7 @@ namespace Neverhood {
Module2100::Module2100(NeverhoodEngine *vm, Module *parentModule, int which)
: Module(vm, parentModule) {
- // TODO SoundMan_addMusic(0x10A10C14, 0x11482B95);
+ _vm->_soundMan->addMusic(0x10A10C14, 0x11482B95);
if (which < 0) {
createScene(_vm->gameState().sceneNum, -1);
@@ -44,7 +44,7 @@ Module2100::Module2100(NeverhoodEngine *vm, Module *parentModule, int which)
}
Module2100::~Module2100() {
- // TODO SoundMan_deleteMusicGroup(0x10A10C14);
+ _vm->_soundMan->deleteMusicGroup(0x10A10C14);
}
void Module2100::createScene(int sceneNum, int which) {
@@ -52,7 +52,7 @@ void Module2100::createScene(int sceneNum, int which) {
_vm->gameState().sceneNum = sceneNum;
switch (_vm->gameState().sceneNum) {
case 0:
- // TODO SoundMan_startMusic(0x11482B95, 0, 1, 1);
+ _vm->_soundMan->startMusic(0x11482B95, 0, 1);
_childObject = new Scene2101(_vm, this, which);
break;
}
diff --git a/engines/neverhood/module2200.cpp b/engines/neverhood/module2200.cpp
index cbd232e834..bb2f59b340 100644
--- a/engines/neverhood/module2200.cpp
+++ b/engines/neverhood/module2200.cpp
@@ -33,7 +33,7 @@ Module2200::Module2200(NeverhoodEngine *vm, Module *parentModule, int which)
debug("Create Module2200(%d)", which);
- // TODO: SoundMan_addMusic(0x11391412, 0x601C908C);
+ _vm->_soundMan->addMusic(0x11391412, 0x601C908C);
if (which < 0) {
createScene(_vm->gameState().sceneNum, -1);
@@ -44,7 +44,7 @@ Module2200::Module2200(NeverhoodEngine *vm, Module *parentModule, int which)
}
Module2200::~Module2200() {
- // TODO SoundMan_deleteGroup(0x11391412);
+ _vm->_soundMan->deleteGroup(0x11391412);
}
void Module2200::createScene(int sceneNum, int which) {
@@ -57,23 +57,23 @@ void Module2200::createScene(int sceneNum, int which) {
_childObject = new Scene2201(_vm, this, which);
break;
case 1:
- // TODO SoundMan_startMusic(0x601C908C, 0, 2, 1);
+ _vm->_soundMan->startMusic(0x601C908C, 0, 2);
_childObject = new Scene2202(_vm, this, which);
break;
case 2:
- // TODO SoundMan_startMusic(0x601C908C, 0, 2, 1);
+ _vm->_soundMan->startMusic(0x601C908C, 0, 2);
_childObject = new Scene2203(_vm, this, which);
break;
case 3:
- // TODO SoundMan_stopMusic(0x601C908C, 0, 2);
+ _vm->_soundMan->stopMusic(0x601C908C, 0, 2);
_childObject = new DiskplayerScene(_vm, this, 3);
break;
case 4:
- // TODO SoundMan_stopMusic(0x601C908C, 0, 2);
+ _vm->_soundMan->stopMusic(0x601C908C, 0, 2);
_childObject = new Scene2205(_vm, this, which);
break;
case 5:
- // TODO SoundMan_stopMusic(0x601C908C, 0, 2);
+ _vm->_soundMan->stopMusic(0x601C908C, 0, 2);
_childObject = new Scene2206(_vm, this, which);
break;
case 6:
@@ -576,19 +576,19 @@ Scene2201::Scene2201(NeverhoodEngine *vm, Module *parentModule, int which)
insertSprite<AsScene2201CeilingFan>();
- // TODO SoundMan_addSound(0x04106220, 0x81212040, true);
+ _vm->_soundMan->addSound(0x04106220, 0x81212040);
}
Scene2201::~Scene2201() {
setGlobalVar(0xC0418A02, _klayman->isDoDeltaX() ? 1 : 0);
- // TODO SoundMan_deleteSoundGroup(0x04106220);
+ _vm->_soundMan->deleteSoundGroup(0x04106220);
}
void Scene2201::update() {
Scene::update();
if (!_soundFlag) {
- // TODO SoundMan_playSoundLooping(0x81212040);
+ _vm->_soundMan->playSoundLooping(0x81212040);
_soundFlag = true;
}
}
@@ -918,13 +918,13 @@ Scene2202::Scene2202(NeverhoodEngine *vm, Module *parentModule, int which)
_soundResource1.load(0x68E25540);
_soundResource2.load(0x40400457);
- // TODO SoundMan_addSound(0x60400854, 0x8101A241, true);
- // TODO SoundMan_playSoundLooping(0x8101A241);
+ _vm->_soundMan->addSound(0x60400854, 0x8101A241);
+ _vm->_soundMan->playSoundLooping(0x8101A241);
}
Scene2202::~Scene2202() {
- // TODO SoundMan_deleteSoundGroup(0x60400854);
+ _vm->_soundMan->deleteSoundGroup(0x60400854);
}
void Scene2202::update() {
@@ -1714,7 +1714,7 @@ AsScene2207Elevator::AsScene2207Elevator(NeverhoodEngine *vm, Scene *parentScene
}
AsScene2207Elevator::~AsScene2207Elevator() {
- // TODO SoundMan_deleteSoundGroup(0x02700413);
+ _vm->_soundMan->deleteSoundGroup(0x02700413);
}
void AsScene2207Elevator::update() {
@@ -1727,7 +1727,7 @@ void AsScene2207Elevator::update() {
if (_destPointIndexDelta != 0) {
_destPointIndexDelta = 0;
} else {
- // TODO SoundMan_deleteSound(0xD3B02847);
+ _vm->_soundMan->deleteSound(0xD3B02847);
_soundResource.play(0x53B8284A);
}
}
@@ -1743,7 +1743,7 @@ void AsScene2207Elevator::update() {
if (_destPointIndexDelta != 0) {
_destPointIndexDelta = 0;
} else {
- // TODO SoundMan_deleteSound(0xD3B02847);
+ _vm->_soundMan->deleteSound(0xD3B02847);
_soundResource.play(0x53B8284A);
}
}
@@ -1802,8 +1802,8 @@ void AsScene2207Elevator::moveToY(int16 y) {
} else {
_destPointIndexDelta = 2;
}
- // TODO SoundMan_addSound(0x02700413, 0xD3B02847, true);
- // TODO SoundMan_playSoundLooping(0xD3B02847);
+ _vm->_soundMan->addSound(0x02700413, 0xD3B02847);
+ _vm->_soundMan->playSoundLooping(0xD3B02847);
}
_isMoving = true;
@@ -1888,7 +1888,7 @@ AsScene2207WallRobotAnimation::AsScene2207WallRobotAnimation(NeverhoodEngine *vm
}
AsScene2207WallRobotAnimation::~AsScene2207WallRobotAnimation() {
- // TODO SoundMan_deleteSoundGroup(0x80D00820);
+ _vm->_soundMan->deleteSoundGroup(0x80D00820);
}
uint32 AsScene2207WallRobotAnimation::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
@@ -1897,14 +1897,14 @@ uint32 AsScene2207WallRobotAnimation::handleMessage(int messageNum, const Messag
case 0x100D:
if (!_idle) {
if (param.asInteger() == 0x3423093) {
- // TODO SoundMan_addSound(0x80D00820, 0x12121943, true);
- // TODO SoundMan_playSoundLooping(0x12121943);
+ _vm->_soundMan->addSound(0x80D00820, 0x12121943);
+ _vm->_soundMan->playSoundLooping(0x12121943);
} else if (param.asInteger() == 0x834AB011) {
_soundResource1.stop();
_soundResource2.stop();
_soundResource3.stop();
_soundResource4.stop();
- // TODO SoundMan_deleteSound(0x12121943);
+ _vm->_soundMan->deleteSound(0x12121943);
} else if (param.asInteger() == 0x3A980501) {
_soundResource2.play();
} else if (param.asInteger() == 0x2A2AD498) {
@@ -1949,7 +1949,7 @@ void AsScene2207WallRobotAnimation::cbStopAnimation() {
_soundResource2.stop();
_soundResource3.stop();
_soundResource4.stop();
- // TODO SoundMan_deleteSound(0x12121943);
+ _vm->_soundMan->deleteSound(0x12121943);
_idle = true;
setVisible(false);
}
diff --git a/engines/neverhood/module2300.cpp b/engines/neverhood/module2300.cpp
index d3346eb31f..3f7c5e6616 100644
--- a/engines/neverhood/module2300.cpp
+++ b/engines/neverhood/module2300.cpp
@@ -33,14 +33,14 @@ Module2300::Module2300(NeverhoodEngine *vm, Module *parentModule, int which)
_flag = getGlobalVar(0x10938830) == 0;
if (_flag) {
- // TODO SoundMan_setSoundVolume(0x90F0D1C3, 0);
- // TODO SoundMan_playSoundLooping(0x90F0D1C3);
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, 0);
+ _vm->_soundMan->playSoundLooping(0x90F0D1C3);
} else {
- // TODO SoundMan_setSoundParams(0x90F0D1C3, false, 0, 0, 0, 0);
+ _vm->_soundMan->setSoundParams(0x90F0D1C3, false, 0, 0, 0, 0);
}
- // TODO SoundMan_playTwoSounds(0x1A214010, 0x48498E46, 0x50399F64, 0);
- // TODO SoundMan_playTwoSounds(0x1A214010, 0x41861371, 0x43A2507F, 0);
+ _vm->_soundMan->playTwoSounds(0x1A214010, 0x48498E46, 0x50399F64, 0);
+ _vm->_soundMan->playTwoSounds(0x1A214010, 0x41861371, 0x43A2507F, 0);
if (which < 0) {
createScene(_vm->gameState().sceneNum, -1);
@@ -59,7 +59,7 @@ Module2300::Module2300(NeverhoodEngine *vm, Module *parentModule, int which)
}
Module2300::~Module2300() {
- // TODO SoundMan_deleteGroup(0x1A214010);
+ _vm->_soundMan->deleteGroup(0x1A214010);
}
void Module2300::createScene(int sceneNum, int which) {
@@ -73,7 +73,7 @@ void Module2300::createScene(int sceneNum, int which) {
createNavigationScene(0x004B67E8, which);
if (_flag) {
_volume = 15;
- // TODO SoundMan_setSoundVolume(0x90F0D1C3, 15);
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, 15);
}
break;
case 2:
@@ -83,16 +83,16 @@ void Module2300::createScene(int sceneNum, int which) {
if (getGlobalVar(0x10938830)) {
createNavigationScene(0x004B68F0, which);
} else {
- // TODO SoundMan_setSoundVolume(0x90F0D1C3, _volume);
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _volume);
createNavigationScene(0x004B68A8, which);
if (_flag) {
_volume = 87;
- // TODO SoundMan_setSoundVolume(0x90F0D1C3, 87);
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, 87);
}
}
break;
case 4:
- // TODO SoundMan_setTwoSoundsPlayFlag(true);
+ _vm->_soundMan->setTwoSoundsPlayFlag(true);
createSmackerScene(0x20080A0B, true, true, false);
break;
}
@@ -140,7 +140,7 @@ void Module2300::updateScene() {
}
break;
case 4:
- // TODO SoundMan_setTwoSoundsPlayFlag(false);
+ _vm->_soundMan->setTwoSoundsPlayFlag(false);
createScene(1, 2);
break;
}
diff --git a/engines/neverhood/module2400.cpp b/engines/neverhood/module2400.cpp
index f2f2da97d0..f1f9f04777 100644
--- a/engines/neverhood/module2400.cpp
+++ b/engines/neverhood/module2400.cpp
@@ -27,7 +27,7 @@ namespace Neverhood {
Module2400::Module2400(NeverhoodEngine *vm, Module *parentModule, int which)
: Module(vm, parentModule) {
- // TODO SoundMan_addMusic(0x202D1010, 0xB110382D);
+ _vm->_soundMan->addMusic(0x202D1010, 0xB110382D);
if (which < 0) {
createScene(_vm->gameState().sceneNum, _vm->gameState().which);
@@ -38,7 +38,7 @@ Module2400::Module2400(NeverhoodEngine *vm, Module *parentModule, int which)
}
Module2400::~Module2400() {
- // TODO SoundMan_deleteMusicGroup(0x202D1010);
+ _vm->_soundMan->deleteMusicGroup(0x202D1010);
}
void Module2400::createScene(int sceneNum, int which) {
@@ -46,27 +46,27 @@ void Module2400::createScene(int sceneNum, int which) {
_vm->gameState().sceneNum = sceneNum;
switch (_vm->gameState().sceneNum) {
case 0:
- // TODO SoundMan_stopMusic(0xB110382D, 0, 0);
+ _vm->_soundMan->stopMusic(0xB110382D, 0, 0);
_childObject = new Scene2401(_vm, this, which);
break;
case 1:
- // TODO SoundMan_startMusic(0xB110382D, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xB110382D, 0, 2);
_childObject = new Scene2402(_vm, this, which);
break;
case 2:
- // TODO SoundMan_startMusic(0xB110382D, 0, 0, 1);
+ _vm->_soundMan->startMusic(0xB110382D, 0, 0);
_childObject = new Scene2403(_vm, this, which);
break;
case 4:
- // TODO SoundMan_stopMusic(0xB110382D, 0, 2);
+ _vm->_soundMan->stopMusic(0xB110382D, 0, 2);
_childObject = new DiskplayerScene(_vm, this, 0);
break;
case 5:
- // TODO SoundMan_startMusic(0xB110382D, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xB110382D, 0, 2);
_childObject = new Scene2406(_vm, this, which);
break;
case 6:
- // TODO SoundMan_stopMusic(0xB110382D, 0, 2);
+ _vm->_soundMan->stopMusic(0xB110382D, 0, 2);
createSmackerScene(0x20D80001, true, true, false);
break;
case 7:
@@ -247,7 +247,7 @@ AsScene2401FlowingWater::AsScene2401FlowingWater(NeverhoodEngine *vm)
}
AsScene2401FlowingWater::~AsScene2401FlowingWater() {
- // TODO SoundMan_deleteSoundGroup(0x40F11C09);
+ _vm->_soundMan->deleteSoundGroup(0x40F11C09);
}
uint32 AsScene2401FlowingWater::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
@@ -260,15 +260,15 @@ uint32 AsScene2401FlowingWater::handleMessage(int messageNum, const MessageParam
break;
case 0x2002:
if (!_isWaterFlowing) {
- // TODO SoundMan_addSound(0x40F11C09, 0x980C1420, true);
- // TODO SoundMan_playSoundLooping(0x980C1420);
+ _vm->_soundMan->addSound(0x40F11C09, 0x980C1420);
+ _vm->_soundMan->playSoundLooping(0x980C1420);
startAnimation(0x10203116, 0, -1);
setVisible(true);
_isWaterFlowing = true;
}
break;
case 0x2003:
- // TODO SoundMan_deleteSound(0x980C1420);
+ _vm->_soundMan->deleteSound(0x980C1420);
_isWaterFlowing = false;
break;
case 0x3002:
@@ -664,7 +664,7 @@ AsScene2402TV::AsScene2402TV(NeverhoodEngine *vm, Klayman *klayman)
}
AsScene2402TV::~AsScene2402TV() {
- // TODO SoundMan_deleteSoundGroup(0x01520123);
+ _vm->_soundMan->deleteSoundGroup(0x01520123);
}
void AsScene2402TV::upWait() {
@@ -687,12 +687,12 @@ void AsScene2402TV::upFocusKlayman() {
startAnimation(0x050A0103, _currFrameIndex, -1);
_newStickFrameIndex = _currFrameIndex;
if (_countdown2 == 0) {
- // TODO SoundMan_addSound(0x01520123, 0xC42D4528, true);
- // TODO SoundMan_playSoundLooping(0xC42D4528);
+ _vm->_soundMan->addSound(0x01520123, 0xC42D4528);
+ _vm->_soundMan->playSoundLooping(0xC42D4528);
}
_countdown2 = 5;
} else if (_countdown2 != 0 && (--_countdown2 == 0)) {
- // TODO SoundMan_deleteSound(0xC42D4528);
+ _vm->_soundMan->deleteSound(0xC42D4528);
}
AnimatedSprite::update();
}
diff --git a/engines/neverhood/module2500.cpp b/engines/neverhood/module2500.cpp
index 822204f36d..a12c516cbf 100644
--- a/engines/neverhood/module2500.cpp
+++ b/engines/neverhood/module2500.cpp
@@ -59,8 +59,8 @@ Module2500::Module2500(NeverhoodEngine *vm, Module *parentModule, int which)
: Module(vm, parentModule), _soundResource1(vm), _soundResource2(vm),
_soundResource3(vm), _soundResource4(vm), _soundIndex(0) {
- // TODO SoundMan_addMusic(0x29220120, 0x05343184);
- // TODO SoundMan_startMusic(0x05343184, 0, 0, 1);
+ _vm->_soundMan->addMusic(0x29220120, 0x05343184);
+ _vm->_soundMan->startMusic(0x05343184, 0, 0);
SetMessageHandler(&Module2500::handleMessage);
if (which < 0) {
@@ -77,7 +77,7 @@ Module2500::Module2500(NeverhoodEngine *vm, Module *parentModule, int which)
}
Module2500::~Module2500() {
- // TODO SoundMan_deleteMusicGroup(0x29220120);
+ _vm->_soundMan->deleteMusicGroup(0x29220120);
}
void Module2500::createScene(int sceneNum, int which) {
diff --git a/engines/neverhood/module2600.cpp b/engines/neverhood/module2600.cpp
index be0503774e..9106eeb8b6 100644
--- a/engines/neverhood/module2600.cpp
+++ b/engines/neverhood/module2600.cpp
@@ -37,12 +37,12 @@ Module2600::Module2600(NeverhoodEngine *vm, Module *parentModule, int which)
// TODO SoundMan_addSoundList(0x40271018, dword_4B87E8, true);
// TODO SoundMan_setSoundListParams(dword_4B87E8, true, 50, 600, 5, 150);
- // TODO SoundMan_playTwoSounds(0x40271018, 0x41861371, 0x43A2507F);
+ _vm->_soundMan->playTwoSounds(0x40271018, 0x41861371, 0x43A2507F, 0);
}
Module2600::~Module2600() {
- // TODO SoundMan_deleteGroup(0x40271018);
+ _vm->_soundMan->deleteGroup(0x40271018);
}
void Module2600::createScene(int sceneNum, int which) {
@@ -72,7 +72,7 @@ void Module2600::createScene(int sceneNum, int which) {
createNavigationScene(0x004B8698, which);
break;
case 7:
- // TODO SoundMan_deleteGroup(0x40271018);
+ _vm->_soundMan->deleteGroup(0x40271018);
createSmackerScene(0x30090001, true, true, false);
break;
case 8:
@@ -268,7 +268,7 @@ AsScene2609Water::AsScene2609Water(NeverhoodEngine *vm)
setDoDeltaX(1);
createSurface1(0x9C210C90, 1200);
setClipRect(260, 260, 400, 368);
- // TODO SoundMan_addSound(0xDC2769B0, true);
+ _vm->_soundMan->addSound(0xDC2769B0, true);
SetUpdateHandler(&AnimatedSprite::update);
SetMessageHandler(&AsScene2609Water::handleMessage);
if (getGlobalVar(0x4E0BE910))
@@ -281,12 +281,12 @@ uint32 AsScene2609Water::handleMessage(int messageNum, const MessageParam &param
case 0x2001:
stopAnimation();
setVisible(false);
- // TODO SoundMan_stopSound(0xDC2769B0);
+ _vm->_soundMan->stopSound(0xDC2769B0);
break;
case 0x2002:
startAnimation(0x9C210C90, 0, -1);
setVisible(true);
- // TODO SoundMan_playSoundLooping(0xDC2769B0);
+ _vm->_soundMan->playSoundLooping(0xDC2769B0);
break;
}
return messageResult;
diff --git a/engines/neverhood/module2700.cpp b/engines/neverhood/module2700.cpp
index a91eea294b..aa5c98e4c2 100644
--- a/engines/neverhood/module2700.cpp
+++ b/engines/neverhood/module2700.cpp
@@ -86,8 +86,8 @@ Module2700::Module2700(NeverhoodEngine *vm, Module *parentModule, int which)
: Module(vm, parentModule), _soundResource1(vm), _soundResource2(vm),
_soundResource3(vm), _soundResource4(vm), _soundIndex(0), _flag1(false) {
- // TODO SoundMan_addMusic(0x42212411, 0x04020210);
- // TODO SoundMan_startMusic(0x04020210, 24, 2, 1);
+ _vm->_soundMan->addMusic(0x42212411, 0x04020210);
+ _vm->_soundMan->startMusic(0x04020210, 24, 2);
SetMessageHandler(&Module2700::handleMessage);
if (which < 0) {
@@ -107,7 +107,7 @@ Module2700::Module2700(NeverhoodEngine *vm, Module *parentModule, int which)
}
Module2700::~Module2700() {
- // TODO SoundMan_deleteGroup(0x42212411);
+ _vm->_soundMan->deleteGroup(0x42212411);
}
void Module2700::createScene(int sceneNum, int which) {
@@ -414,9 +414,9 @@ void Module2700::updateScene() {
case 21:
// TODO? GameState_sub_469C50(&field_52, 0);
// TODO MusicMan_stopAll (if field_52 above = 1)
- // TODO SoundMan_deleteMusic(_musicFileHash);
- // TODO SoundMan_startMusic(0x04020210, 0, 2, 1);
- // TODO SoundMan_deleteSoundGroup(0x42212411);
+ _vm->_soundMan->deleteMusic(_musicFileHash);
+ _vm->_soundMan->startMusic(0x04020210, 0, 2);
+ _vm->_soundMan->deleteSoundGroup(0x42212411);
createScene(20, 3);
break;
case 22:
@@ -458,15 +458,15 @@ void Module2700::updateScene() {
switch (_vm->gameState().sceneNum) {
case 21:
if (!_flag1) {
- // TODO SoundMan_stopMusic(0x04020210, 0, 1);
+ _vm->_soundMan->stopMusic(0x04020210, 0, 1);
// TODO _vm->gameModule()->initScene2801Vars();
_musicFileHash = getGlobalVar(0x89A82A15);
// TODO? GameState_sub_469C50(&field_52, 0);
// TODO MusicMan_create(); // Why?
- // TODO SoundMan_addMusic(0x42212411, _musicFileHash);
- // TODO SoundMan_startMusic(_musicFileHash, 0, /*TODO */???, 1);
- // TODO SoundMan_addSound(0x42212411, 0x44014282, true);
- // TODO SoundMan_setSoundParams(0x44014282, true, 120, 360, 72, 0);
+ _vm->_soundMan->addMusic(0x42212411, _musicFileHash);
+ _vm->_soundMan->startMusic(_musicFileHash, 0, 2/*TODO ??? */);
+ _vm->_soundMan->addSound(0x42212411, 0x44014282);
+ _vm->_soundMan->setSoundParams(0x44014282, true, 120, 360, 72, 0);
_flag1 = true;
}
break;
diff --git a/engines/neverhood/module2800.cpp b/engines/neverhood/module2800.cpp
index 558819c73c..f6c67482e8 100644
--- a/engines/neverhood/module2800.cpp
+++ b/engines/neverhood/module2800.cpp
@@ -35,7 +35,7 @@ Module2800::Module2800(NeverhoodEngine *vm, Module *parentModule, int which)
_fileHash = 0;
// TODO music stuff
- // TODO SoundMan_addMusic(0x64210814, 0xD2FA4D14);
+ _vm->_soundMan->addMusic(0x64210814, 0xD2FA4D14);
setGlobalVar(0x28D8C940, 1);
if (which < 0) {
@@ -52,8 +52,7 @@ Module2800::Module2800(NeverhoodEngine *vm, Module *parentModule, int which)
Module2800::~Module2800() {
// TODO music stuff
- // TODO SoundMan_deleteGroup(0x64210814);
- // TODO Module2800_sub471DF0();
+ _vm->_soundMan->deleteGroup(0x64210814);
}
void Module2800::createScene(int sceneNum, int which) {
@@ -61,11 +60,11 @@ void Module2800::createScene(int sceneNum, int which) {
_vm->gameState().sceneNum = sceneNum;
switch (_vm->gameState().sceneNum) {
case 0:
- // TODO SoundMan_stopMusic(0xD2FA4D14, 0, 0);
+ _vm->_soundMan->stopMusic(0xD2FA4D14, 0, 0);
_childObject = new Scene2801(_vm, this, which);
break;
case 1:
- // TODO SoundMan_stopMusic(0xD2FA4D14, 0, 0);
+ _vm->_soundMan->stopMusic(0xD2FA4D14, 0, 0);
#if 0
_flag = true; // DEBUG!
if (_flag) {
@@ -76,7 +75,7 @@ void Module2800::createScene(int sceneNum, int which) {
#endif
break;
case 2:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
//setGlobalVar(0x1860C990,1);//DEBUG
if (getGlobalVar(0x1860C990))
_childObject = new Scene2803b(_vm, this, which);
@@ -87,98 +86,98 @@ void Module2800::createScene(int sceneNum, int which) {
_childObject = new Scene2804(_vm, this, which);
break;
case 4:
- // TODO SoundMan_stopMusic(0xD2FA4D14, 0, 2);
+ _vm->_soundMan->stopMusic(0xD2FA4D14, 0, 2);
_childObject = new Scene2805(_vm, this, which);
break;
case 5:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Scene2806(_vm, this, which);
break;
case 6:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Scene2807(_vm, this, which);
break;
case 7:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Scene2808(_vm, this, 0);
break;
case 8:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Scene2809(_vm, this, which);
break;
case 9:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Scene2810(_vm, this, which);
break;
case 10:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Scene2808(_vm, this, 1);
break;
case 11:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Scene2812(_vm, this, which);
break;
case 12:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Class152(_vm, this, 0x0000A245, 0x0A241008);
break;
case 13:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Class152(_vm, this, 0x81C60635, 0x60631814);
break;
case 14:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Class152(_vm, this, 0xCA811204, 0x11200CA0);
break;
case 15:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Class152(_vm, this, 0x2D438A00, 0x38A042DC);
break;
case 16:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Class152(_vm, this, 0x0A806204, 0x062000A0);
break;
case 17:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Class152(_vm, this, 0x010F9284, 0xF9280018);
break;
case 18:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Class152(_vm, this, 0x0100022B, 0x0022F018);
break;
case 19:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Class152(_vm, this, 0x10866205, 0x66201100);
break;
case 20:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Class152(_vm, this, 0x01C58000, 0x58004014);
break;
case 21:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Scene2822(_vm, this, which);
break;
case 22:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Class152(_vm, this, 0x9408121E, 0x8121A948);
break;
case 23:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Class152(_vm, this, 0x048C0600, 0xC0604040);
break;
case 24:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new Class152(_vm, this, 0x04270A94, 0x70A9004A);
break;
case 25:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
if (getGlobalVar(0x190A1D18))
_childObject = new Class152(_vm, this, 0x01600204, 0x0020001E);
else
_childObject = new Class152(_vm, this, 0x08611204, 0x1120008E);
break;
case 26:
- // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1);
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
_childObject = new DiskplayerScene(_vm, this, 4);
break;
//
@@ -359,10 +358,10 @@ void Module2800::updateScene() {
} else {
switch (_vm->gameState().sceneNum) {
case 0:
- // TODO Module2800_sub4731E0(true);
+ // TODO Module2800_updateMusic(true);
break;
case 1:
- // TODO Module2800_sub4731E0(false);
+ // TODO Module2800_updateMusic(false);
break;
}
}
@@ -1527,7 +1526,7 @@ AsScene2804BeamCoil::AsScene2804BeamCoil(NeverhoodEngine *vm, Scene *parentScene
_needRefresh = true;
AnimatedSprite::updatePosition();
_soundResource.load(0x6352F051);
- // TODO SoundMan_addSound(0xC5EA0B28, 0xEF56B094, true);
+ _vm->_soundMan->addSound(0xC5EA0B28, 0xEF56B094);
SetUpdateHandler(&AsScene2804BeamCoil::update);
SetMessageHandler(&AsScene2804BeamCoil::handleMessage);
}
@@ -1572,13 +1571,13 @@ void AsScene2804BeamCoil::hide() {
setVisible(false);
_ssBeamCoilBody->setVisible(false);
// TODO _ssBeamCoilBody->update(); -> hide()
- // TODO SoundMan_stopSound(0xEF56B094);
+ _vm->_soundMan->stopSound(0xEF56B094);
}
void AsScene2804BeamCoil::stBeaming() {
startAnimation(0x00494891, 93, -1);
NextState(&AsScene2804BeamCoil::stBeaming);
- // TODO SoundMan_playSoundLooping(0xEF56B094);
+ _vm->_soundMan->playSoundLooping(0xEF56B094);
}
uint32 AsScene2804BeamCoil::hmBeaming(int messageNum, const MessageParam &param, Entity *sender) {
@@ -2735,9 +2734,9 @@ Scene2810::Scene2810(NeverhoodEngine *vm, Module *parentModule, int which)
setMessageList(0x004AE738);
_klayman->setClipRect(0, _sprite2->getDrawRect().y, 640, _sprite3->getDrawRect().y2());
_asRope->setClipRect(0, _sprite2->getDrawRect().y, 640, _sprite3->getDrawRect().y2());
- // TODO SoundMan_addSound(0x84400112, 0xC874EE6C, true);
- // TODO SoundMan_playSoundLooping(0xC874EE6C);
- // TODO SoundMan_setSoundVolume(0xC874EE6C, 50);
+ _vm->_soundMan->addSound(0x84400112, 0xC874EE6C);
+ _vm->_soundMan->playSoundLooping(0xC874EE6C);
+ _vm->_soundMan->setSoundVolume(0xC874EE6C, 50);
_flag1 = false;
} else if ((which >= 11 && which <= 14) || (which >= 19 && which <= 22) || which == 3) {
if (getGlobalVar(0x1860C990)) {
@@ -2798,7 +2797,7 @@ Scene2810::Scene2810(NeverhoodEngine *vm, Module *parentModule, int which)
Scene2810::~Scene2810() {
setGlobalVar(0xC0418A02, _klayman->isDoDeltaX() ? 1 : 0);
setGlobalVar(0x00D30138, _klayman->getX());
- // TODO SoundMan_deleteSoundGroup(0x84400112);
+ _vm->_soundMan->deleteSoundGroup(0x84400112);
}
void Scene2810::sub406650() {
@@ -2887,7 +2886,7 @@ AsScene2812Winch::AsScene2812Winch(NeverhoodEngine *vm)
}
AsScene2812Winch::~AsScene2812Winch() {
- // TODO SoundMan_deleteSoundGroup(0x00B000E2);
+ _vm->_soundMan->deleteSoundGroup(0x00B000E2);
}
uint32 AsScene2812Winch::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
@@ -2896,8 +2895,8 @@ uint32 AsScene2812Winch::handleMessage(int messageNum, const MessageParam &param
case 0x2000:
startAnimation(0x20DA08A0, 0, -1);
setVisible(true);
- // TODO SoundMan_addSound(0x00B000E2, 0xC874EE6C, true);
- // TODO SoundMan_playSoundLooping(0xC874EE6C);
+ _vm->_soundMan->addSound(0x00B000E2, 0xC874EE6C);
+ _vm->_soundMan->playSoundLooping(0xC874EE6C);
break;
case 0x3002:
startAnimation(0x20DA08A0, 7, -1);
diff --git a/engines/neverhood/module3000.cpp b/engines/neverhood/module3000.cpp
index ab86c48fc8..b76f9c7c60 100644
--- a/engines/neverhood/module3000.cpp
+++ b/engines/neverhood/module3000.cpp
@@ -31,16 +31,16 @@ Module3000::Module3000(NeverhoodEngine *vm, Module *parentModule, int which)
// TODO SoundMan_addSoundList(0x81293110, dword_4B7FC8, true);
// TODO SoundMan_setSoundListParams(dword_4B7FC8, true, 50, 600, 5, 150);
- // TODO SoundMan_setSoundParams(0x90F0D1C3, false, 20000, 30000, 20000, 30000);
- // TODO SoundMan_playTwoSounds(0x81293110, 0x48498E46, 0x50399F64, 0);
- // TODO SoundMan_playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
- // TODO SoundMan_playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
+ _vm->_soundMan->setSoundParams(0x90F0D1C3, false, 20000, 30000, 20000, 30000);
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x48498E46, 0x50399F64, 0);
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
_flag = getGlobalVar(0x10938830) != 0;
if (_flag) {
- // TODO SoundMan_setSoundVolume(0x90F0D1C3, 0);
- // TODO SoundMan_playSoundLooping(0x90F0D1C3);
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, 0);
+ _vm->_soundMan->playSoundLooping(0x90F0D1C3);
}
if (which < 0) {
@@ -58,7 +58,7 @@ Module3000::Module3000(NeverhoodEngine *vm, Module *parentModule, int which)
}
Module3000::~Module3000() {
- // TODO SoundMan_deleteGroup(0x81293110);
+ _vm->_soundMan->deleteGroup(0x81293110);
}
void Module3000::createScene(int sceneNum, int which) {
@@ -77,10 +77,10 @@ void Module3000::createScene(int sceneNum, int which) {
}
break;
case 2:
- // TODO SoundMan_playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
if (_flag) {
_soundVolume = 90;
- // TODO SoundMan_setSoundVolume(0x90F0D1C3, 90);
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, 90);
}
if (getGlobalVar(0x10938830)) {
createNavigationScene(0x004B7D58, which);
@@ -181,10 +181,10 @@ void Module3000::updateScene() {
}
break;
case 2:
- // TODO SoundMan_playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
if (_flag) {
_soundVolume = 0;
- // TODO SoundMan_setSoundVolume(0x90F0D1C3, 0);
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, 0);
}
if (_moduleResult == 0) {
createScene(3, 0);
@@ -275,26 +275,26 @@ void Module3000::updateScene() {
int navigationIndex = navigationScene()->getIndex();
if (navigationIndex == 1) {
if (frameNumber == 0) {
- // TODO SoundMan_playTwoSounds(0x81293110, 0x48498E46, 0x50399F64, 0);
- // TODO SoundMan_setSoundVolume(0x48498E46, 70);
- // TODO SoundMan_setSoundVolume(0x50399F64, 70);
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x48498E46, 0x50399F64, 0);
+ _vm->_soundMan->setSoundVolume(0x48498E46, 70);
+ _vm->_soundMan->setSoundVolume(0x50399F64, 70);
} else if (frameNumber == 100) {
- // TODO SoundMan_playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
}
} else if (navigationIndex == 0) {
if (frameNumber == 0) {
- // TODO SoundMan_playTwoSounds(0x81293110, 0x48498E46, 0x50399F64, 0);
- // TODO SoundMan_setSoundVolume(0x48498E46, 70);
- // TODO SoundMan_setSoundVolume(0x50399F64, 70);
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x48498E46, 0x50399F64, 0);
+ _vm->_soundMan->setSoundVolume(0x48498E46, 70);
+ _vm->_soundMan->setSoundVolume(0x50399F64, 70);
} else if (frameNumber == 10) {
- // TODO SoundMan_playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
}
if (_flag && _soundVolume < 90 && frameNumber % 2) {
if (frameNumber == 0)
_soundVolume = 40;
else
_soundVolume++;
- // TODO SoundMan_setSoundVolume(0x90F0D1C3, _soundVolume);
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
}
}
}
@@ -307,17 +307,17 @@ void Module3000::updateScene() {
int navigationIndex = navigationScene()->getIndex();
if (_flag && _soundVolume > 1 && frameNumber % 2) {
_soundVolume--;
- // TODO SoundMan_setSoundVolume(0x90F0D1C3, _soundVolume);
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
}
if (navigationIndex == 0) {
if (frameNumber == 35) {
- // TODO SoundMan_playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
}
} else if (navigationIndex == 1) {
if (frameNumber == 55) {
- // TODO SoundMan_playTwoSounds(0x81293110, 0x48498E46, 0x50399F64, 0);
- // TODO SoundMan_setSoundVolume(0x48498E46, 70);
- // TODO SoundMan_setSoundVolume(0x50399F64, 70);
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x48498E46, 0x50399F64, 0);
+ _vm->_soundMan->setSoundVolume(0x48498E46, 70);
+ _vm->_soundMan->setSoundVolume(0x50399F64, 70);
}
}
}
@@ -330,25 +330,23 @@ void Module3000::updateScene() {
int navigationIndex = navigationScene()->getIndex();
if (navigationIndex == 2) {
if (frameNumber == 40) {
- // TODO SoundMan_playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
}
if (_flag && _soundVolume < 90 && frameNumber % 2) {
if (frameNumber == 0)
_soundVolume = 40;
else
_soundVolume++;
- // TODO SoundMan_setSoundVolume(0x90F0D1C3, _soundVolume);
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
}
}
}
#endif
break;
case 5:
-#if 0 // ALL TODO
- if (navigationScene()->getSoundFlag1() && navigationScene()->getIndex() == 0) {
- // TODO SoundMan_setTwoSoundsPlayFlag(false);
+ if (navigationScene()->getSoundFlag1() && navigationScene()->getNavigationIndex() == 0) {
+ _vm->_soundMan->setTwoSoundsPlayFlag(false);
}
-#endif
break;
}
}
diff --git a/engines/neverhood/navigationscene.cpp b/engines/neverhood/navigationscene.cpp
index 981e703c2e..a3e15369ae 100644
--- a/engines/neverhood/navigationscene.cpp
+++ b/engines/neverhood/navigationscene.cpp
@@ -60,8 +60,8 @@ NavigationScene::NavigationScene(NeverhoodEngine *vm, Module *parentModule, uint
}
NavigationScene::~NavigationScene() {
- // TODO SoundMan_setTwoSoundsPlayFlag(false);
- // TODO SoundMan_setSoundThreePlayFlag(false);
+ _vm->_soundMan->setTwoSoundsPlayFlag(false);
+ _vm->_soundMan->setSoundThreePlayFlag(false);
}
int NavigationScene::getNavigationAreaType() {
@@ -88,8 +88,8 @@ void NavigationScene::update() {
_soundFlag2 = false;
_soundFlag1 = false;
_interactive = true;
- // TODO SoundMan_setTwoSoundsPlayFlag(false);
- // TODO SoundMan_setSoundThreePlayFlag(false);
+ _vm->_soundMan->setTwoSoundsPlayFlag(false);
+ _vm->_soundMan->setSoundThreePlayFlag(false);
_smackerDone = false;
_smackerPlayer->open(navigationItem.fileHash, true);
_vm->_screen->clear();
@@ -205,11 +205,11 @@ void NavigationScene::handleNavigation(const NPoint &mousePos) {
}
if (oldSoundFlag2 != _soundFlag2) {
- // TODO SoundMan_setSoundThreePlayFlag(_soundFlag2);
+ _vm->_soundMan->setSoundThreePlayFlag(_soundFlag2);
}
if (oldSoundFlag1 != _soundFlag1) {
- // TODO SoundMan_setTwoSoundsPlayFlag(_soundFlag1);
+ _vm->_soundMan->setTwoSoundsPlayFlag(_soundFlag1);
}
}
diff --git a/engines/neverhood/navigationscene.h b/engines/neverhood/navigationscene.h
index 4397a4372b..cf351d1bcd 100644
--- a/engines/neverhood/navigationscene.h
+++ b/engines/neverhood/navigationscene.h
@@ -34,6 +34,7 @@ public:
NavigationScene(NeverhoodEngine *vm, Module *parentModule, uint32 navigationListId, int navigationIndex, const byte *itemsTypes);
virtual ~NavigationScene();
int getNavigationAreaType();
+ int getNavigationIndex() const { return _navigationIndex; }
bool getSoundFlag1() const { return _soundFlag1; }
bool getSoundFlag2() const { return _soundFlag2; }
protected: