Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CD-i: Fix Layering #13432

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Vincent-Halver
Copy link
Contributor

@Vincent-Halver Vincent-Halver commented Mar 1, 2025

This fixes 2 major bugs, and reduces the code by 100 lines. It also fixes a minor bug.

Bug 1: When Mixing is enabled, but one of the layers is transparent, the transparent layer would still be visible. This is now fixed.

You can validate this by checking "Why CD-i". The menu used to be tinged green, and often had ghost images. Now the ghost images are gone, and the menu correctly shows that the green overlay is only supposed to appear as a highlight on the menu button.
{86DA21B9-5A9D-4776-8CF2-0936DD525ADF}

Bug 2: When mixing is enabled and both layers are transparent, previously no background was visible. This is now fixed.

You can validate this by checking the Validation Disc (Europe). The Background test used to appear fully black. Now you can see there is actually a color test on the background layer.
{87F81EBA-825F-4032-B89D-19F611CAEF68}

Bug 3 (minor): there was an edge case in the Matte registers. If the game is programmed such that the matte registers are not monotonically increasing in order, they could execute out of order.

I can't remember if any games have this issue. But regardless it's fixed.

When using 2 mattes, if multiple registers trigger on the same X coordinate, the original would execute all of them.

The correct behavior is to only compare against the first one that has not yet been executed.
Bug 1: When mixing was enabled but one layer is transparent, it now correctly ignores the transparent layer.

Bug 2: When mixing is enabled and both layers are transparent, it now correctly shows the backdrop.
Cleans up layering logic. No visible change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant