mist: selena: hook up clock button

This commit is contained in:
Vince Weaver 2020-07-30 01:32:39 -04:00
parent 7c2d19aefc
commit dd055be951
4 changed files with 55 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@ -352,7 +352,7 @@ location18:
.byte SELENA_CLOCK_BEFORE ; east exit
.byte SELENA_CLOCK_PATH ; west exit
.byte $ff ; north exit_dir
.byte DIRECTION_S ; south exit_dir
.byte DIRECTION_S|DIRECTION_SPLIT ; south exit_dir
.byte DIRECTION_E ; east exit_dir
.byte DIRECTION_W ; west exit_dir
.word clock_n_lzsa ; north bg
@ -377,7 +377,10 @@ location19:
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_SOUTH
.byte $ff
.byte DIRECTION_S ; special exit
.byte 17,22 ; special x
.byte 20,28 ; special y
.word clock_button_pressed-1 ; special function
; SELENA_CLOCK_BEFORE -- path before clocks, when coming from crystals
location20:

View File

@ -116,6 +116,9 @@ game_loop:
cmp #SELENA_CHASM
beq fg_draw_chasm_note
cmp #SELENA_CLOCK_CLOSE
beq fg_draw_clock_note
cmp #SELENA_TUNNEL_MAIN_CLOSE
beq fg_draw_tunnel_note
@ -201,6 +204,10 @@ fg_draw_chasm_note:
jsr draw_chasm_background
jmp nothing_special
fg_draw_clock_note:
jsr draw_clock_background
jmp nothing_special
fg_draw_tunnel_note:
jsr draw_tunnel_background
jmp nothing_special

View File

@ -628,6 +628,36 @@ done_draw_chasm_background:
rts
;===========================
; draw clock background #3
;===========================
draw_clock_background:
lda #<sound3_clocks
sta OUTL
lda #>sound3_clocks
sta OUTH
jsr move_and_print
lda SELENA_BUTTON_STATUS
and #SELENA_BUTTON3
beq done_draw_clock_background
lda #17
sta XPOS
lda #6
sta YPOS
lda #<clock_bg_sprite
sta INL
lda #>clock_bg_sprite
sta INH
jsr put_sprite_crop
done_draw_clock_background:
rts
;===========================
; draw tunnel background #5
@ -854,6 +884,19 @@ chasm_bg_sprite:
.byte $22,$32,$32,$32,$32,$32,$22
.byte $33,$98,$11,$11,$11,$98,$33
clock_bg_sprite:
.byte 6,10
.byte $fd,$dd,$dd,$dd,$dd,$dd
.byte $fd,$dd,$dd,$fd,$dd,$dd
.byte $ff,$fd,$dd,$dd,$dd,$dd
.byte $ff,$ff,$dd,$dd,$dd,$fd
.byte $ff,$ff,$dd,$fd,$dd,$dd
.byte $ff,$ff,$ff,$df,$dd,$dd
.byte $dd,$df,$dd,$dd,$dd,$df
.byte $8d,$8d,$8d,$8d,$8d,$8d
.byte $82,$82,$82,$82,$82,$82
.byte $88,$08,$11,$11,$11,$08
tunnel_bg_sprite:
.byte 9,10