7605 Commits

Author SHA1 Message Date
Colin Snover
12d24d5b46 SCI32: Fix bad palette entries when built without USE_RGB_COLOR
This is only a problem for the Windows games that need some
palette entries to be ignored.
2017-07-06 19:12:40 -05:00
Colin Snover
3f0e061eaa SCI32: Refactor DuckPlayer to use common video playback code
This lets DuckPlayer support configurable black-lined video and
configurable high-quality scaling.
2017-07-06 19:12:39 -05:00
Colin Snover
f15f9e3b7c SCI32: Refactor Video32 code to reduce code & feature duplication 2017-07-06 19:12:39 -05:00
Colin Snover
71256a0d3c SCI32: Improve playback quality of SEQ videos 2017-07-06 19:12:39 -05:00
Colin Snover
7057f232d7 SCI32: Improve kPlayVMD rendering
1. Added a new game option for linear interpolation when scaling
   overlay-mode video in ScummVM builds with USE_RGB_COLOR;
2. Implemented SCI2.1-variant of the VMD player renderer (fixes
   Trac#9857), which bypasses the engine's normal rendering
   pipeline;
3. Improved accuracy of the SCI3-variant of the VMD player by
   writing HunkPalettes into the VMD's CelObjMem instead of
   submitting palettes directly to GfxPalette32.
2017-07-06 19:12:38 -05:00
Colin Snover
8cb35442c0 SCI32: Improve kShowMovieWin (AVI) rendering
1. Added a new game option for linear interpolation when scaling
   video in ScummVM builds with USE_RGB_COLOR;
2. 8bpp videos that put black in a palette index other than 0
   (KQ7) should now always render correctly without the earlier
   game-specific workarounds which did not work very well;
3. Data from game scripts regarding video size and position are
   now ignored, since games always just try to show videos in the
   middle of the screen, but frequently get this a little bit
   wrong, causing either bad aspect ratios or off-center videos;
4. Builds without USE_RGB_COLOR support will not crash when
   attempting to play >8bpp AVIs, like those from KQ7 2.00b.

Fixes Trac#9843, Trac#9762.
2017-07-06 19:12:38 -05:00
Colin Snover
e9bef89646 SCI32: Remove useless call
The show list is already cleared by showBits so it does not need to
be cleared a second time.
2017-07-06 19:12:38 -05:00
Colin Snover
2d6fe2b8cd SCI32: Work around bogus palette entries in select Windows games 2017-07-06 19:12:37 -05:00
Colin Snover
c6f5840196 SCI32: Remove magic numbers in HunkPalette 2017-07-06 19:12:37 -05:00
Colin Snover
f7fcce24e1 SCI32: Remove unused method declaration 2017-07-06 19:12:37 -05:00
Colin Snover
35346bc71b SCI32: Update mouse position for rendering in all frameOuts 2017-07-06 19:12:37 -05:00
Colin Snover
1466fb247e SCI32: Add workaround for SQ6 2017-07-06 19:12:36 -05:00
Colin Snover
1fbee2f51e SCI32: Allow skipping SEQ animations
In SSCI, SEQ animations cannot be skipped.
2017-07-06 19:12:36 -05:00
Colin Snover
9f910535c9 SCI32: Centralise OSystem screen updates 2017-07-06 19:12:35 -05:00
Colin Snover
f40ea8c2e7 SCI32: Stop setting unused palette timestamp property 2017-07-06 19:12:35 -05:00
Colin Snover
a689fee663 SCI32: Speed up & deduplicate palette submission code 2017-07-06 19:12:35 -05:00
Martin Kiewitz
4fd313a496 SCI: Fix typo in pq3 script patch 2017-07-01 11:41:15 +02:00
Martin Kiewitz
a978e2a1fd SCI: Add script patch for pq3, points for giving locket (bug #9862)
This script patch will fix not getting 10 points for giving
the locket to Marie.
2017-07-01 11:38:04 +02:00
Colin Snover
1ca905e860 SCI32: Replace Torin dragon's cave patch with a better patch
The previous script patch for this bug was much simpler and
targeted the bad code that hangs, instead of the bad code that
caused the unexpected flag setting, but this caused glitches in
the dragon's cave that couldn't really be fixed since different
animations relied on some common code for positioning Boogle. So,
now, this more complicated patch fixes the fast-forward code in
the seraglio to set Boogle's in-the-bag flag, which is what the
dragon's cave needs in order to not hang when worming Boogle.

Also, because this patch now targets the code that caused the bad
flag state, instead of the code that hangs on the bad state, any
save game in the dragon's cave with the bag flag setting will need
to be fixed by exiting and re-entering the dragon's cave.

Refs Trac#9836.
2017-06-24 16:54:31 -05:00
Colin Snover
fb4b144469 SCI32: Fix Boogle warp glitch caused by previous game patch
Refs Trac#9836.
2017-06-24 11:54:24 -05:00
Colin Snover
c4ca324533 SCI32: Add patch for game script bug in Torin dragon's cave
Fixes Trac#9836.
2017-06-23 22:43:22 -05:00
Colin Snover
a3824d0f39 SCI32: Create Torin-specific save game count limitation remover
Fixes Trac#9840.
2017-06-19 20:45:43 -05:00
Colin Snover
dcc4a1bc67 SCI32: Add workaround for invalid kFrameOut call in PQ4
Fixes Trac#9848.
2017-06-19 19:56:48 -05:00
Colin Snover
71e2f9d6fb SCI32: Add workaround for uninitialised read in PQ4
Fixes Trac#9847.
2017-06-19 19:56:48 -05:00
Colin Snover
5d04679124 SCI32: Add workaround for invalid kPalVarySetStart call in PQ4
Fixes Trac#9845.
2017-06-19 19:56:48 -05:00
Colin Snover
02a7f331b1 SCI32: Remove Windows platform from GK1 German
This entry was added by a batch change operation in
f7a72c897a9657320ccd6a32873b364f77412e98, but the German version
of GK1 does not support Windows.
2017-06-18 21:42:59 -05:00
Colin Snover
f3c452c31e SCI32: Forward OLDDPCM8 parameter instead of using an if-else
Thanks @OmerMor for pointing out this improvement.
2017-06-18 21:42:59 -05:00
Colin Snover
87895b97f7 SCI: Fix looping of sounds that are not initialized yet
This fixes at least the character selection screen in QFG4CD,
where the sound for the torches is supposed to loop, but wasn't
because kDoSoundSetLoop would bail out before setting the loop
property on the soundObj.
2017-06-18 21:42:58 -05:00
Colin Snover
d556dcc57b SCI: Switch SCI2 games to use Audio32
Upon investigation of Sound code across SCI32 games, it was
determined that there are actually (at least) 3 different
revisions, not just a single SCI2.1 version. This patch only
changes the parts of Sound code that are relevant to the correct
use of Audio32.

Fixes Trac#9736, Trac#9756, Trac#9767, Trac#9791.
2017-06-18 21:42:58 -05:00
Colin Snover
733eaeb499 SCI32: Minor tweaks to improve code clarity & consistency 2017-06-18 21:42:58 -05:00
Colin Snover
dc9522eae0 SCI32: Fix Audio32 mix volumes
The previous code for attenuating audio channels was not accurate,
so samples were quieter than they were supposed to be when mixed
together. Robots were also being mixed without attenuation, which
was incorrect.
2017-06-18 21:41:48 -05:00
Colin Snover
832cd25ef1 SCI32: Avoid out-of-bounds read of pixel data in kIsOnMe
Fixes Trac#9761, Trac#9844, Trac#9850, Trac#9851.
2017-06-17 14:35:42 -05:00
Colin Snover
12afcaec49 SCI32: Support old-format 8-bit DPCM coding for SCI2 2017-06-17 13:09:27 -05:00
Colin Snover
e69507cc28 SCI32: Implement engine-accurate DPCM overflow behaviour
DPCM decompression algorithms in SSCI operate directly on 8- and
16-bit registers, so any sample that ends up being out-of-range
during decompression gets wrapped by the CPU, not clipped.

This does not fix any known problem with AUD files, but there are
some VMDs (e.g. GK2 5280.VMD) which are known to contain OOR
samples. Making this code more accurate should prevent trouble
with any other similar files.
2017-06-17 13:09:27 -05:00
Colin Snover
7334f33a3d SCI: State SCI version in error if kernel subop detection fails 2017-06-17 13:09:27 -05:00
Bastien Bouclet
1e64ef48e0 SCI32: Add detection for PQ4, French CD version 2017-06-13 06:06:39 +02:00
Colin Snover
63ad8fbbed SCI: Tidy Script errors & ensure script number exists in all of them 2017-06-10 20:34:55 -05:00
Colin Snover
d6ff67e3c4 SCI32: Fix detection and loading of localized resources in Torin
Italian still needs to be fixed, but nobody seems to have access
to this version at the moment.

Fixes Trac#9772.
2017-06-10 20:32:22 -05:00
Willem Jan Palenstijn
c7d631cb66 SCI: Expand kernel breakpoint pattern matching for negative matches
See matchKernelBreakpointPattern() for samples. The main envisioned use is

DoSound*,!DoSoundUpdateCues

to match all DoSound sub-functions except DoSoundUpdateCues.
2017-06-10 21:32:35 +02:00
Willem Jan Palenstijn
e7b6a257b9 SCI: Change 'none' breakpoint action to 'ignore' for consistency 2017-06-10 21:32:35 +02:00
Willem Jan Palenstijn
4102a77964 SCI: Clean up breakpoint code (indentation, consistency) 2017-06-10 21:32:35 +02:00
Willem Jan Palenstijn
e2e3f7c4c5 SCI: Move bpk/logkernel to main breakpoint infrastructure
This changes the syntax for bpk and logkernel:

Enable breakpoint on kernel call:

bpk FrameOut

Enable logging for kernel call:

bpk FrameOut log
For backward compatibility this has an alias: logkernel FrameOut

Removing a kernel call breakpoint is done with bp_del/bc now.
2017-06-10 21:32:35 +02:00
Willem Jan Palenstijn
0f0ecff0b8 SCI: Print breakpoint info on creation 2017-06-10 21:32:35 +02:00
Willem Jan Palenstijn
4d34d586a6 SCI: Allow setting bp action directly on creation 2017-06-10 21:32:35 +02:00
Willem Jan Palenstijn
b3866aa3d5 SCI: Allow multiple breakpoints with same trigger but different action 2017-06-10 21:32:35 +02:00
Willem Jan Palenstijn
be84cfdb59 SCI: Add inspect, none breakpoint actions 2017-06-10 21:32:35 +02:00
Willem Jan Palenstijn
423ecde8e0 SCI: Move printObject from console to scriptdebug 2017-06-10 21:32:35 +02:00
Willem Jan Palenstijn
8e683db72b SCI: Add break/log/backtrace actions for triggered breakpoints
The action can be set using the new console command bp_action/bpact.
2017-06-10 21:32:35 +02:00
Willem Jan Palenstijn
cb69d10e96 SCI: Add underscores to Breakpoint member variables 2017-06-10 21:32:35 +02:00
Willem Jan Palenstijn
6d143e6da3 SCI: Remove union from Breakpoint 2017-06-10 21:32:35 +02:00