SNES menu: swap A and B buttons

This commit is contained in:
ikari 2012-01-14 02:23:43 +01:00
parent d139fdb40c
commit 2d89eb8000
5 changed files with 28 additions and 14 deletions

View File

@ -139,7 +139,7 @@ window_ev .byt 27
window_tl .byt 28
window_tr .byt 29
text_clkset .byt "Please set the clock.", 0
text_buttonB .byt "Dpad: sel/chg, B: OK", 0
text_buttonB .byt "Dpad: sel/chg, A: OK", 0
time_win_x .byt 18
time_win_y .byt 15
time_win_w .byt 27
@ -161,4 +161,4 @@ text_mm_scic .byt "Enable SuperCIC", 0
text_mm_vmode_menu .byt "Menu video mode", 0
text_mm_vmode_game .byt "Game video mode", 0
text_mm_sysinfo .byt "System Information", 0
text_statusbar_keys .byt "B:Select A:Back X:Menu", 0
text_statusbar_keys .byt "A:Select B:Back X:Menu", 0

View File

@ -78,6 +78,7 @@ time_y10 .byt 0
time_y100 .byt 0
time_sel .byt 0
time_exit .byt 0
time_cancel .byt 0
time_ptr .byt 0
time_tmp .byt 0
;--

View File

@ -120,13 +120,13 @@ mm_menuloop
and pad1trig+1
bne mmkey_b
bra mm_menuloop
mmkey_a
mmkey_b
jsr restore_screen
plp
rts
mmkey_b
jsr mmkey_b_2
mmkey_a
jsr mmkey_a_2
jmp mm_redraw
mmkey_down
@ -156,10 +156,10 @@ mmkey_up_2
+
rts
mmkey_b_2
mmkey_a_2
jsr restore_screen
phk ; push return bank for subroutine
per mmkey_b_2_return-1 ; push return addr for subroutine
per mmkey_a_2_return-1 ; push return addr for subroutine
xba
lda #$00
xba
@ -175,7 +175,7 @@ mmkey_b_2
pha ; push subroutine addr
sep #$20 : .as
rtl ; jump to subroutine
mmkey_b_2_return
mmkey_a_2_return
rts
mm_do_refresh

View File

@ -442,7 +442,7 @@ menu_key_right:
sep #$20 : .as
rts
menu_key_b:
menu_key_a:
jsr select_item
rts
@ -456,15 +456,15 @@ do_setup448
jsr setup_448
rts
menu_key_a:
menu_key_b:
rep #$20 : .al
lda dirstart_addr
beq skip_key_a
beq skip_key_b
sta dirptr_addr
lda #$0000
sta menu_sel
bra select_item
skip_key_a
skip_key_b
sep #$20 : .as
rts

View File

@ -2,7 +2,7 @@
#include "dma.i65"
timebox_data
; string offset, selection width, bcdtime offset, 1s limit, 10s limit
; string offset, selection width, bcdtime offset
.byt 0, 4, 9
.byt 5, 2, 8
.byt 8, 2, 6
@ -46,6 +46,7 @@ time_init:
jsr gettime
stz time_sel
stz time_exit
stz time_cancel
lda #^text_buttonB
sta print_bank
ldx #!text_buttonB
@ -120,17 +121,29 @@ timeloop1
lda #$80
and pad1trig+1
bne tkey_b
lda #$80
and pad1trig
bne tkey_a
; do stuff
lda time_exit
beq timeloop1
bne timesave
; set clock
lda time_cancel
bne timenosave
beq timeloop1
timesave
jsr settime
timenosave
; restore text area
jsr restore_screen
plp
rtl
tkey_b
inc time_cancel
jmp time_update
tkey_a
inc time_exit
jmp time_update