Commit Graph
4076 Commits
Author SHA1 Message Date
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 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 7334f33a3d SCI: State SCI version in error if kernel subop detection fails 2017-06-17 13:09:27 -05:00
Colin Snover 63ad8fbbed SCI: Tidy Script errors & ensure script number exists in all of them 2017-06-10 20:34:55 -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 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 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 b56a49c53e SCI: Move backtrace output to scriptdebug.cpp 2017-06-10 21:32:35 +02:00
Willem Jan Palenstijn e9867356f5 SCI: Handle selector read/write breakpoints from opcodes 2017-06-10 21:32:35 +02:00
Willem Jan Palenstijn 1e5c965a2b SCI: Move scriptdebug declarations to separate header 2017-06-10 21:32:35 +02:00
Willem Jan Palenstijn 3554875c7a SCI: Fix wildcard selector breakpoints
0f9c33e02f in 2011 broke selector
breakpoints of the type "ObjName::", which previously caught all
selector sends of the named object.

Thanks to TMM and snover for noticing.
2017-06-10 21:32:35 +02:00
Colin Snover 62fd5df8b4 SCI32: Fix uninitialized temp read in Torin
Fixes Trac#9810.
2017-06-10 00:21:44 -05:00
Colin Snover 48baf5a4a5 SCI32: Fix uninitialized temp read in LSL6hires
Fixes Trac#9811.
2017-06-10 00:13:58 -05:00
Colin Snover c1021785d6 SCI: Remove some unused #includes 2017-06-09 23:30:11 -05:00
Colin Snover 57d257b36a SCI32: Fix audio sync recursion
Calling to SciEngine::syncSoundSettings from GuestAdditions
recurses back into GuestAdditions, which is obviously not
desirable. Even when it didn't manage to cause infinite recursion
(as in SQ6 demo), it would make the UI behave in broken ways (e.g.
the +/- buttons on the music slider in SQ6 would not work because
the UI would just get updated immediately back to the closest
rounded value).
2017-06-09 23:30:10 -05:00
Colin Snover 85e35943fe 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.
2017-06-09 23:00:14 -05:00
Colin Snover 4311d1b182 SCI: Do not lock Audio36/Sync36 in kLock for SCI1.1
This is not known to fix any problem, but was a noted difference
in the implementation between ScummVM and SSCI.
2017-06-09 22:48:15 -05:00
Colin Snover 095226a614 SCI: Lock Audio resource types when digital SFX is enabled
This seems to have been added in SCI1.1 and continued through
SCI32; older games with digital SFX (like KQ5CD) did not convert
the resource type in kLock.

This is not known to fix any problem, but was a noted difference
in the implementation between ScummVM and SSCI.
2017-06-09 22:48:15 -05:00
Colin Snover f0d00caf93 SCI: Remove unnecessary condition
Argument count validation for kernel calls is performed through the
kernel table signature, so checking here is not necessary.
2017-06-09 22:48:15 -05:00
Colin Snover f48fc02a9b SCI: Fix typo in comment 2017-06-09 22:48:15 -05:00
Colin Snover ddc00e4211 SCI: Remove unhelpful comment 2017-06-09 22:48:14 -05:00
Colin Snover cf98e16d90 SCI: Add serialization for ResourceId 2017-06-09 22:48:14 -05:00
Colin Snover 06e82211ee SCI: Implement Serializable for Object 2017-06-09 22:47:54 -05:00
Colin Snover 03ba3e41f9 SCI32: Return CD speed in kPlatform
This fixes missing playback of some videos in Rama, like the
background video that plays when selecting an email at the
computer at the start of the game.
2017-05-31 22:03:13 -05:00
Martin Kiewitz a8475db05a SCI: SQ4CD: Limit workaround for Russian SQ4 to room 150+900
As proposed by bluegr
2017-05-30 22:11:33 +02:00
Martin Kiewitz 266f68c21b SCI: SQ4CD: Remove room restriction of existing workarounds for end
Fixes bug #9812
2017-05-29 23:44:28 +02:00
Martin Kiewitz 04b5c3a71b SCI32: GK1: Add second beignet timer issue script patch
Should solve bug #9805
2017-05-29 21:21:56 +02:00
Colin Snover ccf5665fac SCI32: Remove dead code 2017-05-27 23:36:11 -05:00
Colin Snover 73fab1e135 SCI32: Remove invalid interaction cursor spinloop in KQ7 2017-05-27 21:57:06 -05:00
Filippos Karapetis a8b3b67d29 SCI32: Update some old comments related to virtual files 2017-05-27 14:33:24 +03:00
Hein-Pieter van Braam 04fb40be2d SCI32: Fix kArrayFill
The ScummVM implementation of class SciArray::fill() has a bug where it
will overwrite the array[index] with the value count times, rather than
fill the array starting from index count times.

This patch fixes that behavior. This was noticed because the LSL7 dice
game was broken, it was impossible to lose. After this patch the dice
game works as expected.

Closes gh-953.
2017-05-26 12:21:43 -05:00
Colin Snover d0040dc8ef SCI32: Fix SCI3 object names > 0xFFFF 2017-05-25 19:25:50 -05:00
Martin Kiewitz ad1cc613ef SCI32: Fix typo in script patch name 2017-05-24 18:49:55 +02:00
Martin Kiewitz 26fe96d637 SCI32: Add script patch for lsl7 cheese maker priority bug
This issue also happens when using the original interpreter.
2017-05-24 18:45:16 +02:00
Martin Kiewitz 97d4a9eff1 SCI32: Add script patch for cheese maker issue
Room 540, was game breaking, but effectively a script
bug, that just happened to work in SSCI.
2017-05-24 15:37:18 +02:00
Colin Snover fdb87619c6 SCI32: Fix selector search for SCI2/2.1 games with missing vocab.997
Fixes Trac#9796.
2017-05-23 22:41:56 -05:00
Colin Snover 63a87ac1f7 SCI32: Fix return value of kWebConnect
On macOS, the return code from OSystem::openUrl was the opposite
of what it was supposed to be; it is now fixed, so this caller
needs to be fixed too.
2017-05-21 19:37:42 -05:00