diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-03-21 14:59:20 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-03-21 14:59:20 +0100 |
| commit | 48600b0595c6104b1afc96b87a570e99dc0ce69e (patch) | |
| tree | 5efb38b5d1b63fd965ff233e0b7eccdbcd6446b2 /src | |
| parent | 1d1922c3027a0f9b6a31f532c455f93154b5dd38 (diff) | |
| download | jetpac.nes-48600b0595c6104b1afc96b87a570e99dc0ce69e.tar.gz jetpac.nes-48600b0595c6104b1afc96b87a570e99dc0ce69e.zip | |
title: Fix toggle with the Select button
Fixes: b3cb545c6ebc ("player: Update its sprites on heading and
throttle")
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/title.s | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/title.s b/src/title.s index 40b9352..1c4b361 100644 --- a/src/title.s +++ b/src/title.s @@ -61,24 +61,26 @@ @check_select: lda #Joypad::BUTTON_SELECT and Joypad::zp_buttons1 - beq @check_start + bne @do_select + ;; If none of the above has been pressed, our only possibility is the + ;; start button. If that's the case, jump there, otherwise quit. + lda #Joypad::BUTTON_START + and Joypad::zp_buttons1 + beq @end + JAL start + + @do_select: lda #SPRITE_Y_POSITION0 cmp $200 beq @down sta $200 - jmp @set_timer_and_end + bne @set_timer_and_end @down: lda #SPRITE_Y_POSITION1 sta $200 - @check_start: - lda #Joypad::BUTTON_START - and Joypad::zp_buttons1 - beq @end - JAL start - @set_timer_and_end: lda #TIMER_INIT_VALUE sta zp_title_timer |
