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

add support for games on DWIN_MARLINUI #27620

Merged

Conversation

shadow578
Copy link
Contributor

Description

this PR adds support for the "Frivolous Game Options" when using a DWIN (Ender 3V2) screen with DWIN_MARLINUI_PORTRAIT or DWIN_MARLINUI_LANDSCAPE selected.

to achieve this, the rendering infrastructure of the games was moved into the MarlinGame class, with screen-specific implementation of the rendering functions.
this also potentially allows adding support for more screens down the line.

rendering happens using a custom rendering api mirroring the U8GLib api.
the existing games have been updated to use this new api, and are fully playable with this PR.

since the DWIN screens support color, games have been updated with color support.
on black-and-white screens, colors are mapped accordingly and will render like before.

Requirements

DWIN (Ender 3V2) screen with DWIN_MARLINUI_PORTRAIT or DWIN_MARLINUI_LANDSCAPE .

Benefits

Allows playing games on more printers, giving users a break between stressfull prints ;)

Configurations

N/A

Related Issues

N/A

Screenshots

Portrait Mode
p_brick p_invaders p_snake
Brickout Invaders Sn4k3
Landscape Mode
l_brick l_invaders l_snake
Brickout Invaders Sn4k3

@thinkyhead
Copy link
Member

Pretty neat! I was going to do this at some point but you stole my fun. ;-)

@mriscoc — Add these into your "pro" fork as a special gift to your users — with a big shoutout to Chris!

@thinkyhead thinkyhead merged commit 22977c8 into MarlinFirmware:bugfix-2.1.x Jan 9, 2025
64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants