diff options
author | Martin Kiewitz | 2010-09-04 08:51:10 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-09-04 08:51:10 +0000 |
commit | 89d4e44281b7bf05b9ad234bdf242de32a47c688 (patch) | |
tree | 440b8c169122f4b10fe58cf3e21aeb5954182bc1 /engines/sci/resource.cpp | |
parent | 92c3a4b5aab20786ceceb62458142561bc569b64 (diff) | |
download | scummvm-rg350-89d4e44281b7bf05b9ad234bdf242de32a47c688.tar.gz scummvm-rg350-89d4e44281b7bf05b9ad234bdf242de32a47c688.tar.bz2 scummvm-rg350-89d4e44281b7bf05b9ad234bdf242de32a47c688.zip |
SCI: doing detectDoSoundType() properly sci0early
checking, if sound resources are sci0early or late for sci0early games instead of hardcoding lsl2
svn-id: r52514
Diffstat (limited to 'engines/sci/resource.cpp')
-rw-r--r-- | engines/sci/resource.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 3b787cc673..4aff273610 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -2148,6 +2148,19 @@ bool ResourceManager::detectForPaletteMergingForSci11() { return false; } +// is called on SCI0EARLY games to make sure that sound resources are in fact also SCI0EARLY +bool ResourceManager::detectEarlySound() { + Resource *res = findResource(ResourceId(kResourceTypeSound, 1), 0); + if (res) { + if (res->size >= 0x22) { + if (READ_LE_UINT16(res->data + 0x1f) == 0) // channel 15 voice count + play mask is 0 in SCI0LATE + if (res->data[0x21] == 0) // last byte right before actual data is 0 as well + return false; // these 2 bytes are + } + } + return true; +} + // Functions below are based on PD code by Brian Provinciano (SCI Studio) bool ResourceManager::hasOldScriptHeader() { Resource *res = findResource(ResourceId(kResourceTypeScript, 0), 0); |