mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-03-04 04:30:18 +00:00
mist: sliders work
This commit is contained in:
parent
7c89f170e6
commit
b8c8eaaf82
@ -44,8 +44,7 @@ location0:
|
||||
.byte 2 ; west exit
|
||||
.byte $ff ; north exit_dir
|
||||
.byte $ff ; south exit_dir
|
||||
.byte DIRECTION_E ; east exit_dir
|
||||
; .byte DIRECTION_W
|
||||
.byte (DIRECTION_E|DIRECTION_ONLY_POINT) ; east exit_dir
|
||||
.byte (DIRECTION_W|DIRECTION_ONLY_POINT) ; west exit_dir
|
||||
.word spaceship_inside_mist_n_lzsa ; north bg
|
||||
.word $0000 ; south bg
|
||||
@ -70,7 +69,11 @@ location1:
|
||||
.word controls_e_lzsa ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_EAST
|
||||
.byte $ff ; special exit
|
||||
.byte DIRECTION_E ; special exit
|
||||
.byte 12,25 ; special x
|
||||
.byte 26,46 ; special y
|
||||
.word controls_pressed-1 ; special function
|
||||
|
||||
|
||||
; electric organ
|
||||
location2:
|
||||
|
@ -178,57 +178,64 @@ ss_buttons_smc:
|
||||
rocket_notes:
|
||||
.byte $00,$00,$1,$00,$5,$00,$0a,$00
|
||||
|
||||
.if 0
|
||||
|
||||
draw_buttons_loop:
|
||||
controls_pressed:
|
||||
|
||||
; top button
|
||||
lda XPOS
|
||||
cmp #21
|
||||
bcs handle_pulled ; bge
|
||||
|
||||
lda SWITCH_TOP_ROW
|
||||
and button_lookup,X
|
||||
beq top_button_off
|
||||
sliders_pressed:
|
||||
|
||||
top_button_on:
|
||||
ldy #$95
|
||||
bne top_button_draw_smc
|
||||
sec
|
||||
sbc #12
|
||||
|
||||
top_button_off:
|
||||
ldy #$35
|
||||
tax
|
||||
|
||||
top_button_draw_smc:
|
||||
sty $4d0+25
|
||||
; if YPOS-28 > rocket_notes, increment
|
||||
; if YPOS-28 < rocket_notes, decrement
|
||||
; 0..14
|
||||
|
||||
inc top_button_draw_smc+1
|
||||
inc top_button_draw_smc+1
|
||||
; rocket ypos ypos-28 15-(ypos-28)
|
||||
; 0 = 42 14 0
|
||||
; 1 = 42 14 0
|
||||
; 2 = 40 12 2
|
||||
; 3 = 40 12 2
|
||||
; 4 = 38 10 4
|
||||
; 5 = 38 10 4
|
||||
; ...
|
||||
; 13 = 28 0 14
|
||||
; 14 = 28 0 14
|
||||
|
||||
; bottom button
|
||||
lda YPOS
|
||||
sec
|
||||
sbc #28
|
||||
sta TEMP
|
||||
lda #15
|
||||
sec
|
||||
sbc TEMP
|
||||
|
||||
lda SWITCH_BOTTOM_ROW
|
||||
and button_lookup,X
|
||||
beq bottom_button_off
|
||||
cmp rocket_notes,X
|
||||
beq slider_play_note
|
||||
bpl slider_decrement
|
||||
|
||||
bottom_button_on:
|
||||
ldy #$19
|
||||
bne bottom_button_draw_smc
|
||||
slider_increment:
|
||||
lda rocket_notes,X
|
||||
beq slider_play_note ; don't make smaller than 0
|
||||
dec rocket_notes,X
|
||||
jmp slider_play_note
|
||||
slider_decrement:
|
||||
lda rocket_notes,X
|
||||
cmp #15
|
||||
bcs slider_play_note ; done make larger than 14
|
||||
inc rocket_notes,X
|
||||
|
||||
bottom_button_off:
|
||||
ldy #$13
|
||||
slider_play_note:
|
||||
|
||||
bottom_button_draw_smc:
|
||||
sty $5d0+26
|
||||
|
||||
inc bottom_button_draw_smc+1
|
||||
inc bottom_button_draw_smc+1
|
||||
|
||||
inx
|
||||
cpx #5
|
||||
bne draw_buttons_loop
|
||||
handle_pulled:
|
||||
|
||||
rts
|
||||
.endif
|
||||
|
||||
|
||||
|
||||
|
||||
.if 0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user