Colin Snover
4840b889d7
SCI32: Initialise pointers in CelObj scaler
...
This ensures that if there is a bug in the drawing code that causes
the row to be unset, it will not result in silently reading garbage
out of random memory.
CID 1354802
2016-05-27 15:54:14 -05:00
Colin Snover
746c4e7b03
SCI32: Fix CelObj cache
...
The previous implementation did not work properly, assigning the
next insertion index to the oldest object instead of filling empty
cache slots on a cache miss.
2016-05-27 15:54:14 -05:00
Colin Snover
4ee5b0f910
SCI32: Use better name for fixed priority field
...
The old name matches the selector, but isn’t as clear.
2016-05-27 15:54:14 -05:00
Colin Snover
741e26cfd2
SCI32: Remove unused Plane fields
...
These fields were written and never read in SSCI.
2016-05-26 19:06:35 -05:00
Colin Snover
719160d494
SCI32: Fix assertion failures in LSL6 hires caused by bad rects
...
LSL6 hires sends rectangles to kernel calls that have negative
dimensions. SSCI did not care about this and would simply accept
these invalid rects, so we do the same, at least for now.
2016-05-25 19:16:11 -05:00
Colin Snover
c4e8ffc821
SCI32: Update header parameters with const, to match implementation
2016-05-25 19:16:11 -05:00
Eugene Sandulenko
356ac37471
SCI: Removing redundant virtual destructor as per LordHoto's suggestion
2016-05-16 21:48:49 +02:00
Eugene Sandulenko
03344d926f
SCI: Make the Window destructor actually virtual
2016-05-16 17:51:18 +02:00
Eugene Sandulenko
f6d8e0f5ed
SCI: Add virtual destructor
2016-05-16 16:56:57 +02:00
Colin Snover
abee16c563
SCI32: Use correct script dimensions for later SCI32 games
...
These values are hard-coded in the engine executable for each game.
2016-03-18 18:51:01 -05:00
Colin Snover
e25d928a9c
SCI32: Fix crashes in kIsOnMe caused by stale CelObjs
2016-03-18 13:08:37 -05:00
Colin Snover
5917467c1b
SCI32: Fix incorrect double-read from CLUT
2016-03-18 09:14:53 -05:00
Colin Snover
a292123cda
SCI32: Code documentation improvements
2016-03-17 10:43:08 -05:00
Colin Snover
804e132476
SCI32: Remove outdated note about state of frameout code
...
This code is engine-accurate now, not based on guesswork.
2016-03-17 10:43:08 -05:00
Colin Snover
17ec528c9a
SCI32: Temporarily remove dead SCI2.1early transitions code
...
This code sneaked in with the graphics engine rewrite, but is not
ready yet to be used. It will return shortly, once it is enabled
and working.
2016-03-17 10:43:07 -05:00
Colin Snover
35fde1bbcf
SCI32: Update unimplemented TODO to reflect the correct operation type
2016-03-17 10:43:07 -05:00
Colin Snover
7f4149d491
SCI32: Enable redrawAllCount in palMorphFrameOut
2016-03-17 10:43:07 -05:00
Colin Snover
33cac79373
SCI32: Work around bad Styler script in KQ7 2.0b
...
The SCI2.1mid version of the game includes scripts designed for
SCI2.1early which means wrong parameters are sent to the kernel.
2016-03-16 22:00:38 -05:00
Filippos Karapetis
f7ec415582
SCI32: Fix updated screen item count in remapMarkRedraw()
...
Thanks to snover for noticing this
2016-03-16 23:18:02 +02:00
Filippos Karapetis
5a547bd242
SCI32: Implement analyzeForRemap()
2016-03-16 01:51:09 +02:00
Filippos Karapetis
5be798c92f
SCI32: Implement the remapping drawing functions
2016-03-16 01:51:09 +02:00
Filippos Karapetis
1f47766b60
SCI32: Implement analyzeUncompressedForRemap()
2016-03-16 01:51:08 +02:00
Filippos Karapetis
f94ddfe5a6
SCI32: Spacing
2016-03-16 01:51:07 +02:00
Filippos Karapetis
a393a1348a
SCI32: Remove dead code related to priority map handling
...
The priority map is not used at all in SCI32 at the engine level by
design, so all the relevant code that handles picture priority is
pretty much dead
2016-03-16 01:51:07 +02:00
Filippos Karapetis
b50d425387
SCI32: Global 12 contains the previous room
2016-03-16 01:51:06 +02:00
Filippos Karapetis
75527e3df5
SCI32: Remove getColorAtCoordinate()
...
The only calling code for this was removed in commit 3f2469c33e
2016-03-16 01:51:06 +02:00
Colin Snover
bd81da1a6a
SCI32: Initialise all scaler tables
...
Initialising only the first table means that if the first ratios
aren't 1:1 but the *second* ratios are 1:1, the second ratios will
read from an uninitialised table.
2016-03-15 14:30:57 -05:00
Filippos Karapetis
be58e5bc30
SCI32: More work on remapping
...
Still not working
2016-03-15 21:06:46 +02:00
Filippos Karapetis
55390e77b1
SCI: Remove unused _gfxScreen parameter from GfxRemap
2016-03-15 11:28:13 +02:00
Colin Snover
e6842022db
SCI32: Fix scaler drawing pixels at the wrong positions
...
In order for scaling ratios to apply equally across objects that
start at different positions on the screen, the pixels that are
read from the source bitmap must all use the same pattern of
division. In other words, cels must follow the same scaling pattern
as if they were drawn starting at an even multiple of the scaling
ratio, even if they were not.
2016-03-13 22:28:39 -05:00
Colin Snover
bfd7e4e784
Revert "SCI32: Fix small inaccuracy in the scaling drawing code"
...
This reverts commit d85eb8ded6 .
This patch did not correctly fix the scaler to follow the same
rules as SSCI and only worked on the y-axis.
2016-03-13 22:28:39 -05:00
Colin Snover
430d5be5bf
SCI32: Add note about kCantBeHere rect
2016-03-13 13:28:14 -05:00
Colin Snover
80098c8423
SCI32: Remove incorrect note about dword_C6288
...
Any reason why flipping this condition did anything to GK1
rendering was due to other unrelated bugs in the renderer.
2016-03-13 13:20:17 -05:00
Colin Snover
ee8615d6b1
SCI32: Clarify the purpose of scaling ratios used in ScreenItem
2016-03-13 12:45:59 -05:00
Martin Kiewitz
d85eb8ded6
SCI32: Fix small inaccuracy in the scaling drawing code
...
Previously sourcePos was always originating from plain 0, 0
which made some pixels not always getting drawn at the right
spot when uneven scaling was used (for example 5:12).
Seems to fix gabriel knight 1 hires graphic issues
2016-03-13 13:12:36 +01:00
Filippos Karapetis
dd220e7c82
SCI32: Use Common::fill() instead of memset(), where possible
...
Thanks wjp, LordHoto, waltervn
2016-03-11 14:26:05 +02:00
Filippos Karapetis
7cf8ce33cb
SCI32: Assign a define for the non-remapped number of colors
2016-03-11 13:13:51 +02:00
Filippos Karapetis
8f7ab881ee
SCI32: Add remap counters and hook them up to frameOut
2016-03-11 07:54:45 +02:00
Filippos Karapetis
48b53aa4c6
SCI32: Avoid usage of delegated constructors
...
Although this feature reduces code duplication, GCC throws the
following: "warning: delegating constructors only available with
-std=c++11 or -std=gnu++11".
2016-03-11 07:30:15 +02:00
Filippos Karapetis
ea52dc498c
SCI32: More work on remapping
...
applyRemap() has been implemented now, however the end effect is still
not visible
2016-03-11 07:22:01 +02:00
Filippos Karapetis
6b857299a4
SCI32: Handle the different remap color ranges in SCI2 and SCI21
...
This fixes an assertion when starting a new game in SQ6
2016-03-11 06:08:27 +02:00
Filippos Karapetis
5ca8b5ff4c
SCI32: Fix bug in updateRemap()
2016-03-11 05:21:43 +02: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
22097018bb
SCI32: Implement GfxText32::getTextCount
2016-03-10 20:07:36 -06: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
ac403ac746
SCI32: Clean up debug messages in GfxFrameout
...
Error messages now contain the name of the failed function and
plane/screen item information that can be used to look up the
plane/screen item in a debugger, if the games ever crash in a
release in this code, per suggestion by @m-kiewitz.
Commented out messages that were used during the rearchitecture of
the main graphics engine are also removed, since that code is stable
now.
2016-03-10 18:28:53 -06:00
Colin Snover
8dea740086
SCI32: Implement kMovePlaneItems
2016-03-10 18:28:53 -06:00
Colin Snover
695e5db9a7
SCI32: Remove side-effect-abusing calls to ScreenItem::getCelObj
2016-03-10 14:16:56 -06:00
Colin Snover
4a16ebc970
SCI32: Implement kSetNowSeen
2016-03-10 14:16:56 -06:00