From ae8dd3048a31a705d94d8a162e6d5ce0998c72a6 Mon Sep 17 00:00:00 2001 From: Tal Hayon Date: Sat, 16 Jul 2022 08:54:50 +0300 Subject: [PATCH] Match sub_080263B4 --- asm/enemy/chuchuBoss.s | 52 ------------------------------------------ src/enemy/chuchuBoss.c | 15 ++++++++++++ 2 files changed, 15 insertions(+), 52 deletions(-) diff --git a/asm/enemy/chuchuBoss.s b/asm/enemy/chuchuBoss.s index 23e7a51a..e0d11428 100644 --- a/asm/enemy/chuchuBoss.s +++ b/asm/enemy/chuchuBoss.s @@ -9,58 +9,6 @@ - thumb_func_start sub_080263B4 -sub_080263B4: @ 0x080263B4 - push {r4, r5, lr} - adds r4, r0, #0 - movs r0, #0x7d - adds r0, r0, r4 - mov ip, r0 - ldrb r0, [r0] - subs r0, #1 - mov r1, ip - strb r0, [r1] - lsls r0, r0, #0x18 - lsrs r5, r0, #0x18 - cmp r5, #0xff - bne _08026410 - ldr r2, _08026400 @ =gUnk_080CC234 - adds r3, r4, #0 - adds r3, #0x7c - ldrb r0, [r3] - adds r1, r0, #1 - strb r1, [r3] - lsls r0, r0, #0x18 - lsrs r0, r0, #0x18 - adds r0, r0, r2 - ldrb r1, [r0] - mov r0, ip - strb r1, [r0] - adds r0, r5, #0 - ands r0, r1 - cmp r0, #0xff - bne _08026404 - movs r0, #0x78 - strb r0, [r3] - adds r0, r4, #0 - adds r0, #0x84 - ldr r1, [r0] - ldrb r0, [r1, #3] - adds r0, #1 - strb r0, [r1, #3] - b _08026410 - .align 2, 0 -_08026400: .4byte gUnk_080CC234 -_08026404: - ldrb r2, [r4, #0xb] - adds r0, r4, #0 - movs r1, #0x49 - movs r3, #0 - bl CreateObjectWithParent -_08026410: - pop {r4, r5, pc} - .align 2, 0 - thumb_func_start sub_08026414 sub_08026414: @ 0x08026414 push {r4, r5, r6, r7, lr} diff --git a/src/enemy/chuchuBoss.c b/src/enemy/chuchuBoss.c index 9eac27a3..0ca3bf18 100644 --- a/src/enemy/chuchuBoss.c +++ b/src/enemy/chuchuBoss.c @@ -579,3 +579,18 @@ void sub_08026358(ChuchuBossEntity* this) { } } } + +void sub_080263B4(ChuchuBossEntity* this) { + u32 bVar2; + u32 bVar3; + + if (this->unk_7d-- == 0) { + bVar3 = this->unk_7d = gUnk_080CC234[this->unk_7c[0]++]; + if ((bVar3 & 0xff) == 0xff) { + this->unk_7c[0] = 0x78; + this->unk_84->unk_03++; + } else { + CreateObjectWithParent(super, OBJECT_49, super->type2, 0); + } + } +}