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
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