diff options
author | m-kiewitz | 2013-09-21 14:27:16 +0200 |
---|---|---|
committer | m-kiewitz | 2013-09-21 14:27:16 +0200 |
commit | 4443793b97761ab1dc1fb312a4092211356b008e (patch) | |
tree | e80857bd0a8cc7eb03a8c59ab5a7ec64472c6011 /engines/sci/engine | |
parent | ac0c890bccfb0a15cd739be60228c4de5a7afeab (diff) | |
download | scummvm-rg350-4443793b97761ab1dc1fb312a4092211356b008e.tar.gz scummvm-rg350-4443793b97761ab1dc1fb312a4092211356b008e.tar.bz2 scummvm-rg350-4443793b97761ab1dc1fb312a4092211356b008e.zip |
SCI: sfx/music priority int16 fixes bug #3615038
it seems that sound system up till SCI0_LATE uses int16, afterwards it seems they changed to byte
main music object (conMusic) in Laura Bow 1 uses -1 as priority. This was truncated to 255 till now, which resulted in many sound effects not getting played, because those used priority 0
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 5 | ||||
-rw-r--r-- | engines/sci/engine/savegame.h | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index c8076ec819..fa9363abe3 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -600,7 +600,10 @@ void MusicEntry::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsSint16LE(dataInc); s.syncAsSint16LE(ticker); s.syncAsSint16LE(signal, VER(17)); - s.syncAsByte(priority); + if (s.getVersion() >= 31) // ffs. sound/music.h -> priority + s.syncAsSint16LE(priority); + else + s.syncAsByte(priority); s.syncAsSint16LE(loop, VER(17)); s.syncAsByte(volume); s.syncAsByte(hold, VER(17)); diff --git a/engines/sci/engine/savegame.h b/engines/sci/engine/savegame.h index 1d899b0d37..f1f02f89f2 100644 --- a/engines/sci/engine/savegame.h +++ b/engines/sci/engine/savegame.h @@ -37,6 +37,7 @@ struct EngineState; * * Version - new/changed feature * ============================= + * 31 - priority for sound effects/music is now a signed int16, instead of a byte * 30 - synonyms * 29 - system strings * 28 - heap @@ -55,7 +56,7 @@ struct EngineState; */ enum { - CURRENT_SAVEGAME_VERSION = 30, + CURRENT_SAVEGAME_VERSION = 31, MINIMUM_SAVEGAME_VERSION = 14 }; |