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/toggle.s | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scroll/toggle.s') diff --git a/scroll/toggle.s b/scroll/toggle.s index b9214b4..32fc39f 100644 --- a/scroll/toggle.s +++ b/scroll/toggle.s @@ -70,11 +70,11 @@ bne @end ;; Read the joypad. - jsr joypad_read + READ_JOYPAD1 ;; Is the player pressing left? If so then the direction is to the left. lda #Joypad::BUTTON_LEFT - and Joypad::m_buttons1 + and Joypad::zp_buttons1 beq @check_right inc Vars::zp_scrolling lda #0 @@ -84,7 +84,7 @@ @check_right: ;; Is the player pressing right? If so then the direction is to the right. lda #Joypad::BUTTON_RIGHT - and Joypad::m_buttons1 + and Joypad::zp_buttons1 beq @check_select inc Vars::zp_scrolling lda #1 @@ -95,7 +95,7 @@ ;; Is the player pressing Select? Then the direction depends on the current ;; nametable. lda #Joypad::BUTTON_SELECT - and Joypad::m_buttons1 + and Joypad::zp_buttons1 beq @end inc Vars::zp_scrolling ldx #0 -- cgit v1.2.3