Commit graph

21 commits

Author SHA1 Message Date
Colin Snover
31e1d0932c SCI32: Clean up Plane
* Rewrap comments to 80 columns
* Clarify comments where possible
2017-10-06 22:11:03 -05:00
Colin Snover
ba619a08dd SCI32: Change plane and screen item sorting algorithm
SSCI's last resort comparison here was to compare the object IDs
of planes & screen items, but this randomly breaks (at least) the
"you have died" dialog at the end of Phant1, and text & buttons
in Hoyle5, even in SSCI itself.

This commit changes last resort comparison to use a monotonically
increasing ID instead, which keeps objects with identical priority
& z-index in creation order when compared.

Fixes Trac#9585.
2016-12-19 14:46:58 -06:00
Colin Snover
0f535e79f5 SCI32: Add 6-argument signature of kAddPicAt
This is used by Torin in room 50900.
2016-08-01 10:37:14 -05:00
Colin Snover
156c68fe58 SCI32: Implement plane transitions (kSetShowStyle and kSetScroll)
This commit implements all of the known plane transitions from
SCI2 through SCI2.1mid games. Because kSetShowStyle is always
called indirectly via the Styler game script, it is difficult to
find all the places where transitions are used. As such,
transitions that appeared to never be used have been added as
stubs which will trigger a game crash with a message to report
what was being done, so any missed transition types can be
identified quickly and then implemented.
2016-08-01 10:37:14 -05:00
Colin Snover
08821cf4e3 SCI32: Give planes a default type
With the addition of the transparent pic type code, the _type
property would be read uninitialised by setType if _pictureId was
set to kPlanePic.

CID 1357230, 1357231.
2016-07-11 10:39:50 -05:00
Colin Snover
948e448738 SCI32: Fix signed comparison warnings 2016-07-01 15:58:43 -05:00
Colin Snover
4ee1901706 SCI32: Add transparent pic plane type
It is not clear if this is ever actually used by game scripts,
though.
2016-06-30 14:04:57 -05:00
Colin Snover
e89bdf536d SCI32: Clean-up pass on rendering pipeline
This pass exposed two bugs, which have been fixed:

1. Checks of `_updated` and `_moved` were reversed in some areas,
   which lead to rendering bugs. In SQ6 the rendering bugs were
   subtle or non-existant, but in e.g. PQ:SWAT the Sierra logo and
   title screen animations were totally missing.

2. The renderer formerly kept reading from ScreenItemLists when
   new items were added in decrementScreenItemArrayCounts, but
   this was determined to be unnecessary.
2016-06-30 14:04:57 -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
a292123cda SCI32: Code documentation improvements 2016-03-17 10:43:08 -05:00
Filippos Karapetis
be58e5bc30 SCI32: More work on remapping
Still not working
2016-03-15 21:06:46 +02:00
Colin Snover
8dea740086 SCI32: Implement kMovePlaneItems 2016-03-10 18:28:53 -06:00
Johannes Schickel
693f8dc295 SCI: Add missing namespace comments in graphics/. 2016-03-08 20:13:05 +01:00
Colin Snover
d486921820 SCI32: Add reg_t comparisons for graphics sorting 2016-03-07 16:46:25 -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
1337cd3dec SCI32: Implement kEditText 2016-03-06 21:34:43 -06:00
Filippos Karapetis
c1dacbe65d SCI: Use American English, like we do in other parts of ScummVM
This replaces "colour" to "color"
2016-02-19 02:50:16 +02:00
Filippos Karapetis
9aac0bdaaa SCI: Compare offsets in the Plane comparison operator
Fixes a crash in the first scene of Torin's Passage
2016-02-19 02:43:55 +02:00
Colin Snover
75ccabc325 SCI: Implement accurate renderer architecture for SCI32 2016-02-18 13:18:02 -06:00