Commit Graph
4076 Commits
Author SHA1 Message Date
Martin Kiewitz 3e4efdbd27 SCI32: Implement syncing planes+screen items from VM for restore
Fixes restoring saved games, when ScummVM dialogs are patched in
Removing clearing planes+screen items as well, because the scripts
actually did that, but did not clear everything.
Fixes "Invalid screen item" message when entering options menu,
after restoring in SQ6.
2016-02-21 17:21:48 +01:00
Martin Kiewitz 7b9c15634f SCI32: Use debugC instead of debugCN for debug output 2016-02-21 14:20:11 +01:00
Martin Kiewitz edd1efb049 SCI32: Add debug output to Add/Update/DeleteScreenItem+Planes
debugflag Graphics
level 6 for Add+Delete
level 7 for Update
2016-02-21 14:14:11 +01:00
Martin Kiewitz 0941dcdb67 SCI32: Add a bit more debug info to errors + screenitems 2016-02-21 13:59:17 +01:00
Martin Kiewitz 51256ab7bb SCI: Add script patch for Laura Bow 1 easter egg
Fixes view-loop for PC version
2016-02-21 13:06:37 +01:00
Martin Kiewitz a1246901ee SCI32: Change kAddLine to use kStubNull b/c signatures 2016-02-20 16:27:59 +01:00
Martin Kiewitz 19283b94a9 SCI32: Some work on kIsOnMe
Plenty of hotspots seem to work now
Not fully done yet
2016-02-20 05:38:22 +01:00
Filippos Karapetis 62ae61dd22 SCI: Silence false positive warnings by MSVC 2016-02-19 02:36:12 +02:00
Colin Snover 766cf6cee7 SCI: Fix too-fast rendering
Now that the renderer is loading resources without spinning CPU time
on decompression every frame, it becomes apparent that kFrameOut is
spammed constantly by the interpreter and needs to be throttled to
ensure that transitions and fades work properly.
2016-02-18 13:18:03 -06:00
Colin Snover 03e3f2c68c SCI: Fix some rect off-by-ones 2016-02-18 13:18:03 -06:00
Colin Snover 2c0e64fdaf SCI: Add short-lived kSetFontRes kernel function
kSetFontRes didn't exist in SCI2, showed up in SCI2.1early,
then was replaced with kFont subop 1 in SCI2.1mid.
2016-02-18 13:18:02 -06:00
Colin Snover 20ccad80bf SCI: WIP GfxText32 code
This at least prevents SQ6 from crashing when going into the
introduction
2016-02-18 13:18:02 -06:00
Colin Snover 3bddd869ab SCI: Build kernel table for ScrollWindow and stub seen functions
Signatures in subops table are correct for length but unknown
types are marked as . instead of the correct type.
2016-02-18 13:18:02 -06:00
Colin Snover b829e48228 SCI: Remove wrong comments in kernel.h and break apart logical sections 2016-02-18 13:18:02 -06:00
Colin Snover 75ccabc325 SCI: Implement accurate renderer architecture for SCI32 2016-02-18 13:18:02 -06:00
Martin Kiewitz 4d5cc05eee SCI: Add script patch kq6 dual mode CD-Audio
Script patch added, so that dual mode uses the same CD-Audio
as regular Speech mode does during the ending (Girl in the Tower)
2016-02-09 14:03:34 +01:00
Martin Kiewitz 1948dce9a5 SCI: Additional info about Mother Goose patches
comments only
2016-02-09 02:22:50 +01:00
Martin Kiewitz ce595cb92d SCI: Script patch for Mixed Up Mother Goose SCI1
+ Mother Goose SCI1.1
Fixes graphic issues when restoring from GMM
Also make the fix ups for Mixed Up Mother Goose, Jones + PQ2
get applied all the time (debugger command not included)
2016-02-09 01:28:34 +01:00
Martin Kiewitz 050ec1ef31 SCI: Make kMemory behavior like original SCI
We added 1 to the size as a workaround, but it's not really a
workaround, because original SCI allocated at least 2 bytes more.
They also made sure the size is even. We now do the same.
2016-02-08 21:12:37 +01:00
Martin Kiewitz 2a883bdd42 SCI: Zero out dynamically allocated memory
Fixes Mixed Up Mother Goose SCI1.1 crash when saving
And could potentially fix all sorts of other issues
Original SCI only zeroed out heap on init.
2016-02-08 20:49:22 +01:00
Martin Kiewitz 077aa0c23f SCI: Script patch for PQ1 stuck in briefing room
Fixes ego getting stuck when briefing is about to start.
Which is bug #5865. Also happened in original interpreter.
Quite a complicated issue, details in patch comments
2016-02-08 18:38:58 +01:00
Martin Kiewitz 806cf00061 SCI: Script patch for SQ4 getting shot while rope
Solves Space Quest 4 "getting shot while getting rope" game bug
Was an original game bug and happened in original SCI as well.
Fixes bug #6076
2016-02-08 14:45:44 +01:00
Filippos Karapetis 88e2673272 SCI: Clean up the op_infoToa and op_superToa SCI3 opcodes 2016-02-05 23:52:18 +02:00
Filippos Karapetis 7ffc4f9816 SCI: Silence false positive warning in MSVC 2016-02-05 23:50:53 +02:00
Martin Kiewitz 04de7279a1 SCI: Blocking ScummVM auto-save slot 0 for saving
Auto-saving is not used by SCI, but slot 0 is ScummVM "standard"
for auto-saving, that's why it's not available for saving anymore.
Jones still uses slot 0 for saving/restoring (because it's
hardcoded and changing it would break it somewhat)
Deleting + restoring is still possible of couse.
2016-02-05 19:43:48 +01:00
Martin Kiewitz c61c89dd35 SCI: QfG1/2/3/4 character file detection changed
No longer checking for .sav file suffix, but instead checking
room number instead. The user is able to change the suffix,
which would have resulted in a compressed character file.
2016-02-05 18:40:14 +01:00
Martin Kiewitz 59d2c4b27e SCI: Do not pass/use .data for mouse button type
Also added comment about .data field. Should be renamed.
2016-02-02 02:10:43 +01:00
Martin Kiewitz c0bdbe1ca8 SCI: Fix control/Fx keys not working anymore
Was effectively caused by commit adding the keyboard driver bug
for SCI0/SCI01, although the bug is actually real and happens.

It seems Sierra did not check the key-modifier in kMenuSelect.
We do and that's why the code didn't recognize all sorts of
menu keys anymore.
We now isolate the lower byte before comparing.

I also noticed, that Sierra passed keyboard modifiers in mouse
events. This was probably done, so that owners of a 1-button
mouse were able to right-click. We do this now too.

Also added information about mouse modifiers in kGetEvent.

Moved the mouse modifier code into getScummVMEvent().

This should fix bug #7009.
2016-02-02 01:56:08 +01:00
Martin Kiewitz 0aa9924df1 SCI: add user option for high resolution graphics
Instead of choosing Windows as platform, users can now also simply
click this option for Gabriel Knight 1 + King's Quest 6
Defaults to high resolution graphics
2016-01-22 02:01:28 +01:00
Colin Snover 5b6b20f421 SCI: Fix SCI32 kPalVary subops 1, 4, 5, 7, 8, 9 using wrong indexes 2016-01-20 16:12:56 -06:00
Filippos Karapetis f2e80ffc7f SCI: Do not map SetScroll twice 2016-01-15 21:34:42 +02:00
Johannes Schickel 71b665b617 SCI: Indent comment properly. 2016-01-15 15:50:38 +01:00
Lars Skovlund 9e672dab60 SCI3: Add comment re new function 2016-01-15 03:14:34 +01:00
Filippos Karapetis 2a4b04f3b2 SCI: Add an initial implementation of kStringTrim
Thanks to lskovlun for his help
2016-01-15 03:25:40 +02:00
Filippos Karapetis a5a531ec9f SCI: Use the actual segment in the segment manager for SCI3 games 2016-01-15 02:48:37 +02:00
Filippos Karapetis fbc9fe03c0 SCI: Allow null references to kStringGetData, for Torin's Passage
Added a TODO for rhis, for now
2016-01-15 02:46:35 +02:00
Colin Snover 76bd2eeb2e SCI: Use tick-based timing more consistently
This means tick-based times are saved to save games, as in SCI32
engine, instead of seconds, which are not accurate enough. It
also means places in SCI engine that need to access game ticks
should do so through g_sci instead of g_system or g_engine.
2016-01-14 16:13:22 -06:00
Colin Snover fb891e4c08 SCI: Implement SCI32 kPalVary and kPalette setFade
This also fixes kPalCycle signatures to be more accurate.
2016-01-14 16:13:22 -06:00
Colin Snover f1cf07eded SCI: Add kPalMorph stub 2016-01-14 16:13:22 -06:00
Colin Snover dc42a86f7e SCI: Fix bad spacing in kernel tables 2016-01-14 16:13:22 -06:00
Filippos Karapetis 0434617018 SCI: Initialize kString properly for SCI2 games
SIG_UNTIL_SCI21MID did not account for SCI2 games. Fixes GK1 DOS
2016-01-08 11:37:13 +02:00
Filippos Karapetis 7379e531c7 Merge pull request #644 from csnover/sci32-kPalCycle
SCI32: palette management (full kPalCycle, partial kSetPalStyleRange and kPalFade)
2016-01-08 10:58:03 +02:00
Colin Snover 275db1f7f2 SCI: Remove unused member property _palCycleToColor 2016-01-07 16:35:09 -06:00
Colin Snover 8a1d48fc03 SCI32: Add kFrameOut stub code 2016-01-07 16:35:09 -06:00
Colin Snover 70d89b3e39 SCI32: Add kSetPalStyleRange stub code 2016-01-07 16:35:09 -06:00
Colin Snover aeee621e44 SCI32: Add initial support for palette cycling (kPalCycle) and fading (kPalFade)
Graphics palette code was rewritten between SCI1 and SCI2, so
SCI32 palette engine code has been moved to a separate GfxPalette32
class.
2016-01-07 16:35:09 -06:00
Martin Kiewitz 7b1df2174d SCI: fix compatibility issue in kFileIO
Allow 0xFFFF as invalid file handle again for kFileIO calls
Fan game "Dating Pool" opens a non-existant file at the start
and tries to read it, even though it shouldn't do the latter.
The sciAudio adjustments changed our behavior to error() out in
such a case. This commit changes it back to our old behavior to
only print out a warning.
2016-01-05 19:44:45 +01:00
Martin Kiewitz 0b5a09f836 SCI32: fix kString calling from within kArray
(didn't work since the introduction of kString signatures and the
kString split-up)
2016-01-04 14:58:02 +01:00
Martin Kiewitz 453afd7bbc SCI: kGetEvent modifiers bug was fixed in SCI1
- SCI1 EGA QfG2 keyboard driver resets AH

In the original commit I forgot to mention:
- thanks to lskovlun for figuring out that bit 9 is checked/set
- thanks to wjp for checking SCI32
2016-01-03 18:32:25 +01:00
Martin Kiewitz f9459656f5 SCI: implement kGetEvent modifiers DOS bug
Will fix darts minigame in the fan game "Betrayed Alliance"
This bug in the original interpreter/keyboard driver seems to have
been fixed in SCI32.
2016-01-03 18:09:06 +01:00