lemm: open door

This commit is contained in:
Vince Weaver 2022-03-09 01:05:00 -05:00
parent 5f73aaa421
commit 3d6aab63d0
7 changed files with 66 additions and 7 deletions

View File

@ -40,6 +40,7 @@ LEMM: lemm.o
lemm.o: lemm.s zp.inc hardware.inc \
graphics/graphics_test.inc \
intro_level1.s update_time.s hgr_sprite.s draw_flames.s \
draw_door.s \
interrupt_handler.s
ca65 -o lemm.o lemm.s -l lemm.lst

39
games/lemm/draw_door.s Normal file
View File

@ -0,0 +1,39 @@
draw_door:
lda FRAMEL
lsr
and #$3
tay
lda door_l,Y
sta INL
lda door_h,Y
sta INH
ldx #9 ; 63
stx CURSOR_X
lda #36
sta CURSOR_Y
jsr hgr_draw_sprite
lda FRAMEL
cmp #7
bne not_door_done
inc DOOR_OPEN
cli ; start music
not_door_done:
rts
door_l:
.byte <door1_sprite,<door2_sprite,<door3_sprite,<door4_sprite
door_h:
.byte >door1_sprite,>door2_sprite,>door3_sprite,>door4_sprite

View File

@ -1,5 +1,5 @@
; updates the time left
draw_flames:
; draw left_flame

View File

@ -45,6 +45,12 @@ sprites.inc: sprites.png
$(HGR_SPRITE) -s -l rflame2_sprite sprites.png 21 36 27 41 >> sprites.inc
$(HGR_SPRITE) -s -l rflame3_sprite sprites.png 21 43 27 48 >> sprites.inc
$(HGR_SPRITE) -s -l rflame4_sprite sprites.png 21 50 27 55 >> sprites.inc
$(HGR_SPRITE) -s -l door1_sprite sprites.png 7 57 55 69 >> sprites.inc
$(HGR_SPRITE) -s -l door2_sprite sprites.png 7 76 55 91 >> sprites.inc
$(HGR_SPRITE) -s -l door3_sprite sprites.png 7 98 55 114 >> sprites.inc
$(HGR_SPRITE) -s -l door4_sprite sprites.png 7 118 55 137 >> sprites.inc

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@ -238,12 +238,7 @@ zurg:
jsr decompress_lzsa2_fast
;=======================
; init vars
;=======================
lda #0
sta LEVEL_OVER
;=======================
; Play "Let's Go"
@ -254,7 +249,16 @@ zurg:
; start music
;=======================
cli
; cli
;=======================
; init vars
;=======================
lda #0
sta LEVEL_OVER
sta DOOR_OPEN
sta FRAMEL
; set up time
@ -271,6 +275,13 @@ zurg:
;===================
main_loop:
lda DOOR_OPEN
bne door_is_open
jsr draw_door
door_is_open:
jsr draw_flames
jsr update_time
@ -344,6 +355,7 @@ load_song_chunk_good:
.include "update_time.s"
.include "intro_level1.s"
.include "draw_flames.s"
.include "draw_door.s"
; pt3 player

View File

@ -55,6 +55,7 @@ CURSOR_Y = $78
DISP_PAGE = $79
DRAW_PAGE = $7A
LEVEL_OVER = $7B
DOOR_OPEN = $7C
APPLEII_MODEL = $8B