parent
d307d21f57
commit
0f6cbc7e47
|
@ -22,9 +22,11 @@ mist_graphics.inc: \
|
|||
step_land3_w.lzsa step_land3_e.lzsa \
|
||||
step_top_e.lzsa step_top_w.lzsa step_top_n.lzsa step_top_s.lzsa \
|
||||
pool_n.lzsa pool_s.lzsa pool_e.lzsa pool_w.lzsa \
|
||||
pool_shipup_s.lzsa \
|
||||
clock_e.lzsa clock_n.lzsa clock_s.lzsa clock_bridge.lzsa \
|
||||
spaceship_far_e.lzsa spaceship_far_n.lzsa \
|
||||
tree1_n.lzsa tree1_s.lzsa \
|
||||
tree1_shipup_n.lzsa \
|
||||
tree2_n.lzsa tree2_s.lzsa tree2_e.lzsa tree2_w.lzsa \
|
||||
tree5_n.lzsa tree5_e.lzsa tree5_s.lzsa \
|
||||
gear_n.lzsa gear_w.lzsa gear_s.lzsa gear_open_n.lzsa\
|
||||
|
@ -72,6 +74,7 @@ mist_graphics.inc: \
|
|||
echo "pool_s_lzsa: .incbin \"pool_s.lzsa\"" >> mist_graphics.inc
|
||||
echo "pool_e_lzsa: .incbin \"pool_e.lzsa\"" >> mist_graphics.inc
|
||||
echo "pool_w_lzsa: .incbin \"pool_w.lzsa\"" >> mist_graphics.inc
|
||||
echo "pool_shipup_s_lzsa: .incbin \"pool_shipup_s.lzsa\"" >> mist_graphics.inc
|
||||
echo "clock_s_lzsa: .incbin \"clock_s.lzsa\"" >> mist_graphics.inc
|
||||
echo "clock_n_lzsa: .incbin \"clock_n.lzsa\"" >> mist_graphics.inc
|
||||
echo "clock_e_lzsa: .incbin \"clock_e.lzsa\"" >> mist_graphics.inc
|
||||
|
@ -80,6 +83,7 @@ mist_graphics.inc: \
|
|||
echo "spaceship_far_e_lzsa: .incbin \"spaceship_far_e.lzsa\"" >> mist_graphics.inc
|
||||
echo "tree1_n_lzsa: .incbin \"tree1_n.lzsa\"" >> mist_graphics.inc
|
||||
echo "tree1_s_lzsa: .incbin \"tree1_s.lzsa\"" >> mist_graphics.inc
|
||||
echo "tree1_shipup_n_lzsa: .incbin \"tree1_shipup_n.lzsa\"" >> mist_graphics.inc
|
||||
echo "tree2_n_lzsa: .incbin \"tree2_n.lzsa\"" >> mist_graphics.inc
|
||||
echo "tree2_s_lzsa: .incbin \"tree2_s.lzsa\"" >> mist_graphics.inc
|
||||
echo "tree2_e_lzsa: .incbin \"tree2_e.lzsa\"" >> mist_graphics.inc
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
|
@ -57,6 +57,9 @@ mist_start:
|
|||
; init the gear
|
||||
jsr open_the_gear
|
||||
|
||||
; make the ship right
|
||||
jsr adjust_ship
|
||||
|
||||
|
||||
game_loop:
|
||||
;=================
|
||||
|
|
|
@ -1,3 +1,62 @@
|
|||
;==========================
|
||||
; adjust ship up/down
|
||||
;==========================
|
||||
adjust_ship:
|
||||
|
||||
lda SHIP_RAISED
|
||||
beq make_ship_down
|
||||
make_ship_up:
|
||||
|
||||
; update backgrounds
|
||||
|
||||
ldy #LOCATION_SOUTH_BG
|
||||
lda #<pool_shipup_s_lzsa
|
||||
sta location10,Y ; MIST_POOL
|
||||
lda #>pool_shipup_s_lzsa
|
||||
sta location10+1,Y ; MIST_POOL
|
||||
|
||||
ldy #LOCATION_NORTH_BG
|
||||
lda #<tree1_shipup_n_lzsa
|
||||
sta location20,Y ; MIST_TREE_CORRIDOR_1
|
||||
lda #>tree1_shipup_n_lzsa
|
||||
sta location20+1,Y ; MIST_TREE_CORRIDOR_1
|
||||
|
||||
|
||||
|
||||
; hook up exit on dock to ship
|
||||
|
||||
|
||||
rts
|
||||
|
||||
make_ship_down:
|
||||
|
||||
; update backgrounds
|
||||
|
||||
ldy #LOCATION_SOUTH_BG
|
||||
lda #<pool_s_lzsa
|
||||
sta location10,Y ; MIST_POOL
|
||||
lda #>pool_s_lzsa
|
||||
sta location10+1,Y ; MIST_POOL
|
||||
|
||||
ldy #LOCATION_NORTH_BG
|
||||
lda #<tree1_n_lzsa
|
||||
sta location20,Y ; MIST_TREE_CORRIDOR_1
|
||||
lda #>tree1_n_lzsa
|
||||
sta location20+1,Y ; MIST_TREE_CORRIDOR_1
|
||||
|
||||
|
||||
|
||||
; remove exit on dock to ship
|
||||
|
||||
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;==========================
|
||||
; draw green if on
|
||||
;==========================
|
||||
draw_pillar:
|
||||
lda LOCATION
|
||||
sec
|
||||
|
@ -31,9 +90,11 @@ done_draw_pillar:
|
|||
rts
|
||||
|
||||
|
||||
;=========================
|
||||
; pillar was touched
|
||||
;=========================
|
||||
|
||||
touch_pillar:
|
||||
lda PILLAR_ON
|
||||
tax ; save to see if toggle ship state
|
||||
|
||||
lda LOCATION
|
||||
sec
|
||||
|
@ -46,8 +107,82 @@ touch_pillar:
|
|||
|
||||
; check to see if we need to raise/lower ship
|
||||
|
||||
lda SHIP_RAISED
|
||||
beq ship_is_down
|
||||
|
||||
ship_is_up:
|
||||
lda PILLAR_ON
|
||||
cmp #(PILLAR_SNAKE|PILLAR_BUG|PILLAR_LEAF)
|
||||
beq done_adjusting_ship
|
||||
|
||||
; lower ship
|
||||
lda #0
|
||||
jmp move_the_ship
|
||||
|
||||
ship_is_down:
|
||||
|
||||
lda PILLAR_ON
|
||||
cmp #(PILLAR_SNAKE|PILLAR_BUG|PILLAR_LEAF)
|
||||
bne done_adjusting_ship
|
||||
|
||||
; raise ship
|
||||
lda #1
|
||||
jmp move_the_ship
|
||||
|
||||
done_adjusting_ship:
|
||||
rts
|
||||
|
||||
|
||||
move_the_ship:
|
||||
sta SHIP_RAISED
|
||||
|
||||
; play noise
|
||||
|
||||
jsr beep
|
||||
|
||||
; adjust the backgrounds
|
||||
|
||||
jsr adjust_ship
|
||||
|
||||
rts
|
||||
|
||||
|
||||
;===========================
|
||||
; BEEP (inlined)
|
||||
;===========================
|
||||
beep:
|
||||
ldy #235
|
||||
sty tone_smc+1
|
||||
|
||||
; BEEP
|
||||
; repeat 30 times
|
||||
lda #30 ; 2
|
||||
tone1_loop:
|
||||
|
||||
tone_smc:
|
||||
|
||||
ldy #24 ; 2
|
||||
loopC: ldx #6 ; 2
|
||||
loopD: dex ; 1
|
||||
bne loopD ; 2
|
||||
dey ; 1
|
||||
bne loopC ; 2
|
||||
|
||||
bit SPEAKER ; 3 ; click speaker
|
||||
|
||||
sec ; 1
|
||||
sbc #1 ; 2
|
||||
bne tone1_loop ; 2
|
||||
|
||||
; Try X=6 Y=21 cycles=757
|
||||
; Try X=6 Y=24 cycles=865
|
||||
; Try X=7 Y=235 cycles=9636
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
powersoftwo:
|
||||
.byte $01,$02,$04,$08,$10,$20,$40,$80
|
||||
|
||||
|
@ -331,9 +466,3 @@ into_generator:
|
|||
sta LEVEL_OVER
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue