Commit Graph
1475 Commits
Author SHA1 Message Date
Colin Snover eac416f480 SCI32: Implement kCantBeHere 2016-03-10 10:38:07 -06:00
Johannes Schickel 7be486ae27 SCI: Slight template formatting fixes. 2016-03-08 20:15:22 +01:00
Johannes Schickel 693f8dc295 SCI: Add missing namespace comments in graphics/. 2016-03-08 20:13:05 +01:00
Filippos Karapetis a2c6e647e6 SCI: Spacing 2016-03-08 20:36:04 +02: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
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 729d0182d8 SCI32: Add unnecessary micro-optimisation to palette merging code 2016-03-07 23:48:13 -06:00
Colin Snover 0afb056e2d SCI32: Fix palette color overflow 2016-03-07 23:47:44 -06:00
Colin Snover 82be9326f7 SCI32: Actually use the BitmapFlags enum 2016-03-07 22:57:46 -06:00
Colin Snover 0235a84b90 SCI32: Enable GfxPalette32::cycleAllPause
This is used by the Mr Soylent machines in SQ6 (e.g. room 370).
2016-03-07 22:52:49 -06:00
Colin Snover 73eea88939 SCI32: Move in-memory bitmap read/write into its own class 2016-03-07 20:51:06 -06:00
Colin Snover bd75b26d56 SCI32: Change magnifier warning to error
If anything actually uses this feature, we should know about it
eventually.
2016-03-07 17:27:38 -06:00
Colin Snover 4297305dd5 SCI32: Clean up renderer code a bit more 2016-03-07 16:46:25 -06:00
Colin Snover d486921820 SCI32: Add reg_t comparisons for graphics sorting 2016-03-07 16:46:25 -06:00
Colin Snover 13f2a2c3bd SCI32: Add debugger command to view screen items in the visible plane list 2016-03-07 16:46:25 -06:00
Willem Jan Palenstijn 8be1ff109f SCI32: Fix adding too many items to drawlist 2016-03-07 23:41:06 +01:00
Colin Snover 266a9fdd25 SCI32: Implement variable size frame drawing 2016-03-06 21:34:44 -06:00
Colin Snover 56806161a7 SCI32: Make PlaneList definition order match declaration order 2016-03-06 21:34:44 -06:00
Colin Snover 36800b7017 SCI32: Fix memory leaks 2016-03-06 21:34:43 -06:00
Colin Snover 3e631ca5e3 SCI32: "Improve" comparison algorithm for planes and screen items
This adds a slightly more accurate comparison algorithm that will
at least ensure that all the engine-generated planes and screen
items with matching priorities will be sorted above
script-generated planes and screen items, like in the original
engine. It still does not sort script-generated items by memory
handle order, so if that is ever a thing that actually happens,
those may still be in the wrong order.
2016-03-06 21:34:43 -06:00
Colin Snover e8d6ad1d0b SCI32: Fix missing digits in plane item list debug output 2016-03-06 21:34:43 -06:00
Colin Snover 1337cd3dec SCI32: Implement kEditText 2016-03-06 21:34:43 -06:00
Colin Snover 4ba7f24632 SCI32: Fix incorrect insertion of new planes 2016-03-05 23:13:38 -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
Colin Snover 5e0cff364f SCI32: "Fix" missing fade transitions
The original engine had some members on PlaneShowStyle to
allow wall clock timing but never actually used them in the
processing loop so transitions simply ran as quickly as the
CPU could process them. For the moment, we will just limit
these transitions to ~30fps, which hopefully roughly matches
the speed of the engine on hardware of the era.
2016-03-02 14:02:49 -06:00
Colin Snover 7ee2af4198 SCI32: Fix changed screen items drawing on top of higher screen items 2016-03-02 08:59:17 -06:00
Colin Snover 2e75f4b2b8 SCI32: Add consts and remove redundant conditional
Adding consts to try to isolate rectangles that change during
draw list processing, to be investigated for incorrect mutations
causing lower screen items to be drawn over higher screen items at
their edges.
2016-03-02 00:02:25 -06:00
Colin Snover 97d5e92185 SCI32: Review rect rounding in Plane and ScreenItem
These changes should cause ScummVM to be more accurate in edge
case rounding.
2016-03-02 00:01:13 -06:00
Colin Snover e5b30fb9af SCI32: Fix bad reads of mirrored cels 2016-03-01 21:12:31 -06:00
Colin Snover f397a73138 SCI32: Fix text size calculation scaling to match SCI
The previous code works correctly only for ratios like 2:1 that
do not generate remainders.
2016-03-01 09:39:57 -06:00
Filippos Karapetis 806fa64d74 SCI32: Add a note about the menu bars in GK1 2016-03-01 04:50:26 +02: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 154f592f51 SCI32: Clear InfoFlagViewVisible after updating ScreenItem 2016-02-27 14:21:23 +01:00
Filippos Karapetis 138c19f06f SCI32: Remove two hacks for Torin, and document what happens instead 2016-02-27 15:00:55 +02:00
Filippos Karapetis 5151ad4d9f SCI: Remove another GK1-related hack 2016-02-27 14:40:33 +02:00
Filippos Karapetis 93e99ba30d SCI: Remove a TODO in GK1 that has been resolved properly now 2016-02-27 14:40:13 +02: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
Willem Jan Palenstijn 93af01a58a SCI32: Comment splitRects 2016-02-21 21:12:13 +01:00
Martin Kiewitz 86a8886409 SCI32: Clean up Gfx::FrameoutsyncWithScripts() 2016-02-21 20:56:26 +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
Martin Kiewitz 210a6b10ac SCI32: Add comment about SQ6's option plane 2016-02-21 17:30:25 +01:00
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
Colin Snover 0abd5b5c4e SCI: Use nullptr instead of 0 for null pointer checks 2016-02-21 09:32:34 -06:00
Martin Kiewitz 0941dcdb67 SCI32: Add a bit more debug info to errors + screenitems 2016-02-21 13:59:17 +01:00
Willem Jan Palenstijn 26a5efe6e8 SCI: Fix redrawAll updating visiblePlanes
It was comparing ScreenItem*'s directly, instead of objects.
2016-02-21 12:52:25 +01:00
Willem Jan Palenstijn 3c3b7ec13d SCI: Skip NULL entries in FindByObject
Lists can contain gaps if they're searched before Pack() is called.
2016-02-21 12:51:31 +01:00
Willem Jan Palenstijn 748b7684b2 SCI: Clear visible planes in GfxFrameout::clear() too
This caused planes and visibleplanes to go out of sync when loading.
2016-02-21 01:45:28 +01:00