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

Adjusted screen coordinates so menu doesn't overlap #66

Merged
merged 3 commits into from
Oct 24, 2021

Conversation

MaikelChan
Copy link
Contributor

I updated blit screen coordinates so the menu doesn't overlap a bit of the top of the screen. It takes into account if the menu is enabled or not, and if uniform scaling is set or not.

menu

When bumping the table, instead of offseting the table pixels by CPU, just memcpy all the pixels to vScreenTex once, and then render two separate quads from that texture: one for the board and the other for the sidebar. Then change the coordinates of the board quad when bumping.
@MaikelChan MaikelChan changed the title Menu screen coordinates Adjusted screen coordinates so menu doesn't overlap Oct 24, 2021
@k4zmu2a k4zmu2a merged commit 5789492 into k4zmu2a:master Oct 24, 2021
@k4zmu2a
Copy link
Owner

k4zmu2a commented Oct 24, 2021

It is better this way, merged.

I will make some changes to PresentVScreen with offset:
Add max(1 and maybe round for offset, otherwise it might be rounded to zero in small window.
Derive 0.625f from table width/vscreen width.

@MaikelChan
Copy link
Contributor Author

Cool, sounds good to me!

@MaikelChan MaikelChan deleted the menu_screen_coordinates branch October 24, 2021 15:46
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.

None yet

2 participants