diff options
Diffstat (limited to 'engines/neverhood')
24 files changed, 387 insertions, 412 deletions
diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp index 6245cc807e..e2494af453 100644 --- a/engines/neverhood/gamemodule.cpp +++ b/engines/neverhood/gamemodule.cpp @@ -51,17 +51,17 @@ GameModule::GameModule(NeverhoodEngine *vm) // Other initializations moved to actual engine class // TODO - // TODO Sound1ChList_sub_407F70(0x2D0031, 0x8861079); + // TODO SoundMan_playSoundThree(0x2D0031, 0x8861079); SetMessageHandler(&GameModule::handleMessage); } GameModule::~GameModule() { - // TODO Sound1ChList_sub_407AF0(0x2D0031); + // TODO SoundMan_deleteSoundGroup(0x2D0031); delete _childObject; _childObject = NULL; // TODO: Set palette to black but probably not neccessary - // TODO Sound1ChList_sub_408480(); + // TODO SoundMan_deinit(); // TODO Set debug vars (maybe) } diff --git a/engines/neverhood/klayman.cpp b/engines/neverhood/klayman.cpp index 957b9ef6ca..ca30e3bccb 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 Sound1ChList_addSoundResource(0x80101800, 0xD3B02847); + // TODO SoundMan_addSound(0x80101800, 0xD3B02847); } KmScene2206::~KmScene2206() { - // TODO Sound1ChList_sub_407AF0(0x80101800); + // TODO SoundMan_deleteSoundGroup(0x80101800); } void KmScene2206::xUpdate() { @@ -4852,7 +4852,7 @@ void KmScene2206::sub482490() { SetUpdateHandler(&Klayman::update); SetMessageHandler(&Klayman::handleMessage41D360); SetSpriteUpdate(&KmScene2206::spriteUpdate482450); - // TODO Sound1ChList_playLooping(0xD3B02847); + // TODO SoundMan_playSoundLooping(0xD3B02847); } } diff --git a/engines/neverhood/module1000.cpp b/engines/neverhood/module1000.cpp index edd9860c11..1c30681401 100644 --- a/engines/neverhood/module1000.cpp +++ b/engines/neverhood/module1000.cpp @@ -31,8 +31,8 @@ Module1000::Module1000(NeverhoodEngine *vm, Module *parentModule, int which) _musicFileHash = getGlobalVar(0xD0A14D10) ? 0x81106480 : 0x00103144; - // TODO Music18hList_add(0x03294419, 0x061880C6); - // TODO Music18hList_add(0x03294419, _musicFileHash); + // TODO SoundMan_addMusic(0x03294419, 0x061880C6); + // TODO SoundMan_addMusic(0x03294419, _musicFileHash); if (which < 0) { createScene(_vm->gameState().sceneNum, -1); @@ -45,7 +45,7 @@ Module1000::Module1000(NeverhoodEngine *vm, Module *parentModule, int which) } Module1000::~Module1000() { - // TODO Music18hList_deleteGroup(0x03294419); + // TODO SoundMan_deleteMusicGroup(0x03294419); } void Module1000::createScene(int sceneNum, int which) { @@ -53,24 +53,24 @@ void Module1000::createScene(int sceneNum, int which) { _vm->gameState().sceneNum = sceneNum; switch (_vm->gameState().sceneNum) { case 0: - // TODO Music18hList_play(0x061880C6, 0, 0, 1); + // TODO SoundMan_startMusic(0x061880C6, 0, 0, 1); _childObject = new Scene1001(_vm, this, which); break; case 1: - // TODO Music18hList_play(0x061880C6, 0, 0, 1); + // TODO SoundMan_startMusic(0x061880C6, 0, 0, 1); _childObject = new Scene1002(_vm, this, which); break; case 2: - // TODO Music18hList_play(0x061880C6, 0, 0); + // TODO SoundMan_startMusic(0x061880C6, 0, 0); _childObject = new Class152(_vm, this, 0xC084110C, 0x41108C00); break; case 3: - // TODO Music18hList_stop(0x061880C6, 0, 2); + // TODO SoundMan_stopMusic(0x061880C6, 0, 2); _childObject = new Scene1004(_vm, this, which); break; case 4: - // TODO Music18hList_stop(0x061880C6, 0, 0); - // TODO Music18hList_play(_musicFileHash, 0, 0, 1); + // TODO SoundMan_stopMusic(0x061880C6, 0, 0); + // TODO SoundMan_startMusic(_musicFileHash, 0, 0, 1); _childObject = new Scene1005(_vm, this, which); break; } @@ -105,7 +105,7 @@ void Module1000::updateScene() { createScene(1, 2); break; case 4: - // TODO Music18hList_stop(_musicFileHash, 0, 1); + // TODO SoundMan_stopMusic(_musicFileHash, 0, 1); createScene(3, 1); break; } diff --git a/engines/neverhood/module1100.cpp b/engines/neverhood/module1100.cpp index 1efd7e3ea7..8b73598e03 100644 --- a/engines/neverhood/module1100.cpp +++ b/engines/neverhood/module1100.cpp @@ -36,16 +36,16 @@ Module1100::Module1100(NeverhoodEngine *vm, Module *parentModule, int which) createScene(9, 3); } - // TODO Sound1ChList_addSoundResources(0x2C818, dword_4B85B0, true); - // TODO Sound1ChList_setSoundValuesMulti(dword_4B85B0, true, 50, 600, 20, 250); - // TODO Sound1ChList_setSoundValues(0x74E01054, false, 100, 200, 10, 20); - // TODO Sound1ChList_setVolume(0x74E01054, 60); - // TODO Sound1ChList_sub_407C70(0x2C818, 0x41861371, 0x43A2507F); + // TODO SoundMan_addSoundList(0x2C818, dword_4B85B0, true); + // TODO SoundMan_setSoundListParams(dword_4B85B0, true, 50, 600, 20, 250); + // TODO SoundMan_setSoundParams(0x74E01054, false, 100, 200, 10, 20); + // TODO SoundMan_setSoundVolume(0x74E01054, 60); + // TODO SoundMan_playTwoSounds(0x2C818, 0x41861371, 0x43A2507F); } Module1100::~Module1100() { - // TODO Sound1ChList_sub_407A50(0x2C818); + // TODO SoundMan_deleteGroup(0x2C818); } void Module1100::createScene(int sceneNum, int which) { @@ -86,11 +86,11 @@ void Module1100::createScene(int sceneNum, int which) { createSmackerScene(0x04180007, true, false, false); break; case 6: - // TODO Sound1ChList_sub_407AF0(0x2C818); + // TODO SoundMan_deleteSoundGroup(0x2C818); createSmackerScene(kSmackerFileHashList06, true, true, false); break; case 7: - // TODO Sound1ChList_setSoundValues(0x74E01054, false, 0, 0, 0, 0); + // TODO SoundMan_setSoundParams(0x74E01054, false, 0, 0, 0, 0); createSmackerScene(kSmackerFileHashList07, true, true, false); break; case 8: @@ -98,7 +98,7 @@ void Module1100::createScene(int sceneNum, int which) { break; case 1002: _countdown = 40; - // TODO Sound1ChList_sub_4080B0(true); + // TODO SoundMan_setTwoSoundsPlayFlag(true); createSmackerScene(0x00012211, true, true, false); break; } @@ -111,9 +111,9 @@ void Module1100::updateScene() { switch (_vm->gameState().sceneNum) { case 0: _countdown = 0; - // TODO Sound1ChList_sub_407C70(0x2C818, 0x48498E46, 0x50399F64); - // TODO Sound1ChList_setVolume(0x48498E46, 65); - // TODO Sound1ChList_setVolume(0x50399F64, 65); + // TODO SoundMan_playTwoSounds(0x2C818, 0x48498E46, 0x50399F64); + // TODO SoundMan_setSoundVolume(0x48498E46, 65); + // TODO SoundMan_setSoundVolume(0x50399F64, 65); if (_moduleResult == 0) { createScene(1, 0); } else if (_moduleResult == 1) { @@ -121,7 +121,7 @@ void Module1100::updateScene() { } break; case 1: - // TODO Sound1ChList_sub_407C70(0x2C818, 0x41861371, 0x43A2507F); + // TODO SoundMan_playTwoSounds(0x2C818, 0x41861371, 0x43A2507F); if (getGlobalVar(0x0C0288F4)) { if (_moduleResult == 0) { createScene(6, -1); @@ -137,7 +137,7 @@ void Module1100::updateScene() { } break; case 2: - // TODO Sound1ChList_setSoundValues(0x74E01054, false, 0, 0, 0, 0); + // TODO SoundMan_setSoundParams(0x74E01054, false, 0, 0, 0, 0); if (_navigationAreaType == 3) { createScene(7, -1); } else if (_moduleResult == 1) { @@ -182,7 +182,7 @@ void Module1100::updateScene() { break; case 1002: _countdown = 0; - // TODO Sound1ChList_sub_407C70(0x2C818, 0x48498E46, 0x50399F64, 0); + // TODO SoundMan_playTwoSounds(0x2C818, 0x48498E46, 0x50399F64, 0); createScene(1, 1); break; } @@ -191,30 +191,30 @@ void Module1100::updateScene() { case 0: #if 0 // TODO if (navigationScene()->soundFlag1 && _countdown != 0 && (--_countdown == 0)) { - Sound1ChList_sub_407C70(0x2C818, 0x48498E46, 0x50399F64); - Sound1ChList_setVolume(0x48498E46, 65); - Sound1ChList_setVolume(0x50399F64, 65); + SoundMan_playTwoSounds(0x2C818, 0x48498E46, 0x50399F64); + SoundMan_setSoundVolume(0x48498E46, 65); + SoundMan_setSoundVolume(0x50399F64, 65); } #endif break; case 1: #if 0 // TODO if (navigationScene()->soundFlag1 && _countdown != 0 && (--_countdown == 0)) { - Sound1ChList_sub_407C70(0x2C818, 0x41861371, 0x43A2507F); + SoundMan_playTwoSounds(0x2C818, 0x41861371, 0x43A2507F); } #endif break; case 2: - // TODO Sound1ChList_setSoundValues(0x74E01054, !navigationScene()->soundFlag1, 0, 0, 0, 0); + // TODO SoundMan_setSoundParams(0x74E01054, !navigationScene()->soundFlag1, 0, 0, 0, 0); break; case 5: case 6: case 7: case 1002: if (_countdown != 0 && (--_countdown == 0)) { - // TODO Sound1ChList_sub_407C70(0x2C818, 0x48498E46, 0x50399F64); - // TODO Sound1ChList_setVolume(0x48498E46, 65); - // TODO Sound1ChList_setVolume(0x50399F64, 65); + // TODO SoundMan_playTwoSounds(0x2C818, 0x48498E46, 0x50399F64); + // TODO SoundMan_setSoundVolume(0x48498E46, 65); + // TODO SoundMan_setSoundVolume(0x50399F64, 65); } break; } diff --git a/engines/neverhood/module1200.cpp b/engines/neverhood/module1200.cpp index 96ed46f4d6..7599d7655d 100644 --- a/engines/neverhood/module1200.cpp +++ b/engines/neverhood/module1200.cpp @@ -39,12 +39,12 @@ Module1200::Module1200(NeverhoodEngine *vm, Module *parentModule, int which) createScene(0, 0); } - // TODO Music18hList_add(0x00478311, 0x62222CAE); - // TODO Music18hList_play(0x62222CAE, 0, 0, 1); + // TODO SoundMan_addMusic(0x00478311, 0x62222CAE); + // TODO SoundMan_startMusic(0x62222CAE, 0, 0, 1); } Module1200::~Module1200() { - // TODO Music18hList_deleteGroup(0x00478311); + // TODO SoundMan_deleteMusicGroup(0x00478311); } void Module1200::createScene(int sceneNum, int which) { @@ -58,7 +58,7 @@ void Module1200::createScene(int sceneNum, int which) { _childObject = new Scene1202(_vm, this, which); break; case 2: - // TODO Music18hList_stop(0x62222CAE, 0, 0); + // TODO SoundMan_stopMusic(0x62222CAE, 0, 0); createSmackerScene(0x31890001, true, true, false); setGlobalVar(0x2A02C07B, 1); break; @@ -87,7 +87,7 @@ void Module1200::updateScene() { createScene(0, 1); break; case 2: - // TODO Music18hList_play(0x62222CAE, 0, 0, 1); + // TODO SoundMan_startMusic(0x62222CAE, 0, 0, 1); createScene(0, 3); break; } @@ -371,7 +371,7 @@ AsScene1201TntMan::AsScene1201TntMan(NeverhoodEngine *vm, Scene *parentScene, Sp } AsScene1201TntMan::~AsScene1201TntMan() { - // TODO Sound1ChList_sub_407AF0(0x01D00560); + // TODO SoundMan_deleteSoundGroup(0x01D00560); } uint32 AsScene1201TntMan::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { @@ -426,8 +426,8 @@ void AsScene1201TntMan::sub40CD60() { } void AsScene1201TntMan::sub40CD90() { - // TODO Sound1ChList_addSoundResource(0x01D00560, 0x4B044624, true); - // TODO Sound1ChList_playLooping(0x4B044624); + // TODO SoundMan_addSound(0x01D00560, 0x4B044624, true); + // TODO SoundMan_playSoundLooping(0x4B044624); _flag = true; startAnimation(0x85084190, 0, -1); SetMessageHandler(&AsScene1201TntMan::handleMessage); @@ -447,7 +447,7 @@ Class465::Class465(NeverhoodEngine *vm, Sprite *asTntMan) } Class465::~Class465() { - // TODO Sound1ChList_sub_407AF0(0x041080A4); + // TODO SoundMan_deleteSoundGroup(0x041080A4); } void Class465::update() { @@ -455,8 +455,8 @@ void Class465::update() { if (getGlobalVar(0x20A0C516)) { setVisible(true); SetUpdateHandler(&AnimatedSprite::update); - // TODO Sound1ChList_addSoundResource(0x041080A4, 0x460A1050, true); - // TODO Sound1ChList_playLooping(0x460A1050); + // TODO SoundMan_addSound(0x041080A4, 0x460A1050, true); + // TODO SoundMan_playSoundLooping(0x460A1050); } } diff --git a/engines/neverhood/module1300.cpp b/engines/neverhood/module1300.cpp index 2c7a5c8443..b7c588f114 100644 --- a/engines/neverhood/module1300.cpp +++ b/engines/neverhood/module1300.cpp @@ -35,12 +35,12 @@ namespace Neverhood { Module1300::Module1300(NeverhoodEngine *vm, Module *parentModule, int which) : Module(vm, parentModule) { - // TODO Music18hList_add(0x61C090, 0x203197); - // TODO Sound1ChList_addSoundResources(0x61C090, dword_4B2868, true); - // TODO Sound1ChList_setSoundValuesMulti(dword_4B2868, 0, 50, 600, 20, 150); - // TODO Sound1ChList_sub_407C70(0x61C090, 0x48498E46, 0x50399F64, 0); - // TODO Sound1ChList_setVolume(0x48498E46, 70); - // TODO Sound1ChList_setVolume(0x50399F64, 70); + // TODO SoundMan_addMusic(0x61C090, 0x203197); + // TODO SoundMan_addSoundList(0x61C090, dword_4B2868, true); + // TODO SoundMan_setSoundListParams(dword_4B2868, false, 50, 600, 20, 150); + // TODO SoundMan_playTwoSounds(0x61C090, 0x48498E46, 0x50399F64, 0); + // TODO SoundMan_setSoundVolume(0x48498E46, 70); + // TODO SoundMan_setSoundVolume(0x50399F64, 70); if (which < 0) { if (_vm->gameState().sceneNum >= 1 && _vm->gameState().sceneNum <= 17) @@ -94,7 +94,7 @@ Module1300::Module1300(NeverhoodEngine *vm, Module *parentModule, int which) } Module1300::~Module1300() { - // TODO Sound1ChList_sub_407A50(0x61C090); + // TODO SoundMan_deleteGroup(0x61C090); } void Module1300::createScene(int sceneNum, int which) { @@ -102,83 +102,83 @@ void Module1300::createScene(int sceneNum, int which) { _vm->gameState().sceneNum = sceneNum; switch (_vm->gameState().sceneNum) { case 1: - // TODO Sound1ChList_setSoundValuesMulti(dword_4B2868, false, 0, 0, 0, 0); - // TODO Music18hList_play(0x203197, 0, 2, 1); + // TODO SoundMan_setSoundListParams(dword_4B2868, false, 0, 0, 0, 0); + // TODO SoundMan_startMusic(0x203197, 0, 2, 1); _childObject = new Scene1302(_vm, this, which); break; case 2: - // TODO Sound1ChList_setSoundValuesMulti(dword_4B2868, false, 0, 0, 0, 0); - // TODO Music18hList_stop(0x203197, 0, 2); + // TODO SoundMan_setSoundListParams(dword_4B2868, false, 0, 0, 0, 0); + // TODO SoundMan_stopMusic(0x203197, 0, 2); _childObject = new Scene1303(_vm, this, which); break; case 3: - // TODO Sound1ChList_setSoundValuesMulti(dword_4B2868, false, 0, 0, 0, 0); - // TODO Music18hList_stop(0x203197, 0, 2); + // TODO SoundMan_setSoundListParams(dword_4B2868, false, 0, 0, 0, 0); + // TODO SoundMan_stopMusic(0x203197, 0, 2); _childObject = new Scene1304(_vm, this, which); break; case 4: - // TODO Sound1ChList_setSoundValuesMulti(dword_4B2868, false, 0, 0, 0, 0); - // TODO Music18hList_play(0x203197, 0, 2, 1); + // TODO SoundMan_setSoundListParams(dword_4B2868, false, 0, 0, 0, 0); + // TODO SoundMan_startMusic(0x203197, 0, 2, 1); _childObject = new Scene1305(_vm, this, which); break; case 5: - // TODO Sound1ChList_setSoundValuesMulti(dword_4B2868, false, 0, 0, 0, 0); - // TODO Music18hList_play(0x203197, 0, 2, 1); + // TODO SoundMan_setSoundListParams(dword_4B2868, false, 0, 0, 0, 0); + // TODO SoundMan_startMusic(0x203197, 0, 2, 1); _childObject = new Scene1306(_vm, this, which); break; case 6: - // TODO Sound1ChList_setSoundValuesMulti(dword_4B2868, false, 0, 0, 0, 0); - // TODO Music18hList_play(0x203197, 0, 2, 1); + // TODO SoundMan_setSoundListParams(dword_4B2868, false, 0, 0, 0, 0); + // TODO SoundMan_startMusic(0x203197, 0, 2, 1); _childObject = new Scene1307(_vm, this, which); break; case 7: - // TODO Sound1ChList_setSoundValuesMulti(dword_4B2868, false, 0, 0, 0, 0); - // TODO Music18hList_play(0x203197, 0, 2, 1); + // TODO SoundMan_setSoundListParams(dword_4B2868, false, 0, 0, 0, 0); + // TODO SoundMan_startMusic(0x203197, 0, 2, 1); _childObject = new Scene1308(_vm, this, which); break; case 8: - // TODO Sound1ChList_setSoundValuesMulti(dword_4B2868, false, 0, 0, 0, 0); - // TODO Music18hList_stop(0x203197, 0, 2); + // TODO SoundMan_setSoundListParams(dword_4B2868, false, 0, 0, 0, 0); + // TODO SoundMan_stopMusic(0x203197, 0, 2); _childObject = new DiskplayerScene(_vm, this, 1); break; case 9: - // TODO Sound1ChList_setSoundValuesMulti(dword_4B2868, false, 0, 0, 0, 0); - // TODO Music18hList_stop(0x203197, 0, 2); + // TODO SoundMan_setSoundListParams(dword_4B2868, false, 0, 0, 0, 0); + // TODO SoundMan_stopMusic(0x203197, 0, 2); createSmackerScene(0x20082818, true, true, false); break; case 10: - // TODO Sound1ChList_setSoundValuesMulti(dword_4B2868, false, 0, 0, 0, 0); - // TODO Music18hList_stop(0x203197, 0, 2); + // TODO SoundMan_setSoundListParams(dword_4B2868, false, 0, 0, 0, 0); + // TODO SoundMan_stopMusic(0x203197, 0, 2); createSmackerScene(0x20082828, true, true, false); break; case 11: - // TODO Sound1ChList_setSoundValuesMulti(0xdword_4B2868, true, 0, 0, 0, 0); - // TODO Music18hList_stop(0x203197, 0, 2); + // TODO SoundMan_setSoundListParams(0xdword_4B2868, true, 0, 0, 0, 0); + // TODO SoundMan_stopMusic(0x203197, 0, 2); createNavigationScene(0x004B27A8, which); break; case 12: - // TODO Sound1ChList_setSoundValuesMulti(0xdword_4B2868, true, 0, 0, 0, 0); - // TODO Music18hList_stop(0x203197, 0, 2); + // TODO SoundMan_setSoundListParams(0xdword_4B2868, true, 0, 0, 0, 0); + // TODO SoundMan_stopMusic(0x203197, 0, 2); createNavigationScene(0x004B2718, which); break; case 13: - // TODO Sound1ChList_setSoundValuesMulti(0xdword_4B2868, true, 0, 0, 0, 0); - // TODO Music18hList_stop(0x203197, 0, 2); + // TODO SoundMan_setSoundListParams(0xdword_4B2868, true, 0, 0, 0, 0); + // TODO SoundMan_stopMusic(0x203197, 0, 2); createNavigationScene(0x004B27D8, which); break; case 14: - // TODO Sound1ChList_setSoundValuesMulti(0xdword_4B2868, true, 0, 0, 0, 0); - // TODO Music18hList_stop(0x203197, 0, 2); + // TODO SoundMan_setSoundListParams(0xdword_4B2868, true, 0, 0, 0, 0); + // TODO SoundMan_stopMusic(0x203197, 0, 2); createNavigationScene(0x004B2808, which); break; case 15: - // TODO Sound1ChList_setSoundValuesMulti(0xdword_4B2868, true, 0, 0, 0, 0); - // TODO Music18hList_stop(0x203197, 0, 2); + // TODO SoundMan_setSoundListParams(0xdword_4B2868, true, 0, 0, 0, 0); + // TODO SoundMan_stopMusic(0x203197, 0, 2); createNavigationScene(0x004B2838, which); break; case 16: - // TODO Sound1ChList_setSoundValuesMulti(dword_4B2868, false, 0, 0, 0, 0); - // TODO Music18hList_stop(0x203197, 0, 2); + // TODO SoundMan_setSoundListParams(dword_4B2868, false, 0, 0, 0, 0); + // TODO SoundMan_stopMusic(0x203197, 0, 2); _childObject = new Scene1317(_vm, this, which); break; case 17: diff --git a/engines/neverhood/module1400.cpp b/engines/neverhood/module1400.cpp index 76bf41bca9..370735695d 100644 --- a/engines/neverhood/module1400.cpp +++ b/engines/neverhood/module1400.cpp @@ -32,8 +32,8 @@ namespace Neverhood { Module1400::Module1400(NeverhoodEngine *vm, Module *parentModule, int which) : Module(vm, parentModule) { - // TODO Music18hList_add(0x00AD0012, 0x06333232); - // TODO Music18hList_add(0x00AD0012, 0x624A220E); + // TODO SoundMan_addMusic(0x00AD0012, 0x06333232); + // TODO SoundMan_addMusic(0x00AD0012, 0x624A220E); if (which < 0) { createScene(_vm->gameState().sceneNum, -1); @@ -44,7 +44,7 @@ Module1400::Module1400(NeverhoodEngine *vm, Module *parentModule, int which) } Module1400::~Module1400() { - // TODO Music18hList_deleteGroup(0x00AD0012); + // TODO SoundMan_deleteMusicGroup(0x00AD0012); } void Module1400::createScene(int sceneNum, int which) { @@ -52,33 +52,33 @@ void Module1400::createScene(int sceneNum, int which) { _vm->gameState().sceneNum = sceneNum; switch (_vm->gameState().sceneNum) { case 0: - // TODO Music18hList_play(0x06333232, 0, 2, 1); + // TODO SoundMan_startMusic(0x06333232, 0, 2, 1); _childObject = new Scene1401(_vm, this, which); break; case 1: - // TODO Music18hList_stop(0x06333232, 0, 2); - // TODO Music18hList_stop(0x624A220E, 0, 2); + // TODO SoundMan_stopMusic(0x06333232, 0, 2); + // TODO SoundMan_stopMusic(0x624A220E, 0, 2); _childObject = new Scene1402(_vm, this, which); break; case 2: - // TODO Music18hList_stop(0x06333232, 0, 2); - // TODO Music18hList_play(0x624A220E, 0, 2, 1); + // TODO SoundMan_stopMusic(0x06333232, 0, 2); + // TODO SoundMan_startMusic(0x624A220E, 0, 2, 1); _childObject = new Scene1403(_vm, this, which); break; case 3: - // TODO Music18hList_play(0x06333232, 0, 2, 1); + // TODO SoundMan_startMusic(0x06333232, 0, 2, 1); _childObject = new Scene1404(_vm, this, which); break; case 4: - // TODO Music18hList_play(0x06333232, 0, 2, 1); + // TODO SoundMan_startMusic(0x06333232, 0, 2, 1); _childObject = new Scene1405(_vm, this, which); break; case 5: - // TODO Music18hList_stop(0x06333232, 0, 2); + // TODO SoundMan_stopMusic(0x06333232, 0, 2); _childObject = new DiskplayerScene(_vm, this, 2); break; case 6: - // TODO Music18hList_stop(0x06333232, 0, 2); + // TODO SoundMan_stopMusic(0x06333232, 0, 2); _childObject = new Scene1407(_vm, this, which); break; } @@ -148,7 +148,7 @@ Class525::Class525(NeverhoodEngine *vm) } Class525::~Class525() { - // TODO Sound1ChList_sub_407AF0(0x01104C08); + // TODO SoundMan_deleteSoundGroup(0x01104C08); } void Class525::update4662A0() { @@ -157,8 +157,8 @@ void Class525::update4662A0() { sub466460(); } if (_countdown2 != 0 && (--_countdown2 == 0)) { - // TODO Sound1ChList_addSoundResource(0x01104C08, 0x4A116437, true); - // TODO Sound1ChList_playLooping(0x4A116437); + // TODO SoundMan_addSound(0x01104C08, 0x4A116437, true); + // TODO SoundMan_playSoundLooping(0x4A116437); } } @@ -211,7 +211,7 @@ void Class525::sub466420() { } void Class525::sub466460() { - // TODO Sound1ChList_deleteSoundByHash(0x4A116437); + // TODO SoundMan_deleteSound(0x4A116437); _soundResource1.play(0x4A120435); startAnimation(0x4C210500, 0, -1); } @@ -406,7 +406,7 @@ Class489::Class489(NeverhoodEngine *vm, Scene *parentScene, Sprite *klayman, Spr } Class489::~Class489() { - // TODO Sound1ChList_sub_407AF0(0x05331081); + // TODO SoundMan_deleteSoundGroup(0x05331081); } uint32 Class489::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { @@ -616,8 +616,8 @@ void Class489::sub434EC0() { NextState(&Class489::sub434F40); setGlobalVar(0x12A10DB3, 1); _soundResource1.play(0xCC4A8456); - // TODO Sound1ChList_addSoundResource(0x05331081, 0xCE428854, true); - // TODO Sound1ChList_playLooping(0xCE428854); + // TODO SoundMan_addSound(0x05331081, 0xCE428854, true); + // TODO SoundMan_playSoundLooping(0xCE428854); } void Class489::sub434F40() { @@ -634,7 +634,7 @@ void Class489::sub434F80() { NextState(&Class489::sub434E90); setGlobalVar(0x12A10DB3, 0); _soundResource1.play(0xCC4A8456); - // TODO Sound1ChList_deleteSoundByHash(0xCE428854); + // TODO SoundMan_deleteSound(0xCE428854); } void Class489::sub434FF0() { diff --git a/engines/neverhood/module1600.cpp b/engines/neverhood/module1600.cpp index 6519efaf38..77d135d4a6 100644 --- a/engines/neverhood/module1600.cpp +++ b/engines/neverhood/module1600.cpp @@ -44,14 +44,14 @@ Module1600::Module1600(NeverhoodEngine *vm, Module *parentModule, int which) createScene(0, 0); } - // TODO Sound1ChList_addSoundResources(0x1A008D8, dword_4B3BB0, true); - // TODO Sound1ChList_setSoundValuesMulti(dword_4B3BB0, true, 50, 600, 5, 150); - // TODO Sound1ChList_sub_407C70(0x1A008D8, 0x41861371, 0x43A2507F, 0); + // TODO SoundMan_addSoundList(0x1A008D8, dword_4B3BB0, true); + // TODO SoundMan_setSoundListParams(dword_4B3BB0, true, 50, 600, 5, 150); + // TODO SoundMan_playTwoSounds(0x1A008D8, 0x41861371, 0x43A2507F, 0); } Module1600::~Module1600() { - // TODO Sound1ChList_sub_407A50(0x1A008D8); + // TODO SoundMan_deleteGroup(0x1A008D8); } void Module1600::createScene(int sceneNum, int which) { diff --git a/engines/neverhood/module1700.cpp b/engines/neverhood/module1700.cpp index f9dc6b7fa8..696f646af1 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 Music18hList_add(0x04212331); - // TODO Sound1ChList_addSoundResources(0x04212331, dword_4AE930, true); - // TODO Sound1ChList_setSoundValuesMulti(dword_4AE930, 1, 50, 600, 5, 150); - // TODO Sound1ChList_sub_407C70(0x04212331, 0x41861371, 0x43A2507F, 0); + // TODO SoundMan_addMusic(0x04212331); + // TODO SoundMan_addSoundList(0x04212331, dword_4AE930, true); + // TODO SoundMan_setSoundListParams(dword_4AE930, true, 50, 600, 5, 150); + // TODO 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 Sound1ChList_sub_407A50(0x04212331); + // TODO SoundMan_deleteGroup(0x04212331); } void Module1700::createScene(int sceneNum, int which) { @@ -53,7 +53,7 @@ void Module1700::createScene(int sceneNum, int which) { _vm->gameState().sceneNum = sceneNum; switch (_vm->gameState().sceneNum) { case 0: - // TODO Sound1ChList_setSoundValuesMulti(dword_4AE930, 0, 0, 0, 0, 0); + // TODO SoundMan_setSoundListParams(dword_4AE930, false, 0, 0, 0, 0); createSmackerScene(0x3028A005, true, true, false); break; case 1: @@ -63,12 +63,12 @@ void Module1700::createScene(int sceneNum, int which) { createNavigationScene(0x004AE8E8, which); break; case 3: - // TODO Sound1ChList_setSoundValuesMulti(dword_4AE930, 0, 0, 0, 0, 0); + // TODO SoundMan_setSoundListParams(dword_4AE930, false, 0, 0, 0, 0); createSmackerScene(0x01190041, true, true, false); break; case 4: - // TODO Sound1ChList_setSoundValuesMulti(dword_4AE930, 0, 0, 0, 0, 0); - // TODO Music18hList_play(0x31114225, 0, 2, 1); + // TODO SoundMan_setSoundListParams(dword_4AE930, false, 0, 0, 0, 0); + // TODO SoundMan_startMusic(0x31114225, 0, 2, 1); _childObject = new Scene1705(_vm, this, which); break; } @@ -80,7 +80,7 @@ void Module1700::updateScene() { if (!updateChild()) { switch (_vm->gameState().sceneNum) { case 0: - // TODO Sound1ChList_setSoundValuesMulti(dword_4AE930, 1, 0, 0, 0); + // TODO SoundMan_setSoundListParams(dword_4AE930, false, 0, 0, 0); createScene(1, 0); break; case 1: diff --git a/engines/neverhood/module1800.cpp b/engines/neverhood/module1800.cpp index cce72b0a11..7526a3aa76 100644 --- a/engines/neverhood/module1800.cpp +++ b/engines/neverhood/module1800.cpp @@ -28,9 +28,9 @@ namespace Neverhood { Module1800::Module1800(NeverhoodEngine *vm, Module *parentModule, int which) : Module(vm, parentModule) { - // TODO Sound1ChList_addSoundResources(0x04A14718, dword_4AFE70); - // TODO Sound1ChList_setSoundValuesMulti(dword_4AFE70, 1, 50, 600, 10, 150); - // TODO Sound1ChList_sub_407C70(0x04A14718, 0x8A382B55, 0x0C242F1D, 0); + // TODO SoundMan_addSoundList(0x04A14718, dword_4AFE70); + // TODO SoundMan_setSoundListParams(dword_4AFE70, true, 50, 600, 10, 150); + // TODO 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 Sound1ChList_sub_407A50(0x04A14718); + // TODO SoundMan_deleteGroup(0x04A14718); } void Module1800::createScene(int sceneNum, int which) { @@ -73,11 +73,11 @@ void Module1800::createScene(int sceneNum, int which) { createNavigationScene(0x004AFE40, which); break; case 6: - // TODO Sound1ChList_sub_407A50(0x04A14718); + // TODO SoundMan_deleteGroup(0x04A14718); createSmackerScene(0x08D84010, true, true, false); break; case 7: - // TODO Sound1ChList_setSoundValuesMulti(dword_4AFE70, 0, 0, 0, 0, 0); + // TODO SoundMan_setSoundListParams(dword_4AFE70, false, 0, 0, 0, 0); createSmackerScene(0x0168B121, true, true, false); break; case 8: @@ -159,7 +159,7 @@ void Module1800::updateScene() { #if 0 // TODO NavigationScene *navigationScene = (NavigationScene*)_childObject; if (navigationScene->soundFlag1 && navigationScene->index == 2) { - // TODO Sound1ChList_sub_4080B0(false); + // TODO SoundMan_setTwoSoundsPlayFlag(false); } #endif break; diff --git a/engines/neverhood/module1900.cpp b/engines/neverhood/module1900.cpp index 45d3b834a5..bf1aad6a49 100644 --- a/engines/neverhood/module1900.cpp +++ b/engines/neverhood/module1900.cpp @@ -36,13 +36,13 @@ Module1900::Module1900(NeverhoodEngine *vm, Module *parentModule, int which) createScene(0, 0); } - // TODO Sound1ChList_addSoundResources(0x04E1C09C, dword_4B8800, true); - // TODO Sound1ChList_setSoundValuesMulti(dword_4B8800, true, 50, 600, 5, 150); + // TODO SoundMan_addSoundList(0x04E1C09C, dword_4B8800, true); + // TODO SoundMan_setSoundListParams(dword_4B8800, true, 50, 600, 5, 150); } Module1900::~Module1900() { - // TODO Sound1ChList_sub_407A50(0x04E1C09C); + // TODO SoundMan_deleteGroup(0x04E1C09C); } void Module1900::createScene(int sceneNum, int which) { diff --git a/engines/neverhood/module2000.cpp b/engines/neverhood/module2000.cpp index bd22c7b154..e07129134c 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 Sound1ChList_sub_407A50(0x81293110); + // TODO SoundMan_deleteGroup(0x81293110); } void Module2000::createScene(int sceneNum, int which) { diff --git a/engines/neverhood/module2100.cpp b/engines/neverhood/module2100.cpp index c6de482cf8..33c9d23cbf 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 Music18hList_add(0x10A10C14, 0x11482B95); + // TODO 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 Music18hList_deleteGroup(0x10A10C14); + // TODO 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 Music18hList_play(0x11482B95, 0, 1, 1); + // TODO SoundMan_startMusic(0x11482B95, 0, 1, 1); _childObject = new Scene2101(_vm, this, which); break; } diff --git a/engines/neverhood/module2200.cpp b/engines/neverhood/module2200.cpp index 9846bc5cd4..cbd232e834 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: Music18hList_add(0x11391412, 0x601C908C); + // TODO: 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 Sound1ChList_sub_407A50(0x11391412); + // TODO 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 Music18hList_play(0x601C908C, 0, 2, 1); + // TODO SoundMan_startMusic(0x601C908C, 0, 2, 1); _childObject = new Scene2202(_vm, this, which); break; case 2: - // TODO Music18hList_play(0x601C908C, 0, 2, 1); + // TODO SoundMan_startMusic(0x601C908C, 0, 2, 1); _childObject = new Scene2203(_vm, this, which); break; case 3: - // TODO Music18hList_stop(0x601C908C, 0, 2); + // TODO SoundMan_stopMusic(0x601C908C, 0, 2); _childObject = new DiskplayerScene(_vm, this, 3); break; case 4: - // TODO Music18hList_stop(0x601C908C, 0, 2); + // TODO SoundMan_stopMusic(0x601C908C, 0, 2); _childObject = new Scene2205(_vm, this, which); break; case 5: - // TODO Music18hList_stop(0x601C908C, 0, 2); + // TODO 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 Sound1ChList_addSoundResource(0x04106220, 0x81212040, true); + // TODO SoundMan_addSound(0x04106220, 0x81212040, true); } Scene2201::~Scene2201() { setGlobalVar(0xC0418A02, _klayman->isDoDeltaX() ? 1 : 0); - // TODO Sound1ChList_sub_407AF0(0x04106220); + // TODO SoundMan_deleteSoundGroup(0x04106220); } void Scene2201::update() { Scene::update(); if (!_soundFlag) { - // TODO Sound1ChList_playLooping(0x81212040); + // TODO SoundMan_playSoundLooping(0x81212040); _soundFlag = true; } } @@ -918,13 +918,13 @@ Scene2202::Scene2202(NeverhoodEngine *vm, Module *parentModule, int which) _soundResource1.load(0x68E25540); _soundResource2.load(0x40400457); - // TODO Sound1ChList_addSoundResource(0x60400854, 0x8101A241, true); - // TODO Sound1ChList_playLooping(0x8101A241); + // TODO SoundMan_addSound(0x60400854, 0x8101A241, true); + // TODO SoundMan_playSoundLooping(0x8101A241); } Scene2202::~Scene2202() { - // TODO Sound1ChList_sub_407AF0(0x60400854); + // TODO SoundMan_deleteSoundGroup(0x60400854); } void Scene2202::update() { @@ -1714,7 +1714,7 @@ AsScene2207Elevator::AsScene2207Elevator(NeverhoodEngine *vm, Scene *parentScene } AsScene2207Elevator::~AsScene2207Elevator() { - // TODO Sound1ChList_sub_407AF0(0x02700413); + // TODO SoundMan_deleteSoundGroup(0x02700413); } void AsScene2207Elevator::update() { @@ -1727,7 +1727,7 @@ void AsScene2207Elevator::update() { if (_destPointIndexDelta != 0) { _destPointIndexDelta = 0; } else { - // TODO Sound1ChList_deleteSoundByHash(0xD3B02847); + // TODO SoundMan_deleteSound(0xD3B02847); _soundResource.play(0x53B8284A); } } @@ -1743,7 +1743,7 @@ void AsScene2207Elevator::update() { if (_destPointIndexDelta != 0) { _destPointIndexDelta = 0; } else { - // TODO Sound1ChList_deleteSoundByHash(0xD3B02847); + // TODO SoundMan_deleteSound(0xD3B02847); _soundResource.play(0x53B8284A); } } @@ -1802,8 +1802,8 @@ void AsScene2207Elevator::moveToY(int16 y) { } else { _destPointIndexDelta = 2; } - // TODO Sound1ChList_addSoundResource(0x02700413, 0xD3B02847, true); - // TODO Sound1ChList_playLooping(0xD3B02847); + // TODO SoundMan_addSound(0x02700413, 0xD3B02847, true); + // TODO SoundMan_playSoundLooping(0xD3B02847); } _isMoving = true; @@ -1888,7 +1888,7 @@ AsScene2207WallRobotAnimation::AsScene2207WallRobotAnimation(NeverhoodEngine *vm } AsScene2207WallRobotAnimation::~AsScene2207WallRobotAnimation() { - // TODO Sound1ChList_sub_407AF0(0x80D00820); + // TODO SoundMan_deleteSoundGroup(0x80D00820); } uint32 AsScene2207WallRobotAnimation::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { @@ -1897,14 +1897,14 @@ uint32 AsScene2207WallRobotAnimation::handleMessage(int messageNum, const Messag case 0x100D: if (!_idle) { if (param.asInteger() == 0x3423093) { - // TODO Sound1ChList_addSoundResource(0x80D00820, 0x12121943, true); - // TODO Sound1ChList_playLooping(0x12121943); + // TODO SoundMan_addSound(0x80D00820, 0x12121943, true); + // TODO SoundMan_playSoundLooping(0x12121943); } else if (param.asInteger() == 0x834AB011) { _soundResource1.stop(); _soundResource2.stop(); _soundResource3.stop(); _soundResource4.stop(); - // TODO Sound1ChList_deleteSoundByHash(0x12121943); + // TODO 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 Sound1ChList_deleteSoundByHash(0x12121943); + // TODO SoundMan_deleteSound(0x12121943); _idle = true; setVisible(false); } diff --git a/engines/neverhood/module2300.cpp b/engines/neverhood/module2300.cpp index 1513f7ba40..d3346eb31f 100644 --- a/engines/neverhood/module2300.cpp +++ b/engines/neverhood/module2300.cpp @@ -27,20 +27,20 @@ namespace Neverhood { Module2300::Module2300(NeverhoodEngine *vm, Module *parentModule, int which) : Module(vm, parentModule), _volume(0) { - // TODO Sound1ChList_addSoundResources(0x1A214010, dword_4B6938, true); - // TODO Sound1ChList_setSoundValuesMulti(dword_4B6938, true, 50, 600, 10, 10, 150); + // TODO SoundMan_addSoundList(0x1A214010, dword_4B6938, true); + // TODO SoundMan_setSoundListParams(dword_4B6938, true, 50, 600, 10, 10, 150); _flag = getGlobalVar(0x10938830) == 0; if (_flag) { - // TODO Sound1ChList_setVolume(0x90F0D1C3, 0); - // TODO Sound1ChList_playLooping(0x90F0D1C3); + // TODO SoundMan_setSoundVolume(0x90F0D1C3, 0); + // TODO SoundMan_playSoundLooping(0x90F0D1C3); } else { - // TODO Sound1ChList_setSoundValues(0x90F0D1C3, false, 0, 0, 0, 0); + // TODO SoundMan_setSoundParams(0x90F0D1C3, false, 0, 0, 0, 0); } - // TODO Sound1ChList_sub_407C70(0x1A214010, 0x48498E46, 0x50399F64, 0); - // TODO Sound1ChList_sub_407C70(0x1A214010, 0x41861371, 0x43A2507F, 0); + // TODO SoundMan_playTwoSounds(0x1A214010, 0x48498E46, 0x50399F64, 0); + // TODO 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 Sound1ChList_sub_407A50(0x1A214010); + // TODO 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 Sound1ChList_setVolume(0x90F0D1C3, 15); + // TODO 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 Sound1ChList_setVolume(0x90F0D1C3, _volume); + // TODO SoundMan_setSoundVolume(0x90F0D1C3, _volume); createNavigationScene(0x004B68A8, which); if (_flag) { _volume = 87; - // TODO Sound1ChList_setVolume(0x90F0D1C3, 87); + // TODO SoundMan_setSoundVolume(0x90F0D1C3, 87); } } break; case 4: - // TODO Sound1ChList_sub_4080B0(true); + // TODO SoundMan_setTwoSoundsPlayFlag(true); createSmackerScene(0x20080A0B, true, true, false); break; } @@ -140,7 +140,7 @@ void Module2300::updateScene() { } break; case 4: - // TODO Sound1ChList_sub_4080B0(false); + // TODO SoundMan_setTwoSoundsPlayFlag(false); createScene(1, 2); break; } @@ -152,15 +152,15 @@ void Module2300::updateScene() { if (_flag && navigationScene->getSoundFlag1() && navigationScene->getNavigationIndex() == 4 && navigationScene->getSmackerPlayer() && navigationScene->getSmackerPlayer()->getFrameNumber() % 2) { _volume++; - Sound1ChList_setVolume(0x90F0D1C3, _volume); + SoundMan_setSoundVolume(0x90F0D1C3, _volume); } #endif #if 0 // TODO if (navigationScene->getSoundFlag1() && navigationScene->getNavigationIndex() == 0 && navigationScene->getSmackerPlayer() && navigationScene->getSmackerPlayer()->getFrameNumber() == 50) { - Sound1ChList_sub_407C70(0x1A214010, 0x48498E46, 0x50399F64); - Sound1ChList_setVolume(0x48498E46, 70); - Sound1ChList_setVolume(0x50399F64, 70); + SoundMan_playTwoSounds(0x1A214010, 0x48498E46, 0x50399F64); + SoundMan_setSoundVolume(0x48498E46, 70); + SoundMan_setSoundVolume(0x50399F64, 70); } #endif break; @@ -170,7 +170,7 @@ void Module2300::updateScene() { if (_flag && navigationScene->getSoundFlag1() && navigationScene->getSmackerPlayer() && navigationScene->getSmackerPlayer()->getFrameNumber() % 2) { _volume--; - Sound1ChList_setVolume(0x90F0D1C3, _volume); + SoundMan_setSoundVolume(0x90F0D1C3, _volume); } #endif break; diff --git a/engines/neverhood/module2400.cpp b/engines/neverhood/module2400.cpp index 02e6225b8a..f2f2da97d0 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 Music18hList_add(0x202D1010, 0xB110382D); + // TODO 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 Music18hList_deleteGroup(0x202D1010); + // TODO 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 Music18hList_stop(0xB110382D, 0, 0); + // TODO SoundMan_stopMusic(0xB110382D, 0, 0); _childObject = new Scene2401(_vm, this, which); break; case 1: - // TODO Music18hList_play(0xB110382D, 0, 2, 1); + // TODO SoundMan_startMusic(0xB110382D, 0, 2, 1); _childObject = new Scene2402(_vm, this, which); break; case 2: - // TODO Music18hList_play(0xB110382D, 0, 0, 1); + // TODO SoundMan_startMusic(0xB110382D, 0, 0, 1); _childObject = new Scene2403(_vm, this, which); break; case 4: - // TODO Music18hList_stop(0xB110382D, 0, 2); + // TODO SoundMan_stopMusic(0xB110382D, 0, 2); _childObject = new DiskplayerScene(_vm, this, 0); break; case 5: - // TODO Music18hList_play(0xB110382D, 0, 2, 1); + // TODO SoundMan_startMusic(0xB110382D, 0, 2, 1); _childObject = new Scene2406(_vm, this, which); break; case 6: - // TODO Music18hList_stop(0xB110382D, 0, 2); + // TODO SoundMan_stopMusic(0xB110382D, 0, 2); createSmackerScene(0x20D80001, true, true, false); break; case 7: @@ -247,7 +247,7 @@ AsScene2401FlowingWater::AsScene2401FlowingWater(NeverhoodEngine *vm) } AsScene2401FlowingWater::~AsScene2401FlowingWater() { - // TODO Sound1ChList_sub_407AF0(0x40F11C09); + // TODO SoundMan_deleteSoundGroup(0x40F11C09); } uint32 AsScene2401FlowingWater::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { @@ -260,15 +260,15 @@ uint32 AsScene2401FlowingWater::handleMessage(int messageNum, const MessageParam break; case 0x2002: if (!_isWaterFlowing) { - // TODO Sound1ChList_addSoundResource(0x40F11C09, 0x980C1420, true); - // TODO Sound1ChList_playLooping(0x980C1420); + // TODO SoundMan_addSound(0x40F11C09, 0x980C1420, true); + // TODO SoundMan_playSoundLooping(0x980C1420); startAnimation(0x10203116, 0, -1); setVisible(true); _isWaterFlowing = true; } break; case 0x2003: - // TODO Sound1ChList_deleteSoundByHash(0x980C1420); + // TODO SoundMan_deleteSound(0x980C1420); _isWaterFlowing = false; break; case 0x3002: @@ -664,7 +664,7 @@ AsScene2402TV::AsScene2402TV(NeverhoodEngine *vm, Klayman *klayman) } AsScene2402TV::~AsScene2402TV() { - // TODO Sound1ChList_sub_407AF0(0x01520123); + // TODO SoundMan_deleteSoundGroup(0x01520123); } void AsScene2402TV::upWait() { @@ -687,12 +687,12 @@ void AsScene2402TV::upFocusKlayman() { startAnimation(0x050A0103, _currFrameIndex, -1); _newStickFrameIndex = _currFrameIndex; if (_countdown2 == 0) { - // TODO Sound1ChList_addSoundResource(0x01520123, 0xC42D4528, true); - // TODO Sound1ChList_playLooping(0xC42D4528); + // TODO SoundMan_addSound(0x01520123, 0xC42D4528, true); + // TODO SoundMan_playSoundLooping(0xC42D4528); } _countdown2 = 5; } else if (_countdown2 != 0 && (--_countdown2 == 0)) { - // TODO Sound1ChList_deleteSoundByHash(0xC42D4528); + // TODO SoundMan_deleteSound(0xC42D4528); } AnimatedSprite::update(); } diff --git a/engines/neverhood/module2500.cpp b/engines/neverhood/module2500.cpp index 84b98af08a..822204f36d 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 Music18hList_add(0x29220120, 0x05343184); - // TODO Music18hList_play(0x05343184, 0, 0, 1); + // TODO SoundMan_addMusic(0x29220120, 0x05343184); + // TODO SoundMan_startMusic(0x05343184, 0, 0, 1); SetMessageHandler(&Module2500::handleMessage); if (which < 0) { @@ -77,7 +77,7 @@ Module2500::Module2500(NeverhoodEngine *vm, Module *parentModule, int which) } Module2500::~Module2500() { - // TODO Music18hList_deleteGroup(0x29220120); + // TODO SoundMan_deleteMusicGroup(0x29220120); } void Module2500::createScene(int sceneNum, int which) { diff --git a/engines/neverhood/module2600.cpp b/engines/neverhood/module2600.cpp index 7975fcbb5d..be0503774e 100644 --- a/engines/neverhood/module2600.cpp +++ b/engines/neverhood/module2600.cpp @@ -35,14 +35,14 @@ Module2600::Module2600(NeverhoodEngine *vm, Module *parentModule, int which) createScene(0, 1); } - // TODO Sound1ChList_addSoundResources(0x40271018, dword_4B87E8, true); - // TODO Sound1ChList_setSoundValuesMulti(dword_4B87E8, true, 50, 600, 5, 150); - // TODO Sound1ChList_sub_407C70(0x40271018, 0x41861371, 0x43A2507F); + // TODO SoundMan_addSoundList(0x40271018, dword_4B87E8, true); + // TODO SoundMan_setSoundListParams(dword_4B87E8, true, 50, 600, 5, 150); + // TODO SoundMan_playTwoSounds(0x40271018, 0x41861371, 0x43A2507F); } Module2600::~Module2600() { - // TODO Sound1ChList_sub_407A50(0x40271018); + // TODO 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 Sound1ChList_sub_407A50(0x40271018); + // TODO 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 Sound1ChList_addSoundResource(0xDC2769B0, true); + // TODO SoundMan_addSound(0xDC2769B0, true); SetUpdateHandler(&AnimatedSprite::update); SetMessageHandler(&AsScene2609Water::handleMessage); if (getGlobalVar(0x4E0BE910)) @@ -281,12 +281,12 @@ uint32 AsScene2609Water::handleMessage(int messageNum, const MessageParam ¶m case 0x2001: stopAnimation(); setVisible(false); - // TODO Sound1ChList_stop(0xDC2769B0); + // TODO SoundMan_stopSound(0xDC2769B0); break; case 0x2002: startAnimation(0x9C210C90, 0, -1); setVisible(true); - // TODO Sound1ChList_playLooping(0xDC2769B0); + // TODO SoundMan_playSoundLooping(0xDC2769B0); break; } return messageResult; diff --git a/engines/neverhood/module2700.cpp b/engines/neverhood/module2700.cpp index 71ce229956..a91eea294b 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 Music18hList_add(0x42212411, 0x04020210); - // TODO Music18hList_play(0x04020210, 24, 2, 1); + // TODO SoundMan_addMusic(0x42212411, 0x04020210); + // TODO SoundMan_startMusic(0x04020210, 24, 2, 1); SetMessageHandler(&Module2700::handleMessage); if (which < 0) { @@ -107,7 +107,7 @@ Module2700::Module2700(NeverhoodEngine *vm, Module *parentModule, int which) } Module2700::~Module2700() { - // TODO Sound1ChList_sub_407A50(0x42212411); + // TODO 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 Music18hList_delete(_musicFileHash); - // TODO Music18hList_play(0x04020210, 0, 2, 1); - // TODO Sound1ChList_sub_407AF0(0x42212411); + // TODO SoundMan_deleteMusic(_musicFileHash); + // TODO SoundMan_startMusic(0x04020210, 0, 2, 1); + // TODO 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 Music18hList_stop(0x04020210, 0, 1); + // TODO SoundMan_stopMusic(0x04020210, 0, 1); // TODO _vm->gameModule()->initScene2801Vars(); _musicFileHash = getGlobalVar(0x89A82A15); // TODO? GameState_sub_469C50(&field_52, 0); - // TODO MusicMan_create(); - // TODO Music18hList_add2(0x42212411, _musicFileHash); - // TODO Music18hList_play2(_musicFileHash, 0, /*TODO */???, 1); - // TODO Sound1ChList_addSoundResource(0x42212411, 0x44014282, true); - // TODO Sound1ChList_setSoundValues(0x44014282, true, 120, 360, 72, 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); _flag1 = true; } break; diff --git a/engines/neverhood/module2800.cpp b/engines/neverhood/module2800.cpp index 97fb18f9f2..558819c73c 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 Music18hList_add(0x64210814, 0xD2FA4D14); + // TODO SoundMan_addMusic(0x64210814, 0xD2FA4D14); setGlobalVar(0x28D8C940, 1); if (which < 0) { @@ -52,7 +52,7 @@ Module2800::Module2800(NeverhoodEngine *vm, Module *parentModule, int which) Module2800::~Module2800() { // TODO music stuff - // TODO Sound1ChList_sub_407A50(0x64210814); + // TODO SoundMan_deleteGroup(0x64210814); // TODO Module2800_sub471DF0(); } @@ -61,11 +61,11 @@ void Module2800::createScene(int sceneNum, int which) { _vm->gameState().sceneNum = sceneNum; switch (_vm->gameState().sceneNum) { case 0: - // TODO Music18hList_stop(0xD2FA4D14, 0, 0); + // TODO SoundMan_stopMusic(0xD2FA4D14, 0, 0); _childObject = new Scene2801(_vm, this, which); break; case 1: - // TODO Music18hList_stop(0xD2FA4D14, 0, 0); + // TODO SoundMan_stopMusic(0xD2FA4D14, 0, 0); #if 0 _flag = true; // DEBUG! if (_flag) { @@ -76,7 +76,7 @@ void Module2800::createScene(int sceneNum, int which) { #endif break; case 2: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); //setGlobalVar(0x1860C990,1);//DEBUG if (getGlobalVar(0x1860C990)) _childObject = new Scene2803b(_vm, this, which); @@ -87,98 +87,98 @@ void Module2800::createScene(int sceneNum, int which) { _childObject = new Scene2804(_vm, this, which); break; case 4: - // TODO Music18hList_stop(0xD2FA4D14, 0, 2); + // TODO SoundMan_stopMusic(0xD2FA4D14, 0, 2); _childObject = new Scene2805(_vm, this, which); break; case 5: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Scene2806(_vm, this, which); break; case 6: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Scene2807(_vm, this, which); break; case 7: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Scene2808(_vm, this, 0); break; case 8: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Scene2809(_vm, this, which); break; case 9: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Scene2810(_vm, this, which); break; case 10: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Scene2808(_vm, this, 1); break; case 11: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Scene2812(_vm, this, which); break; case 12: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Class152(_vm, this, 0x0000A245, 0x0A241008); break; case 13: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Class152(_vm, this, 0x81C60635, 0x60631814); break; case 14: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Class152(_vm, this, 0xCA811204, 0x11200CA0); break; case 15: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Class152(_vm, this, 0x2D438A00, 0x38A042DC); break; case 16: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Class152(_vm, this, 0x0A806204, 0x062000A0); break; case 17: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Class152(_vm, this, 0x010F9284, 0xF9280018); break; case 18: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Class152(_vm, this, 0x0100022B, 0x0022F018); break; case 19: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Class152(_vm, this, 0x10866205, 0x66201100); break; case 20: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Class152(_vm, this, 0x01C58000, 0x58004014); break; case 21: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Scene2822(_vm, this, which); break; case 22: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Class152(_vm, this, 0x9408121E, 0x8121A948); break; case 23: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Class152(_vm, this, 0x048C0600, 0xC0604040); break; case 24: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new Class152(_vm, this, 0x04270A94, 0x70A9004A); break; case 25: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); if (getGlobalVar(0x190A1D18)) _childObject = new Class152(_vm, this, 0x01600204, 0x0020001E); else _childObject = new Class152(_vm, this, 0x08611204, 0x1120008E); break; case 26: - // TODO Music18hList_play(0xD2FA4D14, 0, 2, 1); + // TODO SoundMan_startMusic(0xD2FA4D14, 0, 2, 1); _childObject = new DiskplayerScene(_vm, this, 4); break; // @@ -1527,7 +1527,7 @@ AsScene2804BeamCoil::AsScene2804BeamCoil(NeverhoodEngine *vm, Scene *parentScene _needRefresh = true; AnimatedSprite::updatePosition(); _soundResource.load(0x6352F051); - // TODO Sound1ChList_addSoundResource(0xC5EA0B28, 0xEF56B094, true); + // TODO SoundMan_addSound(0xC5EA0B28, 0xEF56B094, true); SetUpdateHandler(&AsScene2804BeamCoil::update); SetMessageHandler(&AsScene2804BeamCoil::handleMessage); } @@ -1572,13 +1572,13 @@ void AsScene2804BeamCoil::hide() { setVisible(false); _ssBeamCoilBody->setVisible(false); // TODO _ssBeamCoilBody->update(); -> hide() - // TODO Sound1ChList_stop(0xEF56B094); + // TODO SoundMan_stopSound(0xEF56B094); } void AsScene2804BeamCoil::stBeaming() { startAnimation(0x00494891, 93, -1); NextState(&AsScene2804BeamCoil::stBeaming); - // TODO Sound1ChList_playLooping(0xEF56B094); + // TODO SoundMan_playSoundLooping(0xEF56B094); } uint32 AsScene2804BeamCoil::hmBeaming(int messageNum, const MessageParam ¶m, Entity *sender) { @@ -2735,9 +2735,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 Sound1ChList_addSoundResource(0x84400112, 0xC874EE6C, true); - // TODO Sound1ChList_playLooping(0xC874EE6C); - // TODO Sound1ChList_setVolume(0xC874EE6C, 50); + // TODO SoundMan_addSound(0x84400112, 0xC874EE6C, true); + // TODO SoundMan_playSoundLooping(0xC874EE6C); + // TODO SoundMan_setSoundVolume(0xC874EE6C, 50); _flag1 = false; } else if ((which >= 11 && which <= 14) || (which >= 19 && which <= 22) || which == 3) { if (getGlobalVar(0x1860C990)) { @@ -2798,7 +2798,7 @@ Scene2810::Scene2810(NeverhoodEngine *vm, Module *parentModule, int which) Scene2810::~Scene2810() { setGlobalVar(0xC0418A02, _klayman->isDoDeltaX() ? 1 : 0); setGlobalVar(0x00D30138, _klayman->getX()); - // TODO Sound1ChList_sub_407AF0(0x84400112); + // TODO SoundMan_deleteSoundGroup(0x84400112); } void Scene2810::sub406650() { @@ -2887,7 +2887,7 @@ AsScene2812Winch::AsScene2812Winch(NeverhoodEngine *vm) } AsScene2812Winch::~AsScene2812Winch() { - // TODO Sound1ChList_sub_407AF0(0x00B000E2); + // TODO SoundMan_deleteSoundGroup(0x00B000E2); } uint32 AsScene2812Winch::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { @@ -2896,8 +2896,8 @@ uint32 AsScene2812Winch::handleMessage(int messageNum, const MessageParam ¶m case 0x2000: startAnimation(0x20DA08A0, 0, -1); setVisible(true); - // TODO Sound1ChList_addSoundResource(0x00B000E2, 0xC874EE6C, true); - // TODO Sound1ChList_playLooping(0xC874EE6C); + // TODO SoundMan_addSound(0x00B000E2, 0xC874EE6C, true); + // TODO SoundMan_playSoundLooping(0xC874EE6C); break; case 0x3002: startAnimation(0x20DA08A0, 7, -1); diff --git a/engines/neverhood/module3000.cpp b/engines/neverhood/module3000.cpp index 8c797f3e61..ab86c48fc8 100644 --- a/engines/neverhood/module3000.cpp +++ b/engines/neverhood/module3000.cpp @@ -29,18 +29,18 @@ namespace Neverhood { Module3000::Module3000(NeverhoodEngine *vm, Module *parentModule, int which) : Module(vm, parentModule), _soundVolume(0) { - // TODO Sound1ChList_addSoundResources(0x81293110, dword_4B7FC8, true); - // TODO Sound1ChList_setSoundValuesMulti(dword_4B7FC8, 1, 50, 600, 5, 150); - // TODO Sound1ChList_setSoundValues(0x90F0D1C3, false, 20000, 30000, 20000, 30000); - // TODO Sound1ChList_sub_407C70(0x81293110, 0x48498E46, 0x50399F64, 0); - // TODO Sound1ChList_sub_407C70(0x81293110, 0x40030A51, 0xC862CA15, 0); - // TODO Sound1ChList_sub_407C70(0x81293110, 0x41861371, 0x43A2507F, 0); + // 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); _flag = getGlobalVar(0x10938830) != 0; if (_flag) { - // TODO Sound1ChList_setVolume(0x90F0D1C3, 0); - // TODO Sound1ChList_playLooping(0x90F0D1C3); + // TODO SoundMan_setSoundVolume(0x90F0D1C3, 0); + // TODO SoundMan_playSoundLooping(0x90F0D1C3); } if (which < 0) { @@ -58,7 +58,7 @@ Module3000::Module3000(NeverhoodEngine *vm, Module *parentModule, int which) } Module3000::~Module3000() { - // TODO Sound1ChList_sub_407A50(0x81293110); + // TODO 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 Sound1ChList_sub_407C70(0x81293110, 0x40030A51, 0xC862CA15, 0); + // TODO SoundMan_playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0); if (_flag) { _soundVolume = 90; - // TODO Sound1ChList_setVolume(0x90F0D1C3, 90); + // TODO SoundMan_setSoundVolume(0x90F0D1C3, 90); } if (getGlobalVar(0x10938830)) { createNavigationScene(0x004B7D58, which); @@ -109,7 +109,7 @@ void Module3000::createScene(int sceneNum, int which) { createNavigationScene(0x004B7FB0, which, kNavigationTypes06); break; case 7: - // TODO Sound1ChList_setSoundValuesMulti(dword_4B7FC8, 0, 0, 0, 0, 0); + // TODO SoundMan_setSoundListParams(dword_4B7FC8, false, 0, 0, 0, 0); if (!getSubVar(0x40050052, 0x089809C2)) { setSubVar(0x40050052, 0x089809C2, 1); createSmackerScene(0x90022001, true, true, false); @@ -126,7 +126,7 @@ void Module3000::createScene(int sceneNum, int which) { _childObject = new Scene3011(_vm, this, 0); break; case 11: - // TODO Sound1ChList_setSoundValuesMulti(dword_4B7FC8, 0, 0, 0, 0, 0); + // TODO SoundMan_setSoundListParams(dword_4B7FC8, false, 0, 0, 0, 0); if (!getSubVar(0x40050052, 0x10130993)) { setSubVar(0x40050052, 0x10130993, 1); createSmackerScene(0x31093019, true, true, false); @@ -181,10 +181,10 @@ void Module3000::updateScene() { } break; case 2: - // TODO Sound1ChList_sub_407C70(0x81293110, 0x41861371, 0x43A2507F, 0); + // TODO SoundMan_playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0); if (_flag) { _soundVolume = 0; - // TODO Sound1ChList_setVolume(0x90F0D1C3, 0); + // TODO SoundMan_setSoundVolume(0x90F0D1C3, 0); } if (_moduleResult == 0) { createScene(3, 0); @@ -229,12 +229,12 @@ void Module3000::updateScene() { case 8: _flag = getGlobalVar(0x10938830); // CHECKME if (_moduleResult != 1) { - // TODO: Sound1ChList_setSoundValuesMulti(dword_4B7FC8, true, 0, 0, 0, 0): + // TODO: SoundMan_setSoundListParams(dword_4B7FC8, true, 0, 0, 0, 0): createScene(4, 1); } else if (getGlobalVar(0xF0402B0A)) { createScene(1008, -1); } else { - // TODO: Sound1ChList_setSoundValuesMulti(dword_4B7FC8, true, 0, 0, 0, 0); + // TODO: SoundMan_setSoundListParams(dword_4B7FC8, true, 0, 0, 0, 0); createScene(4, 1); } break; @@ -275,26 +275,26 @@ void Module3000::updateScene() { int navigationIndex = navigationScene()->getIndex(); if (navigationIndex == 1) { if (frameNumber == 0) { - // TODO Sound1ChList_sub_407C70(0x81293110, 0x48498E46, 0x50399F64, 0); - // TODO Sound1ChList_setVolume(0x48498E46, 70); - // TODO Sound1ChList_setVolume(0x50399F64, 70); + // TODO SoundMan_playTwoSounds(0x81293110, 0x48498E46, 0x50399F64, 0); + // TODO SoundMan_setSoundVolume(0x48498E46, 70); + // TODO SoundMan_setSoundVolume(0x50399F64, 70); } else if (frameNumber == 100) { - // TODO Sound1ChList_sub_407C70(0x81293110, 0x41861371, 0x43A2507F, 0); + // TODO SoundMan_playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0); } } else if (navigationIndex == 0) { if (frameNumber == 0) { - // TODO Sound1ChList_sub_407C70(0x81293110, 0x48498E46, 0x50399F64, 0); - // TODO Sound1ChList_setVolume(0x48498E46, 70); - // TODO Sound1ChList_setVolume(0x50399F64, 70); + // TODO SoundMan_playTwoSounds(0x81293110, 0x48498E46, 0x50399F64, 0); + // TODO SoundMan_setSoundVolume(0x48498E46, 70); + // TODO SoundMan_setSoundVolume(0x50399F64, 70); } else if (frameNumber == 10) { - // TODO Sound1ChList_sub_407C70(0x81293110, 0x40030A51, 0xC862CA15, 0); + // TODO SoundMan_playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0); } if (_flag && _soundVolume < 90 && frameNumber % 2) { if (frameNumber == 0) _soundVolume = 40; else _soundVolume++; - // TODO Sound1ChList_setVolume(0x90F0D1C3, _soundVolume); + // TODO SoundMan_setSoundVolume(0x90F0D1C3, _soundVolume); } } } @@ -307,17 +307,17 @@ void Module3000::updateScene() { int navigationIndex = navigationScene()->getIndex(); if (_flag && _soundVolume > 1 && frameNumber % 2) { _soundVolume--; - // TODO Sound1ChList_setVolume(0x90F0D1C3, _soundVolume); + // TODO SoundMan_setSoundVolume(0x90F0D1C3, _soundVolume); } if (navigationIndex == 0) { if (frameNumber == 35) { - // TODO Sound1ChList_sub_407C70(0x81293110, 0x41861371, 0x43A2507F, 0); + // TODO SoundMan_playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0); } } else if (navigationIndex == 1) { if (frameNumber == 55) { - // TODO Sound1ChList_sub_407C70(0x81293110, 0x48498E46, 0x50399F64, 0); - // TODO Sound1ChList_setVolume(0x48498E46, 70); - // TODO Sound1ChList_setVolume(0x50399F64, 70); + // TODO SoundMan_playTwoSounds(0x81293110, 0x48498E46, 0x50399F64, 0); + // TODO SoundMan_setSoundVolume(0x48498E46, 70); + // TODO SoundMan_setSoundVolume(0x50399F64, 70); } } } @@ -330,14 +330,14 @@ void Module3000::updateScene() { int navigationIndex = navigationScene()->getIndex(); if (navigationIndex == 2) { if (frameNumber == 40) { - // TODO Sound1ChList_sub_407C70(0x81293110, 0x40030A51, 0xC862CA15, 0); + // TODO SoundMan_playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0); } if (_flag && _soundVolume < 90 && frameNumber % 2) { if (frameNumber == 0) _soundVolume = 40; else _soundVolume++; - // TODO Sound1ChList_setVolume(0x90F0D1C3, _soundVolume); + // TODO SoundMan_setSoundVolume(0x90F0D1C3, _soundVolume); } } } @@ -346,7 +346,7 @@ void Module3000::updateScene() { case 5: #if 0 // ALL TODO if (navigationScene()->getSoundFlag1() && navigationScene()->getIndex() == 0) { - // TODO Sound1ChList_sub_4080B0(false); + // TODO SoundMan_setTwoSoundsPlayFlag(false); } #endif break; diff --git a/engines/neverhood/navigationscene.cpp b/engines/neverhood/navigationscene.cpp index 7a3161cb47..981e703c2e 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 Sound1ChList_sub_4080B0(0); - // TODO Sound1ChList_sub_408110(0); + // TODO SoundMan_setTwoSoundsPlayFlag(false); + // TODO SoundMan_setSoundThreePlayFlag(false); } int NavigationScene::getNavigationAreaType() { @@ -88,8 +88,8 @@ void NavigationScene::update() { _soundFlag2 = false; _soundFlag1 = false; _interactive = true; - // TODO Sound1ChList_sub_4080B0(0); - // TODO Sound1ChList_sub_408110(0); + // TODO SoundMan_setTwoSoundsPlayFlag(false); + // TODO 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 Sound1ChList_sub_408110(_soundFlag2); + // TODO SoundMan_setSoundThreePlayFlag(_soundFlag2); } if (oldSoundFlag1 != _soundFlag1) { - // TODO Sound1ChList_sub_4080B0(_soundFlag1); + // TODO SoundMan_setTwoSoundsPlayFlag(_soundFlag1); } } diff --git a/engines/neverhood/sound.cpp b/engines/neverhood/sound.cpp index 38ccce9650..91a23bfc7b 100644 --- a/engines/neverhood/sound.cpp +++ b/engines/neverhood/sound.cpp @@ -52,6 +52,34 @@ void MusicResource::stop(int16 fadeVolumeStep) { // TODO } +MusicItem::MusicItem() + : _musicResource(NULL) { +} + +MusicItem::~MusicItem() { + if (_musicResource) + _musicResource->unload(); + delete _musicResource; +} + +SoundItem::SoundItem(NeverhoodEngine *vm, uint32 nameHash, uint32 soundFileHash, + bool playOnceAfterRandomCountdown, int16 minCountdown, int16 maxCountdown, + bool playOnceAfterCountdown, int16 initialCountdown, bool playLooping, int16 currCountdown) + : _soundResource(NULL), _nameHash(nameHash), _soundFileHash(soundFileHash), + _playOnceAfterRandomCountdown(false), _minCountdown(0), _maxCountdown(0), + _playOnceAfterCountdown(_playOnceAfterCountdown), _initialCountdown(initialCountdown), + _playLooping(false), _currCountdown(currCountdown) { + + _soundResource = new SoundResource(vm); + _soundResource->load(soundFileHash); +} + +SoundItem::~SoundItem() { + if (_soundResource) + _soundResource->unload(); + delete _soundResource; +} + SoundMan::SoundMan(NeverhoodEngine *vm) : _vm(vm), _soundIndex1(-1), _soundIndex2(-1), _soundIndex3(-1) { @@ -71,62 +99,43 @@ void SoundMan::addMusic(uint32 nameHash, uint32 musicFileHash) { musicItem->_countdown = 24; musicItem->_musicResource = new MusicResource(_vm); musicItem->_musicResource->load(musicFileHash); - // TODO Is this needed? musicItem->_musicResource->init(); _musicItems.push_back(musicItem); } void SoundMan::deleteMusic(uint32 musicFileHash) { - for (uint i = 0; i < _musicItems.size(); ++i) { - MusicItem *musicItem = _musicItems[i]; - if (musicItem->_musicFileHash == musicFileHash) { - musicItem->_musicResource->unload(); - delete musicItem->_musicResource; - delete musicItem; - _musicItems.remove_at(i); - break; - } + MusicItem *musicItem = getMusicItemByHash(musicFileHash); + if (musicItem) { + delete musicItem; + for (uint i = 0; i < _musicItems.size(); ++i) + if (_musicItems[i]->_musicFileHash == musicFileHash) { + _musicItems.remove_at(i); + break; + } } } void SoundMan::startMusic(uint32 musicFileHash, int16 countdown, int16 fadeVolumeStep) { - for (uint i = 0; i < _musicItems.size(); ++i) { - MusicItem *musicItem = _musicItems[i]; - if (musicItem->_musicFileHash == musicFileHash) { - musicItem->_play = true; - musicItem->_stop = false; - musicItem->_countdown = countdown; - musicItem->_fadeVolumeStep = fadeVolumeStep; - break; - } + MusicItem *musicItem = getMusicItemByHash(musicFileHash); + if (musicItem) { + musicItem->_play = true; + musicItem->_stop = false; + musicItem->_countdown = countdown; + musicItem->_fadeVolumeStep = fadeVolumeStep; } } void SoundMan::stopMusic(uint32 musicFileHash, int16 countdown, int16 fadeVolumeStep) { - for (uint i = 0; i < _musicItems.size(); ++i) { - MusicItem *musicItem = _musicItems[i]; - if (musicItem->_musicFileHash == musicFileHash) { - musicItem->_play = false; - musicItem->_stop = true; - musicItem->_countdown = countdown; - musicItem->_fadeVolumeStep = fadeVolumeStep; - break; - } + MusicItem *musicItem = getMusicItemByHash(musicFileHash); + if (musicItem) { + musicItem->_play = false; + musicItem->_stop = true; + musicItem->_countdown = countdown; + musicItem->_fadeVolumeStep = fadeVolumeStep; } } void SoundMan::addSound(uint32 nameHash, uint32 soundFileHash) { - SoundItem *soundItem = new SoundItem(); - soundItem->_nameHash = nameHash; - soundItem->_soundFileHash = soundFileHash; - soundItem->_playOnceAfterRandomCountdown = false; - soundItem->_minCountdown = 50; - soundItem->_maxCountdown = 600; - soundItem->_playOnceAfterCountdown = false; - soundItem->_initialCountdown = 0; - soundItem->_playLooping = false; - soundItem->_currCountdown = 0; - soundItem->_soundResource = new SoundResource(_vm); - soundItem->_soundResource->load(soundFileHash); + SoundItem *soundItem = new SoundItem(_vm, nameHash, soundFileHash, false, 50, 600, false, 0, false, 0); _soundItems.push_back(soundItem); } @@ -136,15 +145,14 @@ void SoundMan::addSoundList(uint32 nameHash, uint32 *soundFileHashList) { } void SoundMan::deleteSound(uint32 soundFileHash) { - for (uint i = 0; i < _soundItems.size(); ++i) { - SoundItem *soundItem = _soundItems[i]; - if (soundItem->_soundFileHash == soundFileHash) { - soundItem->_soundResource->unload(); - delete soundItem->_soundResource; - delete soundItem; - _soundItems.remove_at(i); - break; - } + SoundItem *soundItem = getSoundItemByHash(soundFileHash); + if (soundItem) { + delete soundItem; + for (uint i = 0; i < _soundItems.size(); ++i) + if (_soundItems[i]->_soundFileHash == soundFileHash) { + _soundItems.remove_at(i); + break; + } } } @@ -248,8 +256,6 @@ void SoundMan::deleteMusicGroup(uint32 nameHash) { for (int index = _musicItems.size() - 1; index >= 0; --index) { MusicItem *musicItem = _musicItems[index]; if (musicItem->_nameHash == nameHash) { - musicItem->_musicResource->unload(); - delete musicItem->_musicResource; delete musicItem; _musicItems.remove_at(index); } @@ -261,28 +267,18 @@ void SoundMan::deleteSoundGroup(uint32 nameHash) { SoundItem *soundItem; if (_soundIndex1 != -1 && _soundItems[_soundIndex1]->_nameHash == nameHash) { - soundItem = _soundItems[_soundIndex1]; - soundItem->_soundResource->unload(); - delete soundItem->_soundResource; - delete soundItem; - _soundItems.remove_at(_soundIndex1); + deleteSoundByIndex(_soundIndex1); _soundIndex1 = -1; } if (_soundIndex2 != -1 && _soundItems[_soundIndex2]->_nameHash == nameHash) { - soundItem = _soundItems[_soundIndex2]; - soundItem->_soundResource->unload(); - delete soundItem->_soundResource; - delete soundItem; - _soundItems.remove_at(_soundIndex2); + deleteSoundByIndex(_soundIndex2); _soundIndex2 = -1; } for (int index = _soundItems.size() - 1; index >= 0; --index) { soundItem = _soundItems[index]; if (soundItem->_nameHash == nameHash) { - soundItem->_soundResource->unload(); - delete soundItem->_soundResource; delete soundItem; _soundItems.remove_at(index); } @@ -297,22 +293,14 @@ void SoundMan::playTwoSounds(uint32 nameHash, uint32 soundFileHash1, uint32 soun int16 currCountdown2 = _initialCountdown / 2; if (_soundIndex1 != -1) { - soundItem = _soundItems[_soundIndex1]; - currCountdown1 = soundItem->_currCountdown; - soundItem->_soundResource->unload(); - delete soundItem->_soundResource; - delete soundItem; - _soundItems.remove_at(_soundIndex1); + currCountdown1 = _soundItems[_soundIndex1]->_currCountdown; + deleteSoundByIndex(_soundIndex1); _soundIndex1 = -1; } if (_soundIndex2 != -1) { - soundItem = _soundItems[_soundIndex2]; - currCountdown2 = soundItem->_currCountdown; - soundItem->_soundResource->unload(); - delete soundItem->_soundResource; - delete soundItem; - _soundItems.remove_at(_soundIndex2); + currCountdown2 = _soundItems[_soundIndex2]->_currCountdown; + deleteSoundByIndex(_soundIndex2); _soundIndex2 = -1; } @@ -320,36 +308,16 @@ void SoundMan::playTwoSounds(uint32 nameHash, uint32 soundFileHash1, uint32 soun _initialCountdown = initialCountdown; if (soundFileHash1 != 0) { - soundItem = new SoundItem(); - soundItem->_nameHash = nameHash; - soundItem->_soundFileHash = soundFileHash1; - soundItem->_playOnceAfterRandomCountdown = false; - soundItem->_minCountdown = 0; - soundItem->_maxCountdown = 0; - soundItem->_playOnceAfterCountdown = _playOnceAfterCountdown; - soundItem->_initialCountdown = _initialCountdown; - soundItem->_playLooping = false; - soundItem->_currCountdown = currCountdown1; - soundItem->_soundResource = new SoundResource(_vm); - soundItem->_soundResource->load(soundFileHash1); + soundItem = new SoundItem(_vm, nameHash, soundFileHash1, false, 0, 0, + _playOnceAfterCountdown, _initialCountdown, false, currCountdown1); soundItem->_soundResource->setVolume(80); _soundIndex1 = _soundItems.size(); _soundItems.push_back(soundItem); } if (soundFileHash2 != 0) { - soundItem = new SoundItem(); - soundItem->_nameHash = nameHash; - soundItem->_soundFileHash = soundFileHash2; - soundItem->_playOnceAfterRandomCountdown = false; - soundItem->_minCountdown = 0; - soundItem->_maxCountdown = 0; - soundItem->_playOnceAfterCountdown = _playOnceAfterCountdown; - soundItem->_initialCountdown = _initialCountdown; - soundItem->_playLooping = false; - soundItem->_currCountdown = currCountdown2; - soundItem->_soundResource = new SoundResource(_vm); - soundItem->_soundResource->load(soundFileHash2); + soundItem = new SoundItem(_vm, nameHash, soundFileHash2, false, 0, 0, + _playOnceAfterCountdown, _initialCountdown, false, currCountdown2); soundItem->_soundResource->setVolume(80); _soundIndex2 = _soundItems.size(); _soundItems.push_back(soundItem); @@ -362,28 +330,14 @@ void SoundMan::playSoundThree(uint32 nameHash, uint32 soundFileHash) { SoundItem *soundItem; if (_soundIndex3 != -1) { - soundItem = _soundItems[_soundIndex3]; - soundItem->_soundResource->unload(); - delete soundItem->_soundResource; - delete soundItem; - _soundItems.remove_at(_soundIndex3); + deleteSoundByIndex(_soundIndex3); _soundIndex3 = -1; } if (soundFileHash != 0) { - soundItem = new SoundItem(); - soundItem->_nameHash = nameHash; - soundItem->_soundFileHash = soundFileHash; - soundItem->_playOnceAfterRandomCountdown = false; - soundItem->_minCountdown = 0; - soundItem->_maxCountdown = 0; - soundItem->_playOnceAfterCountdown = false; - soundItem->_initialCountdown = _initialCountdown3; - soundItem->_playLooping = false; - soundItem->_currCountdown = 0; - soundItem->_soundResource = new SoundResource(_vm); - soundItem->_soundResource->load(soundFileHash); - _soundIndex2 = _soundItems.size(); + soundItem = new SoundItem(_vm, nameHash, soundFileHash, false, 0, 0, + false, _initialCountdown3, false, 0); + _soundIndex3 = _soundItems.size(); _soundItems.push_back(soundItem); } @@ -403,6 +357,13 @@ void SoundMan::setSoundThreePlayFlag(bool playOnceAfterCountdown) { _playOnceAfterCountdown3 = playOnceAfterCountdown; } +MusicItem *SoundMan::getMusicItemByHash(uint32 musicFileHash) { + for (uint i = 0; i < _musicItems.size(); ++i) + if (_musicItems[i]->_musicFileHash == musicFileHash) + return _musicItems[i]; + return NULL; +} + SoundItem *SoundMan::getSoundItemByHash(uint32 soundFileHash) { for (uint i = 0; i < _soundItems.size(); ++i) if (_soundItems[i]->_soundFileHash == soundFileHash) @@ -410,4 +371,9 @@ SoundItem *SoundMan::getSoundItemByHash(uint32 soundFileHash) { return NULL; } +void SoundMan::deleteSoundByIndex(int index) { + delete _soundItems[index]; + _soundItems.remove_at(index); +} + } // End of namespace Neverhood diff --git a/engines/neverhood/sound.h b/engines/neverhood/sound.h index 66ed700e1a..39bf7cd096 100644 --- a/engines/neverhood/sound.h +++ b/engines/neverhood/sound.h @@ -50,6 +50,8 @@ struct MusicItem { int16 _fadeVolumeStep; int16 _countdown; MusicResource *_musicResource; + MusicItem(); + ~MusicItem(); }; struct SoundItem { @@ -63,6 +65,11 @@ struct SoundItem { bool _playLooping; int16 _currCountdown; SoundResource *_soundResource; + + SoundItem(NeverhoodEngine *vm, uint32 nameHash, uint32 soundFileHash, + bool playOnceAfterRandomCountdown, int16 minCountdown, int16 maxCountdown, + bool playOnceAfterCountdown, int16 initialCountdown, bool playLooping, int16 currCountdown); + ~SoundItem(); }; class SoundMan { @@ -113,7 +120,9 @@ protected: Common::Array<MusicItem*> _musicItems; Common::Array<SoundItem*> _soundItems; + MusicItem *getMusicItemByHash(uint32 musicFileHash); SoundItem *getSoundItemByHash(uint32 soundFileHash); + void deleteSoundByIndex(int index); }; |