SWORD25: Fix display order of deathscreen#6474
Merged
bluegr merged 1 commit intoscummvm:masterfrom Mar 10, 2025
Merged
Conversation
Fix death screen appearing behind save/load menu by adjusting its z-value. The issue occurs due to differences in render order between original engine and ScummVM implementation. The original engine renders based on parent-child relationships, it renders the subtree of a node completely before moving to other nodes. while ScummVM sorts by absolute z-values (parent absolute z + child z). View `BS_RenderObject::Render` in `renderobject.cpp` in the source code of the original engine and `RenderObject::render` in `renderobject.cpp` in the source code of ScummVM version for more details. Fixes: https://bugs.scummvm.org/ticket/15426
Member
Contributor
Author
|
I haven't found other affected screens yet. |
Member
|
Thanks your work, and for testing this! Merging |
I am the reporter of the bug in question and I can confirm there aren't any other screens affected! Good job! Thank you!!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix death screen appearing behind save/load menu by adjusting its z-value. The issue occurs due to differences in render order between original engine and ScummVM implementation.
The original engine renders based on parent-child relationships, it renders the subtree of a node completely before moving to other nodes. while ScummVM sorts by absolute z-values (parent absolute z + child z).
Here is an example showing when the two render engine have different behaviors. If we have a render tree like this:
Different display orders:
ScummVM version: root -> nodeA -> nodeB -> nodeAchild
Original version: root -> nodeA -> nodeAchild -> nodeB
View
BS_RenderObject::Renderinrenderobject.cppin the source code of the original engine andRenderObject::renderinrenderobject.cppin the source code of ScummVM version for more details.Fixes: https://bugs.scummvm.org/ticket/15426