Commit graph

216 commits

Author SHA1 Message Date
Colin Snover
c6cf7215f0 SCI32: Fix kStringFormat signatures 2017-04-22 19:25:20 -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
ec12c5a342 SCI: Move ScummVM save/restore to GuestAdditions and reimplement for SCI32 2017-04-22 13:01:16 -05:00
Colin Snover
6b0cd955fa SCI32: Fix crash when using brightness slider in Shivers 2017-03-30 19:46:27 -05:00
Colin Snover
3b34f17fb3 SCI32: Add kWebConnect and kWinExec
Used by Phant2.
2017-03-30 19:46:27 -05:00
Colin Snover
766d46153a SCI32: Implement known-used portions of kPlayDuck 2017-03-30 19:46:27 -05:00
Martin Kiewitz
26b6d450df SCI: Clean up kRandom + allow 0 parameters via signatures
Also added in depth comments about the currently known variations
Returning the RNG seed is now implemented (although it seems no
games actually use this functionality, it seems to be just script
bugs).
Also remove Torin kRandom workarounds.
2017-02-26 00:24:57 +01:00
Colin Snover
f66c033d52 SCI32: Add workaround for Hoyle5 2017-01-16 12:16:13 -06:00
Colin Snover
d495267829 SCI32: Fix loading save games in KQ7 1.51 2017-01-16 12:16:12 -06:00
Colin Snover
0744dc4109 SCI32: Fix spinloop in Hoyle5
Hoyle5 will spin on kGetTime between 15 and 300 ticks in multiple
game scripts in order to delay execution (for example, after
choosing opponents and clicking "okay"). This causes ScummVM to
be unresponsive and wastes CPU time.

This commit patches the spin subroutines to instead call a kernel
function (kWait) that waits without a spin loop. This kernel
function was removed in SCI2, and has been added back in ScummVM
specifically for Hoyle5, so this patch will not work with the
original interpreter.
2017-01-16 12:16:12 -06:00
Colin Snover
54e94c572a SCI32: Add workarounds, transitions, fixes for PQ4CD 2017-01-12 13:14:03 -06:00
Colin Snover
8cce4f1b8c SCI32: Ignore attempts to free null array reg_ts 2017-01-09 19:34:54 -06:00
Colin Snover
bd9bc7ce87 SCI32: Clean up comment on kSetHotRectangles
Since this feature is now implemented, it is not necessary to
describe its intended functionality here.
2017-01-09 19:34:54 -06:00
Colin Snover
01e6d07360 SCI32: Split kCelInfo into subops
Different subops have different call signature requirements.
2017-01-09 19:34:54 -06:00
Colin Snover
97a47852c1 SCI32: Fix kSetShowStyle signature for SCI3 2017-01-09 19:34:54 -06:00
Colin Snover
02598b4473 SCI32: Add workarounds for Hoyle5 Crazy Eights 2016-12-11 20:09:48 -06:00
Colin Snover
5b5aaee57b SCI32: Implement List sort
Used by Hoyle5.

Also includes a tiny amount of cleanup in kAddAfter for
consistency with kAddBefore.
2016-12-11 20:09:48 -06:00
Colin Snover
6de396d787 SCI32: Add workaround for Hoyle5 startup call to kPlatform
Fixes Trac#9665.
2016-12-11 12:31:45 -06:00
Colin Snover
2eea7dc961 SCI32: Implement kPlayVMDIgnorePalettes
Used in Shivers room 35170 when pressing the play button.
2016-11-04 20:45:45 -05:00
Colin Snover
65d0c659ef SCI32: Fix crash clicking quit button during LSL6hires credits 2016-10-15 20:57:48 -05:00
Colin Snover
f35fafa525 SCI32: Fix kPalVary(SetVary) in SCI2.1early games
Game scripts pass an extra argument which is never used in SSCI.
This happens e.g. when warping from room 620 to room 860 in
LSL6hires.

Adding a signature for kPalVarySetVary for SCI2.1early games only
does not work because KQ7 1.51 is detected as SCI2.1early but the
interpreter includes kPalVary code that matches SCI2.1mid.

Fixes Trac#9611.
2016-10-15 18:00:37 -05:00
Colin Snover
40444b0aeb SCI32: Clarify some identifiers
transparentColor -> skipColor
displace -> origin
scaledWidth -> xResolution
scaledHeight -> yResolution
2016-10-09 11:21:46 -05:00
Colin Snover
fb129116cd SCI32: Stub kGraph
This kernel call exists only in SCI2 and is a null subroutine. It
is called at the beginning of GK1.
2016-10-01 15:26:34 -05:00
Colin Snover
d527e75f32 SCI32: Fix signature of kString(ArraySetElements) to allow 0 args 2016-10-01 14:07:26 -05:00
Colin Snover
bde7090708 SCI32: Fix kArray signature 2016-09-29 19:39:16 -05:00
Colin Snover
9d2397e1e9 SCI32: Implement kBitmapCreateFromView and kBitmapGetInfo
Used by Torin room 40300 to perform pathfinding by bitmap.
2016-09-29 19:39:16 -05:00
Colin Snover
3e75f42d85 SCI: Rename "until" to "thru" in kernel call signatures
Kernel calls with these signatures are inclusive of the engine
version given in the name; this change makes it clearer that
this is the case.
2016-09-29 19:39:16 -05:00
Colin Snover
7bae02e558 SCI32: Put brackets around rest parameters
The kernel signature * means "one or more", not "zero or more" as
might be expected from the otherwise regex-like syntax.
2016-09-29 19:39:16 -05:00
Colin Snover
1eb6d90eec SCI32: Implement ScummVM save/load 2016-09-29 19:39:16 -05:00
Colin Snover
10f450917c SCI32: Implement kSave for standard-save SCI32 games
Games with custom save code (KQ7, MGDX, PQ:SWAT, Shivers) are not
fully supported yet.
2016-09-29 19:39:16 -05:00
Colin Snover
a22bfb0db2 SCI32: Fix "new game" and auto-save functionality 2016-09-29 19:39:16 -05:00
Colin Snover
64dc37cfe2 SCI32: Start implementing kSave for SCI32 2016-09-29 19:39:16 -05:00
Colin Snover
c7dacf273e SCI32: Clean up and fix some SCI32-only kFileIO operations 2016-09-29 19:39:16 -05:00
Colin Snover
02540b8d38 SCI32: Add support for kPrintDebug 2016-09-29 19:39:16 -05:00
Colin Snover
44dd029cb1 SCI32: Implement kSetHotRectangles
Used only by chapter 7 of Phant1.
2016-09-29 19:39:16 -05:00
Colin Snover
2be2629a3b SCI32: Fix kFileIOOpen signature
The mode argument is required in SCI32 too; Torin just had a script
bug.
2016-09-29 19:39:16 -05:00
Colin Snover
3f91726765 SCI32: Rewrite kArray & kString
This change invalidates earlier SCI32 save games, which separated
arrays and strings in an incompatible manner. Old save games
contain invalid references to a string segment which no longer
exists, and contain incompatible array structures that lack
critical type information.
2016-09-29 19:39:16 -05:00
Colin Snover
b784357f5d SCI: Fix whitespace 2016-09-29 19:39:16 -05:00
Colin Snover
c3335657f7 SCI32: Allow invalid bitmap references to be passed to kBitmapDestroy
SSCI explicitly ignored invalid references passed to this function.

Fixes GK1 room 410, when using the Rada Drum book on the drummer.
2016-08-27 12:03:37 -05:00
Filippos Karapetis
ed461fba65 SCI32: Add a workaround when starting a new game in Phantasmagoria
This workaround is needed when starting a new game from a chapter after
the first one
2016-08-25 21:56:23 +03:00
Filippos Karapetis
25515c690e SCI32: Fix the signature of kDoAudioCritical, and add documentation
This is used in Phantasmagoria, chapter 3, nursery (room 14200),
during the "ghost lullaby" event. It is used to make the lullaby
sound exclusive, but it really doesn't make any major difference.

Also, the documentation has been adjusted to contain this
information. Finally, the documentation has been adjusted to use
80 columns
2016-08-25 17:02:21 +03:00
Filippos Karapetis
380902eb07 SCI32: Add workarounds for a bug in Torin, in an animation of Lycentia 2016-08-24 11:57:08 +03:00
Filippos Karapetis
ba8d6f6c03 SCI32: Move the SCI32 Mac cursor handling code into GfxCursor32
This was left in the SCI16 code in commit 80d9182554
2016-08-22 19:56:06 +03:00
Filippos Karapetis
88cffa3220 SCI32: Add stubs for the kPlayVMDSetPreload and kPaletteSetGamma calls
These were introduced in SCI3, and are used by RAMA. We don't preload
videos, so we don't really need kPlayVMDSetPreload, but
kPaletteSetGamma may need an implementation.

With these two stubs, the main menu of RAMA is working again
2016-08-22 19:04:26 +03:00
Filippos Karapetis
6b5e87683c SCI32: Reorder the SCI32 palette kernel call assignments 2016-08-22 18:52:20 +03:00
Colin Snover
dc093742b3 SCI32: Bug fixes to PQ:SWAT script bugs and kList calls 2016-08-19 15:23:10 -05:00
Colin Snover
0a4a2567a3 SCI32: Partially implement kCD 2016-08-19 15:23:10 -05:00
Colin Snover
e55b774584 SCI32: Add kPlayVMDGetStatus kernel call
Used by Lighthouse.
2016-08-19 15:23:10 -05:00
Colin Snover
eae6891404 SCI32: Fix kGlobalToLocal and kLocalToGlobal
Fixes (at least) the native SCI save dialogs.
2016-08-19 15:23:10 -05:00