ootw: add falling boulder

This commit is contained in:
Vince Weaver 2019-01-18 00:27:32 -05:00
parent 07476896d5
commit 17cc990e5a
4 changed files with 43 additions and 0 deletions

View File

@ -23,6 +23,9 @@ ootw:
lda #1
sta DIRECTION
lda #40
sta BOULDER_Y
jsr ootw_pool
;===========================

View File

@ -94,6 +94,16 @@ earthquake_init:
lda #200
sta EQUAKE_PROGRESS
lda #0
sta BOULDER_Y
jsr random16
lda SEEDL
and #$1f
clc
adc #4
sta BOULDER_X
earth_mover:
lda EQUAKE_PROGRESS
beq earth_still
@ -144,7 +154,28 @@ done_shake:
;======================
; draw falling boulders
lda BOULDER_Y
cmp #38
bpl no_boulder
lda #<boulder
sta INL
lda #>boulder
sta INH
lda BOULDER_X
sta XPOS
lda BOULDER_Y
sta YPOS
jsr put_sprite
lda FRAMEL
and #$3
bne no_boulder
inc BOULDER_Y
inc BOULDER_Y
no_boulder:
;=======================
; page flip

View File

@ -361,6 +361,13 @@ caught8:
.byte $aa,$aa,$aa,$aa
.byte $aa,$aa,$aa,$5e
;============================
; Falling boulder
boulder:
.byte $3,$2
.byte $22,$22,$2a
.byte $22,$22,$22

View File

@ -138,6 +138,8 @@ HGR_COLOR = $E4
GAME_OVER = $E5
EQUAKE_PROGRESS = $E6
EARTH_OFFSET = $E7
BOULDER_X = $E8
BOULDER_Y = $E9
;SHIPY = $E4
;YADD = $E5
;LOOP = $E6