From 3200bc93b49b1e7bca0090de4cb1890a0e8242a8 Mon Sep 17 00:00:00 2001 From: kottochii <106819117+kottochii@users.noreply.github.com> Date: Wed, 26 Aug 2026 17:48:51 +1000 Subject: [PATCH] fix: buttons are now wired to more descriptive values on SK controller --- global_state.cpp | 4 ++-- include/global_constants.h | 6 +++--- rendering.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/global_state.cpp b/global_state.cpp index 0da2f41..f62e48b 100644 --- a/global_state.cpp +++ b/global_state.cpp @@ -85,7 +85,7 @@ void end_game(bool successful) { fill_triangle(COLOR_BLACK, 414, 165, 404, 175, 424, 175); fill_triangle(COLOR_BLACK, 414, 240, 404, 230, 424, 230); } - draw_text("Press 1 to submit", COLOR_BLACK, font_named("default"), 30, 260, 280); + draw_text("Press B1 to submit", COLOR_BLACK, font_named("default"), 30, 260, 280); // Handle initials entry if (key_typed(UP)) { @@ -135,6 +135,6 @@ void end_game(bool successful) { draw_text("score: " + score, COLOR_WHITE, font_named("default"), 18, 370, 80 + 45 * i); } draw_text("Press start to play again", COLOR_BLACK, font_named("default"), 18, 275, 530); - draw_text("Press 2 to exit", COLOR_BLACK, font_named("default"), 18, 275, 550); + draw_text("Press B2 to exit", COLOR_BLACK, font_named("default"), 18, 275, 550); } } diff --git a/include/global_constants.h b/include/global_constants.h index 8116220..4301b42 100644 --- a/include/global_constants.h +++ b/include/global_constants.h @@ -24,6 +24,6 @@ constexpr key_code UP = UP_KEY; constexpr key_code DOWN = DOWN_KEY; constexpr key_code LEFT = LEFT_KEY; constexpr key_code RIGHT = RIGHT_KEY; -constexpr key_code START = SPACE_KEY; -constexpr key_code P1_B1 = Z_KEY; -constexpr key_code P1_B2 = X_KEY; +constexpr key_code START = NUM_1_KEY; +constexpr key_code P1_B1 = LEFT_CTRL_KEY; +constexpr key_code P1_B2 = LEFT_ALT_KEY; diff --git a/rendering.cpp b/rendering.cpp index 65f4be3..1384129 100644 --- a/rendering.cpp +++ b/rendering.cpp @@ -34,9 +34,9 @@ void draw_game() { draw_bitmap("ball", ball.x, ball.y); } - // Draw the "Press 1 to start" text if the ball is held + // Draw the "Press B1 to start" text if the ball is held if (game_data.ball_is_held) { - draw_text("Press 1 to start", COLOR_WHITE, font_named("default"), 35, 230, (screen_height() / 2) + 50); + draw_text("Press B1 to start", COLOR_WHITE, font_named("default"), 35, 230, (screen_height() / 2) + 50); } // Draw the power-up drops