Commit Graph
86814 Commits
Author SHA1 Message Date
Colin Snover a2fb53790b SCI32: Make version 41 the first supported save game version
Save games created by earlier versions of ScummVM are prone to
having subtle graphics problems or other corruption caused by
incomplete save/load code.
2017-04-22 13:01:38 -05:00
Colin Snover e504efe4da SCI32: Add palette code for late SCI2.1mid+ games
Sometime during SCI2.1mid, the palette manager was changed to
save and restore the source palette, and to add in-game gamma
correction. Previously, only the vary start and target palettes
were saved, and gamma correction was only configurable in SSCI by
editing RESOURCE.CFG.
2017-04-22 13:01:37 -05:00
Colin Snover 399551af09 SCI: Fix compilation when SCI32 is disabled 2017-04-22 13:01:37 -05:00
Colin Snover 93b337b833 SCI: Do not sync objects when saving games
Commit 5de2668939 silently changed
behaviour from running this code only when restoring a game, to
running all the time, in an apparent copy-paste error.
2017-04-22 13:01:37 -05:00
Colin Snover a22e461208 SCI: Improve comments in GuestAdditions 2017-04-22 13:01:37 -05:00
Colin Snover 2df939d33b SCI32: Add workaround for SQ6 invalid read after a failed save game restore 2017-04-22 13:01:36 -05:00
Colin Snover f8703ae48d SCI32: Fix infinite recursion when loading invalid save from launcher 2017-04-22 13:01:36 -05:00
Colin Snover 2862e51068 SCI32: Fix launcher load for Shivers 2017-04-22 13:01:36 -05:00
Colin Snover a2c48eff4c SCI32: Only activate the Load button in the launcher when it is usable 2017-04-22 13:01:36 -05:00
Colin Snover 1ed185bbbb SCI: Implement delayed restore for SCI32 and move implementations to GuestAdditions 2017-04-22 13:01:35 -05:00
Colin Snover 6f75bed90c SCI32: Remove original save/load option from games without ScummVM save integration 2017-04-22 13:01:35 -05:00
Colin Snover 4c0f2a3738 SCI: Move ScummVM kernel calls to 0xe0 2017-04-22 13:01:35 -05:00
Colin Snover c8486395fa SCI: Clean up unnecessary delayed restore flags
_delayedRestoreGame is always set and cleared at the same time as
_delayedRestoreGameId, and _delayedRestoreFromLauncher is written
but never read.
2017-04-22 13:01:35 -05:00
Colin Snover ec12c5a342 SCI: Move ScummVM save/restore to GuestAdditions and reimplement for SCI32 2017-04-22 13:01:16 -05:00
Colin Snover 3303a88139 SCI: Improve audio volume & settings sync code
This patch includes enhancements to the ScummVM integration with
SCI engine, with particular focus on SCI32 support.

1. Fixes audio volumes syncing erroneously to ScummVM in games
   that modify the audio volume without user action (e.g. SCI1.1
   talkies that reduce music volume during speech playback). Now,
   volumes will only be synchronised when the user interacts with
   the game's audio settings. This mechanism works by looking for
   a known volume control object in the stack, and only syncing
   when the control object is present. (Ports and planes were
   researched and found unreliable.)

2. Fixes audio syncing in SCI32 games that do not set game
   volumes through kDoSoundMasterVolume/kDoAudioVolume, like GK1,
   GK2, Phant1, and Torin.

3. Fixes speech/subtitles syncing in SCI32 games that do not use
   global 90, like LSL6hires.

4. Fixes in-game volume controls in SCI32 games reflecting
   outdated audio volumes when a change is made during the game
   from the ScummVM launcher.

5. Fixes SCI32 games that would restore volumes from save games
   or reset volumes on startup, which caused game volumes to be
   out-of-sync with ScummVM when started.

6. ScummVM integration code for audio sync has been abstracted
   into a new GuestAdditions class. This keeps the ScummVM-
   specific code all in one place, with only small hooks into the
   engine code. ScummVM integrated save/load code should probably
   also go here in the future.

Fixes Trac#9700.
2017-04-21 19:00:27 -05:00
Paul Gilbert c2e9fee932 TITANIC: Cleanup of CStarControlSub26 fn5 2017-04-18 22:34:29 -04:00
Paul Gilbert fdf2a70f44 TITANIC: Fixes for CStarControlSub25 fn2 2017-04-18 21:42:09 -04:00
Colin Snover a620b6c354 SCI: Fix handling of buggy SCI0 export tables
The previous fix for this bug was incorrect; it only happened
to work because of another bug: the number of exports was being
read incorrectly (reading the byte size of the export block, not
the number of exports), so the validation check for the export
number always passed. Then, the "small" offsets that were seen
were actually either invalid reads into the header of the next
block in the script (KQ4), or reads into the bad first export
table which contained an unfilled offset (Camelot).

Once the incorrect number of exports was fixed, the previous "fix"
broke in KQ4 because the export number validation started to work
correctly and the first export table does not have enough entries
(needs 2, has 1).

This patch fixes the bug by using the last export table in SCI0
scripts instead of the first export table. (This does not affect
most scripts, since only the buggy scripts have more than one
export table.)

Fixes Trac#9731.
2017-04-18 11:47:18 -05:00
Torbjörn Andersson 6cda47ca3d JANITORIAL: Remove superfluous semicolons 2017-04-18 06:49:14 +02:00
Eugene Sandulenko a36e631b16 DIRECTOR: Fix event processing 2017-04-17 18:23:25 +02:00
Paul Gilbert 4940bef43e TITANIC: Further renamings of CStarMover fields 2017-04-17 11:50:12 -04:00
Paul Gilbert 60faebe348 TITANIC: Renamings for CCameraMover fields and methods 2017-04-17 11:39:25 -04:00
Lothar Serra Mari 363da6ee55 I18N: Update translation (German)
Currently translated at 100.0% (946 of 946 strings)
2017-04-17 08:02:41 +02:00
Thierry Crozat 571f608192 I18N: Regenerate translations data file 2017-04-17 05:05:09 +02:00
Paul Gilbert b22b572e64 TITANIC: Further positioning renames 2017-04-16 22:03:33 -04:00
Paul Gilbert feb359e4a9 TITANIC: Renamings for positions and orientations 2017-04-16 21:46:36 -04:00
Paul Gilbert 3877a0642b TITANIC: Renamings for mover position updates 2017-04-16 18:16:08 -04:00
Paul Gilbert 4fae7c8e78 TITANIC: Renaming of camera setting position & orientation 2017-04-16 17:24:41 -04:00
Paul Gilbert 0774501c8d TITANIC: Renaming for viewport position poses and access methods 2017-04-16 16:00:03 -04:00
Paul Gilbert e1ea47eb5c TITANIC: Rename CStarControlSub13 to CViewport 2017-04-16 15:40:54 -04:00
Colin Snover 4946f149b4 SCI: Improve MidiParser_SCI robustness against bad sound resources
1. KQ4 sound 104 has an extra 0xFC (MIDI Stop command/kEndOfTrack)
   at the end of the resource, which causes an out-of-bounds read
   because the filtering loop continues after the first 0xFC and
   unconditionally attempts to read 2 bytes (expecting there to
   always be a delta value + a command, whereas in this file there
   is only another kEndOfTrack command). This is corrected by
   exiting the filtering loop when a kEndOfTrack is encountered
   and there is not enough data remaining in the resource to
   continue reading.

2. KQ5 sound 699 is truncated, which causes the parser to attempt
   to read past the end of the resource. This is addressed by
   adding bounds checks that exit the mix loop early if there is
   no more data available to read. This allows truncated sounds
   to be played as far as possible (previously, trying to read
   truncated resources would result in a fatal error).

3. midiMixChannels allocates an arbitrary amount of raw memory
   for the mixed MIDI sequence, without performing any bounds
   checking when writing to this memory, potentially leading to
   a crash or silent corruption of adjacent memory. This is
   mitigated by using SciSpan instead of a raw pointer for the
   mixed data.

Fixes Trac#9727.
2017-04-16 12:23:35 -05:00
Paul Gilbert fa27fd7478 TITANIC: Extra debugging info for starfield movement 2017-04-16 13:03:12 -04:00
Paul Gilbert b57fd696ba TITANIC: Renamed CStarControlSub20 to CCameraMover 2017-04-16 11:35:32 -04:00
Thierry Crozat f1b2d9c71b NEWS: Mention improved handling of joysticks 2017-04-16 09:59:03 +01:00
D G Turner 51edb208e2 TITANIC: Fix GCC Unused Variable Warning. 2017-04-16 06:09:16 +01:00
Paul Gilbert 93c2ca3c94 TITANIC: Renaming methods for setting camera movement 2017-04-15 22:21:01 -04:00
Paul Gilbert 074e466f91 TITANIC: Renaming movement counter fields 2017-04-15 21:35:04 -04:00
Paul Gilbert d128587e99 TITANIC: Movement starting to work when star is clicked 2017-04-15 21:24:56 -04:00
Paul Gilbert 12fa59697e TITANIC: Renaming and fixes for movers active flag 2017-04-15 18:28:26 -04:00
Paul Gilbert d150d1e3bf TITANIC: Remove hard-coded starfield position 2017-04-15 17:10:23 -04:00
Paul Gilbert c2d54f010e TITANIC: Fixes for setting up star closeup sphere data 2017-04-15 16:38:14 -04:00
Eugene Sandulenko 4873330d23 DIRECTOR: Lingo: Added stub for generic event handlers 2017-04-14 18:49:01 +02:00
Thierry Crozat 1e38ca45cd SCI: Fix speech in QfG IV on big endian platforms 2017-04-14 00:01:54 +01:00
stevenhoefel bcc3fffc2d DIRECTOR: D5 Shared Cast loading. 2017-04-13 14:41:00 +10:00
Paul Gilbert 5741ee3103 TITANIC: Fix centroid calculations in star drawing methods 2017-04-12 20:48:47 -04:00
Paolo Bossi 887adf1723 I18N: Update translation (Italian)
Currently translated at 100.0% (946 of 946 strings)
2017-04-12 22:07:59 +02:00
Eugene Sandulenko 689a6ff6af I18N: Update translation (Spanish)
Currently translated at 98.9% (936 of 946 strings)
2017-04-12 08:05:33 +02:00
pablobecerra e8d777f6c7 I18N: Update translation (Spanish)
Currently translated at 98.9% (936 of 946 strings)
2017-04-12 08:04:53 +02:00
Paul Gilbert 910e6816ea TITANIC: Further cleanup of CStarCloseup draw 2017-04-10 22:33:16 -04:00
Paul Gilbert 31bf6cd708 TITANIC: Cleaning up CStarCloseup draw 2017-04-10 22:18:22 -04:00