From 5c1c4973b5695466a58cf989b230333eed4a99f8 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Thu, 17 Jan 2019 00:22:51 -0500 Subject: [PATCH] ootw: add pool monster --- ootw/ootw.s | 57 +++++++++++++++++++++++++++++++++++++++++++ ootw/ootw_sprites.inc | 20 +++++++++++++++ ootw/zp.inc | 2 ++ 3 files changed, 79 insertions(+) diff --git a/ootw/ootw.s b/ootw/ootw.s index 84429dd8..2352691b 100644 --- a/ootw/ootw.s +++ b/ootw/ootw.s @@ -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 diff --git a/ootw/ootw_sprites.inc b/ootw/ootw_sprites.inc index ab4d4b0f..6326a186 100644 --- a/ootw/ootw_sprites.inc +++ b/ootw/ootw_sprites.inc @@ -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 diff --git a/ootw/zp.inc b/ootw/zp.inc index f7607773..67dded59 100644 --- a/ootw/zp.inc +++ b/ootw/zp.inc @@ -152,6 +152,8 @@ XPOS = $F3 YPOS = $F4 DIRECTION = $F5 GAIT = $F6 +TENTACLE_X = $F7 +TENTACLE_PROGRESS = $F8 TEMP = $FA TEMPY = $FB INL = $FC