mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-11-18 21:06:31 +00:00
mist: nibel: can close gate from one side
This commit is contained in:
parent
9eb3bac9d5
commit
034d7d5637
@ -16,6 +16,7 @@ nibel_graphics.inc: \
|
||||
blue_path2_n.lzsa blue_path2_s.lzsa \
|
||||
blue_path_2p25_n.lzsa blue_path_2p25_s.lzsa blue_path_2p25_e.lzsa \
|
||||
blue_path_2p25_open_e.lzsa \
|
||||
blue_path_2p25_gate_s.lzsa \
|
||||
blue_path_2p5_n.lzsa blue_path_2p5_s.lzsa \
|
||||
blue_path_2p75_n.lzsa blue_path_2p75_s.lzsa \
|
||||
blue_path3_n.lzsa blue_path3_s.lzsa \
|
||||
@ -49,6 +50,7 @@ nibel_graphics.inc: \
|
||||
echo "blue_path_2p25_s_lzsa: .incbin \"blue_path_2p25_s.lzsa\"" >> nibel_graphics.inc
|
||||
echo "blue_path_2p25_e_lzsa: .incbin \"blue_path_2p25_e.lzsa\"" >> nibel_graphics.inc
|
||||
echo "blue_path_2p25_open_e_lzsa: .incbin \"blue_path_2p25_open_e.lzsa\"" >> nibel_graphics.inc
|
||||
echo "blue_path_2p25_gate_s_lzsa: .incbin \"blue_path_2p25_gate_s.lzsa\"" >> nibel_graphics.inc
|
||||
echo "blue_path_2p5_n_lzsa: .incbin \"blue_path_2p5_n.lzsa\"" >> nibel_graphics.inc
|
||||
echo "blue_path_2p5_s_lzsa: .incbin \"blue_path_2p5_s.lzsa\"" >> nibel_graphics.inc
|
||||
echo "blue_path_2p75_n_lzsa: .incbin \"blue_path_2p75_n.lzsa\"" >> nibel_graphics.inc
|
||||
|
BIN
mist/graphics_nibel/blue_path_2p25_gate_s.png
Normal file
BIN
mist/graphics_nibel/blue_path_2p25_gate_s.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 907 B After Width: | Height: | Size: 8.2 KiB |
@ -586,4 +586,4 @@ location30:
|
||||
.byte 11,27 ; special x
|
||||
.byte 4,44 ; special y
|
||||
.word scary_entrance-1 ; special function
|
||||
|
||||
; FIXME: we should also still handle south stuff if possible
|
||||
|
12
mist/nibel.s
12
mist/nibel.s
@ -83,6 +83,10 @@ game_loop:
|
||||
beq animate_projector
|
||||
cmp #NIBEL_SHACK_CENTER
|
||||
beq animate_trap
|
||||
cmp #NIBEL_BLUE_PATH_2P25
|
||||
beq animate_gate_s
|
||||
cmp #NIBEL_BLUE_PATH_2P5
|
||||
beq animate_gate_n
|
||||
|
||||
jmp nothing_special
|
||||
|
||||
@ -102,6 +106,14 @@ animate_trap:
|
||||
jsr draw_trap
|
||||
jmp nothing_special
|
||||
|
||||
animate_gate_s:
|
||||
jsr update_gate_s
|
||||
jmp nothing_special
|
||||
|
||||
animate_gate_n:
|
||||
jsr update_gate_n
|
||||
jmp nothing_special
|
||||
|
||||
animate_viewer:
|
||||
lda ANIMATE_FRAME
|
||||
beq nothing_special
|
||||
|
@ -1,3 +1,59 @@
|
||||
update_gate_n:
|
||||
rts
|
||||
|
||||
update_gate_s:
|
||||
|
||||
lda ANIMATE_FRAME
|
||||
beq open_gate_s
|
||||
bne close_gate_s
|
||||
|
||||
open_gate_s:
|
||||
ldy #LOCATION_SOUTH_BG
|
||||
lda location19,Y ; NIBEL_BLUE_PATH_2P25
|
||||
cmp #<blue_path_2p25_s_lzsa
|
||||
beq done_open_gate_s ; see if already open
|
||||
|
||||
lda #<blue_path_2p25_s_lzsa
|
||||
sta location19,Y ; NIBEL_BLUE_PATH_2P25
|
||||
lda #>blue_path_2p25_s_lzsa
|
||||
sta location19+1,Y ; NIBEL_BLUE_PATH_2P25
|
||||
jsr change_direction
|
||||
done_open_gate_s:
|
||||
rts
|
||||
|
||||
close_gate_s:
|
||||
ldy #LOCATION_SOUTH_BG
|
||||
lda location19,Y ; NIBEL_BLUE_PATH_2P25
|
||||
cmp #<blue_path_2p25_gate_s_lzsa
|
||||
beq done_close_gate_s ; see if already closed
|
||||
|
||||
lda #<blue_path_2p25_gate_s_lzsa
|
||||
sta location19,Y ; NIBEL_BLUE_PATH_2P25
|
||||
lda #>blue_path_2p25_gate_s_lzsa
|
||||
sta location19+1,Y ; NIBEL_BLUE_PATH_2P25
|
||||
|
||||
; lda ANIMATE_FRAME
|
||||
; pha
|
||||
|
||||
jsr change_direction
|
||||
|
||||
; pla
|
||||
; sta ANIMATE_FRAME
|
||||
|
||||
done_close_gate_s:
|
||||
|
||||
lda FRAMEL
|
||||
and #$3f
|
||||
bne really_done_close_gate_s
|
||||
|
||||
dec ANIMATE_FRAME
|
||||
|
||||
really_done_close_gate_s:
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
draw_gate_animation_s:
|
||||
lda DIRECTION
|
||||
cmp #DIRECTION_S
|
||||
@ -435,7 +491,7 @@ handle_shack_door:
|
||||
|
||||
; swing gate (26,27,28,29)
|
||||
|
||||
lda #1
|
||||
lda #2
|
||||
sta ANIMATE_FRAME
|
||||
|
||||
rts
|
||||
|
Loading…
Reference in New Issue
Block a user