From 55e544610eaafe442d5641e49828240d737c7a31 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 19 Aug 2019 11:31:11 -0400 Subject: [PATCH] ootw: c1: beast behaves better in rope room keeps running when on rope stays on ground when walking --- ootw/TODO | 7 ++++--- ootw/ootw_c1_beast.s | 38 +++++++++++++++++++++++++++++++++----- ootw/ootw_c1_rope.s | 23 ++++++++++++++--------- 3 files changed, 51 insertions(+), 17 deletions(-) diff --git a/ootw/TODO b/ootw/TODO index cccd6370..1c90beb2 100644 --- a/ootw/TODO +++ b/ootw/TODO @@ -85,9 +85,9 @@ BEHAVIOR DIFFERENCES: - earthquake should happen while on rope * beast: - - beast can/should trip and fall if it gets close in the pool - room while running? - + - beast can/should trip and fall if it gets too close but + then you pull away + - beast should climb hill in rope room better @@ -137,6 +137,7 @@ FUTURE WORK: + alien running + friend walking + friend running + + alien punching animation * L1 pool + adjust tentacle to not go off edge of screen diff --git a/ootw/ootw_c1_beast.s b/ootw/ootw_c1_beast.s index 2f68ec2b..73627998 100644 --- a/ootw/ootw_c1_beast.s +++ b/ootw/ootw_c1_beast.s @@ -120,10 +120,29 @@ check_beast_right: check_beast_left: + ; stop if in rope room and at edge + + lda WHICH_CAVE + cmp #3 + bne beast_not_rope_room +beast_rope_room: + lda BEAST_X + cmp #11 + bcs beast_not_rope_room ; bge + + lda #B_STANDING + sta BEAST_STATE + + lda #0 + sta BEAST_COUNT + rts + +beast_not_rope_room: + ; no attack if swinging lda PHYSICIST_STATE cmp #P_SWINGING - beq stop_beast + beq skip_if_swinging ; Pp^pp Bbbbbb ; if B=p @@ -135,10 +154,7 @@ check_beast_left: bne beast_no_stop beq beast_caught -stop_beast: - lda #B_STANDING - sta BEAST_STATE - rts +skip_if_swinging: beast_no_stop: inc BEAST_GAIT ; cycle through animation @@ -170,6 +186,9 @@ beast_caught: ;====================== ; standing + ; need to check for collision here so physicist + ; doesn't just run past beast at arrival + move_beast_standing: lda BEAST_COUNT beq beast_stand_done ; if 0, perma-stand @@ -181,6 +200,15 @@ move_beast_standing: sta BEAST_STATE beast_stand_done: + + lda PHYSICIST_X + cmp BEAST_X + + bne p_not_foolish + + jmp beast_slash_cutscene + +p_not_foolish: rts ;====================================== diff --git a/ootw/ootw_c1_rope.s b/ootw/ootw_c1_rope.s index 10bb86c2..94579968 100644 --- a/ootw/ootw_c1_rope.s +++ b/ootw/ootw_c1_rope.s @@ -71,6 +71,9 @@ load_swing_bg: sta GAIT sta GAME_OVER + lda #3 + sta WHICH_CAVE + jsr setup_beast ;============================ @@ -160,27 +163,29 @@ beyond_quake: ; adjust y for slope + ; shift by 2 from physicist as beast is 9 wide (vs 5) + lda BEAST_X - cmp #26 + cmp #24 bcs beast_no_adjust_y ; bge - cmp #17 - bcc beast_on_platform + cmp #15 + bcc beast_on_platform ; blt - sec - sbc #3 + clc + adc #1 and #$fe ; our sprite code only draws even y jmp beast_done_adjust_y - ; slope is 15 - 26 ( 28 - 36) - ; 26 -> 22 + ; 16 maps to -> 16 + ; 24 maps to -> 24 beast_on_platform: - lda #14 + lda #16 bne beast_done_adjust_y beast_no_adjust_y: - lda #22 + lda #24 beast_done_adjust_y: sta BEAST_Y