diff options
author | Filippos Karapetis | 2015-07-04 01:10:28 +0300 |
---|---|---|
committer | Filippos Karapetis | 2015-07-04 01:51:45 +0300 |
commit | 5311191687b678fda4a3379f5b79bc735329f35b (patch) | |
tree | b55cea6c4f3bcfdb7e79a20447cfad5980623770 /engines/saga/scene.cpp | |
parent | 3f119aab0ec20aa05aafdd6ac55d525dbf3b6368 (diff) | |
download | scummvm-rg350-5311191687b678fda4a3379f5b79bc735329f35b.tar.gz scummvm-rg350-5311191687b678fda4a3379f5b79bc735329f35b.tar.bz2 scummvm-rg350-5311191687b678fda4a3379f5b79bc735329f35b.zip |
SAGA: Add support for the scene descriptors of the ITE DOS demo
Diffstat (limited to 'engines/saga/scene.cpp')
-rw-r--r-- | engines/saga/scene.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp index 4fa15d09e5..efd4c371b1 100644 --- a/engines/saga/scene.cpp +++ b/engines/saga/scene.cpp @@ -866,15 +866,13 @@ void Scene::loadSceneDescriptor(uint32 resourceId) { _sceneDescription.reset(); - if (resourceId == 0) { + if (resourceId == 0) return; - } _vm->_resource->loadResource(_sceneContext, resourceId, sceneDescriptorData); + ByteArrayReadStreamEndian readS(sceneDescriptorData, _sceneContext->isBigEndian()); - if (sceneDescriptorData.size() == 16) { - ByteArrayReadStreamEndian readS(sceneDescriptorData, _sceneContext->isBigEndian()); - + if (sceneDescriptorData.size() == 14 || sceneDescriptorData.size() == 16) { _sceneDescription.flags = readS.readSint16(); _sceneDescription.resourceListResourceId = readS.readSint16(); _sceneDescription.endSlope = readS.readSint16(); @@ -882,7 +880,10 @@ void Scene::loadSceneDescriptor(uint32 resourceId) { _sceneDescription.scriptModuleNumber = readS.readUint16(); _sceneDescription.sceneScriptEntrypointNumber = readS.readUint16(); _sceneDescription.startScriptEntrypointNumber = readS.readUint16(); - _sceneDescription.musicResourceId = readS.readSint16(); + if (sceneDescriptorData.size() == 16) + _sceneDescription.musicResourceId = readS.readSint16(); + } else { + warning("Scene::loadSceneDescriptor: Unknown scene descriptor data size (%d)", sceneDescriptorData.size()); } } |