summaryrefslogtreecommitdiff
path: root/src/enemy/keaton.c
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2020-08-08 09:06:54 -0500
committerMarcus Huderle <huderlem@gmail.com>2020-08-08 09:06:54 -0500
commit2c0b39832e30964515fdfad3e1a3e3047fbd17d7 (patch)
tree1bf388460852dd4f745623205d97c8ab88fabce6 /src/enemy/keaton.c
parent10819392f7a23c5390cbb3505e3ed1eea79bbe4b (diff)
Match keaton/sub_08032574
Diffstat (limited to 'src/enemy/keaton.c')
-rw-r--r--src/enemy/keaton.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/src/enemy/keaton.c b/src/enemy/keaton.c
index 7c960ac7..b30c65df 100644
--- a/src/enemy/keaton.c
+++ b/src/enemy/keaton.c
@@ -115,26 +115,22 @@ void sub_080324FC(Entity* this) {
}
}
-#if NON_MATCHING // r4-r5 register swap
void sub_08032574(Entity* this) {
- if (this->attachedEntity == NULL || !(this->attachedEntity->bitfield & 0x80)) {
- (this->field_0x76)--;
- if ((this->field_0x76 == 0) || (sub_080AEFE0(this) == 0)) {
- sub_0803275C(this);
- } else {
- UpdateAnimationSingleFrame(this);
- if (!(this->field_0x76 & 0x7)) {
- sub_08032794(this);
- }
- }
+ if (this->attachedEntity && (this->attachedEntity->bitfield & 0x80)) {
+ sub_0803275C(this);
+ return;
+ }
+
+ if (--this->field_0x76 == 0 || !sub_080AEFE0(this)) {
+ sub_0803275C(this);
+ return;
+ }
+
+ UpdateAnimationSingleFrame(this);
+ if ((this->field_0x76 & 0x7) == 0) {
+ sub_08032794(this);
}
}
-#else
-NAKED
-void sub_08032574(Entity* this) {
- asm(".include \"asm/non_matching/keaton/sub_08032574.inc\"");
-}
-#endif
void sub_080325C4(Entity* this) {
this->actionDelay--;