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

Avoid rendering both the background and window on the same line #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ccawley2011
Copy link
Contributor

From what I understand, if the window is active on a given line it'll completely cover the background, so there's no need to draw both of them. In addition, this PR will only clear the buffer if neither the window nor the background are active, which improves performance a bit.

@deltabeard
Copy link
Owner

deltabeard commented Jun 6, 2024

These changes causes failures in the DMG-Acid2 test as shown below.

DMG-ACID2_0000000000

Previously, the output was:

DMG-ACID2_0000000000

The left eye and the left chin are drawn by the background which is why they do not look correct after your changes (see https://github.com/mattcurrie/dmg-acid2?tab=readme-ov-file#eyes). The coordinates of the window can be changed to start at any x and y pixel. See https://gbdev.io/pandocs/Scrolling.html#ff4aff4b--wy-wx-window-y-position-x-position-plus-7 .

The increase in speed was impressive though. 🙂

@deltabeard deltabeard self-requested a review June 13, 2024 15:13
Copy link
Owner

@deltabeard deltabeard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the previous comment, the behaviour of the window is now not functioning correctly.

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.

2 participants