From 85e35943fe27b99a91d97eace3072117c2073f69 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Wed, 7 Jun 2017 20:59:34 -0500 Subject: SCI32: Implement kLock & kDoAudio(1) for SCI32 1. Unlocking all resources of a type using a resource ID of -1 is gone in SCI32; 2. Audio locks need to be serialized starting in GK2 for the game's modified kDoAudio(1) call; 3. Audio locks in SCI3 must work more like SSCI, since at least Lighthouse's `BackMusic::fade` method will attempt to unlock audio that was never locked by a script. In SSCI (and now in ScummVM too) this is a no-op; previously in ScummVM, it would remove Audio32's own lock on the audio resource, resulting in a use-after-free; 4. kDoAudio(1) starting in GK2 returns the number of active *not-in-memory* channels being played, not the total number of active channels. Fixes Trac#9675. --- engines/sci/engine/savegame.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/sci/engine/savegame.h') diff --git a/engines/sci/engine/savegame.h b/engines/sci/engine/savegame.h index 151585ac77..29930241b1 100644 --- a/engines/sci/engine/savegame.h +++ b/engines/sci/engine/savegame.h @@ -37,6 +37,7 @@ struct EngineState; * * Version - new/changed feature * ============================= + * 44 - GK2+SCI3 audio resource locks * 43 - stop saving SCI3 mustSetViewVisible array * 42 - SCI3 robots and VM objects * 41 - palette support for newer SCI2.1 games; stable SCI2/2.1 save games @@ -68,7 +69,7 @@ struct EngineState; */ enum { - CURRENT_SAVEGAME_VERSION = 43, + CURRENT_SAVEGAME_VERSION = 44, MINIMUM_SAVEGAME_VERSION = 14 #ifdef ENABLE_SCI32 , -- cgit v1.2.3