From c77dc74410be69f550dbf9013b36e6ead3044cb1 Mon Sep 17 00:00:00 2001 From: ultima-soul Date: Mon, 29 Jul 2019 17:52:01 -0700 Subject: [PATCH] Match TryInterruptEventObjectSpecialAnim without asm hack. --- src/field_player_avatar.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index b322fc1c73..6d62cdc4ab 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -336,14 +336,9 @@ void player_step(u8 direction, u16 newKeys, u16 heldKeys) static bool8 TryInterruptEventObjectSpecialAnim(struct EventObject *playerEventObj, u8 direction) { - #ifdef NONMATCHING - u8 r5 = direction; - u8 r6 = direction; - #else - u8 r5 = direction; - register u8 r6 asm("r6") = direction; - #endif - //a very bad HACK + u8 r5 = direction; + u8 r6 = direction; + r6++; r6--; if (EventObjectIsMovementOverridden(playerEventObj) && !EventObjectClearHeldMovementIfFinished(playerEventObj))