Age | Commit message (Collapse) | Author |
|
* Rewrap comments to 80 columns
* Clarify comments where possible
* Use smart pointers where appropriate
|
|
screen items in last-ditch sort
Fixes Trac#10257. Fixes Trac#10261.
|
|
Rendering bugs in ScummVM are often caused by buggy game scripts
relying on the last ditch sort, which is not the same in ScummVM
as in SSCI (since the SSCI last ditch sort relies on a different
memory architecture and is super buggy). However, these bugs do
not show up very frequently these days, so it is easy to forget
all the places that need to be checked when debugging a rendering
problem that appears to be caused by sorting failure.
This commit breaks out the last ditch comparison formerly in
Plane::calcLists to hopefully make it more visible to future
programmers.
Refs Trac#9957.
|
|
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.
|
|
|
|
|
|
Ow. My eyeballs.
|
|
|
|
|
|
It seems highly probable that there are later SCI games that use
the "hi res" rendering path, so sorting and unsorting of
ScreenItemLists needs to be accurate.
|
|
This line drawing code lives in a remodelled GfxPaint32 class
that is totally separate from GfxPaint16.
|
|
|
|
The old name matches the selector, but isn’t as clear.
|
|
|
|
|
|
The implementation was not correctly rounding the scaled position
with mulru, leading to occasionally incorrect hit detection at
the boundaries of boxes.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|