From 6aed02ca086c559d6ab1f529148bc8a450f0bee9 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Thu, 22 Aug 2019 13:27:18 -0400 Subject: [PATCH] ootw: c2: add initial shield --- ootw/ootw_c2_jail.s | 23 +++++++++++++++++++++++ ootw/zp.inc | 2 ++ 2 files changed, 25 insertions(+) diff --git a/ootw/ootw_c2_jail.s b/ootw/ootw_c2_jail.s index ac53b0ef..4b7d0e3c 100644 --- a/ootw/ootw_c2_jail.s +++ b/ootw/ootw_c2_jail.s @@ -29,6 +29,7 @@ ootw_jail_init: lda #1 sta JAIL_POWER_ON + sta FIRST_SHIELD lda #F_RUNNING sta friend_state @@ -202,6 +203,28 @@ jail2: cmp #2 bne jail3 + + lda FIRST_SHIELD + beq not_first_shield + + ; pretend a battle was underway +first_shield: + lda #0 + sta FIRST_SHIELD + sta shield_count + + lda #1 + sta shield_out + lda #18 + sta shield_x + + lda #28 + sta shield_y + + inc SHIELD_OUT + +not_first_shield: + lda #(-4+128) sta LEFT_LIMIT lda #(39+128) diff --git a/ootw/zp.inc b/ootw/zp.inc index be5b530d..97b80597 100644 --- a/ootw/zp.inc +++ b/ootw/zp.inc @@ -91,6 +91,7 @@ PT3_TEMP = $8A ; More zero-page addresses ; we try not to conflict with anything DOS, MONITOR or BASIC related +FIRST_SHIELD = $BD COLLISION_X = $BE COLLISION_Y = $BF @@ -110,6 +111,7 @@ BEAST_DEAD = $CB ; 1 VENT_OPEN = $CC ; 2 INTRO_REPEAT = $CD ; INTRO + LASER_TEMP = $CE ; 2+ LEFT_SHOOT_TARGET = $CF ; ALL RIGHT_SHOOT_TARGET = $D0 ; ALL