diff --git a/ootw/keyboard.s b/ootw/keyboard.s index fb216081..5d8bd3c8 100644 --- a/ootw/keyboard.s +++ b/ootw/keyboard.s @@ -306,6 +306,15 @@ start_crouch_shoot: start_crouch: and #STATE_RUNNING + beq start_crouch_norun + + ldx #4 ; slide a bit + stx GAIT + ora #P_CROUCHING + sta PHYSICIST_STATE + jmp done_keypress + +start_crouch_norun: ora #P_CROUCHING jmp change_state_clear_gait @@ -388,10 +397,7 @@ stand_stance: jmp change_state_clear_gait kick: -; lda #STATE_CROUCHING bit PHYSICIST_STATE ; crouching state in V now -; lda PHYSICIST_STATE -; cmp #P_CROUCHING bvc kick_standing lda #P_CROUCH_KICKING diff --git a/ootw/physicist.s b/ootw/physicist.s index 814ec7ad..9e5b9f9b 100644 --- a/ootw/physicist.s +++ b/ootw/physicist.s @@ -184,6 +184,22 @@ physicist_crouching: ; FIXME: we have an animation? + ; if we have some gait left, slide a bit + lda GAIT + beq crouch_done_slide + + dec GAIT + bne crouch_done_slide + + lda DIRECTION + beq p_slide_left + inc PHYSICIST_X + jmp crouch_done_slide +p_slide_left: + dec PHYSICIST_X + +crouch_done_slide: + lda #