mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-13 22:30:49 +00:00
mist: stoney: can now unlock hatch to get above lighthouse
This commit is contained in:
parent
29bb054128
commit
f0f0140b4a
@ -58,7 +58,7 @@ finger_match_lit_sprite:
|
|||||||
|
|
||||||
finger_key_sprite:
|
finger_key_sprite:
|
||||||
.byte 6,4
|
.byte 6,4
|
||||||
.byte $aa,$aa,$aa,$aa,$aa,$ba
|
.byte $aa,$aa,$aa,$aa,$aa,$bd
|
||||||
.byte $dd,$dd,$dd,$dd,$db,$bb
|
.byte $dd,$dd,$dd,$dd,$db,$bb
|
||||||
.byte $aa,$ad,$aa,$ab,$bd,$bb
|
.byte $aa,$ad,$aa,$ab,$bd,$bb
|
||||||
.byte $aa,$aa,$aa,$aa,$ab,$ab
|
.byte $aa,$aa,$aa,$aa,$ab,$ab
|
||||||
|
@ -15,6 +15,7 @@ stoney_graphics.inc: \
|
|||||||
lighthouse_path_e.lzsa lighthouse_path_w.lzsa \
|
lighthouse_path_e.lzsa lighthouse_path_w.lzsa \
|
||||||
lighthouse_door_e.lzsa lighthouse_door_w.lzsa \
|
lighthouse_door_e.lzsa lighthouse_door_w.lzsa \
|
||||||
lighthouse_inside_e.lzsa lighthouse_inside_w.lzsa \
|
lighthouse_inside_e.lzsa lighthouse_inside_w.lzsa \
|
||||||
|
lighthouse_inside_locked_e.lzsa \
|
||||||
lighthouse_inside_n.lzsa \
|
lighthouse_inside_n.lzsa \
|
||||||
lighthouse_inside_nowater_n.lzsa lighthouse_inside_notrunk_n.lzsa \
|
lighthouse_inside_nowater_n.lzsa lighthouse_inside_notrunk_n.lzsa \
|
||||||
lighthouse_inside_lidup_n.lzsa \
|
lighthouse_inside_lidup_n.lzsa \
|
||||||
@ -67,6 +68,7 @@ stoney_graphics.inc: \
|
|||||||
echo "lighthouse_door_e_lzsa: .incbin \"lighthouse_door_e.lzsa\"" >> stoney_graphics.inc
|
echo "lighthouse_door_e_lzsa: .incbin \"lighthouse_door_e.lzsa\"" >> stoney_graphics.inc
|
||||||
echo "lighthouse_door_w_lzsa: .incbin \"lighthouse_door_w.lzsa\"" >> stoney_graphics.inc
|
echo "lighthouse_door_w_lzsa: .incbin \"lighthouse_door_w.lzsa\"" >> stoney_graphics.inc
|
||||||
echo "lighthouse_inside_e_lzsa: .incbin \"lighthouse_inside_e.lzsa\"" >> stoney_graphics.inc
|
echo "lighthouse_inside_e_lzsa: .incbin \"lighthouse_inside_e.lzsa\"" >> stoney_graphics.inc
|
||||||
|
echo "lighthouse_inside_locked_e_lzsa: .incbin \"lighthouse_inside_locked_e.lzsa\"" >> stoney_graphics.inc
|
||||||
echo "lighthouse_inside_w_lzsa: .incbin \"lighthouse_inside_w.lzsa\"" >> stoney_graphics.inc
|
echo "lighthouse_inside_w_lzsa: .incbin \"lighthouse_inside_w.lzsa\"" >> stoney_graphics.inc
|
||||||
echo "lighthouse_inside_n_lzsa: .incbin \"lighthouse_inside_n.lzsa\"" >> stoney_graphics.inc
|
echo "lighthouse_inside_n_lzsa: .incbin \"lighthouse_inside_n.lzsa\"" >> stoney_graphics.inc
|
||||||
echo "lighthouse_inside_nowater_n_lzsa: .incbin \"lighthouse_inside_nowater_n.lzsa\"" >> stoney_graphics.inc
|
echo "lighthouse_inside_nowater_n_lzsa: .incbin \"lighthouse_inside_nowater_n.lzsa\"" >> stoney_graphics.inc
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 862 B After Width: | Height: | Size: 6.8 KiB |
BIN
mist/graphics_stoney/lighthouse_inside_locked_e.png
Normal file
BIN
mist/graphics_stoney/lighthouse_inside_locked_e.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
@ -98,7 +98,7 @@ location4:
|
|||||||
.byte STONEY_LIGHTHOUSE_PATH ; west exit
|
.byte STONEY_LIGHTHOUSE_PATH ; west exit
|
||||||
.byte $ff ; north exit_dir
|
.byte $ff ; north exit_dir
|
||||||
.byte $ff ; south exit_dir
|
.byte $ff ; south exit_dir
|
||||||
.byte DIRECTION_E ; east exit_dir
|
.byte DIRECTION_E|DIRECTION_ONLY_POINT ; east exit_dir
|
||||||
.byte DIRECTION_W ; west exit_dir
|
.byte DIRECTION_W ; west exit_dir
|
||||||
.word $0000 ; north bg
|
.word $0000 ; north bg
|
||||||
.word $0000 ; south bg
|
.word $0000 ; south bg
|
||||||
|
@ -52,6 +52,8 @@ stoney_start:
|
|||||||
jsr update_compass_state
|
jsr update_compass_state
|
||||||
jsr update_tunnel_lights
|
jsr update_tunnel_lights
|
||||||
jsr update_pump_state
|
jsr update_pump_state
|
||||||
|
jsr update_hatch_state
|
||||||
|
jsr update_inside_lighthouse_action
|
||||||
|
|
||||||
lda #1
|
lda #1
|
||||||
sta CURSOR_VISIBLE ; visible at first
|
sta CURSOR_VISIBLE ; visible at first
|
||||||
|
@ -1469,9 +1469,12 @@ trunk_open_plug:
|
|||||||
bne water_already_gone
|
bne water_already_gone
|
||||||
|
|
||||||
lda #12
|
lda #12
|
||||||
sta ANIMATE_FRAME
|
bne water_water_water ; bra
|
||||||
|
|
||||||
water_already_gone:
|
water_already_gone:
|
||||||
|
lda #0
|
||||||
|
water_water_water:
|
||||||
|
sta ANIMATE_FRAME
|
||||||
lda TRUNK_STATE
|
lda TRUNK_STATE
|
||||||
eor #TRUNK_VALVE_OPEN
|
eor #TRUNK_VALVE_OPEN
|
||||||
ora #TRUNK_WATER_DRAINED
|
ora #TRUNK_WATER_DRAINED
|
||||||
@ -1619,9 +1622,28 @@ inside_and_drained:
|
|||||||
lda #STONEY_LIGHTHOUSE_SPIRAL
|
lda #STONEY_LIGHTHOUSE_SPIRAL
|
||||||
sta LOCATION
|
sta LOCATION
|
||||||
jmp change_location
|
jmp change_location
|
||||||
|
|
||||||
inside_water_up:
|
inside_water_up:
|
||||||
|
|
||||||
|
lda TRUNK_STATE
|
||||||
|
and #TRUNK_LID_OPEN
|
||||||
|
beq inside_water_do_nothing
|
||||||
|
|
||||||
|
; take key
|
||||||
|
lda TRUNK_STATE
|
||||||
|
ora #TRUNK_KEY_TAKEN
|
||||||
|
sta TRUNK_STATE
|
||||||
|
|
||||||
|
; switch cursor to have key
|
||||||
|
lda #HOLDING_KEY
|
||||||
|
sta HOLDING_ITEM
|
||||||
|
|
||||||
|
; HACK
|
||||||
|
; swap out so we can open lock now
|
||||||
|
|
||||||
|
jsr update_inside_lighthouse_action
|
||||||
|
|
||||||
|
inside_water_do_nothing:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
rotate_to_ladder:
|
rotate_to_ladder:
|
||||||
@ -1630,6 +1652,9 @@ rotate_to_ladder:
|
|||||||
jmp change_direction
|
jmp change_direction
|
||||||
|
|
||||||
|
|
||||||
|
;=============================
|
||||||
|
; draw inside of lighthouse
|
||||||
|
;=============================
|
||||||
|
|
||||||
draw_inside_lighthouse:
|
draw_inside_lighthouse:
|
||||||
|
|
||||||
@ -1640,6 +1665,26 @@ draw_inside_lighthouse:
|
|||||||
|
|
||||||
looking_toward_trunk:
|
looking_toward_trunk:
|
||||||
|
|
||||||
|
; if trunk is open and key not taken, draw it
|
||||||
|
lda TRUNK_STATE
|
||||||
|
and #(TRUNK_KEY_TAKEN|TRUNK_LID_OPEN)
|
||||||
|
cmp #TRUNK_LID_OPEN
|
||||||
|
bne dont_draw_key
|
||||||
|
|
||||||
|
lda #16
|
||||||
|
sta XPOS
|
||||||
|
lda #30
|
||||||
|
sta YPOS
|
||||||
|
|
||||||
|
lda #<trunk_key_sprite
|
||||||
|
sta INL
|
||||||
|
lda #>trunk_key_sprite
|
||||||
|
sta INH
|
||||||
|
jsr put_sprite_crop
|
||||||
|
|
||||||
|
|
||||||
|
dont_draw_key:
|
||||||
|
|
||||||
lda ANIMATE_FRAME
|
lda ANIMATE_FRAME
|
||||||
|
|
||||||
; since 0 is the static image, we can just treat
|
; since 0 is the static image, we can just treat
|
||||||
@ -1767,3 +1812,120 @@ trunk_key_sprite:
|
|||||||
.byte $00,$A0,$A0,$00,$A0
|
.byte $00,$A0,$A0,$00,$A0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;============================
|
||||||
|
; update hatch state
|
||||||
|
;============================
|
||||||
|
update_hatch_state:
|
||||||
|
; default is locked and can't go to top
|
||||||
|
|
||||||
|
lda TRUNK_STATE
|
||||||
|
and #TRUNK_HATCH_OPEN
|
||||||
|
beq close_hatch
|
||||||
|
|
||||||
|
open_hatch:
|
||||||
|
ldy #LOCATION_EAST_EXIT
|
||||||
|
lda #STONEY_LIGHTHOUSE_UPSTAIRS
|
||||||
|
sta location5,Y ; STONEY_LIGHTHOUSE_INSIDE
|
||||||
|
|
||||||
|
ldy #LOCATION_EAST_BG
|
||||||
|
lda #<lighthouse_inside_e_lzsa
|
||||||
|
sta location5,Y ; STONEY_LIGHTHOUSE_INSIDE
|
||||||
|
lda #>lighthouse_inside_e_lzsa
|
||||||
|
sta location5+1,Y ; STONEY_LIGHTHOUSE_INSIDE
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
close_hatch:
|
||||||
|
ldy #LOCATION_EAST_EXIT
|
||||||
|
lda #$ff
|
||||||
|
sta location5,Y ; STONEY_LIGHTHOUSE_INSIDE
|
||||||
|
|
||||||
|
ldy #LOCATION_EAST_BG
|
||||||
|
lda #<lighthouse_inside_locked_e_lzsa
|
||||||
|
sta location5,Y ; STONEY_LIGHTHOUSE_INSIDE
|
||||||
|
lda #>lighthouse_inside_locked_e_lzsa
|
||||||
|
sta location5+1,Y ; STONEY_LIGHTHOUSE_INSIDE
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
;========================
|
||||||
|
; update inside lighthouse action
|
||||||
|
;========================
|
||||||
|
; change action behavior if holding key
|
||||||
|
update_inside_lighthouse_action:
|
||||||
|
|
||||||
|
lda HOLDING_ITEM
|
||||||
|
cmp #HOLDING_KEY
|
||||||
|
bne normal_action
|
||||||
|
|
||||||
|
holding_action:
|
||||||
|
ldy #LOCATION_SPECIAL_EXIT
|
||||||
|
lda #DIRECTION_E
|
||||||
|
sta location5,Y ; STONEY_LIGHTHOUSE_INSIDE
|
||||||
|
ldy #LOCATION_SPECIAL_X1
|
||||||
|
lda #12
|
||||||
|
sta location5,Y
|
||||||
|
lda #19
|
||||||
|
sta location5+1,Y
|
||||||
|
lda #8
|
||||||
|
sta location5+2,Y
|
||||||
|
lda #20
|
||||||
|
sta location5+3,Y
|
||||||
|
|
||||||
|
ldy #LOCATION_SPECIAL_FUNC
|
||||||
|
lda #<(unlock_hatch-1)
|
||||||
|
sta location5,Y
|
||||||
|
lda #>(unlock_hatch-1)
|
||||||
|
sta location5+1,Y
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
normal_action:
|
||||||
|
ldy #LOCATION_SPECIAL_EXIT
|
||||||
|
lda #DIRECTION_N
|
||||||
|
sta location5,Y ; STONEY_LIGHTHOUSE_INSIDE
|
||||||
|
ldy #LOCATION_SPECIAL_X1
|
||||||
|
lda #10
|
||||||
|
sta location5,Y
|
||||||
|
lda #35
|
||||||
|
sta location5+1,Y
|
||||||
|
lda #20
|
||||||
|
sta location5+2,Y
|
||||||
|
lda #44
|
||||||
|
sta location5+3,Y
|
||||||
|
|
||||||
|
ldy #LOCATION_SPECIAL_FUNC
|
||||||
|
lda #<(handle_inside_lighthouse-1)
|
||||||
|
sta location5,Y
|
||||||
|
lda #>(handle_inside_lighthouse-1)
|
||||||
|
sta location5+1,Y
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;========================
|
||||||
|
; unlock the hatch
|
||||||
|
;========================
|
||||||
|
; FIXME: show animation?
|
||||||
|
; drop key?
|
||||||
|
; in actual game you still have to manually open hatch
|
||||||
|
; after the lock falls off
|
||||||
|
unlock_hatch:
|
||||||
|
|
||||||
|
; drop key
|
||||||
|
lda #0
|
||||||
|
sta HOLDING_ITEM
|
||||||
|
|
||||||
|
jsr update_inside_lighthouse_action
|
||||||
|
|
||||||
|
; unlock the hatch
|
||||||
|
lda TRUNK_STATE
|
||||||
|
ora #TRUNK_HATCH_OPEN
|
||||||
|
sta TRUNK_STATE
|
||||||
|
|
||||||
|
jsr update_hatch_state
|
||||||
|
jmp change_direction
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user