aboutsummaryrefslogtreecommitdiff
path: root/saga/rscfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'saga/rscfile.cpp')
-rw-r--r--saga/rscfile.cpp32
1 files changed, 17 insertions, 15 deletions
diff --git a/saga/rscfile.cpp b/saga/rscfile.cpp
index f7d2807984..f079c9aaec 100644
--- a/saga/rscfile.cpp
+++ b/saga/rscfile.cpp
@@ -522,46 +522,48 @@ void Resource::loadGlobalResources(int chapter, int actorsEntrance) {
// TODO: songTable
+ int voiceLUTResourceID = 0;
+
+ _vm->_script->_globalVoiceLUT.freeMem();
+
switch (chapter) {
case 1:
_vm->_sndRes->setVoiceBank(1);
- // chapterRes = "voices1.res"
- // hackVoiceTableListID = 23
+ voiceLUTResourceID = 23;
break;
case 2:
_vm->_sndRes->setVoiceBank(2);
- // chapterRes = "voices2.res"
- // hackVoiceTableListID = 24
+ voiceLUTResourceID = 24;
break;
case 3:
_vm->_sndRes->setVoiceBank(3);
- // chapterRes = "voices3.res"
- // hackVoiceTableListID = 25
+ voiceLUTResourceID = 25;
break;
case 4:
_vm->_sndRes->setVoiceBank(4);
- // chapterRes = "voices4.res"
- // hackVoiceTableListID = 26
+ voiceLUTResourceID = 26;
break;
case 5:
_vm->_sndRes->setVoiceBank(5);
- // chapterRes = "voices5.res"
- // hackVoiceTableListID = 27
+ voiceLUTResourceID = 27;
break;
case 6:
_vm->_sndRes->setVoiceBank(6);
- // chapterRes = "voices6.res"
- // hackVoiceTableListID = 28
+ voiceLUTResourceID = 28;
break;
case 7:
break;
case 8:
_vm->_sndRes->setVoiceBank(0);
- // chapterRes = "voicess.res"
- // hackVoiceTableListID = 22
+ voiceLUTResourceID = 22;
break;
}
-
+
+ if (voiceLUTResourceID) {
+ _vm->_resource->loadResource(resourceContext, voiceLUTResourceID, resourcePointer, resourceLength);
+ _vm->_script->loadVoiceLUT(_vm->_script->_globalVoiceLUT, resourcePointer, resourceLength);
+ free(resourcePointer);
+ }
}
} // End of namespace Saga