mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-04-03 07:32:25 +00:00
mist: selena: hook up water button
a pain as it's shared room with the blue page
This commit is contained in:
parent
a4a13d08ae
commit
e3560cd29b
@ -41,7 +41,7 @@
|
||||
; Selena
|
||||
.byte LOAD_SELENA ; WHICH_LOAD = $80
|
||||
.byte DIRECTION_N ; DIRECTION = $81
|
||||
.byte SELENA_ANTENNA_STEPS ; LOCATION = $82
|
||||
.byte SELENA_WALKWAY1 ; LOCATION = $82
|
||||
.endif
|
||||
|
||||
|
||||
|
@ -181,7 +181,7 @@ location8:
|
||||
.word $0000 ; west bg
|
||||
.byte BG_SOUTH
|
||||
.byte DIRECTION_S ; special exit
|
||||
.byte 7,12 ; special x
|
||||
.byte 6,12 ; special x
|
||||
.byte 8,18 ; special y
|
||||
.word press_elevator_button-1
|
||||
|
||||
|
@ -268,8 +268,8 @@ location13:
|
||||
.word water_note_e_lzsa ; east bg
|
||||
.word water_note_w_lzsa ; west bg
|
||||
.byte BG_SOUTH|BG_EAST|BG_WEST
|
||||
.byte DIRECTION_S ; special exit
|
||||
.byte 20,27 ; special x
|
||||
.byte DIRECTION_S|DIRECTION_W ; special exit
|
||||
.byte 19,27 ; special x
|
||||
.byte 24,34 ; special y
|
||||
.word selena_take_blue_page-1 ; special function
|
||||
|
||||
|
@ -105,7 +105,7 @@ game_loop:
|
||||
beq mist_book_animation
|
||||
|
||||
cmp #SELENA_WATER
|
||||
beq fg_draw_blue_page
|
||||
beq fg_draw_blue_page ; and water note
|
||||
|
||||
cmp #SELENA_CRYSTAL_CLOSE
|
||||
beq fg_draw_red_page
|
||||
@ -116,6 +116,7 @@ game_loop:
|
||||
cmp #SELENA_TUNNEL_MAIN_CLOSE
|
||||
beq fg_draw_tunnel_note
|
||||
|
||||
|
||||
jmp nothing_special
|
||||
|
||||
mist_book_animation:
|
||||
@ -189,6 +190,10 @@ fg_draw_antenna_panel:
|
||||
jsr draw_antenna_panel
|
||||
jmp nothing_special
|
||||
|
||||
fg_draw_water_note:
|
||||
jsr draw_water_background
|
||||
jmp nothing_special
|
||||
|
||||
fg_draw_tunnel_note:
|
||||
jsr draw_tunnel_background
|
||||
jmp nothing_special
|
||||
@ -271,6 +276,15 @@ selena_take_red_page:
|
||||
jmp take_red_page
|
||||
|
||||
selena_take_blue_page:
|
||||
lda DIRECTION
|
||||
and #$f
|
||||
cmp #DIRECTION_W
|
||||
bne actually_take_blue_page
|
||||
|
||||
jmp water_button_pressed
|
||||
|
||||
actually_take_blue_page:
|
||||
|
||||
lda #SELENA_PAGE
|
||||
jmp take_blue_page
|
||||
|
||||
@ -299,7 +313,12 @@ draw_blue_page:
|
||||
|
||||
lda DIRECTION
|
||||
cmp #DIRECTION_S
|
||||
beq do_draw_blue_page
|
||||
cmp #DIRECTION_W
|
||||
bne no_draw_page
|
||||
jmp draw_water_background
|
||||
|
||||
do_draw_blue_page:
|
||||
|
||||
lda BLUE_PAGES_TAKEN
|
||||
and #SELENA_PAGE
|
||||
|
@ -554,10 +554,46 @@ antenna_display11_sprite:
|
||||
.byte $55,$86,$86,$86,$86,$86,$86,$86,$66
|
||||
.byte $88,$88,$88,$88,$88,$88,$88,$88,$88
|
||||
|
||||
;===========================
|
||||
; draw water background #1
|
||||
;===========================
|
||||
draw_water_background:
|
||||
|
||||
;=========================
|
||||
; draw tunnel background
|
||||
;=========================
|
||||
lda DIRECTION
|
||||
and #$f
|
||||
cmp #DIRECTION_W
|
||||
bne done_draw_water_background
|
||||
|
||||
bit TEXTGR ; we do this because we aren't a standalone
|
||||
; location
|
||||
|
||||
lda #<sound1_water
|
||||
sta OUTL
|
||||
lda #>sound1_water
|
||||
sta OUTH
|
||||
jsr move_and_print
|
||||
|
||||
lda SELENA_BUTTON_STATUS
|
||||
and #SELENA_BUTTON1
|
||||
beq done_draw_water_background
|
||||
|
||||
lda #17
|
||||
sta XPOS
|
||||
lda #10
|
||||
sta YPOS
|
||||
lda #<water_bg_sprite
|
||||
sta INL
|
||||
lda #>water_bg_sprite
|
||||
sta INH
|
||||
jsr put_sprite_crop
|
||||
|
||||
done_draw_water_background:
|
||||
rts
|
||||
|
||||
|
||||
;===========================
|
||||
; draw tunnel background #5
|
||||
;===========================
|
||||
draw_tunnel_background:
|
||||
|
||||
lda #<sound5_tunnel
|
||||
@ -584,6 +620,79 @@ done_draw_tunnel_background:
|
||||
rts
|
||||
|
||||
|
||||
;=========================
|
||||
; water button #1
|
||||
;=========================
|
||||
water_button_pressed:
|
||||
|
||||
lda SELENA_BUTTON_STATUS
|
||||
eor #SELENA_BUTTON1
|
||||
sta SELENA_BUTTON_STATUS
|
||||
|
||||
and #SELENA_BUTTON1
|
||||
beq done_water_button_pressed
|
||||
|
||||
jsr play_water_noise
|
||||
|
||||
done_water_button_pressed:
|
||||
rts
|
||||
|
||||
|
||||
;=========================
|
||||
; chasm button #2
|
||||
;=========================
|
||||
chasm_button_pressed:
|
||||
|
||||
lda SELENA_BUTTON_STATUS
|
||||
eor #SELENA_BUTTON2
|
||||
sta SELENA_BUTTON_STATUS
|
||||
|
||||
and #SELENA_BUTTON2
|
||||
beq done_chasm_button_pressed
|
||||
|
||||
jsr play_chasm_noise
|
||||
|
||||
done_chasm_button_pressed:
|
||||
rts
|
||||
|
||||
|
||||
;=========================
|
||||
; clock button #3
|
||||
;=========================
|
||||
clock_button_pressed:
|
||||
|
||||
lda SELENA_BUTTON_STATUS
|
||||
eor #SELENA_BUTTON3
|
||||
sta SELENA_BUTTON_STATUS
|
||||
|
||||
and #SELENA_BUTTON3
|
||||
beq done_tunnel_button_pressed
|
||||
|
||||
jsr play_clock_noise
|
||||
|
||||
done_clock_button_pressed:
|
||||
rts
|
||||
|
||||
|
||||
;=========================
|
||||
; crystal button #4
|
||||
;=========================
|
||||
crystal_button_pressed:
|
||||
|
||||
lda SELENA_BUTTON_STATUS
|
||||
eor #SELENA_BUTTON4
|
||||
sta SELENA_BUTTON_STATUS
|
||||
|
||||
and #SELENA_BUTTON4
|
||||
beq done_crystal_button_pressed
|
||||
|
||||
jsr play_crystal_noise
|
||||
|
||||
done_crystal_button_pressed:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;=========================
|
||||
; tunnel button
|
||||
;=========================
|
||||
@ -601,11 +710,63 @@ tunnel_button_pressed:
|
||||
done_tunnel_button_pressed:
|
||||
rts
|
||||
|
||||
;===============================
|
||||
; play the noises
|
||||
;===============================
|
||||
|
||||
; water #1
|
||||
play_water_noise:
|
||||
|
||||
play_tunnel_noise:
|
||||
lda #NOTE_E3
|
||||
sta speaker_frequency
|
||||
|
||||
lda #NOTE_C3
|
||||
lda #15
|
||||
sta speaker_duration
|
||||
|
||||
jsr speaker_tone
|
||||
|
||||
rts
|
||||
|
||||
; fire #2
|
||||
play_chasm_noise:
|
||||
|
||||
lda #NOTE_D3
|
||||
sta speaker_frequency
|
||||
|
||||
lda #15
|
||||
sta speaker_duration
|
||||
|
||||
jsr speaker_tone
|
||||
|
||||
rts
|
||||
|
||||
; clock #3
|
||||
play_clock_noise:
|
||||
|
||||
ldx #5
|
||||
clock_noise_loop:
|
||||
jsr click_speaker
|
||||
|
||||
lda #200
|
||||
jsr WAIT
|
||||
|
||||
dex
|
||||
bne clock_noise_loop
|
||||
|
||||
rts
|
||||
|
||||
; whistle #4
|
||||
play_crystal_noise:
|
||||
|
||||
lda #NOTE_E3
|
||||
sta speaker_frequency
|
||||
|
||||
lda #10
|
||||
sta speaker_duration
|
||||
|
||||
jsr speaker_tone
|
||||
|
||||
lda #NOTE_E4
|
||||
sta speaker_frequency
|
||||
|
||||
lda #10
|
||||
@ -615,7 +776,33 @@ play_tunnel_noise:
|
||||
|
||||
rts
|
||||
|
||||
; tunnel #5
|
||||
play_tunnel_noise:
|
||||
|
||||
lda #NOTE_C3
|
||||
sta speaker_frequency
|
||||
|
||||
lda #15
|
||||
sta speaker_duration
|
||||
|
||||
jsr speaker_tone
|
||||
|
||||
rts
|
||||
|
||||
|
||||
water_bg_sprite:
|
||||
.byte 7,11
|
||||
.byte $dd,$dd,$dd,$ff,$dd,$dd,$dd
|
||||
.byte $dd,$dd,$dd,$ff,$ff,$dd,$dd
|
||||
.byte $dd,$dd,$dd,$df,$df,$dd,$dd
|
||||
.byte $dd,$dd,$dd,$ff,$dd,$dd,$dd
|
||||
.byte $dd,$dd,$dd,$ff,$ff,$dd,$dd
|
||||
.byte $dd,$dd,$dd,$df,$df,$dd,$dd
|
||||
.byte $df,$fd,$df,$fd,$df,$fd,$df
|
||||
.byte $dd,$dd,$dd,$dd,$dd,$dd,$dd
|
||||
.byte $8d,$8d,$8d,$8d,$8d,$8d,$8d
|
||||
.byte $32,$82,$12,$12,$12,$82,$32
|
||||
.byte $33,$88,$91,$81,$81,$98,$33
|
||||
|
||||
tunnel_bg_sprite:
|
||||
.byte 9,10
|
||||
|
Loading…
x
Reference in New Issue
Block a user