From 428c301a80641361f51af8102628b545cf9ae63e Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 11 Mar 2025 17:00:47 +0100 Subject: shared: Bring joypad into a proper style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Put functions inside of the scope, avoid useless fallthroughs and be more realistic on what is needed from elsewhere. Signed-off-by: Miquel Sabaté Solà --- scroll/include/player.s | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scroll/include/player.s') diff --git a/scroll/include/player.s b/scroll/include/player.s index 239cec6..a4f750c 100644 --- a/scroll/include/player.s +++ b/scroll/include/player.s @@ -76,7 +76,7 @@ .proc update ;; Is the player requesting to go up? lda #Joypad::BUTTON_UP - and Joypad::m_buttons1 + and Joypad::zp_buttons1 beq @check_down ;; If we are already at the top disregard this button press and check @@ -108,7 +108,7 @@ @check_down: ;; Is the player requesting to go down? lda #Joypad::BUTTON_DOWN - and Joypad::m_buttons1 + and Joypad::zp_buttons1 beq @check_left ;; We have to move down unless we are already at the very bottom. @@ -135,7 +135,7 @@ @check_left: ;; Is the player requesting to go left? lda #Joypad::BUTTON_LEFT - and Joypad::m_buttons1 + and Joypad::zp_buttons1 beq @check_right ;; We have to move left unless we are already at the leftmost edge. @@ -160,7 +160,7 @@ @check_right: ;; Last check! Is the player requesting to go right? lda #Joypad::BUTTON_RIGHT - and Joypad::m_buttons1 + and Joypad::zp_buttons1 bne @check_level_end rts -- cgit v1.2.3