ootw: add pool monster

This commit is contained in:
Vince Weaver 2019-01-17 00:22:51 -05:00
parent c3b36946b0
commit 5c1c4973b5
3 changed files with 79 additions and 0 deletions

View File

@ -67,6 +67,9 @@ ootw:
lda #0
sta GAIT
lda #30
sta TENTACLE_PROGRESS
;============================
; Main Loop
;============================
@ -147,6 +150,60 @@ game_loop:
jsr put_sprite
;===============
; move/draw tentacle monster
lda FRAMEH
and #3
bne tentacle_move
lda FRAMEL
cmp #$ff
bne tentacle_move
tentacle_init:
sec
lda PHYSICIST_X
sbc #2
sta TENTACLE_X
lda #0
sta TENTACLE_PROGRESS
tentacle_move:
lda TENTACLE_PROGRESS
cmp #26
bpl no_tentacle
; lda FRAMEL
; and #$30 ; 0110 1100
; lsr
; lsr
; lsr
tax
lda tentacle_progression,X
sta INL
lda tentacle_progression+1,X
sta INH
lda TENTACLE_X
sta XPOS
lda #22
sta YPOS
lda FRAMEL
and #$3f
bne no_tentacle_progress
inc TENTACLE_PROGRESS
inc TENTACLE_PROGRESS
no_tentacle_progress:
jsr put_sprite
no_tentacle:
;===============
; draw physicist

View File

@ -191,6 +191,26 @@ slug_attack:
;=======================
; Tentacle
tentacle_progression:
.word tentacle0 ; 0
.word tentacle1 ; 1
.word tentacle2 ; 2
.word tentacle3 ; 3
.word tentacle4 ; 4
.word tentacle5 ; 5
.word tentacle5 ; 6
.word tentacle5 ; 7
.word tentacle4 ; 8
.word tentacle3 ; 9
.word tentacle2 ; 10
.word tentacle1 ; 11
.word tentacle0 ; 12
tentacle0:
.byte $2,$5
.byte $aa,$aa

View File

@ -152,6 +152,8 @@ XPOS = $F3
YPOS = $F4
DIRECTION = $F5
GAIT = $F6
TENTACLE_X = $F7
TENTACLE_PROGRESS = $F8
TEMP = $FA
TEMPY = $FB
INL = $FC