Commit Graph
297 Commits
Author SHA1 Message Date
sluicebox 6abb9c6061 SCI: kScummVMSleep is now available in SCI16 2022-04-08 22:42:04 -04:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
sluicebox 388f3a02ef SCI32: Create kScummVMSleep for script patches
We have several SCI32 script patches that replace kGetTime spin loops
with calls to kWait for the intended delay. This prevents blocking
the main thread and allows ScummVM to be responsive and update the
screen. But kWait isn't a simple sleep, it's a throttling function,
and the duration that it sleeps (if any) is determined by the time
since it was last called. kWait was only in SCI16 interpreters so it
had to be restored to SCI32 and this required a further workaround
for Phant2 compatibility.

Now we have a dedicated custom kernel function, kScummVMSleep, which
does a simple sleep so that SCI32 script patch delays are consistent
and the Phant2 workaround isn't needed. This approach is similar to
kScummVMSaveLoad.
2021-10-19 08:40:33 -05:00
Bartosz Gentkowski 7192ec0bb5 DOXYGEN: Fix the build output and structure
This commit introduces a couple tweaks to the
doxygen build configuration to assure the
overall structure looks correct.
2020-12-02 22:55:41 +00:00
sluicebox d5d7d05d80 SCI32: Use correct kDoSound subops in Mac games 2020-02-07 13:15:43 -08:00
sluicebox 2df444cecb SCI32: Implement kInputText for PHANT2 easter eggs
Implements kInputText, which displays a black and white utility dialog
with a title and a text box in a fixed position using the system font.
The only known game that uses this is Phantasmagoria 2 for several
easter eggs, which now work. This was probably used by internal scripts
during game development.

kEditText and kInputText share a function in Sierra's interpreter for
processing events, so that code has been factored out and placed in
GfxControls32::processEditEvent().

GfxText32 can now measure text pixel height as SSCI did by identifying
the tallest character height in the current text, which the newly added
titled font bitmap code requires.

Fixes bug #10570
2020-01-25 18:11:57 -08:00
sluicebox 649c801839 SCI: Implement kFileIOCopy
Allows patching a Phantasmagoria 1 script to copy instead of rename.
Although most games can call this through their File:copy script, none
have been discovered yet that do.
2019-12-21 18:26:07 -07:00
sluicebox 55dba55056 SCI32: Fix kRobot subop 6 implementation
Fixes Phantasmagoria 1 animations not resuming after closing the
control panel during the chapter 7 chase
2019-12-06 21:02:53 -08:00
sluicebox 05b21ace68 SCI32: Implement VMD Censorship Blobs
Phantasmagoria 1's censorship mode is now supported

Trac #11229
2019-12-04 09:11:21 -08:00
sluicebox 511e5441e3 SCI32: Enable Mac code (remove ENABLE_SCI32_MAC) 2019-10-11 14:18:26 -07:00
Kawa 9aadb27267 SCI: Add some more SCI11+ features
Also gate them behind the presence of a 184.VOC resource instead of GID_CATDATE. This should not matter with regards to the remap effects -- the 2015 and 2016 demos had none, and the first that did has an unknown release status. Only the 2017 demo would fall, which would be easily fixed by dropping in a valid 184.VOC patch file.
2019-06-23 01:46:53 +03:00
Filippos Karapetis d2f5023ee9 SCI: Do not apply script patches when checking for static selectors
Fixes bug #10969
2019-06-08 13:57:34 +03:00
Filippos Karapetis 9551e64bdf SCI: Remove unnecessary two-phase Kernel initialisation
Adapted from csnover's commit 8c96c1fd3e1568b61ee0594522615466f26a7793
2019-05-12 19:05:51 +03:00
Lars Skovlund b94ef3dab0 SCI: Rename kRestartGame to kRestartGame16 2019-01-05 22:25:31 +02:00
Kawa ca2209cb5f SCI: Add support for The Dating Pool (#1403) 2018-12-02 22:56:19 +02:00
Filippos Karapetis 89785ea804 SCI32: Add stub for kWinDLL - used in Hoyle 5 2018-08-21 03:36:06 +03:00
Colin Snover 3b8b4f1722 SCI32: Clean up unused kBitmap code/subops 2017-09-29 19:56:24 -05:00
Colin Snover 743082ac8c SCI32: Disable all SCI32 Mac code
This code is currently untestable and is almost certainly at least
partly based on guesswork & not actual reverse-engineering (as was
the case for all other pre-2015 SCI32 code), so future developers
interested in adding SCI32 Mac support should use it only as an
intermediate reference rather than as known good code.
2017-09-24 22:56:59 -05:00
Colin Snover 21337e4cf6 SCI32: Implement per-channel audio panning
Used by RAMA, in various places, starting with the refrigerator
at base camp after the cable car at the beginning of the game.
2017-09-24 22:56:57 -05:00
Colin Snover 94b39c83b6 SCI32: Remove redundant kStringGetData implementation
This code is identical to the kArrayGetData implementation.
2017-09-08 21:10:51 -05:00
Colin Snover 43a07abb46 SCI32: Implement kCelLink
kCelLink exists in SSCI since 2.1mid, but it is only known to be
used in Lighthouse, during the weapon creation puzzle near the end
of the game.
2017-09-03 20:58:07 -05: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
Colin Snover ccf5665fac SCI32: Remove dead code 2017-05-27 23:36:11 -05:00
Colin Snover 168774c3c6 SCI32: Add kPlayVMD subop 27 (SetPlane)
Used by RAMA, when playing a video at the Hub Camp computer at the
beginning of the game (room 1004).
2017-04-23 13:07:25 -05:00
Colin Snover ede7976ede SCI32: Fix bad kPointSize implementation
Fixes text scaling gone mad in Phant2.
2017-04-22 19:25:20 -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 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
Colin Snover 31daa956d6 SCI: Implement bounds-checked reads of game resources 2017-03-27 19:42:31 -05: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 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 2eea7dc961 SCI32: Implement kPlayVMDIgnorePalettes
Used in Shivers room 35170 when pressing the play button.
2016-11-04 20:45:45 -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 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 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
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
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
Colin Snover 0f2748b15a SCI32: Implement kRobot 2016-08-19 14:08:22 -05:00
Colin Snover 7da359755d SCI32: Split kPlatform for SCI32 2016-08-19 13:57:40 -05:00
Colin Snover 6e2e862d8e SCI32: Implement kShakeScreen for SCI32 2016-08-19 13:57:40 -05:00
Colin Snover ff00e93c67 SCI32: Remove GfxScreen from SCI32 2016-08-19 13:57:40 -05:00
Colin Snover 80d9182554 SCI32: Implement SCI32 cursor support 2016-08-19 13:57:40 -05:00