aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2005-09-29 15:27:10 +0000
committerEugene Sandulenko2005-09-29 15:27:10 +0000
commit7f686ebe53bb256c3ff57bb1bdb1dd1f210d14d3 (patch)
treec9afa81e4f8027c0d66118d4c4d918782331c502
parent1c2fdf5af82ef4dcb2444433e0b8cbc2d837bae5 (diff)
downloadscummvm-rg350-7f686ebe53bb256c3ff57bb1bdb1dd1f210d14d3.tar.gz
scummvm-rg350-7f686ebe53bb256c3ff57bb1bdb1dd1f210d14d3.tar.bz2
scummvm-rg350-7f686ebe53bb256c3ff57bb1bdb1dd1f210d14d3.zip
Fix SFX loading in IHNM. Now they're played.
svn-id: r18898
-rw-r--r--saga/rscfile.cpp8
-rw-r--r--saga/sndres.cpp2
2 files changed, 8 insertions, 2 deletions
diff --git a/saga/rscfile.cpp b/saga/rscfile.cpp
index c4bd242090..381beb823e 100644
--- a/saga/rscfile.cpp
+++ b/saga/rscfile.cpp
@@ -440,12 +440,18 @@ void Resource::loadGlobalResources(int chapter, int actorsEntrance) {
// TODO: close chapter context, or rather reassign it in our case
ResourceContext *resourceContext;
+ ResourceContext *soundContext;
resourceContext = _vm->_resource->getContext(GAME_RESOURCEFILE);
if (resourceContext == NULL) {
error("Resource::loadGlobalResources() resource context not found");
}
+ soundContext = _vm->_resource->getContext(GAME_SOUNDFILE);
+ if (soundContext == NULL) {
+ error("Resource::loadGlobalResources() sound context not found");
+ }
+
byte *resourcePointer;
size_t resourceLength;
@@ -490,7 +496,7 @@ void Resource::loadGlobalResources(int chapter, int actorsEntrance) {
}
debug(0, "Going to read %d of %d", chapter, _vm->_sndRes->_fxTableIDs[chapter]);
- _vm->_resource->loadResource(resourceContext, _vm->_sndRes->_fxTableIDs[chapter],
+ _vm->_resource->loadResource(soundContext, _vm->_sndRes->_fxTableIDs[chapter],
resourcePointer, resourceLength);
if (resourceLength == 0) {
diff --git a/saga/sndres.cpp b/saga/sndres.cpp
index 2b0e585cfe..8c770d733d 100644
--- a/saga/sndres.cpp
+++ b/saga/sndres.cpp
@@ -58,7 +58,7 @@ SndRes::SndRes(SagaEngine *vm) : _vm(vm) {
} else {
ResourceContext *resourceContext;
- resourceContext = _vm->_resource->getContext(GAME_RESOURCEFILE);
+ resourceContext = _vm->_resource->getContext(GAME_SOUNDFILE);
if (resourceContext == NULL) {
error("Resource::loadGlobalResources() resource context not found");
}