feat: add custom background rendering and speed scaling features for snake gameplay

This commit is contained in:
phillip committed 2026-10-03 20:58:33 +02:00
1 parent 93c0a44027
commit 60bf111400
13 files changed
+711 -26

No files matched your search

+3 -1
View File
@@ -25,7 +25,7 @@ bool handle_input_frame(InputContext &ctx) {
if (*ctx.internals) {
setBackdropColor(RGB15(0, 0, 7));
} else {
setBackdropColor(RGB15(0, 0, 0));
setBackdropColor(ctx.state->hardMode ? RGB15(6, 2, 2) : RGB15(2, 3, 6));
consoleSelect(ctx.topScreen);
consoleClear();
invalidate_hud(*ctx.renderAssets);
@@ -65,6 +65,8 @@ bool handle_input_frame(InputContext &ctx) {
if ((ctx.state->paused || ctx.state->gameOver) && (keys != 0U) && ((keys & KEY_B) != 0U)) {
ctx.state->scene = Scene::Menu;
ctx.state->paused = false;
setBackdropColor(RGB15(2, 2, 6));
setBackdropColorSub(RGB15(2, 2, 6));
draw_menu(*ctx.state, *ctx.renderAssets, audio_is_music_enabled(*ctx.audio));
return true;
}