Commit Graph
4076 Commits
Author SHA1 Message Date
Filippos Karapetis 16a7bcb0c3 SCI32: Implement kBitmapSetDisplace 2016-03-15 11:29:24 +02:00
Colin Snover 3a067f3b79 SCI32: Implement kBitmapDrawColor 2016-03-14 19:49:33 -05:00
Colin Snover 3f2469c33e SCI32: Implement kCelInfo 2016-03-13 23:38:26 -05:00
Colin Snover 30cb8f5c4f SCI32: Correct some kernel call signatures 2016-03-13 12:45:59 -05:00
Colin Snover 362b46259f SCI32: Implement kCelHigh and kCelWide SCI32 versions
The SCI16 versions do not implement the scaling algorithm used
by SCI32 so would be off by one in some cases.
2016-03-13 12:40:16 -05:00
Colin Snover 287391d1d5 SCI32: Fix incorrect mouse event coordinates in SCI2 hires 2016-03-11 19:05:13 -06:00
Filippos Karapetis 3a770fa0d8 SCI32: Initial implementation of kRemapColors
applyRemap() is still not finished, so nothing is actually visible yet
2016-03-11 05:10:32 +02:00
Colin Snover 7105fb23a8 SCI32: Use correct name of kCantBeHere kernel function
Only updating SCI32 names here due to not knowing about the
correctness of the SCI16 code.
2016-03-10 18:31:10 -06:00
Colin Snover 41b3d9ff46 SCI32: Use separate function for SCI32 version of kCantBeHere
Requested by @m-kiewitz.
2016-03-10 18:28:53 -06:00
Colin Snover 8dea740086 SCI32: Implement kMovePlaneItems 2016-03-10 18:28:53 -06:00
Colin Snover 0bb4c32c50 SCI32: Minor cleanup of kernel calls 2016-03-10 14:16:56 -06:00
Colin Snover 4a16ebc970 SCI32: Implement kSetNowSeen 2016-03-10 14:16:56 -06:00
Colin Snover eac416f480 SCI32: Implement kCantBeHere 2016-03-10 10:38:07 -06:00
Johannes Schickel c0163de084 SCI: Fix build with SCI32 disabled.
Regression from d486921820.
2016-03-08 20:20:36 +01:00
Filippos Karapetis f450ca0ebf SCI: Split color remapping functionality into a separate class
Currently, only the SCI16 remapping functionality is implemented
(used in the QFG4 demo)
2016-03-08 20:36:03 +02:00
Filippos Karapetis 8f6bbe79ab SCI: Update the game ID of a workaround that's only used in QFG4 demo 2016-03-08 20:36:03 +02:00
Filippos Karapetis aa69563f8a SCI32: Disable kRemapColors32, as SCI32 remapping is still incomplete 2016-03-08 20:36:02 +02:00
Filippos Karapetis 6958aa9890 SCI: Separate the demos of QFG4, PQ4 and GK1 from their full versions
The demo versions of these games were using a very different engine -
SCI1.1 vs SCI2/SCI2.1. Thus, we split them into different game IDs,
to avoid mixing specific game checks for them, as well as specific
game workarounds, which are different for the demos than the full
versions. Also, the demos should be working when SCI32 is disabled.
For these games, we don't use ADGF_DEMO, to avoid game IDs like
foodemo-demo
2016-03-08 20:36:02 +02:00
Colin Snover a2e9cc4965 SCI32: Clean up kIsOnMe and fix rounding bug
The implementation was not correctly rounding the scaled position
with mulru, leading to occasionally incorrect hit detection at
the boundaries of boxes.
2016-03-08 10:29:05 -06:00
Colin Snover b9fa04c201 SCI32: Implement kBitmapDrawText 2016-03-07 20:51:06 -06:00
Colin Snover 73eea88939 SCI32: Move in-memory bitmap read/write into its own class 2016-03-07 20:51:06 -06:00
Martin Kiewitz 343f1c7f8b SCI: Script patch for ending glitch in multilingual kq5
Game hangs during the magic battle during the ending.
Happened in all multilingual versions because of a script bug
(scripts were waiting for a signal, music didn't set one)
Fixes French, German and Spanish versions of KQ5
Also happened, when using the original interpreter
2016-03-08 01:29:46 +01:00
Colin Snover d486921820 SCI32: Add reg_t comparisons for graphics sorting 2016-03-07 16:46:25 -06:00
Colin Snover 1337cd3dec SCI32: Implement kEditText 2016-03-06 21:34:43 -06:00
Martin Kiewitz 4ebca03534 SCI: Make cursor workaround work properly on OpenPandora
Other platforms, that support analog stick + touch screen at the
same time, are possibly also affected.

Cursor workarounds exist for qfg1vga, qfg3, lsl5 and Island of
Dr. Brain. Those sometimes worked and sometimes didn't on
at least OpenPandora and should be fixed now.
2016-03-05 21:28:09 +01:00
Colin Snover 445980f010 SCI32: Fix misidentification of createFontBitmap(CelInfo &) 2016-03-03 21:29:53 -06:00
Colin Snover 9a280d3965 SCI32: Add all kBitmap signatures
Not all SCI2.1late/SCI3 function signatures are fully known yet,
but all subops are now represented in the kernel tables.
2016-03-03 20:31:10 -06:00
Colin Snover b6a7d8c6a5 SCI32: Minor consistency improvement to FrameOut 2016-03-02 14:02:49 -06:00
Filippos Karapetis 5125652be2 SCI32: Add a workaround for kPalVarySetPercent in GK1 (chapter change) 2016-03-02 21:43:27 +02:00
Martin Kiewitz 8588592947 SCI32: Don't do a syncWithScripts on restore from launcher
Causes issues in at least gk1 (option + inventory plane are shown)
Game::restore is not called, when doing restores from launcher,
so in the original interpreter this script code wasn't called
either.

Fixes option + inventory planes etc. being shown right after
restoring via launcher, when original save/load dialogs were
disabled.
2016-03-02 19:34:40 +01:00
Willem Jan Palenstijn 0012390f2a SCI32: Fix index/offset mixup in updateInfoFlagViewVisible 2016-03-01 20:18:29 +01:00
Willem Jan Palenstijn d03ab8b716 SCI32: Revert GK1 hacks
Replacing a valid signature error by a warning isn't useful.
2016-03-01 11:32:02 +01:00
Filippos Karapetis 03754d4127 SCI32: Warn when the unhandled parameter is set in kPalVarySetPercent 2016-03-01 04:21:09 +02:00
Filippos Karapetis 6ba31a88f0 SCI32: GK1 adds another optional parameter to kPalVarySetPercent 2016-03-01 04:12:36 +02:00
Filippos Karapetis e317958d4c SCI: Remove superfluous cast to boolean and fix code styling 2016-03-01 01:23:55 +02:00
Filippos Karapetis cdbd7c8add SCI: Use uint32 instead of unsigned int 2016-03-01 01:12:58 +02:00
Lars Skovlund a375cbf42b SCI3: Collect bits for managing kInfoFlagViewVisible 2016-02-29 16:00:13 +01:00
Colin Snover 3e5adc33a8 SCI32: Non-titled text bitmap implementation
This implementation is not 100% engine accurate, but it is
more accurate than what was there, and hopefully the differences
between this and the engine code are merely cosmetic.

The known (intentional) differences are:

1. Uses ScummVM rects inside the engine code, converting to/from
   SCI rects on the kernel edges and when scaling
2. Fewer side effects when performing operations that *should*
   have been pure from the start (like text dimension calculation).
   Still not side-effect-free, but at least things like colours
   and alignment do not need to be reset every time a measurement
   is taken, unlike in the actual engine.

Editor controls and some other kBitmap code are temporarily
disabled as a result of changes to GfxText32 until they can be
updated to be engine-accurate.
2016-02-28 21:48:56 -06:00
Willem Jan Palenstijn 77bb83cdfd SCI32: Update InfoFlagViewVisible from send_selector 2016-02-27 14:21:23 +01:00
Willem Jan Palenstijn d803847ca1 SCI32: Update InfoFlagViewVisible in VM opcodes 2016-02-27 14:21:14 +01:00
Martin Kiewitz 94a03b6a45 SCI: Make Freddy Pharkas intro scaling patch more generic
So that hopefully the signature will match for all versions
2016-02-26 00:08:02 +01:00
Martin Kiewitz 8da595366b SCI: Add script patch for Freddy Pharkas intro scaling
Fixes game title views not shown while they are scaled in.
2016-02-25 23:51:08 +01:00
Martin Kiewitz 3cf34d6417 SCI: Add script patch for qfg3 combat speed problem
Fixes bug #6247
2016-02-24 21:36:50 +01:00
Martin Kiewitz f3c2d7629d SCI: Fix FM-Towns audio language selection
This first of all combines both detection entries and makes it
possible so that the user can directly choose English or Japanese
without having to add the game twice.
But it also fixes the in-game option to switch between English
and Japanese. Prior to this commit it was only possible to for
example switch from Japanese to English once, but it was not
possible to switch back without quitting the game and starting it
again.
2016-02-24 00:51:50 +01:00
Martin Kiewitz 82165bb6f6 SCI: Improve kAnimate fastcast detection, Remove EQ1 hack
- Add "kAnimate fast cast state" to "version" debug command
- Make it possible for script patcher signatures to get fully
used outside of the regular script patcher
- Remove previous fastcast detections and replace them with
a signature heuristic
- Remove object name checking, when fastcast global is set
- Heuristic detects "fast cast" support incorrectly for multilingual
KQ5, but it seems the game never sets the global, so it won't
matter. KQ5 CD (also SCI1 late) has fastcast support.
- Remove hack in GfxView::draw
- Add lots of comments to ScriptPatcher class

This fixes EcoQuest 1 Floppy showing the anemone on top of the
message box (see bug #5170)
2016-02-23 20:17:18 +01:00
Martin Kiewitz 480035d6aa SCI32: Do not clear screen when restoring for SCI32
Fixes graphical issues, when restoring saved games.
SCI32 did not clear the screen and also did not even redraw the
screen on restore. It only redraws elements that have changed.
Behavior verified using TSR in DOSBox (see comments).
Also added comment about clearing the screen for SCI16.
2016-02-22 21:38:01 +01:00
Martin Kiewitz 2c247a03e9 SCI: Add hack for Pepper's Adventure in Time CDAUDIO issue
Game checks for file CDAUDIO. Currently the kFileIO(Exists)
code is working pretty slowly on at least Windows. Needs to get
fixed properly by enhancing SaveFileManager().
This is primarily for branch 1.8.0.
2016-02-22 14:24:37 +01:00
Lars Skovlund f7025c4cab SCI: Make Pharkas CD opcodes return explicit values. Document. 2016-02-22 01:04:56 +01:00
Lars Skovlund 11d6da4ef6 SCI32: Document purpose of 993.voc 2016-02-22 01:04:18 +01:00
Martin Kiewitz 1ac8533b1f SCI32: Fix save patching for ScummVM dialog
- Patch game super object for saving instead of game object
- Remove re-adding planes+screen items, game::replay does that
We would only have to do that for soft-failing on restore
- Change debug levels of kNumLoops/kNumCels to 9
- Add special comment about -info- selector in syncWithScripts()

This should now make ScummVM menu saving work properly at
least in SQ6.
2016-02-21 20:33:17 +01:00