mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-04-02 15:30:05 +00:00
mist: opening gear fully works
This commit is contained in:
parent
05ec65861d
commit
2258d43b1b
@ -83,6 +83,33 @@ no_wrap:
|
||||
cpx #3
|
||||
bne wrap_wheels_loop
|
||||
|
||||
; see if done!
|
||||
; note 0->3, 1->1, 2->2 so want 2/2/1 -> 2/2/1
|
||||
lda CLOCK_TOP
|
||||
cmp #2
|
||||
bne no_open_gear
|
||||
lda CLOCK_MIDDLE
|
||||
cmp #2
|
||||
bne no_open_gear
|
||||
lda CLOCK_BOTTOM
|
||||
cmp #1
|
||||
bne no_open_gear
|
||||
|
||||
lda #1
|
||||
change_gear:
|
||||
sta GEAR_OPEN
|
||||
|
||||
jsr open_the_gear
|
||||
jmp inside_done
|
||||
|
||||
no_open_gear:
|
||||
lda GEAR_OPEN
|
||||
beq inside_done
|
||||
|
||||
; change if it was open
|
||||
lda #0
|
||||
jmp change_gear
|
||||
|
||||
inside_done:
|
||||
rts
|
||||
|
||||
@ -161,12 +188,58 @@ draw_clock_inside:
|
||||
|
||||
open_the_gear:
|
||||
|
||||
; FIXME
|
||||
lda GEAR_OPEN
|
||||
beq no_gear_open
|
||||
|
||||
; replace gear bg 1
|
||||
; re-route click to MECHE age
|
||||
; replace gear bg 2
|
||||
; replace gear sprite inside clock
|
||||
yes_gear_open:
|
||||
ldy #LOCATION_NORTH_EXIT
|
||||
lda #30
|
||||
sta location19,Y
|
||||
|
||||
ldy #LOCATION_NORTH_EXIT_DIR
|
||||
lda #DIRECTION_E
|
||||
sta location19,Y
|
||||
|
||||
ldy #LOCATION_NORTH_BG
|
||||
lda #<gear_open_n_lzsa
|
||||
sta location19,Y
|
||||
lda #>gear_open_n_lzsa
|
||||
sta location19+1,Y
|
||||
|
||||
ldy #LOCATION_SOUTH_BG
|
||||
lda #<clock_inside_open_lzsa
|
||||
sta location27,Y
|
||||
lda #>clock_inside_open_lzsa
|
||||
sta location27+1,Y
|
||||
|
||||
jmp done_open_the_gear
|
||||
|
||||
|
||||
no_gear_open:
|
||||
|
||||
ldy #LOCATION_NORTH_EXIT
|
||||
lda #$FF
|
||||
sta location19,Y
|
||||
|
||||
; ldy #LOCATION_NORTH_EXIT_DIR
|
||||
; lda #DIRECTION_E
|
||||
; sta location19,Y
|
||||
|
||||
ldy #LOCATION_NORTH_BG
|
||||
lda #<gear_n_lzsa
|
||||
sta location19,Y
|
||||
lda #>gear_n_lzsa
|
||||
sta location19+1,Y
|
||||
|
||||
ldy #LOCATION_SOUTH_BG
|
||||
lda #<clock_inside_s_lzsa
|
||||
sta location27,Y
|
||||
lda #>clock_inside_s_lzsa
|
||||
sta location27+1,Y
|
||||
|
||||
done_open_the_gear:
|
||||
|
||||
jsr change_location
|
||||
|
||||
rts
|
||||
|
||||
@ -327,3 +400,76 @@ clock_puzzle_done:
|
||||
|
||||
|
||||
.include "clock_sprites.inc"
|
||||
|
||||
|
||||
; put at 12,6 on screen 4 N
|
||||
gear_block_sprite1:
|
||||
.byte 4,3
|
||||
.byte $ff,$ff,$ff,$ff
|
||||
.byte $ff,$ff,$ff,$ff
|
||||
.byte $ff,$ff,$ff,$0f
|
||||
|
||||
; put at 9,6 on screen 20 N
|
||||
gear_block_sprite2:
|
||||
.byte 7,4
|
||||
.byte $ff,$ff,$ff,$ff,$ff,$ff,$ff
|
||||
.byte $ff,$ff,$ff,$ff,$ff,$ff,$ff
|
||||
.byte $fd,$fd,$dd,$ff,$dd,$fd,$df
|
||||
.byte $ff,$ff,$dd,$ff,$dd,$ff,$0f
|
||||
|
||||
; put at 21,4 on screen 5 N
|
||||
gear_block_sprite3:
|
||||
.byte 2,2
|
||||
.byte $ff,$ff
|
||||
.byte $ff,$ff
|
||||
|
||||
|
||||
check_gear_delete:
|
||||
lda DIRECTION
|
||||
cmp #DIRECTION_N
|
||||
bne done_gear_delete
|
||||
|
||||
lda LOCATION
|
||||
cmp #4
|
||||
beq gear_look1
|
||||
cmp #20
|
||||
beq gear_look2
|
||||
cmp #5
|
||||
beq gear_look3
|
||||
bne done_gear_delete
|
||||
|
||||
gear_look1:
|
||||
lda #<gear_block_sprite1
|
||||
sta INL
|
||||
lda #>gear_block_sprite1
|
||||
sta INH
|
||||
lda #12
|
||||
sta XPOS
|
||||
lda #6
|
||||
jmp draw_gear_delete
|
||||
|
||||
gear_look2:
|
||||
lda #<gear_block_sprite2
|
||||
sta INL
|
||||
lda #>gear_block_sprite2
|
||||
sta INH
|
||||
lda #9
|
||||
sta XPOS
|
||||
lda #6
|
||||
jmp draw_gear_delete
|
||||
|
||||
gear_look3:
|
||||
lda #<gear_block_sprite3
|
||||
sta INL
|
||||
lda #>gear_block_sprite3
|
||||
sta INH
|
||||
lda #21
|
||||
sta XPOS
|
||||
lda #4
|
||||
|
||||
draw_gear_delete:
|
||||
sta YPOS
|
||||
jsr put_sprite_crop
|
||||
|
||||
done_gear_delete:
|
||||
rts
|
||||
|
@ -31,7 +31,7 @@ mist_graphics.inc: \
|
||||
red_book_open.lzsa red_book_static.lzsa red_book_static2.lzsa \
|
||||
tree2_n.lzsa \
|
||||
tree5_n.lzsa tree5_e.lzsa \
|
||||
gear_n.lzsa gear_w.lzsa gear_s.lzsa \
|
||||
gear_n.lzsa gear_w.lzsa gear_s.lzsa gear_open_n.lzsa\
|
||||
gear_base_n.lzsa \
|
||||
dentist_door_n.lzsa dentist_door_s.lzsa \
|
||||
spaceship_switch_n.lzsa \
|
||||
@ -39,9 +39,10 @@ mist_graphics.inc: \
|
||||
tree_cabin_e.lzsa \
|
||||
clock_island_s.lzsa clock_island_n.lzsa \
|
||||
clock_puzzle_s.lzsa clock_puzzle_bridge.lzsa \
|
||||
clock_inside_s.lzsa \
|
||||
clock_inside_s.lzsa clock_inside_open.lzsa \
|
||||
fireplace_e.lzsa \
|
||||
in_fireplace_w.lzsa in_fireplace_door.lzsa
|
||||
in_fireplace_w.lzsa in_fireplace_door.lzsa \
|
||||
gear_open_e.lzsa
|
||||
echo "m_link_book_lzsa: .incbin \"m_link_book.lzsa\"" > mist_graphics.inc
|
||||
echo "dock_n_lzsa: .incbin \"dock_n.lzsa\"" >> mist_graphics.inc
|
||||
echo "dock_s_lzsa: .incbin \"dock_s.lzsa\"" >> mist_graphics.inc
|
||||
@ -90,6 +91,7 @@ mist_graphics.inc: \
|
||||
echo "gear_n_lzsa: .incbin \"gear_n.lzsa\"" >> mist_graphics.inc
|
||||
echo "gear_s_lzsa: .incbin \"gear_s.lzsa\"" >> mist_graphics.inc
|
||||
echo "gear_w_lzsa: .incbin \"gear_w.lzsa\"" >> mist_graphics.inc
|
||||
echo "gear_open_n_lzsa: .incbin \"gear_open_n.lzsa\"" >> mist_graphics.inc
|
||||
echo "gear_base_n_lzsa: .incbin \"gear_base_n.lzsa\"" >> mist_graphics.inc
|
||||
echo "dentist_door_n_lzsa: .incbin \"dentist_door_n.lzsa\"" >> mist_graphics.inc
|
||||
echo "dentist_door_s_lzsa: .incbin \"dentist_door_s.lzsa\"" >> mist_graphics.inc
|
||||
@ -103,9 +105,11 @@ mist_graphics.inc: \
|
||||
echo "clock_puzzle_s_lzsa: .incbin \"clock_puzzle_s.lzsa\"" >> mist_graphics.inc
|
||||
echo "clock_puzzle_bridge_lzsa: .incbin \"clock_puzzle_bridge.lzsa\"" >> mist_graphics.inc
|
||||
echo "clock_inside_s_lzsa: .incbin \"clock_inside_s.lzsa\"" >> mist_graphics.inc
|
||||
echo "clock_inside_open_lzsa: .incbin \"clock_inside_open.lzsa\"" >> mist_graphics.inc
|
||||
echo "fireplace_e_lzsa: .incbin \"fireplace_e.lzsa\"" >> mist_graphics.inc
|
||||
echo "in_fireplace_w_lzsa: .incbin \"in_fireplace_w.lzsa\"" >> mist_graphics.inc
|
||||
echo "in_fireplace_door_lzsa: .incbin \"in_fireplace_door.lzsa\"" >> mist_graphics.inc
|
||||
echo "gear_open_e_lzsa: .incbin \"gear_open_e.lzsa\"" >> mist_graphics.inc
|
||||
|
||||
%.gr: %.png
|
||||
$(PNG2GR) $< $@
|
||||
|
BIN
mist/graphics_island/clock_inside_open.png
Normal file
BIN
mist/graphics_island/clock_inside_open.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.9 KiB |
BIN
mist/graphics_island/gear_open_e.png
Normal file
BIN
mist/graphics_island/gear_open_e.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.3 KiB |
BIN
mist/graphics_island/gear_open_n.png
Normal file
BIN
mist/graphics_island/gear_open_n.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.0 KiB |
@ -46,6 +46,7 @@ tree5_e_lzsa: .incbin "tree5_e.lzsa"
|
||||
gear_n_lzsa: .incbin "gear_n.lzsa"
|
||||
gear_s_lzsa: .incbin "gear_s.lzsa"
|
||||
gear_w_lzsa: .incbin "gear_w.lzsa"
|
||||
gear_open_n_lzsa: .incbin "gear_open_n.lzsa"
|
||||
gear_base_n_lzsa: .incbin "gear_base_n.lzsa"
|
||||
dentist_door_n_lzsa: .incbin "dentist_door_n.lzsa"
|
||||
dentist_door_s_lzsa: .incbin "dentist_door_s.lzsa"
|
||||
@ -59,6 +60,8 @@ clock_island_n_lzsa: .incbin "clock_island_n.lzsa"
|
||||
clock_puzzle_s_lzsa: .incbin "clock_puzzle_s.lzsa"
|
||||
clock_puzzle_bridge_lzsa: .incbin "clock_puzzle_bridge.lzsa"
|
||||
clock_inside_s_lzsa: .incbin "clock_inside_s.lzsa"
|
||||
clock_inside_open_lzsa: .incbin "clock_inside_open.lzsa"
|
||||
fireplace_e_lzsa: .incbin "fireplace_e.lzsa"
|
||||
in_fireplace_w_lzsa: .incbin "in_fireplace_w.lzsa"
|
||||
in_fireplace_door_lzsa: .incbin "in_fireplace_door.lzsa"
|
||||
gear_open_e_lzsa: .incbin "gear_open_e.lzsa"
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 763 B After Width: | Height: | Size: 12 KiB |
@ -40,7 +40,7 @@ locations:
|
||||
.word location16,location17,location18,location19
|
||||
.word location20,location21,location22,location23
|
||||
.word location24,location25,location26,location27
|
||||
.word location28,location29
|
||||
.word location28,location29,location30
|
||||
|
||||
; myst linking book
|
||||
location0:
|
||||
@ -584,3 +584,23 @@ location29:
|
||||
.byte BG_WEST ; west
|
||||
.byte $ff ; special exit
|
||||
|
||||
; open_gear
|
||||
location30:
|
||||
.byte $ff ; north exit
|
||||
.byte $ff ; south exit
|
||||
.byte 19 ; east exit
|
||||
.byte $ff ; west exit
|
||||
.byte $ff ; north exit_dir
|
||||
.byte $ff ; south exit_dir
|
||||
.byte DIRECTION_N ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
.word $0000 ; north bg
|
||||
.word $0000 ; south bg
|
||||
.word gear_open_e_lzsa ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_EAST
|
||||
.byte DIRECTION_E ; special exit
|
||||
.byte 17,23 ; special x
|
||||
.byte 14,24 ; special y
|
||||
.word exit_level-1 ; special function
|
||||
|
||||
|
16
mist/mist.s
16
mist/mist.s
@ -51,6 +51,10 @@ mist_start:
|
||||
sta CLOCK_HOUR
|
||||
jsr clock_inside_reset
|
||||
|
||||
lda #0
|
||||
sta GEAR_OPEN
|
||||
|
||||
|
||||
not_first_time:
|
||||
|
||||
|
||||
@ -83,8 +87,14 @@ game_loop:
|
||||
; handle special-case forground logic
|
||||
;====================================
|
||||
|
||||
lda GEAR_OPEN
|
||||
beq not_gear_related
|
||||
|
||||
jsr check_gear_delete
|
||||
not_gear_related:
|
||||
|
||||
lda LOCATION
|
||||
cmp #25 ; clock puzzle
|
||||
cmp #25 ; clock puzzle
|
||||
beq location_clock
|
||||
cmp #27
|
||||
beq location_inside_clock
|
||||
@ -95,6 +105,7 @@ location_clock:
|
||||
jmp nothing_special
|
||||
location_inside_clock:
|
||||
jsr draw_clock_inside
|
||||
jmp nothing_special
|
||||
|
||||
|
||||
nothing_special:
|
||||
@ -551,6 +562,8 @@ done_turning:
|
||||
rts
|
||||
|
||||
|
||||
exit_level:
|
||||
rts
|
||||
|
||||
;==========================
|
||||
; includes
|
||||
@ -598,3 +611,4 @@ audio_red_page:
|
||||
audio_link_noise:
|
||||
.incbin "audio/link_noise.btc"
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user