lemm: fix to use right door on level5

This commit is contained in:
Vince Weaver 2022-03-15 16:09:38 -04:00
parent d0f88ee8d1
commit 6a86dfe89c
3 changed files with 61 additions and 1 deletions

View File

@ -52,3 +52,63 @@ door_l:
door_h:
.byte >door1_sprite,>door2_sprite,>door3_sprite,>door4_sprite
;=================
; draw the door L5
;=================
draw_door_5:
lda FRAMEL
lsr
and #$3
tay
lda bdoor_l,Y
sta INL
lda bdoor_h,Y
sta INH
ldx #9 ; 63
stx XPOS
lda #24
sta YPOS
jsr hgr_draw_sprite
jsr hgr_sprite_page_toggle
ldx #9 ; 63
stx XPOS
lda #24
sta YPOS
jsr hgr_draw_sprite
jsr hgr_sprite_page_toggle
lda FRAMEL
cmp #7
bne not_bdoor_done
inc DOOR_OPEN
cli ; start music
not_bdoor_done:
rts
bdoor_l:
.byte <bdoor1_sprite,<bdoor2_sprite,<bdoor3_sprite,<bdoor4_sprite
bdoor_h:
.byte >bdoor1_sprite,>bdoor2_sprite,>bdoor3_sprite,>bdoor4_sprite

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -163,7 +163,7 @@ l5_no_load_chunk:
lda DOOR_OPEN
bne l5_door_is_open
jsr draw_door
jsr draw_door_5
l5_door_is_open: