summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEthan Roseman <ethteck@gmail.com>2020-04-18 04:50:41 -0400
committerGitHub <noreply@github.com>2020-04-18 04:50:41 -0400
commitcb5a604ea7b80117c10a4f876052b2ad9276c8fb (patch)
tree18039f5340b90aa2d6a20b453e95dbf9ea19dd7e /src
parent62864ba11dbbee61455d51078e2d9f80375ed4f5 (diff)
Decompiled ovl_En_Ru1 (#72)
* Decompiled ovl_En_Ru1 * Formatting * Actor/TransitionDrawTable struct fixes * addressing PR comments * addressing PR comments (2)
Diffstat (limited to 'src')
-rw-r--r--src/code/z_actor.c29
-rw-r--r--src/overlays/actors/ovl_Door_Warp1/z_door_warp1.h3
-rw-r--r--src/overlays/actors/ovl_En_Ru1/z_en_ru1.c2786
-rw-r--r--src/overlays/actors/ovl_En_Ru1/z_en_ru1.h48
-rw-r--r--src/overlays/actors/ovl_En_Ru1/z_en_ru1_cutscene_data.c130
-rw-r--r--src/overlays/actors/ovl_En_Ru2/z_en_ru2.c21
-rw-r--r--src/overlays/actors/ovl_En_Ru2/z_en_ru2.h6
7 files changed, 2571 insertions, 452 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index 02e5b4efb..dd4822943 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -3690,21 +3690,6 @@ typedef struct {
/* 0x06 */ s16 unk_06;
/* 0x08 */ s16 unk_08;
/* 0x0A */ s16 unk_0A;
- /* 0x0C */ char unk_0C[0x2];
- /* 0x0E */ s16 unk_0E;
- /* 0x10 */ s16 unk_10;
- /* 0x12 */ char unk_12[0x2];
- /* 0x14 */ f32 unk_14;
- /* 0x18 */ Vec3f unk_18;
-} struct_80034A14_arg1;
-
-typedef struct {
- /* 0x00 */ s16 unk_00;
- /* 0x02 */ s16 unk_02;
- /* 0x04 */ s16 unk_04;
- /* 0x06 */ s16 unk_06;
- /* 0x08 */ s16 unk_08;
- /* 0x0A */ s16 unk_0A;
/* 0x0C */ u8 unk_0C;
} struct_80116130_0; // size = 0x10
@@ -3750,18 +3735,18 @@ void func_800344BC(Actor* actor, struct_80034A14_arg1* arg1, s16 arg2, s16 arg3,
sp40 = Math_Vec3f_Yaw(&actor->posRot.pos, &arg1->unk_18) - actor->shape.rot.y;
temp1 = (sp40 < -arg2) ? -arg2 : ((sp40 > arg2) ? arg2 : sp40);
- Math_SmoothScaleMaxMinS(&arg1->unk_0A, temp1, 6, 2000, 1);
+ Math_SmoothScaleMaxMinS(&arg1->unk_08.y, temp1, 6, 2000, 1);
sp40 = (ABS(sp40) >= 0x8000) ? 0 : ((sp40 >= 0) ? sp40 : -sp40);
- arg1->unk_0A = ((arg1->unk_0A < -sp40) ? -sp40 : ((arg1->unk_0A > sp40) ? sp40 : arg1->unk_0A));
+ arg1->unk_08.y = ((arg1->unk_08.y < -sp40) ? -sp40 : ((arg1->unk_08.y > sp40) ? sp40 : arg1->unk_08.y));
- sp40 = sp40 - arg1->unk_0A;
+ sp40 = sp40 - arg1->unk_08.y;
temp1 = (sp40 < -arg5) ? -arg5 : ((sp40 > arg5) ? arg5 : sp40);
- Math_SmoothScaleMaxMinS(&arg1->unk_10, temp1, 6, 2000, 1);
+ Math_SmoothScaleMaxMinS(&arg1->unk_08.z, temp1, 6, 2000, 1);
sp40 = (ABS(sp40) >= 0x8000) ? 0 : ((sp40 >= 0) ? sp40 : -sp40);
- arg1->unk_10 = ((arg1->unk_10 < -sp40) ? -sp40 : ((arg1->unk_10 > sp40) ? sp40 : arg1->unk_10));
+ arg1->unk_08.z = ((arg1->unk_08.z < -sp40) ? -sp40 : ((arg1->unk_08.z > sp40) ? sp40 : arg1->unk_08.z));
if (arg8 != 0) {
if (arg3) {} // Seems necessary to match
@@ -3771,10 +3756,10 @@ void func_800344BC(Actor* actor, struct_80034A14_arg1* arg1, s16 arg2, s16 arg3,
temp1 = (sp46 < arg4) ? arg4 : ((sp46 > arg3) ? arg3 : sp46);
Math_SmoothScaleMaxMinS(&arg1->unk_08, temp1, 6, 2000, 1);
- temp2 = sp46 - arg1->unk_08;
+ temp2 = sp46 - arg1->unk_08.x;
temp1 = (temp2 < arg7) ? arg7 : ((temp2 > arg6) ? arg6 : temp2);
- Math_SmoothScaleMaxMinS(&arg1->unk_0E, temp1, 6, 2000, 1);
+ Math_SmoothScaleMaxMinS(&arg1->unk_0E.x, temp1, 6, 2000, 1);
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_800344BC.s")
diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.h b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.h
index 96a6ef100..b34368ea7 100644
--- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.h
+++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.h
@@ -6,7 +6,8 @@
typedef struct {
/* 0x0000 */ Actor actor;
- /* 0x014C */ char unk_14C[0xA4];
+ /* 0x014C */ char unk_14C[0xA0];
+ /* 0x01EC */ s32 unk_1EC;
} DoorWarp1; // size = 0x01F0
extern const ActorInit Door_Warp1_InitVars;
diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
index 525a8fd46..23a1868a6 100644
--- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
+++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
@@ -1,5 +1,13 @@
+/*
+ * File: z_en_ru1.c
+ * Overlay: En_Ru1
+ * Description:
+ */
+
#include "z_en_ru1.h"
+#include <vt.h>
+
#define FLAGS 0x04000011
void EnRu1_Init(EnRu1* this, GlobalContext* globalCtx);
@@ -7,7 +15,114 @@ void EnRu1_Destroy(EnRu1* this, GlobalContext* globalCtx);
void EnRu1_Update(EnRu1* this, GlobalContext* globalCtx);
void EnRu1_Draw(EnRu1* this, GlobalContext* globalCtx);
-/*
+void func_80AEC0B4(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEC100(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEC130(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEC17C(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEC1D4(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEC244(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEC2C0(EnRu1* this, GlobalContext* globalCtx);
+void func_80AECA94(EnRu1* this, GlobalContext* globalCtx);
+void func_80AECAB4(EnRu1* this, GlobalContext* globalCtx);
+void func_80AECAD4(EnRu1* this, GlobalContext* globalCtx);
+void func_80AECB18(EnRu1* this, GlobalContext* globalCtx);
+void func_80AECB60(EnRu1* this, GlobalContext* globalCtx);
+void func_80AECBB8(EnRu1* this, GlobalContext* globalCtx);
+void func_80AECC1C(EnRu1* this, GlobalContext* globalCtx);
+void func_80AECC84(EnRu1* this, GlobalContext* globalCtx);
+void func_80AED304(EnRu1* this, GlobalContext* globalCtx);
+void func_80AED324(EnRu1* this, GlobalContext* globalCtx);
+void func_80AED344(EnRu1* this, GlobalContext* globalCtx);
+void func_80AED374(EnRu1* this, GlobalContext* globalCtx);
+void func_80AED3A4(EnRu1* this, GlobalContext* globalCtx);
+void func_80AED3E0(EnRu1* this, GlobalContext* globalCtx);
+void func_80AED414(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEF29C(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEF2AC(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEF2D0(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEF354(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEF3A8(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEEBD4(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEEC5C(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEECF0(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEED58(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEEDCC(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEEE34(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEEE9C(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEEF08(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEEF5C(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEF9D8(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEFA2C(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEFAAC(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEFB04(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEFB68(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEFCE8(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEFBC8(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEFC24(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEFECC(EnRu1* this, GlobalContext* globalCtx);
+void func_80AEFF40(EnRu1* this, GlobalContext* globalCtx);
+
+void func_80AF0278(EnRu1* this, GlobalContext* globalCtx, s32 limbIndex, Vec3s* rot);
+
+void func_80AF03F4(EnRu1* this, GlobalContext* globalCtx);
+void func_80AF0400(EnRu1* this, GlobalContext* globalCtx);
+void func_80AF05D4(EnRu1* this, GlobalContext* globalCtx);
+
+ColliderCylinderInit D_80AF0800 = {
+ 0x00, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00000000, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x0019, 0x0050, 0x0000, 0x0000, 0x0000, 0x0000,
+};
+
+ColliderCylinderInit D_80AF082C = {
+ 0x00, 0x09, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00000101, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x0014, 0x001E, 0x0000, 0x0000, 0x0000, 0x0000,
+};
+
+u32 D_80AF0858[] = {
+ 0x0600E3B8, 0x0600F238, 0x0600F638, 0x0600FE38, 0x06010238, 0x06010A38,
+};
+
+u32 D_80AF0870[] = {
+ 0x0600E838,
+ 0x0600FA38,
+ 0x06010638,
+};
+
+s32 D_80AF087C = 0;
+
+#include "z_en_ru1_cutscene_data.c"
+
+u32 D_80AF1938 = 0;
+
+ActorFunc D_80AF193C[] = {
+ (ActorFunc)func_80AEC0B4, (ActorFunc)func_80AEC100, (ActorFunc)func_80AEC130, (ActorFunc)func_80AEC17C,
+ (ActorFunc)func_80AEC1D4, (ActorFunc)func_80AEC244, (ActorFunc)func_80AEC2C0, (ActorFunc)func_80AECA94,
+ (ActorFunc)func_80AECAB4, (ActorFunc)func_80AECAD4, (ActorFunc)func_80AECB18, (ActorFunc)func_80AECB60,
+ (ActorFunc)func_80AECBB8, (ActorFunc)func_80AECC1C, (ActorFunc)func_80AECC84, (ActorFunc)func_80AED304,
+ (ActorFunc)func_80AED324, (ActorFunc)func_80AED344, (ActorFunc)func_80AED374, (ActorFunc)func_80AED3A4,
+ (ActorFunc)func_80AED3E0, (ActorFunc)func_80AED414, (ActorFunc)func_80AEF29C, (ActorFunc)func_80AEF2AC,
+ (ActorFunc)func_80AEF2D0, (ActorFunc)func_80AEF354, (ActorFunc)func_80AEF3A8, (ActorFunc)func_80AEEBD4,
+ (ActorFunc)func_80AEEC5C, (ActorFunc)func_80AEECF0, (ActorFunc)func_80AEED58, (ActorFunc)func_80AEEDCC,
+ (ActorFunc)func_80AEEE34, (ActorFunc)func_80AEEE9C, (ActorFunc)func_80AEEF08, (ActorFunc)func_80AEEF5C,
+ (ActorFunc)func_80AEF9D8, (ActorFunc)func_80AEFA2C, (ActorFunc)func_80AEFAAC, (ActorFunc)func_80AEFB04,
+ (ActorFunc)func_80AEFB68, (ActorFunc)func_80AEFCE8, (ActorFunc)func_80AEFBC8, (ActorFunc)func_80AEFC24,
+ (ActorFunc)func_80AEFECC, (ActorFunc)func_80AEFF40,
+};
+
+void (*D_80AF19F4[])(EnRu1* this, GlobalContext* globalCtx, s32 limbIndex, Vec3s* rot) = {
+ func_80AF0278,
+};
+
+Vec3f D_80AF19F8 = { 0.0f, 10.0f, 0.0f };
+
+ActorFunc D_80AF1A04[] = {
+ (ActorFunc)func_80AF03F4,
+ (ActorFunc)func_80AF0400,
+ (ActorFunc)func_80AF05D4,
+};
+
const ActorInit En_Ru1_InitVars = {
ACTOR_EN_RU1,
ACTORTYPE_NPC,
@@ -19,417 +134,2260 @@ const ActorInit En_Ru1_InitVars = {
(ActorFunc)EnRu1_Update,
(ActorFunc)EnRu1_Draw,
};
-*/
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEAC10.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEAC54.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEACDC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEAD20.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEAD98.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEADD8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEADE0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEADF0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/EnRu1_Destroy.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEAE1C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEAEA4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEAEB8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEAECC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEAF38.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEAF58.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEAFA0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEAFE0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB020.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB088.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB0EC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB104.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB124.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB174.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB1B4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB1D8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB220.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB264.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB320.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB364.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB3A4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB3CC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB3DC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB438.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB458.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB480.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB4A8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB50C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB59C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB680.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB6E0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB738.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB7D0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB7E0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB87C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB89C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB914.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB934.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB954.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEB974.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEBA0C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEBA2C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEBAFC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEBB3C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEBB78.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEBBF4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEBC30.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEBC84.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEBCB8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEBD1C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEBD94.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEBE3C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEBEC8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEBF60.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEBFD8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC070.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC0B4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC100.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC130.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC17C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC1D4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC244.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC2C0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC320.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC40C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC4CC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC4F4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC5FC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC650.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC6B0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC6E4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC780.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC81C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC8B8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC93C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEC9C4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECA18.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECA44.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECA94.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECAB4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECAD4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECB18.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECB60.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECBB8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECC1C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECC84.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECCB0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECDA0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECE04.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECE20.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECEB4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AECF6C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED084.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED0B0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED0C8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED0D8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED110.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED154.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED19C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED218.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED304.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED324.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED344.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED374.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED3A4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED3E0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED414.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED44C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED4FC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED520.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED57C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED5B8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED5DC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED600.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED624.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED6DC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED6F8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED738.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED83C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AED8DC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEDAE0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEDB30.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEDEF4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEDFF4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEE02C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEE050.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEE264.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEE2F8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEE394.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEE488.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEE568.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEE628.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEE6D0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEE7C4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEEAC8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEEB24.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEEBB4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEEBD4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEEC5C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEECF0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEED58.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEEDCC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEEE34.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEEE9C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEEF08.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEEF5C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEEF68.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEEFEC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF080.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF0BC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF170.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF188.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF1F0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF29C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF2AC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF2D0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF354.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF3A8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF40C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF4A8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF4E0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF51C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF540.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF5B8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF624.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF728.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF79C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF820.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF890.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF930.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF99C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEF9D8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFA2C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFAAC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFB04.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFB68.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFBC8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFC24.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFC54.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFCE8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFD38.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFDC0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFE38.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFE84.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFE9C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFECC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFF40.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AEFF94.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AF0050.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/EnRu1_Update.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/EnRu1_Init.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AF0278.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AF02E8.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AF0368.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AF03F4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AF0400.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/func_80AF05D4.s")
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ru1/EnRu1_Draw.s")
+extern AnimationHeader D_06000690;
+extern AnimationHeader D_06000E54;
+extern AnimationHeader D_06001488;
+extern AnimationHeader D_06002058;
+extern AnimationHeader D_06002990;
+extern AnimationHeader D_06002EC0;
+extern AnimationHeader D_06003608;
+extern AnimationHeader D_06003784;
+extern AnimationHeader D_06004074;
+extern AnimationHeader D_06004350;
+extern AnimationHeader D_06004648;
+extern AnimationHeader D_06004BF0;
+extern AnimationHeader D_060063F4;
+extern AnimationHeader D_06006B9C;
+extern AnimationHeader D_06007534;
+extern AnimationHeader D_060078E4;
+extern AnimationHeader D_06008100;
+extern AnimationHeader D_06008AA8;
+extern AnimationHeader D_06009060;
+extern AnimationHeader D_060097B8;
+extern SkeletonHeader D_06012700;
+extern AnimationHeader D_06012E94;
+extern AnimationHeader D_06013A64;
+
+void func_80AEAC10(EnRu1* this, GlobalContext* globalCtx) {
+ s32 pad[4];
+ ColliderCylinderMain* collider = &this->collider;
+
+ ActorCollider_Cylinder_Update(&this->actor, collider);
+ Actor_CollisionCheck_SetOT(globalCtx, &globalCtx->sub_11E60, collider);
+}
+
+void func_80AEAC54(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+ ColliderCylinderMain* collider2 = &this->collider2;
+ s32 pad[3];
+
+ ActorCollider_Cylinder_Update(thisx, collider2);
+ if (this->unk_34C != 0) {
+ Actor_CollisionCheck_SetOT(globalCtx, &globalCtx->sub_11E60, collider2);
+ } else if (thisx->xzDistanceFromLink > 32.0f) {
+ this->unk_34C = 1;
+ }
+}
+
+void func_80AEACDC(EnRu1* this, GlobalContext* globalCtx) {
+ s32 pad[4];
+ ColliderCylinderMain* collider2 = &this->collider2;
+
+ ActorCollider_Cylinder_Update(&this->actor, collider2);
+ Actor_CollisionCheck_SetAT(globalCtx, &globalCtx->sub_11E60, collider2);
+}
+
+void func_80AEAD20(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+
+ ActorCollider_AllocCylinder(globalCtx, &this->collider);
+ if (!thisx) {} // necessary to match
+ func_8005C450(globalCtx, &this->collider, thisx, &D_80AF0800);
+
+ ActorCollider_AllocCylinder(globalCtx, &this->collider2);
+ func_8005C450(globalCtx, &this->collider2, thisx, &D_80AF082C);
+}
+
+void func_80AEAD98(EnRu1* this, GlobalContext* globalCtx) {
+ ActorCollider_FreeCylinder(globalCtx, &this->collider);
+ ActorCollider_FreeCylinder(globalCtx, &this->collider2);
+}
+
+void func_80AEADD8(EnRu1* this) {
+ this->unk_34C = 0;
+}
+
+u8 func_80AEADE0(EnRu1* this) {
+ u8 params = this->actor.params >> 8;
+ return params;
+}
+
+u8 func_80AEADF0(EnRu1* this) {
+ s16 params = this->actor.params;
+ return params;
+}
+
+void EnRu1_Destroy(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEAD98(this, globalCtx);
+}
+
+void func_80AEAE1C(EnRu1* this) {
+ s32 pad[3];
+ s16* unk_25E = &this->unk_25E;
+ s16* unk_25C = &this->unk_25C;
+
+ if (DECR(*unk_25E) == 0) {
+ *unk_25E = Math_Rand_S16Offset(0x3C, 0x3C);
+ }
+
+ *unk_25C = *unk_25E;
+ if (*unk_25C >= 3) {
+ *unk_25C = 0;
+ }
+}
+
+void func_80AEAEA4(EnRu1* this, s16 arg1) {
+ this->unk_25C = arg1;
+}
+
+void func_80AEAEB8(EnRu1* this, s16 arg1) {
+ this->unk_260 = arg1;
+}
+
+void func_80AEAECC(EnRu1* this, GlobalContext* globalCtx) {
+ f32* velocityY = &this->actor.velocity.y;
+ f32 velocityYHeld = *velocityY;
+
+ *velocityY = -4.0f;
+ func_8002E4B4(globalCtx, &this->actor, 19.0f, 25.0f, 30.0f, 7);
+ *velocityY = velocityYHeld;
+}
+
+s32 func_80AEAF38(GlobalContext* globalCtx) {
+ if (globalCtx->csCtx.state == 0) {
+ return 1;
+ }
+ return 0;
+}
+
+CsCmdActorAction* func_80AEAF58(GlobalContext* globalCtx, s32 actorActionIdx) {
+ s32 pad[2];
+ CsCmdActorAction* ret = NULL;
+
+ if (!func_80AEAF38(globalCtx)) {
+ ret = globalCtx->csCtx.actorActions[actorActionIdx];
+ }
+ return ret;
+}
+
+s32 func_80AEAFA0(GlobalContext* globalCtx, u16 action, s32 actorActionIdx) {
+ CsCmdActorAction* csCmdActorAction = func_80AEAF58(globalCtx, actorActionIdx);
+ if ((csCmdActorAction != NULL) && (csCmdActorAction->action == action)) {
+ return 1;
+ }
+ return 0;
+}
+
+s32 func_80AEAFE0(GlobalContext* globalCtx, u16 action, s32 actorActionIdx) {
+ CsCmdActorAction* csCmdActorAction = func_80AEAF58(globalCtx, actorActionIdx);
+ if ((csCmdActorAction != NULL) && (csCmdActorAction->action != action)) {
+ return 1;
+ }
+ return 0;
+}
+
+s32 func_80AEB020(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* actorIt = globalCtx->actorCtx.actorList[ACTORTYPE_NPC].first;
+ EnRu1* someEnRu1;
+
+ while (actorIt != NULL) {
+ if (actorIt->id == ACTOR_EN_RU1) {
+ someEnRu1 = actorIt;
+ if (someEnRu1 != this) {
+ if ((someEnRu1->action == 31) || (someEnRu1->action == 32) || (someEnRu1->action == 24)) {
+ return 1;
+ }
+ }
+ }
+ actorIt = actorIt->next;
+ }
+ return 0;
+}
+
+DynaPolyActor* func_80AEB088(GlobalContext* globalCtx) {
+ Actor* actorIt = globalCtx->actorCtx.actorList[ACTORTYPE_BG].first;
+
+ while (actorIt != NULL) {
+ if (actorIt->id == ACTOR_BG_BDAN_OBJECTS && actorIt->params == 0) {
+ return actorIt;
+ }
+ actorIt = actorIt->next;
+ }
+ osSyncPrintf(VT_FGCOL(RED) "お立ち台が無い!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ return NULL;
+}
+
+void func_80AEB0EC(EnRu1* this, s32 arg1) {
+ if (this->unk_28C != NULL) {
+ this->unk_28C->unk_1B8 = arg1;
+ }
+}
+
+s32 func_80AEB104(EnRu1* this) {
+ if (this->unk_28C != NULL) {
+ return this->unk_28C->unk_1B8;
+ } else {
+ return 0;
+ }
+}
+
+Actor* func_80AEB124(GlobalContext* globalCtx) {
+ Actor* actorIt = globalCtx->actorCtx.actorList[ACTORTYPE_BOSS].first;
+
+ while (actorIt != NULL) {
+ if ((actorIt->id == ACTOR_DEMO_EFFECT) && ((actorIt->params & 0xFF) == 0x15)) {
+ return actorIt;
+ }
+ actorIt = actorIt->next;
+ }
+ return NULL;
+}
+
+s32 func_80AEB174(GlobalContext* globalCtx) {
+ return (func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx));
+}
+
+s32 func_80AEB1B4(GlobalContext* globalCtx) {
+ return func_8010BDBC(&globalCtx->msgCtx) == 2;
+}
+
+void func_80AEB1D8(EnRu1* this) {
+ Actor* thisx = &this->actor;
+
+ this->action = 36;
+ this->drawConfig = 0;
+ thisx->velocity.x = 0.0f;
+ thisx->velocity.y = 0.0f;
+ thisx->velocity.z = 0.0f;
+ thisx->speedXZ = 0.0f;
+ thisx->gravity = 0.0f;
+ thisx->minVelocityY = 0.0f;
+ func_80AEB0EC(this, 0);
+}
+
+void func_80AEB220(EnRu1* this, GlobalContext* globalCtx) {
+ if ((func_80AEAF38(globalCtx)) && (this->actor.params == 0xA)) {
+ func_80AEB1D8(this);
+ }
+}
+
+void func_80AEB264(EnRu1* this, AnimationHeader* animation, u8 arg2, f32 transitionRate, s32 arg4) {
+ s32 pad[2];
+ AnimationHeader* animationHeader = SEGMENTED_TO_VIRTUAL(&animation->genericHeader);
+ f32 frameCount = SkelAnime_GetFrameCount(&animationHeader->genericHeader);
+ f32 playbackSpeed;
+ f32 unk0;
+ f32 fc;
+
+ if (arg4 == 0) {
+ unk0 = 0.0f;
+ fc = frameCount;
+ playbackSpeed = 1.0f;
+ } else {
+ unk0 = frameCount;
+ fc = 0.0f;
+ playbackSpeed = -1.0f;
+ }
+
+ SkelAnime_ChangeAnim(&this->skelAnime, animationHeader, playbackSpeed, unk0, fc, arg2, transitionRate);
+}
+
+s32 EnRu1_FrameUpdateMatrix(EnRu1* this) {
+ // why?
+ if (this->action != 32) {
+ return SkelAnime_FrameUpdateMatrix(&this->skelAnime);
+ } else {
+ return SkelAnime_FrameUpdateMatrix(&this->skelAnime);
+ }
+}
+
+void func_80AEB364(EnRu1* this, GlobalContext* globalCtx) {
+ this->skelAnime.flags |= 1;
+ SkelAnime_LoadAnimationType5(globalCtx, &this->actor, &this->skelAnime, 1.0f);
+}
+
+void func_80AEB3A4(EnRu1* this, GlobalContext* globalCtx) {
+ this->skelAnime.flags |= 1;
+ func_80AEB364(this, globalCtx);
+}
+
+void func_80AEB3CC(EnRu1* this) {
+ this->skelAnime.flags &= ~0x1;
+}
+
+void func_80AEB3DC(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEB264(this, &D_06000690, 0, 0, 0);
+ this->action = 0;
+ this->drawConfig = 1;
+ func_80AEAEA4(this, 4);
+ func_80AEAEB8(this, 0);
+}
+
+CsCmdActorAction* func_80AEB438(GlobalContext* globalCtx) {
+ return func_80AEAF58(globalCtx, 3);
+}
+
+s32 func_80AEB458(GlobalContext* globalCtx, u16 action) {
+ return func_80AEAFA0(globalCtx, action, 3);
+}
+
+s32 func_80AEB480(GlobalContext* globalCtx, u16 action) {
+ return func_80AEAFE0(globalCtx, action, 3);
+}
+
+void func_80AEB4A8(EnRu1* this, GlobalContext* globalCtx, s16 arg2, s16 arg3) {
+ Vec3f sp24;
+ Actor* thisx = &this->actor;
+
+ sp24.x = thisx->posRot.pos.x;
+ sp24.y = thisx->posRot.pos.y + thisx->unk_84;
+ sp24.z = thisx->posRot.pos.z;
+ func_80029444(globalCtx, &sp24, 100, arg2, arg3);
+}
+
+void func_80AEB50C(EnRu1* this, GlobalContext* globalCtx) {
+ this->unk_270 += 1.0f;
+ if (this->unk_270 >= kREG(3) + 10.0f) {
+ func_80AEB4A8(this, globalCtx, kREG(1) + 500, 0);
+ this->unk_270 = 0.0f;
+ }
+}
+
+void func_80AEB59C(EnRu1* this, GlobalContext* globalCtx) {
+ f32 temp_f0;
+
+ func_80AEB4A8(this, globalCtx, kREG(2) + 500, 0);
+ func_80AEB4A8(this, globalCtx, kREG(2) + 500, kREG(3) + 10.0f);
+ temp_f0 = kREG(3) + 10.0f;
+ func_80AEB4A8(this, globalCtx, kREG(2) + 500, temp_f0 + temp_f0);
+}
+
+void func_80AEB680(EnRu1* this, GlobalContext* globalCtx) {
+ Vec3f pos;
+ Actor* thisx = &this->actor;
+
+ pos.x = thisx->posRot.pos.x;
+ pos.y = thisx->posRot.pos.y + thisx->unk_84;
+ pos.z = thisx->posRot.pos.z;
+
+ func_8002949C(globalCtx, &pos, 0, 0, 1, 0);
+}
+
+void func_80AEB6E0(EnRu1* this, GlobalContext* globalCtx) {
+ SkelAnime* skelAnime = &this->skelAnime;
+
+ if (skelAnime->unk_3E.y < skelAnime->actorDrawTbl->y) {
+ skelAnime->flags |= 3;
+ SkelAnime_LoadAnimationType5(globalCtx, &this->actor, skelAnime, 1.0f);
+ }
+}
+
+void func_80AEB738(EnRu1* this, GlobalContext* globalCtx) {
+ SkelAnime* skelAnime = &this->skelAnime;
+
+ skelAnime->unk_3E = *skelAnime->actorDrawTbl;
+ skelAnime->prevFramePos = *skelAnime->actorDrawTbl;
+ if (skelAnime->unk_3E.y < skelAnime->actorDrawTbl->y) {
+ skelAnime->flags |= 3;
+ SkelAnime_LoadAnimationType5(globalCtx, &this->actor, skelAnime, 1.0f);
+ }
+}
+
+void func_80AEB7D0(EnRu1* this) {
+ this->skelAnime.flags &= ~0x3;
+}
+
+f32 func_80AEB7E0(CsCmdActorAction* csCmdActorAction, GlobalContext* globalCtx) {
+ s32 csCtxFrames = globalCtx->csCtx.frames;
+ if ((csCtxFrames < csCmdActorAction->endFrame) && (csCmdActorAction->endFrame - csCmdActorAction->startFrame > 0)) {
+ return (Math_Coss(((csCtxFrames - csCmdActorAction->startFrame) /
+ (f32)(csCmdActorAction->endFrame - csCmdActorAction->startFrame)) *
+ 32768.0f) *
+ -0.5f) +
+ 0.5f;
+ }
+ return 1.0f;
+}
+
+f32 func_80AEB87C(f32 arg0, s32 arg1, s32 arg2) {
+ return (((f32)arg2 - arg1) * arg0) + arg1;
+}
+
+void func_80AEB89C(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+ CsCmdActorAction* actorAction = func_80AEB438(globalCtx);
+ s16 actorActionRotY;
+
+ if (actorAction != NULL) {
+ actorActionRotY = actorAction->rot.y;
+ thisx->shape.rot.y = actorActionRotY;
+ thisx->posRot.rot.y = actorActionRotY;
+ thisx->posRot.pos.x = actorAction->startPos.x;
+ thisx->posRot.pos.y = actorAction->startPos.y;
+ thisx->posRot.pos.z = actorAction->startPos.z;
+ }
+}
+
+void func_80AEB914(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEB89C(this, globalCtx);
+}
+
+void func_80AEB934(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEB89C(this, globalCtx);
+}
+
+void func_80AEB954(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEB6E0(this, globalCtx);
+}
+
+void func_80AEB974(EnRu1* this, GlobalContext* globalCtx) {
+ Vec3f* thisPos;
+ f32 sp30;
+ CsCmdActorAction* csCmdActorAction = func_80AEB438(globalCtx);
+ Actor* thisx = &this->actor;
+
+ if (csCmdActorAction != NULL) {
+ sp30 = func_80AEB7E0(csCmdActorAction, globalCtx);
+ thisPos = &thisx->posRot.pos;
+ thisPos->x = func_80AEB87C(sp30, csCmdActorAction->startPos.x, csCmdActorAction->endPos.x);
+ thisPos->y = func_80AEB87C(sp30, csCmdActorAction->startPos.y, csCmdActorAction->endPos.y);
+ thisPos->z = func_80AEB87C(sp30, csCmdActorAction->startPos.z, csCmdActorAction->endPos.z);
+ }
+}
+
+void func_80AEBA0C(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEB6E0(this, globalCtx);
+}
+
+void func_80AEBA2C(EnRu1* this, GlobalContext* globalCtx) {
+ s32 pad;
+ Vec3f* unk_364 = &this->unk_364;
+ Vec3f* thisPos;
+ f32 temp_ret_2;
+ CsCmdActorAction* csCmdActorAction = func_80AEB438(globalCtx);
+ Actor* thisx = &this->actor;
+
+ if (csCmdActorAction != NULL) {
+ temp_ret_2 = func_80AEB7E0(csCmdActorAction, globalCtx);
+ thisPos = &thisx->posRot.pos;
+ thisPos->x = func_80AEB87C(temp_ret_2, unk_364->x, csCmdActorAction->endPos.x);
+ thisPos->y = func_80AEB87C(temp_ret_2, unk_364->y, csCmdActorAction->endPos.y);
+ thisPos->z = func_80AEB87C(temp_ret_2, unk_364->z, csCmdActorAction->endPos.z);
+ }
+}
+
+void func_80AEBAFC(EnRu1* this) {
+ if (this->unk_298 == 0) {
+ func_80078914(&this->actor.unk_E4, NA_SE_EV_DIVE_INTO_WATER);
+ this->unk_298 = 1;
+ }
+}
+
+void func_80AEBB3C(EnRu1* this) {
+ if (func_800A56C8(&this->skelAnime, 5.0f)) {
+ func_80078914(&this->actor.unk_E4, 0x863);
+ }
+}
+
+void func_80AEBB78(EnRu1* this) {
+ SkelAnime* skelAnime = &this->skelAnime;
+ if ((((func_800A56C8(skelAnime, 4.0f)) || (func_800A56C8(skelAnime, 13.0f))) ||
+ (func_800A56C8(skelAnime, 22.0f))) ||
+ (func_800A56C8(skelAnime, 31.0f))) {
+ func_80078914(&this->actor.unk_E4, 0x839);
+ }
+}
+
+void func_80AEBBF4(EnRu1* this) {
+ if (func_800A56C8(&this->skelAnime, 8.0f)) {
+ func_80078914(&this->actor.unk_E4, 0x873);
+ }
+}
+
+void func_80AEBC30(GlobalContext* globalCtx) {
+ Player* player;
+
+ if (globalCtx->csCtx.frames == 0xCD) {
+ player = PLAYER;
+ Audio_PlaySoundGeneral(NA_SE_EV_DIVE_INTO_WATER, &player->actor.unk_E4, 4, &D_801333E0, &D_801333E0,
+ &D_801333E8);
+ }
+}
+
+void func_80AEBC84(EnRu1* this, GlobalContext* globalCtx) {
+ if (globalCtx->csCtx.frames == 0x82) {
+ func_80078914(&this->actor.unk_E4, NA_SE_VO_RT_LAUGH_0);
+ }
+}
+
+void func_80AEBCB8(EnRu1* this, UNK_TYPE arg1) {
+ if (arg1 != 0) {
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06012E94, 1.0f, 0, SkelAnime_GetFrameCount(&D_06012E94.genericHeader),
+ 0, -8.0f);
+ }
+}
+
+void func_80AEBD1C(EnRu1* this, GlobalContext* globalCtx) {
+ if (func_80AEB480(globalCtx, 2)) {
+ this->action = 1;
+ this->drawConfig = 0;
+ func_80AEB914(this, globalCtx);
+ func_80AEAECC(this, globalCtx);
+ func_80AEB680(this, globalCtx);
+ func_80AEB59C(this, globalCtx);
+ }
+}
+
+void func_80AEBD94(EnRu1* this, GlobalContext* globalCtx) {
+ s32 pad[2];
+ f32 frameCount;
+
+ if (func_80AEB480(globalCtx, 3)) {
+ frameCount = SkelAnime_GetFrameCount(&D_06009060.genericHeader);
+ func_80AEB934(this, globalCtx);
+ func_80AEB738(this, globalCtx);
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06009060, 1.0f, 0.0f, frameCount, 2, 0.0f);
+ this->action = 2;
+ this->drawConfig = 1;
+ }
+}
+
+void func_80AEBE3C(EnRu1* this, GlobalContext* globalCtx, s32 arg2) {
+ s32 pad[2];
+ f32 frameCount;
+
+ if (arg2 != 0) {
+ frameCount = SkelAnime_GetFrameCount(&D_06013A64.genericHeader);
+ func_80AEB7D0(this);
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06013A64, 1.0f, 0, frameCount, 0, -8.0f);
+ this->action = 3;
+ } else {
+ func_80AEB954(this, globalCtx);
+ }
+}
+
+void func_80AEBEC8(EnRu1* this, GlobalContext* globalCtx) {
+ s32 pad[2];
+ f32 frameCount;
+
+ if (func_80AEB458(globalCtx, 6)) {
+ frameCount = SkelAnime_GetFrameCount(&D_06008AA8.genericHeader);
+ func_80AEB738(this, globalCtx);
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06008AA8, 1.0f, 0, frameCount, 2, -8.0f);
+ this->action = 4;
+ }
+}
+
+void func_80AEBF60(EnRu1* this, GlobalContext* globalCtx) {
+ if (func_80AEB480(globalCtx, 6)) {
+ func_80AEB7D0(this);
+ this->action = 5;
+ this->unk_364 = this->actor.posRot.pos;
+ return;
+ } else {
+ func_80AEBA0C(this, globalCtx);
+ }
+}
+
+void func_80AEBFD8(EnRu1* this, GlobalContext* globalCtx) {
+ CsCmdActorAction* csCmdActorAction = func_80AEB438(globalCtx);
+ f32 frameCount;
+ u16 csCtxFrames;
+ u16 csCmdActorActionEndFrame;
+
+ if (csCmdActorAction != NULL) {
+ csCtxFrames = globalCtx->csCtx.frames;
+ csCmdActorActionEndFrame = csCmdActorAction->endFrame;
+ if (csCtxFrames >= csCmdActorActionEndFrame - 2) {
+ frameCount = SkelAnime_GetFrameCount(&D_06008100.genericHeader);
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06008100, 1.0, 0, frameCount, 2, -8.0f);
+ this->action = 6;
+ }
+ }
+}
+
+void func_80AEC070(EnRu1* this, GlobalContext* globalCtx, UNK_TYPE arg2) {
+ if ((func_80AEB458(globalCtx, 8)) && (arg2 != 0)) {
+ Actor_Kill(&this->actor);
+ }
+}
+
+void func_80AEC0B4(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEB89C(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEBC84(this, globalCtx);
+ func_80AEBC30(globalCtx);
+ func_80AEBD1C(this, globalCtx);
+}
+
+void func_80AEC100(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEBAFC(this);
+ func_80AEBD94(this, globalCtx);
+}
+
+void func_80AEC130(EnRu1* this, GlobalContext* globalCtx) {
+ s32 something = EnRu1_FrameUpdateMatrix(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEBB3C(this);
+ func_80AEBE3C(this, globalCtx, something);
+}
+
+void func_80AEC17C(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEB974(this, globalCtx);
+ func_80AEAECC(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEB50C(this, globalCtx);
+ func_80AEBEC8(this, globalCtx);
+}
+
+void func_80AEC1D4(EnRu1* this, GlobalContext* globalCtx) {
+ s32 something;
+
+ something = EnRu1_FrameUpdateMatrix(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEAE1C(this);
+ func_80AEB50C(this, globalCtx);
+ func_80AEBCB8(this, something);
+ func_80AEBBF4(this);
+ func_80AEBF60(this, globalCtx);
+}
+
+void func_80AEC244(EnRu1* this, GlobalContext* globalCtx) {
+ s32 something;
+
+ something = EnRu1_FrameUpdateMatrix(this);
+ func_80AEBA2C(this, globalCtx);
+ func_80AEAECC(this, globalCtx);
+ func_80AEAE1C(this);
+ func_80AEB50C(this, globalCtx);
+ func_80AEBCB8(this, something);
+ func_80AEBB78(this);
+ func_80AEBFD8(this, globalCtx);
+}
+
+void func_80AEC2C0(EnRu1* this, GlobalContext* globalCtx) {
+ s32 something;
+
+ something = EnRu1_FrameUpdateMatrix(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEAE1C(this);
+ func_80AEB50C(this, globalCtx);
+ func_80AEC070(this, globalCtx, something);
+}
+
+void func_80AEC320(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+ s8 actorRoom;
+
+ if (!(gSaveContext.infTable[20] & 2)) {
+ func_80AEB264(this, &D_060097B8, 0, 0, 0);
+ this->action = 7;
+ func_80AEAEB8(this, 1);
+ return;
+ }
+ if ((gSaveContext.infTable[20] & 0x80) && (!(gSaveContext.infTable[20] & 1)) &&
+ (!(gSaveContext.infTable[20] & 0x20))) {
+ if (!func_80AEB020(this, globalCtx)) {
+ func_80AEB264(this, &D_060097B8, 0, 0, 0);
+ actorRoom = thisx->room;
+ this->action = 22;
+ thisx->room = -1;
+ this->drawConfig = 0;
+ this->roomNum1 = actorRoom;
+ this->roomNum3 = actorRoom;
+ this->roomNum2 = actorRoom;
+ } else {
+ Actor_Kill(thisx);
+ }
+ } else {
+ Actor_Kill(thisx);
+ }
+}
+
+void func_80AEC40C(EnRu1* this) {
+ Actor* thisx = &this->actor;
+ f32 unk_26C = this->unk_26C;
+ if (unk_26C < 8.0f) {
+ thisx->speedXZ = (((kREG(3) * 0.01f) + 2.7f) * 0.125f) * unk_26C;
+ } else {
+ thisx->speedXZ = (kREG(3) * 0.01f) + 2.7f;
+ }
+ thisx->velocity.y = -1.0f;
+ Actor_MoveForward(thisx);
+}
+
+void func_80AEC4CC(EnRu1* this) {
+ Actor* thisx = &this->actor;
+ thisx->velocity.y = -1.0f;
+ Actor_MoveForward(thisx);
+}
+
+void func_80AEC4F4(EnRu1* this) {
+ Actor* thisx = &this->actor;
+ f32* speedXZ = &thisx->speedXZ;
+ f32* unk_26C = &this->unk_26C;
+
+ if (this->unk_26C < 8.0f) {
+ *unk_26C += 1.0f;
+ *speedXZ *= (8.0f - *unk_26C) * 0.125f;
+ thisx->velocity.y = -*unk_26C * (((kREG(4) * 0.01f) + 13.0f) * 0.125f);
+ } else {
+ *speedXZ = 0.0f;
+ thisx->velocity.y = -((kREG(4) * 0.01f) + 13.0f);
+ }
+ Actor_MoveForward(thisx);
+}
+
+s32 func_80AEC5FC(EnRu1* this, GlobalContext* globalCtx) {
+ Player* player = PLAYER;
+ Actor* thisx = &this->actor;
+ f32 thisPosZ = thisx->posRot.pos.z;
+ f32 playerPosZ = player->actor.posRot.pos.z;
+ if ((playerPosZ - thisPosZ <= 265.0f) && (player->actor.posRot.pos.y >= thisx->posRot.pos.y)) {
+ return 1;
+ }
+ return 0;
+}
+
+void func_80AEC650(EnRu1* this) {
+ s32 pad[2];
+ if (this->unk_280 == 0) {
+ if ((func_800A56C8(&this->skelAnime, 2.0f)) || (func_800A56C8(&this->skelAnime, 7.0f))) {
+ func_80078914(&this->actor.unk_E4, 0x803);
+ }
+ }
+}
+
+void func_80AEC6B0(EnRu1* this) {
+ func_80078914(&this->actor.unk_E4, NA_SE_EV_FALL_DOWN_DIRT);
+ func_80078914(&this->actor.unk_E4, NA_SE_VO_RT_FALL);
+}
+
+void func_80AEC6E4(EnRu1* this, GlobalContext* globalCtx) {
+ if ((func_80AEAFA0(globalCtx, 4, 3)) && (this->unk_280 == 0)) {
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06003784, 1.0f, 0, SkelAnime_GetFrameCount(&D_06003784.genericHeader),
+ 2, -8.0f);
+ this->unk_280 = 1;
+ func_80AEC6B0(this);
+ }
+}
+
+void func_80AEC780(EnRu1* this, GlobalContext* globalCtx) {
+ s32 pad;
+ Player* player = PLAYER;
+
+ if ((func_80AEC5FC(this, globalCtx)) && (!Gameplay_InCsMode(globalCtx)) && (!(player->stateFlags1 & 0x206000)) &&
+ (player->actor.bgCheckFlags & 1)) {
+
+ globalCtx->csCtx.segment = &D_80AF0880;
+ gSaveContext.cutsceneTrigger = 1;
+ player->unk_838 = 0.0f;
+ this->action = 8;
+ }
+}
+
+void func_80AEC81C(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+ CsCmdActorAction* csCmdActorAction;
+ s16 newRotY;
+ if (func_80AEAFE0(globalCtx, 1, 3)) {
+ csCmdActorAction = globalCtx->csCtx.actorActions[3];
+ thisx->posRot.pos.x = csCmdActorAction->startPos.x;
+ thisx->posRot.pos.y = csCmdActorAction->startPos.y;
+ thisx->posRot.pos.z = csCmdActorAction->startPos.z;
+ newRotY = csCmdActorAction->rot.y;
+ thisx->shape.rot.y = newRotY;
+ thisx->posRot.rot.y = newRotY;
+ this->action = 9;
+ this->drawConfig = 1;
+ }
+}
+
+void func_80AEC8B8(EnRu1* this, GlobalContext* globalCtx) {
+ if (func_80AEAFA0(globalCtx, 3, 3)) {
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06004074, 1.0f, 0, SkelAnime_GetFrameCount(&D_06004074.genericHeader),
+ 2, -8.0f);
+ this->action = 10;
+ }
+}
+
+void func_80AEC93C(EnRu1* this, UNK_TYPE arg1) {
+ if (arg1 != 0) {
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_060078E4, 1.0f, 0, SkelAnime_GetFrameCount(&D_060078E4.genericHeader),
+ 0, -8.0f);
+ this->actor.posRot.rot.y += 0x8000;
+ this->action = 0xB;
+ this->unk_26C = 0.0f;
+ }
+}
+
+void func_80AEC9C4(EnRu1* this) {
+ this->unk_26C += 1.0f;
+ if (this->unk_26C >= 8.0f) {
+ this->action = 12;
+ this->unk_26C = 0.0f;
+ this->actor.velocity.y = -1.0f;
+ }
+}
+
+void func_80AECA18(EnRu1* this) {
+ Actor* thisx = &this->actor;
+ if (!(thisx->bgCheckFlags & 1)) {
+ this->action = 13;
+ this->unk_26C = 0.0f;
+ thisx->velocity.y = 0.0f;
+ }
+}
+
+void func_80AECA44(EnRu1* this, GlobalContext* globalCtx) {
+ if (func_80AEAFA0(globalCtx, 5, 3)) {
+ gSaveContext.infTable[20] |= 2;
+ this->action = 14;
+ }
+}
+
+void func_80AECA94(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEC780(this, globalCtx);
+}
+
+void func_80AECAB4(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEC81C(this, globalCtx);
+}
+
+void func_80AECAD4(EnRu1* this, GlobalContext* globalCtx) {
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEC8B8(this, globalCtx);
+}
+
+void func_80AECB18(EnRu1* this, GlobalContext* globalCtx) {
+ s32 something;
+
+ something = EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEC93C(this, something);
+}
+
+void func_80AECB60(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEC40C(this);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEC650(this);
+ func_80AEC9C4(this);
+}
+
+void func_80AECBB8(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEC4CC(this);
+ func_80AEC6E4(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEC650(this);
+ func_80AECA18(this);
+}
+
+void func_80AECC1C(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEC4F4(this);
+ func_80AEC6E4(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEC650(this);
+ func_80AECA44(this, globalCtx);
+}
+
+void func_80AECC84(EnRu1* this, GlobalContext* globalCtx) {
+ if (globalCtx->csCtx.state == 0) {
+ Actor_Kill(&this->actor);
+ }
+}
+
+void func_80AECCB0(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+ Vec3f* pos;
+ s16 rotTowardsLinkY;
+ f32 spawnX;
+ f32 spawnY;
+ f32 spawnZ;
+ s32 pad[2];
+
+ rotTowardsLinkY = thisx->rotTowardsLinkY;
+ pos = &thisx->posRot.pos;
+ spawnX = ((kREG(1) + 12.0f) * Math_Sins(rotTowardsLinkY)) + pos->x;
+ spawnY = pos->y;
+ spawnZ = ((kREG(1) + 12.0f) * Math_Coss(rotTowardsLinkY)) + pos->z;
+ this->unk_278 = Actor_SpawnAttached(&globalCtx->actorCtx, this, globalCtx, ACTOR_DOOR_WARP1, spawnX, spawnY, spawnZ,
+ 0, rotTowardsLinkY, 0, 5);
+}
+
+void func_80AECDA0(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEB264(this, &D_06000E54, 0, 0, 0);
+ this->action = 15;
+ this->actor.shape.unk_08 = -10000.0f;
+ func_80AEAEA4(this, 5);
+ func_80AEAEB8(this, 2);
+}
+
+void func_80AECE04(EnRu1* this, GlobalContext* globalCtx) {
+ this->actor.shape.unk_08 += (250.0f / 3.0f);
+}
+
+void func_80AECE20(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+ Player* player = PLAYER;
+ Vec3f* playerPos = &player->actor.posRot.pos;
+ s16 shapeRotY = player->actor.shape.rot.y;
+ s32 pad;
+ f32 unk_27C = this->unk_27C;
+ Vec3f* pos = &thisx->posRot.pos;
+
+ pos->x = (Math_Sins(shapeRotY) * unk_27C) + playerPos->x;
+ pos->y = playerPos->y;
+ pos->z = (Math_Coss(shapeRotY) * unk_27C) + playerPos->z;
+}
+
+void func_80AECEB4(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+ Player* player = PLAYER;
+ Vec3f* player_unk_450 = &player->unk_450;
+ Vec3f* pos = &thisx->posRot.pos;
+ s16 shapeRotY = thisx->shape.rot.y;
+
+ player_unk_450->x = ((kREG(2) + 30.0f) * Math_Sins(shapeRotY)) + pos->x;
+ player_unk_450->z = ((kREG(2) + 30.0f) * Math_Coss(shapeRotY)) + pos->z;
+}
+
+s32 func_80AECF6C(EnRu1* this, GlobalContext* globalCtx) {
+ s16* shapeRotY;
+ Player* player = PLAYER;
+ Player* otherPlayer;
+ s16 temp_f16;
+ f32 temp1;
+ f32 temp2;
+ s32 pad2[5];
+
+ this->unk_26C += 1.0f;
+ if ((player->actor.speedXZ == 0.0f) && (this->unk_26C >= 3.0f)) {
+ otherPlayer = PLAYER;
+ player->actor.posRot.pos.x = otherPlayer->unk_450.x;
+ player->actor.posRot.pos.y = otherPlayer->unk_450.y;
+ player->actor.posRot.pos.z = otherPlayer->unk_450.z;
+ shapeRotY = &player->actor.shape.rot.y;
+ temp1 = this->actor.posRot.pos.x - player->actor.posRot.pos.x;
+ temp2 = this->actor.posRot.pos.z - player->actor.posRot.pos.z;
+ temp_f16 = Math_atan2f(temp1, temp2) * 10430.3779296875f;
+ if (*shapeRotY != temp_f16) {
+ Math_SmoothScaleMaxMinS(shapeRotY, temp_f16, 0x14, 0x1838, 0x64);
+ player->actor.posRot.rot.y = *shapeRotY;
+ } else {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+s32 func_80AED084(EnRu1* this, UNK_TYPE arg1) {
+ if (this->unk_278 != NULL && this->unk_278->unk_1EC == arg1) {
+ return 1;
+ }
+ return 0;
+}
+
+void func_80AED0B0(EnRu1* this, UNK_TYPE arg1) {
+ if (this->unk_278 != NULL) {
+ this->unk_278->unk_1EC = arg1;
+ }
+}
+
+void func_80AED0C8(EnRu1* this, GlobalContext* globalCtx) {
+ this->action = 16;
+}
+
+void func_80AED0D8(EnRu1* this, GlobalContext* globalCtx) {
+ this->action = 17;
+ this->drawConfig = 1;
+ this->actor.posRot.rot.y = this->actor.rotTowardsLinkY;
+ this->actor.shape.rot.y = this->actor.rotTowardsLinkY;
+ func_80AECCB0(this, globalCtx);
+}
+
+void func_80AED110(EnRu1* this) {
+ Actor* thisx = &this->actor;
+ if (thisx->shape.unk_08 >= 0.0f) {
+ this->action = 18;
+ thisx->shape.unk_08 = 0.0f;
+ func_80AED0B0(this, 1);
+ }
+}
+
+void func_80AED154(EnRu1* this, GlobalContext* globalCtx) {
+ if (func_80AED084(this, 2)) {
+ this->action = 0x13;
+ this->unk_26C = 0.0f;
+ func_80AECEB4(this, globalCtx);
+ }
+}
+
+void func_80AED19C(EnRu1* this, s32 cond) {
+ if (cond) {
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06001488, 1.0f, 0, SkelAnime_GetFrameCount(&D_06001488.genericHeader),
+ 2, -8.0f);
+ this->action = 20;
+ func_80AED0B0(this, 3);
+ }
+}
+
+void func_80AED218(EnRu1* this, UNK_TYPE arg1) {
+ if (func_80AED084(this, 4)) {
+ if (arg1 != 0) {
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06002058, 1.0f, 0,
+ SkelAnime_GetFrameCount(&D_06002058.genericHeader), 0, -8.0f);
+ }
+ } else if (func_80AED084(this, 5)) {
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06002990, 1.0f, 0, SkelAnime_GetFrameCount(&D_06002990.genericHeader),
+ 2, -8.0f);
+ this->action = 21;
+ this->unk_27C = this->actor.xzDistanceFromLink;
+ }
+}
+
+void func_80AED304(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AED0C8(this, globalCtx);
+}
+
+void func_80AED324(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AED0D8(this, globalCtx);
+}
+
+void func_80AED344(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AECE04(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AED110(this);
+}
+
+void func_80AED374(EnRu1* this, GlobalContext* globalCtx) {
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AED154(this, globalCtx);
+}
+
+void func_80AED3A4(EnRu1* this, GlobalContext* globalCtx) {
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AED19C(this, func_80AECF6C(this, globalCtx));
+}
+
+void func_80AED3E0(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEAECC(this, globalCtx);
+ func_80AED218(this, EnRu1_FrameUpdateMatrix(this));
+}
+
+void func_80AED414(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AECE20(this, globalCtx);
+ func_80AEAECC(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+}
+
+void func_80AED44C(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+ s8 actorRoom;
+
+ if ((gSaveContext.infTable[20] & 2) && (!(gSaveContext.infTable[20] & 0x20)) &&
+ (!(gSaveContext.infTable[20] & 1)) && (!(gSaveContext.infTable[20] & 0x80))) {
+ if (!func_80AEB020(this, globalCtx)) {
+ func_80AEB264(this, &D_060097B8, 0, 0, 0);
+ actorRoom = thisx->room;
+ this->action = 22;
+ thisx->room = -1;
+ this->roomNum1 = actorRoom;
+ this->roomNum3 = actorRoom;
+ this->roomNum2 = actorRoom;
+ } else {
+ Actor_Kill(thisx);
+ }
+ } else {
+ Actor_Kill(thisx);
+ }
+}
+
+void func_80AED4FC(EnRu1* this) {
+ func_80078914(&this->actor.unk_E4, NA_SE_EV_LAND_DIRT);
+}
+
+func_80AED520(EnRu1* this, GlobalContext* globalCtx) {
+ Player* player = PLAYER;
+
+ Audio_PlaySoundGeneral(0x883, &player->actor.unk_E4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
+ func_80078914(&this->actor.unk_E4, NA_SE_VO_RT_LIFT);
+}
+
+void func_80AED57C(EnRu1* this) {
+ if (this->actor.speedXZ != 0.0f) {
+ func_80078914(&this->actor.unk_E4, NA_SE_VO_RT_THROW);
+ }
+}
+
+void func_80AED5B8(EnRu1* this) {
+ func_80078914(&this->actor.unk_E4, NA_SE_VO_RT_CRASH);
+}
+
+void func_80AED5DC(EnRu1* this) {
+ func_80078914(&this->actor.unk_E4, NA_SE_VO_RT_UNBALLANCE);
+}
+
+void func_80AED600(EnRu1* this) {
+ func_80078914(&this->actor.unk_E4, NA_SE_VO_RT_DISCOVER);
+}
+
+s32 func_80AED624(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+ s8 curRoomNum = globalCtx->roomCtx.curRoom.num;
+
+ if (this->roomNum2 != curRoomNum) {
+ Actor_Kill(thisx);
+ return 0;
+ } else if (((this->roomNum1 != curRoomNum) || (this->roomNum2 != curRoomNum)) &&
+ (thisx->unk_84 > kREG(16) + 50.0f) && (this->action != 33)) {
+ this->action = 33;
+ this->drawConfig = 2;
+ this->unk_2A8 = 0xFF;
+ this->unk_2A4 = 0.0f;
+ }
+ return 1;
+}
+
+void func_80AED6DC(EnRu1* this, GlobalContext* globalCtx) {
+ s8 curRoomNum = globalCtx->roomCtx.curRoom.num;
+ this->roomNum2 = curRoomNum;
+ this->unk_288 = 0.0f;
+}
+
+void func_80AED6F8(GlobalContext* globalCtx) {
+ s8 curRoomNum;
+ if ((!(gSaveContext.infTable[20] & 0x80))) {
+ curRoomNum = globalCtx->roomCtx.curRoom.num;
+ if (curRoomNum == 2) {
+ gSaveContext.infTable[20] |= 0x80;
+ }
+ }
+}
+
+void func_80AED738(EnRu1* this, GlobalContext* globalCtx) {
+ u32 temp_v0;
+
+ if (func_80AED624(this, globalCtx)) {
+ this->unk_2A4 += 1.0f;
+ if (this->unk_2A4 < 20.0f) {
+ temp_v0 = ((20.0f - this->unk_2A4) * 255.0f) / 20.0f;
+ this->unk_2A8 = temp_v0;
+ this->actor.shape.unk_14 = temp_v0;
+ } else {
+ Actor_Kill(this);
+ }
+ }
+}
+
+void func_80AED83C(EnRu1* this) {
+ s32 pad2[2];
+ Vec3s* tempPtr;
+ Vec3s* tempPtr2;
+
+ tempPtr = &this->unk_374.unk_08;
+ Math_SmoothScaleMaxMinS(&tempPtr->x, 0, 0x14, 0x1838, 0x64);
+ Math_SmoothScaleMaxMinS(&tempPtr->y, 0, 0x14, 0x1838, 0x64);
+ tempPtr2 = &this->unk_374.unk_0E;
+ Math_SmoothScaleMaxMinS(&tempPtr2->x, 0, 0x14, 0x1838, 0x64);
+ Math_SmoothScaleMaxMinS(&tempPtr2->y, 0, 0x14, 0x1838, 0x64);
+}
+
+void func_80AED8DC(EnRu1* this) {
+ s32 temp_hi;
+ s16* unk_2AC = &this->unk_2AC;
+ s16* someY = &this->unk_374.unk_08.y;
+ s16* unk_29E = &this->unk_29E;
+ s32 pad[2];
+
+ if (DECR(*unk_2AC) == 0) {
+ *unk_2AC = Math_Rand_S16Offset(0xA, 0x19);
+ temp_hi = *unk_2AC % 5;
+ if (temp_hi == 0) {
+ this->unk_2B0 = 1;
+ } else if (temp_hi == 1) {
+ this->unk_2B0 = 2;
+ } else {
+ this->unk_2B0 = 0;
+ }
+ *unk_29E = 0;
+ }
+
+ if (this->unk_2B0 == 0) {
+ Math_SmoothScaleMaxMinS(unk_29E, 0 - *someY, 1, 0x190, 0x190);
+ Math_SmoothScaleMaxMinS(someY, 0, 3, ABS(*unk_29E), 0x64);
+ } else if (this->unk_2B0 == 1) {
+ Math_SmoothScaleMaxMinS(unk_29E, -0x2AAA - *someY, 1, 0x190, 0x190);
+ Math_SmoothScaleMaxMinS(someY, -0x2AAA, 3, ABS(*unk_29E), 0x64);
+ } else {
+ Math_SmoothScaleMaxMinS(unk_29E, 0x2AAA - *someY, 1, 0x190, 0x190);
+ Math_SmoothScaleMaxMinS(someY, 0x2AAA, 3, ABS(*unk_29E), 0x64);
+ }
+}
+
+void func_80AEDAE0(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+ DynaPolyActor* dyna = DynaPolyInfo_GetActor(&globalCtx->colCtx, thisx->floorPolySource);
+
+ if ((dyna == NULL) || (dyna->actor.id == ACTOR_EN_BOX)) {
+ thisx->bgCheckFlags &= ~0x19;
+ }
+}
+
+void func_80AEDB30(EnRu1* this, GlobalContext* globalCtx) {
+ DynaPolyActor* temp_dyna;
+ f32* velocityY;
+ f32* speedXZ;
+ f32* gravity;
+ s16 unk_7E;
+ s16 rotY;
+ s32 temp_a1_2;
+ s32 temp_a0;
+ s32 phi_v1;
+
+ if (this->actor.bgCheckFlags & 1) {
+ velocityY = &this->actor.velocity.y;
+ temp_dyna = DynaPolyInfo_GetActor(&globalCtx->colCtx, this->actor.floorPolySource);
+ if (*velocityY <= 0.0f) {
+ speedXZ = &this->actor.speedXZ;
+ if (temp_dyna != NULL) {
+ if (temp_dyna->actor.id != ACTOR_EN_BOX) {
+ *speedXZ = 0.0f;
+ }
+ } else {
+ if (*speedXZ >= (kREG(27) * 0.01f) + 3.0f) {
+ *speedXZ *= (kREG(19) * 0.01f) + 0.8f;
+ } else {
+ *speedXZ = 0.0f;
+ }
+ }
+ gravity = &this->actor.gravity;
+ if (temp_dyna != NULL) {
+ if (temp_dyna->actor.id != ACTOR_EN_BOX) {
+ *velocityY = 0.0f;
+ this->actor.minVelocityY = 0.0f;
+ *gravity = 0.0f;
+ } else {
+ *velocityY *= -1.0f;
+ }
+ } else {
+ *velocityY *= -((kREG(20) * 0.01f) + 0.6f);
+ if (*velocityY <= -*gravity * ((kREG(20) * 0.01f) + 0.6f)) {
+ *velocityY = 0.0f;
+ this->actor.minVelocityY = 0.0f;
+ *gravity = 0.0f;
+ }
+ }
+ func_80AED4FC(this);
+ }
+ }
+ if (this->actor.bgCheckFlags & 0x10) {
+ speedXZ = &this->actor.speedXZ;
+ velocityY = &this->actor.velocity.y;
+ if (*speedXZ >= (kREG(27) * 0.01f) + 3.0f) {
+ *speedXZ *= (kREG(19) * 0.01f) + 0.8f;
+ } else {
+ *speedXZ = 0.0f;
+ }
+ if (*velocityY >= 0.0f) {
+ *velocityY *= -((kREG(20) * 0.01f) + 0.6f);
+ func_80AED4FC(this);
+ }
+ }
+ if (this->actor.bgCheckFlags & 8) {
+ speedXZ = &this->actor.speedXZ;
+ if (*speedXZ != 0.0f) {
+ rotY = this->actor.posRot.rot.y;
+ unk_7E = this->actor.unk_7E;
+ temp_a0 = (unk_7E * 2) - rotY;
+ temp_a1_2 = temp_a0 + 0x8000;
+ if ((s16)((temp_a0 - unk_7E) + 0x8000) >= 0) {
+ phi_v1 = (s16)(temp_a1_2 - unk_7E);
+ } else {
+ phi_v1 = -(s16)(temp_a1_2 - unk_7E);
+ }
+ if (phi_v1 < 0x4001) {
+ if (*speedXZ >= (kREG(27) * 0.01f) + 3.0f) {
+ *speedXZ *= (kREG(21) * 0.01f) + 0.6f;
+ } else {
+ *speedXZ = 0.0f;
+ }
+ this->actor.posRot.rot.y = temp_a1_2;
+ func_80AED4FC(this);
+ func_80AED5B8(this);
+ }
+ }
+ }
+}
+
+void func_80AEDEF4(EnRu1* this, GlobalContext* globalCtx) {
+ f32* speedXZ = &this->actor.speedXZ;
+ DynaPolyActor* dyna = DynaPolyInfo_GetActor(&globalCtx->colCtx, this->actor.floorPolySource);
+
+ if ((dyna != NULL) && (dyna->actor.id == ACTOR_EN_BOX)) {
+ if (*speedXZ != 0.0f) {
+ *speedXZ *= 1.1f;
+ } else {
+ *speedXZ = 1.0f;
+ }
+ }
+ if (*speedXZ >= (kREG(27) * 0.01f) + 3.0f) {
+ *speedXZ *= (kREG(22) * 0.01f) + 0.98f;
+ } else {
+ *speedXZ = 0.0f;
+ }
+}
+
+void func_80AEDFF4(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEDB30(this, globalCtx);
+ func_80AEDEF4(this, globalCtx);
+ Actor_MoveForward(&this->actor);
+}
+
+void func_80AEE02C(EnRu1* this) {
+ Actor* thisx = &this->actor;
+
+ thisx->velocity.x = 0.0f;
+ thisx->velocity.y = 0.0f;
+ thisx->velocity.z = 0.0f;
+ thisx->speedXZ = 0.0f;
+ thisx->gravity = 0.0f;
+ thisx->minVelocityY = 0.0f;
+}
+
+void func_80AEE050(EnRu1* this) {
+ s32 pad;
+ f32 sp28;
+ f32 sp24;
+ f32 temp_f10;
+ EnRu1* thisx = this; // necessary to match
+
+ if (this->unk_350 == 0) {
+ if ((this->actor.minVelocityY == 0.0f) && (this->actor.speedXZ == 0.0f)) {
+ this->unk_350 = 1;
+ func_80AEE02C(this);
+ this->unk_35C = 0;
+ this->unk_358 = (this->actor.unk_84 - 10.0f) * 0.5f;
+ this->unk_354 = this->actor.posRot.pos.y + thisx->unk_358; // thisx only used here
+ } else {
+ this->actor.gravity = 0.0f;
+ this->actor.minVelocityY *= 0.2f;
+ this->actor.velocity.y *= 0.2f;
+ if (this->actor.minVelocityY >= -0.1f) {
+ this->actor.minVelocityY = 0.0f;
+ this->actor.velocity.y = 0.0f;
+ }
+ this->actor.speedXZ *= 0.5f;
+ if (this->actor.speedXZ <= 0.1f) {
+ this->actor.speedXZ = 0.0f;
+ }
+ this->actor.velocity.x = Math_Sins(this->actor.posRot.rot.y) * this->actor.speedXZ;
+ this->actor.velocity.z = Math_Coss(this->actor.posRot.rot.y) * this->actor.speedXZ;
+ func_8002D7EC(this);
+ }
+ } else {
+ if (this->unk_350 == 1) {
+ if (this->unk_358 <= 1.0f) {
+ func_80AEE02C(this);
+ this->unk_350 = 2;
+ this->unk_360 = 0.0f;
+ } else {
+ sp28 = this->unk_358;
+ sp24 = this->unk_354;
+ temp_f10 = Math_Coss(this->unk_35C) * -sp28;
+ this->actor.posRot.pos.y = temp_f10 + sp24;
+ this->unk_35C += 0x3E8;
+ this->unk_358 *= 0.95f;
+ }
+ } else {
+ this->unk_360 += 1.0f;
+ if (this->unk_360 > 0.0f) {
+ this->unk_350 = 3;
+ }
+ }
+ }
+}
+
+s32 func_80AEE264(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+
+ if (!func_8002F194(thisx, globalCtx)) {
+ thisx->flags |= 9;
+ if ((gSaveContext.infTable[20] & 8)) {
+ thisx->textId = 0x404E;
+ func_8002F2F4(thisx, globalCtx);
+ } else if (gSaveContext.infTable[20] & 4) {
+ thisx->textId = 0x404D;
+ func_8002F2F4(thisx, globalCtx);
+ } else {
+ thisx->textId = 0x404C;
+ func_8002F2F4(thisx, globalCtx);
+ }
+ return 0;
+ }
+ return 1;
+}
+
+void func_80AEE2F8(EnRu1* this, GlobalContext* globalCtx) {
+ DynaPolyActor* dyna;
+ u32 floorPolySource;
+ if ((this->actor.bgCheckFlags & 1) && (this->actor.floorPolySource != 0x32)) {
+ floorPolySource = this->actor.floorPolySource;
+ dyna = DynaPolyInfo_GetActor(&globalCtx->colCtx, floorPolySource);
+ if ((dyna != NULL) && (dyna->actor.id == ACTOR_BG_BDAN_SWITCH)) {
+ if ((((dyna->actor.params) >> 8) & 0x3F) == 0x38) {
+ gSaveContext.infTable[20] |= 1;
+ return;
+ }
+ }
+ }
+ gSaveContext.infTable[20] &= ~0x1;
+}
+
+s32 func_80AEE394(EnRu1* this, GlobalContext* globalCtx) {
+ s32 pad[2];
+ CollisionContext* colCtx;
+ DynaPolyActor* dynaActor;
+ s32 floorPolySource;
+
+ if ((this->actor.bgCheckFlags & 1) && (this->actor.floorPolySource != 0x32)) {
+ colCtx = &globalCtx->colCtx;
+ floorPolySource =
+ this->actor.floorPolySource; // necessary match, can't move this out of this block unfortunately
+ dynaActor = DynaPolyInfo_GetActor(colCtx, floorPolySource);
+ if ((dynaActor != NULL) && (dynaActor->actor.id == ACTOR_BG_BDAN_OBJECTS) && (dynaActor->actor.params == 0) &&
+ (!func_8008E988(globalCtx)) && (globalCtx->msgCtx.unk_E300 == 0)) {
+ func_80AEE02C(this);
+ globalCtx->csCtx.segment = &D_80AF10A4;
+ gSaveContext.cutsceneTrigger = 1;
+ this->action = 36;
+ this->drawConfig = 0;
+ this->unk_28C = dynaActor;
+ this->actor.shape.unk_14 = 0;
+ return 1;
+ }
+ }
+ return 0;
+}
+
+void func_80AEE488(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+ s8 curRoomNum;
+
+ if (func_8002F410(thisx, globalCtx)) {
+ curRoomNum = globalCtx->roomCtx.curRoom.num;
+ this->roomNum3 = curRoomNum;
+ this->action = 31;
+ func_80AED520(this, globalCtx);
+ } else if ((!func_80AEE394(this, globalCtx)) && (!(thisx->bgCheckFlags & 1))) {
+ thisx->minVelocityY = -((kREG(24) * 0.01f) + 6.8f);
+ thisx->gravity = -((kREG(23) * 0.01f) + 1.3f);
+ this->action = 28;
+ }
+}
+
+void func_80AEE568(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+
+ if (!func_80AEE394(this, globalCtx)) {
+ if ((thisx->bgCheckFlags & 1) && (thisx->speedXZ == 0.0f) && (thisx->minVelocityY == 0.0f)) {
+ func_80AEE02C(this);
+ func_8002F580(this, globalCtx);
+ this->action = 27;
+ func_80AEADD8(this);
+ } else if (thisx->unk_84 > 0.0f) {
+ this->action = 29;
+ this->unk_350 = 0;
+ }
+ }
+}
+
+void func_80AEE628(EnRu1* this, GlobalContext* globalCtx) {
+ s32 pad[2];
+ s8 curRoomNum = globalCtx->roomCtx.curRoom.num;
+
+ if (func_80AEAF38(globalCtx)) {
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06006B9C, 1.0f, 0, SkelAnime_GetFrameCount(&D_06006B9C.genericHeader),
+ 0, -8.0f);
+ gSaveContext.infTable[20] |= 0x10;
+ this->action = 31;
+ }
+ this->roomNum3 = curRoomNum;
+}
+
+s32 func_80AEE6D0(EnRu1* this, GlobalContext* globalCtx) {
+ s32 pad;
+ s8 curRoomNum = globalCtx->roomCtx.curRoom.num;
+
+ if ((!(gSaveContext.infTable[20] & 0x10)) && (func_80AEB124(globalCtx) != 0)) {
+ if (func_8008E988(globalCtx) == 0) {
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06004648, 1.0f, 0,
+ SkelAnime_GetFrameCount(&D_06004350.genericHeader), 0, -8.0f);
+ func_80AED600(this);
+ this->action = 34;
+ this->unk_26C = 0.0f;
+ globalCtx->csCtx.segment = &D_80AF1728;
+ gSaveContext.cutsceneTrigger = 1;
+ }
+ this->roomNum3 = curRoomNum;
+ return 1;
+ }
+ this->roomNum3 = curRoomNum;
+ return 0;
+}
+
+void func_80AEE7C4(EnRu1* this, GlobalContext* globalCtx) {
+ f32 frameCount;
+ s32 pad[13];
+ Player* player;
+ f32* unk_370 = &this->unk_370;
+
+ if (func_8002F5A0(this, globalCtx)) {
+ frameCount = SkelAnime_GetFrameCount(&D_06006B9C.genericHeader);
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, 0, -8.0f);
+ func_80AED6DC(this, globalCtx);
+ this->actor.speedXZ *= (kREG(25) * 0.01f) + 1.0f;
+ this->actor.velocity.y *= (kREG(26) * 0.01f) + 1.0f;
+ this->actor.minVelocityY = -((kREG(24) * 0.01f) + 6.8f);
+ this->actor.gravity = -((kREG(23) * 0.01f) + 1.3f);
+ func_80AED57C(this);
+ this->action = 28;
+ *unk_370 = 0.0f;
+ return;
+ }
+
+ if (func_80AEE6D0(this, globalCtx)) {
+ *unk_370 = 0.0f;
+ return;
+ }
+
+ player = PLAYER;
+ if (player->stateFlags2 & 0x10000000) {
+ this->unk_370 += 1.0f;
+ if (this->action != 32) {
+ if (*unk_370 > 30.0f) {
+ if (Math_Rand_S16Offset(0, 3) == 0) {
+ frameCount = SkelAnime_GetFrameCount(&D_06004350.genericHeader);
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06004350, 1.0f, 0, frameCount, 0, -8.0f);
+ func_80AED5DC(this);
+ this->action = 32;
+ }
+ *unk_370 = 0.0f;
+ }
+ } else {
+ if (*unk_370 > 50.0f) {
+ frameCount = SkelAnime_GetFrameCount(&D_06006B9C.genericHeader);
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, 0, -8.0f);
+ this->action = 31;
+ *unk_370 = 0.0f;
+ }
+ }
+ } else {
+ frameCount = SkelAnime_GetFrameCount(&D_06006B9C.genericHeader);
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, 0, -8.0f);
+ *unk_370 = 0.0f;
+ }
+}
+
+s32 func_80AEEAC8(EnRu1* this, GlobalContext* globalCtx) {
+ if (this->actor.bgCheckFlags & 1) {
+ func_80AEE02C(this);
+ func_8002F580(this, globalCtx);
+ this->action = 27;
+ func_80AEADD8(this);
+ return 1;
+ }
+ return 0;
+}
+
+void func_80AEEB24(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+
+ if ((func_80AEEAC8(this, globalCtx) == 0) && (this->unk_350 == 3)) {
+ this->action = 30;
+ func_80AEE02C(this);
+ thisx->gravity = -0.1f;
+ thisx->minVelocityY = -((kREG(18) * 0.1f) + 0.7f);
+ }
+}
+
+void func_80AEEBB4(EnRu1* this, GlobalContext* globalCtx) {
+ func_8002F580(this, globalCtx);
+}
+
+void func_80AEEBD4(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AED83C(this);
+ func_80AEAC54(this, globalCtx);
+ func_80AEAECC(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEEBB4(this, globalCtx);
+ func_80AEE488(this, globalCtx);
+ func_80AED624(this, globalCtx);
+ func_80AEDAE0(this, globalCtx);
+}
+
+void func_80AEEC5C(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AED83C(this);
+ func_80AEACDC(this, globalCtx);
+ func_80AEAECC(this, globalCtx);
+ func_80AEE2F8(this, globalCtx);
+ func_80AEDFF4(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEE568(this, globalCtx);
+ func_80AED624(this, globalCtx);
+ func_80AEDAE0(this, globalCtx);
+}
+
+void func_80AEECF0(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AED83C(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEE050(this);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEEB24(this, globalCtx);
+ func_80AED624(this, globalCtx);
+}
+
+void func_80AEED58(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AED83C(this);
+ func_80AEAECC(this, globalCtx);
+ Actor_MoveForward(&this->actor);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEEAC8(this, globalCtx);
+ func_80AED624(this, globalCtx);
+ func_80AEDAE0(this, globalCtx);
+}
+
+void func_80AEEDCC(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AED8DC(this);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEE2F8(this, globalCtx);
+ func_80AEAE1C(this);
+ func_80AED6F8(globalCtx);
+ func_80AEE7C4(this, globalCtx);
+}
+
+void func_80AEEE34(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AED83C(this);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEE2F8(this, globalCtx);
+ func_80AEAE1C(this);
+ func_80AED6F8(globalCtx);
+ func_80AEE7C4(this, globalCtx);
+}
+
+void func_80AEEE9C(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AED83C(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEDFF4(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AED738(this, globalCtx);
+ func_80AED624(this, globalCtx);
+}
+
+void func_80AEEF08(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AED83C(this);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEAE1C(this);
+ func_80AEE628(this, globalCtx);
+}
+
+void func_80AEEF5C(EnRu1* this, GlobalContext* globalCtx) {
+}
+
+void func_80AEEF68(EnRu1* this, GlobalContext* globalCtx) {
+ Player* player = PLAYER;
+ s16 something;
+
+ this->unk_374.unk_18 = player->actor.posRot.pos;
+ this->unk_374.unk_14 = kREG(16) - 3.0f;
+ something = kREG(17) + 0xC;
+ func_80034A14(&this->actor, &this->unk_374, something, 2);
+}
+
+void func_80AEEFEC(EnRu1* this, GlobalContext* globalCtx) {
+ Player* player = PLAYER;
+ s16 something;
+
+ this->unk_374.unk_18 = player->actor.posRot.pos;
+ this->unk_374.unk_14 = kREG(16) - 3.0f;
+ something = kREG(17) + 0xC;
+ func_80034A14(&this->actor, &this->unk_374, something, 4);
+ this->actor.posRot.rot.y = this->actor.shape.rot.y;
+}
+
+void func_80AEF080(EnRu1* this) {
+ if (func_800A56C8(&this->skelAnime, 11.0f)) {
+ func_80078914(&this->actor.unk_E4, NA_SE_EV_LAND_DIRT);
+ }
+}
+
+s32 func_80AEF0BC(EnRu1* this, GlobalContext* globalCtx) {
+ s32 frameCount;
+ if (gSaveContext.infTable[20] & 4) {
+ frameCount = SkelAnime_GetFrameCount(&D_06007534.genericHeader);
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06007534, 1.0f, 0, frameCount, 2, -8.0f);
+ globalCtx->msgCtx.msgMode = 0x37;
+ this->action = 26;
+ this->actor.flags &= ~0x9;
+ return 1;
+ }
+ return 0;
+}
+
+void func_80AEF170(EnRu1* this, GlobalContext* globalCtx, s32 cond) {
+ if (cond) {
+ this->action = 25;
+ }
+}
+
+void func_80AEF188(EnRu1* this, GlobalContext* globalCtx) {
+ if (func_80AEB174(globalCtx) && !func_80AEF0BC(this, globalCtx)) {
+ func_80106CCC(globalCtx);
+ gSaveContext.infTable[20] |= 4;
+ this->action = 24;
+ }
+}
+
+void func_80AEF1F0(EnRu1* this, GlobalContext* globalCtx, UNK_TYPE arg2) {
+ if (arg2 != 0) {
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06006B9C, 1.0f, 0.0f,
+ SkelAnime_GetFrameCount(&D_06006B9C.genericHeader), 0, 0.0f);
+ func_80106CCC(globalCtx);
+ gSaveContext.infTable[20] |= 8;
+ func_80AED6DC(this, globalCtx);
+ func_8002F580(this, globalCtx);
+ this->action = 27;
+ func_80AEADD8(this);
+ }
+}
+
+void func_80AEF29C(EnRu1* this, GlobalContext* globalCtx) {
+ this->action = 23;
+}
+
+void func_80AEF2AC(EnRu1* this, GlobalContext* globalCtx) {
+ this->action = 24;
+ this->drawConfig = 1;
+ this->actor.flags |= 9;
+}
+
+void func_80AEF2D0(EnRu1* this, GlobalContext* globalCtx) {
+ s32 cond;
+
+ func_80AEEF68(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEAC10(this, globalCtx);
+ func_80AEAECC(this, globalCtx);
+ cond = func_80AEE264(this, globalCtx);
+ func_80AED624(this, globalCtx);
+ func_80AEF170(this, globalCtx, cond);
+}
+
+void func_80AEF354(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEEFEC(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEF188(this, globalCtx);
+}
+
+void func_80AEF3A8(EnRu1* this, GlobalContext* globalCtx) {
+ s32 something;
+
+ func_80AED83C(this);
+ something = EnRu1_FrameUpdateMatrix(this);
+ func_80AEF080(this);
+ func_80AEAE1C(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEF1F0(this, globalCtx, something);
+}
+
+void func_80AEF40C(EnRu1* this) {
+ SkelAnime* skelAnime = &this->skelAnime;
+
+ if ((func_800A56C8(skelAnime, 2.0f)) || (func_800A56C8(skelAnime, 7.0f)) || (func_800A56C8(skelAnime, 12.0f)) ||
+ (func_800A56C8(skelAnime, 18.0f)) || (func_800A56C8(skelAnime, 25.0f)) || (func_800A56C8(skelAnime, 33.0f))) {
+ func_80078914(&this->actor.unk_E4, 0x803);
+ }
+}
+
+void func_80AEF4A8(EnRu1* this, GlobalContext* globalCtx) {
+ Audio_PlaySoundAtPosition(globalCtx, &this->actor.unk_E4, 0x14, NA_SE_VO_RT_FALL);
+}
+
+void func_80AEF4E0(EnRu1* this) {
+ if (func_800A56C8(&this->skelAnime, 5.0f)) {
+ func_80078914(&this->actor.unk_E4, NA_SE_VO_RT_LAUGH_0);
+ }
+}
+
+void func_80AEF51C(EnRu1* this) {
+ func_80078914(&this->actor.unk_E4, NA_SE_VO_RT_THROW);
+}
+
+void func_80AEF540(EnRu1* this) {
+ if (func_80AEB104(this) == 2) {
+ func_80AEAEA4(this, 3);
+ func_80AEAEB8(this, 2);
+ if (this->skelAnime.mode != 2) {
+ func_80AEB264(this, &D_06004BF0, 2, -8.0f, 0);
+ func_80AEF51C(this);
+ }
+ }
+}
+
+void func_80AEF5B8(EnRu1* this) {
+ f32 animCurrentFrame;
+ if (D_80AF1938 == 0) {
+ animCurrentFrame = this->skelAnime.animCurrentFrame;
+ if (animCurrentFrame >= 60.0f) {
+ func_80AEAEA4(this, 3);
+ func_80AEAEB8(this, 0);
+ func_80AED57C(this);
+ D_80AF1938 = 1;
+ }
+ }
+}
+
+void func_80AEF624(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+ f32 frameCount;
+ CsCmdActorAction* csCmdActorAction;
+ CsCmdActorAction* csCmdActorAction2;
+ s16 newRotTmp;
+
+ if (func_80AEAFE0(globalCtx, 1, 3)) {
+ frameCount = SkelAnime_GetFrameCount(&D_060063F4.genericHeader);
+ // this weird part with the redundant variable is necessary to match for some reason
+ csCmdActorAction2 = globalCtx->csCtx.actorActions[3];
+ csCmdActorAction = csCmdActorAction2;
+ thisx->posRot.pos.x = csCmdActorAction->startPos.x;
+ thisx->posRot.pos.y = csCmdActorAction->startPos.y;
+ thisx->posRot.pos.z = csCmdActorAction->startPos.z;
+ newRotTmp = csCmdActorAction->rot.x;
+ thisx->shape.rot.x = newRotTmp;
+ thisx->posRot.rot.x = newRotTmp;
+ newRotTmp = csCmdActorAction->rot.y;
+ thisx->shape.rot.y = newRotTmp;
+ thisx->posRot.rot.y = newRotTmp;
+ newRotTmp = csCmdActorAction->rot.z;
+ thisx->shape.rot.z = newRotTmp;
+ thisx->posRot.rot.z = newRotTmp;
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_060063F4, 1.0f, 0.0f, frameCount, 2, 0.0f);
+ func_80AEB3A4(this, globalCtx);
+ this->action = 37;
+ this->drawConfig = 1;
+ thisx->shape.unk_14 = 0xFF;
+ }
+}
+
+void func_80AEF728(EnRu1* this, UNK_TYPE arg1) {
+ if (arg1 != 0) {
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06003608, 1.0f, 0.0f,
+ SkelAnime_GetFrameCount(&D_06003608.genericHeader), 0, 0.0f);
+ func_80AEB3CC(this);
+ this->action = 38;
+ }
+}
+
+void func_80AEF79C(EnRu1* this, GlobalContext* globalCtx) {
+ if (func_80AEAFE0(globalCtx, 2, 3)) {
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_06002EC0, 1.0f, 0, SkelAnime_GetFrameCount(&D_06002EC0.genericHeader),
+ 2, -8.0f);
+ this->action = 39;
+ }
+}
+
+void func_80AEF820(EnRu1* this, UNK_TYPE arg1) {
+ if (arg1 != 0) {
+ SkelAnime_ChangeAnim(&this->skelAnime, &D_060097B8, 1.0f, 0, SkelAnime_GetFrameCount(&D_060097B8.genericHeader),
+ 0, -8.0f);
+ this->action = 40;
+ }
+}
+
+void func_80AEF890(EnRu1* this, GlobalContext* globalCtx) {
+ s32 pad[2];
+ s8 curRoomNum;
+
+ if ((gSaveContext.sceneSetupIndex < 4) && (func_80AEAF38(globalCtx))) {
+ curRoomNum = globalCtx->roomCtx.curRoom.num;
+ gSaveContext.infTable[20] |= 0x20;
+ Flags_SetSwitch(globalCtx, func_80AEADE0(this));
+ func_80AEB0EC(this, 1);
+ this->action = 42;
+ this->actor.room = curRoomNum;
+ }
+}
+
+void func_80AEF930(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+
+ if (func_80AEB104(this) == 3) {
+ thisx->flags |= 9;
+ thisx->textId = 0x4048;
+ func_8010B720(globalCtx, thisx->textId);
+ func_80AEF4A8(this, globalCtx);
+ this->action = 43;
+ this->drawConfig = 0;
+ }
+}
+
+void func_80AEF99C(EnRu1* this, GlobalContext* globalCtx) {
+ if (func_80AEB1B4(globalCtx) != 0) {
+ func_80AEB0EC(this, 4);
+ Actor_Kill(&this->actor);
+ }
+}
+
+void func_80AEF9D8(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AED83C(this);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEF624(this, globalCtx);
+ func_80AEB220(this, globalCtx);
+}
+
+void func_80AEFA2C(EnRu1* this, GlobalContext* globalCtx) {
+ s32 something;
+
+ func_80AED83C(this);
+ func_80AEB364(this, globalCtx);
+ func_80AEAECC(this, globalCtx);
+ something = EnRu1_FrameUpdateMatrix(this);
+ func_80AEF4E0(this);
+ func_80AEF5B8(this);
+ func_80AEF40C(this);
+ func_80AEF728(this, something);
+ func_80AEB220(this, globalCtx);
+}
+
+void func_80AEFAAC(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AED83C(this);
+ func_80AEAECC(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEF79C(this, globalCtx);
+ func_80AEB220(this, globalCtx);
+}
+
+void func_80AEFB04(EnRu1* this, GlobalContext* globalCtx) {
+ s32 something;
+
+ func_80AED83C(this);
+ func_80AEAECC(this, globalCtx);
+ something = EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEF820(this, something);
+ func_80AEB220(this, globalCtx);
+}
+
+void func_80AEFB68(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AED83C(this);
+ func_80AEAECC(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEF890(this, globalCtx);
+ func_80AEB220(this, globalCtx);
+}
+
+void func_80AEFBC8(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AED83C(this);
+ func_80AEAECC(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEF540(this);
+ func_80AEF930(this, globalCtx);
+}
+
+void func_80AEFC24(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AED83C(this);
+ func_80AEF99C(this, globalCtx);
+}
+
+void func_80AEFC54(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+
+ if ((gSaveContext.infTable[20] & 0x20) && (!(gSaveContext.infTable[20] & 0x40))) {
+ func_80AEB264(this, &D_060097B8, 0, 0, 0);
+ this->action = 41;
+ this->unk_28C = func_80AEB088(globalCtx);
+ func_80AEB0EC(this, 1);
+ thisx->flags &= ~0x9;
+ } else {
+ Actor_Kill(thisx);
+ }
+}
+
+void func_80AEFCE8(EnRu1* this, GlobalContext* globalCtx) {
+ this->unk_28C = func_80AEB088(globalCtx);
+ if (this->unk_28C != NULL) {
+ this->action = 42;
+ this->drawConfig = 1;
+ func_80AEB0EC(this, 1);
+ }
+}
+
+void func_80AEFD38(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+
+ if ((gSaveContext.eventChkInf[3] & 0x80) && (gSaveContext.linkAge == 1)) {
+ func_80AEB264(this, &D_060097B8, 0, 0, 0);
+ thisx->flags &= ~0x10;
+ this->action = 44;
+ this->drawConfig = 1;
+ } else {
+ Actor_Kill(thisx);
+ }
+}
+
+s32 func_80AEFDC0(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+
+ if (!func_8002F194(thisx, globalCtx)) {
+ thisx->flags |= 9;
+ thisx->textId = Text_GetFaceReaction(globalCtx, 0x1F);
+ if (thisx->textId == 0) {
+ thisx->textId = 0x402C;
+ }
+ func_8002F2F4(thisx, globalCtx);
+ return 0;
+ }
+ return 1;
+}
+
+s32 func_80AEFE38(EnRu1* this, GlobalContext* globalCtx) {
+ if (func_8010BDBC(&globalCtx->msgCtx) == 2) {
+ this->actor.flags &= ~0x9;
+ return 1;
+ }
+ return 0;
+}
+
+void func_80AEFE84(EnRu1* this, GlobalContext* globalCtx, s32 cond) {
+ if (cond) {
+ this->action = 45;
+ }
+}
+
+void func_80AEFE9C(EnRu1* this, GlobalContext* globalCtx) {
+ if (func_80AEFE38(this, globalCtx)) {
+ this->action = 44;
+ }
+}
+
+void func_80AEFECC(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEEF68(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEAC10(this, globalCtx);
+ func_80AEAECC(this, globalCtx);
+ func_80AEFE84(this, globalCtx, func_80AEFDC0(this, globalCtx));
+}
+
+void func_80AEFF40(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEEFEC(this, globalCtx);
+ EnRu1_FrameUpdateMatrix(this);
+ func_80AEAE1C(this);
+ func_80AEAECC(this, globalCtx);
+ func_80AEFE9C(this, globalCtx);
+}
+
+void func_80AEFF94(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+ s8 actorRoom;
+
+ if ((gSaveContext.infTable[20] & 2) && (gSaveContext.infTable[20] & 1) && (!(gSaveContext.infTable[20] & 0x20)) &&
+ (!(func_80AEB020(this, globalCtx)))) {
+ func_80AEB264(this, &D_060097B8, 0, 0, 0);
+ actorRoom = thisx->room;
+ this->action = 22;
+ thisx->room = -1;
+ this->drawConfig = 0;
+ this->roomNum1 = actorRoom;
+ this->roomNum3 = actorRoom;
+ this->roomNum2 = actorRoom;
+ osSyncPrintf("スイッチルトセット!!!!!!!!!!!!!!!!!!!!!!\n");
+ } else {
+ osSyncPrintf("スイッチルトセットしない!!!!!!!!!!!!!!!!!!!!!!\n");
+ Actor_Kill(thisx);
+ }
+}
+
+void func_80AF0050(EnRu1* this, GlobalContext* globalCtx) {
+ func_80AEB264(this, &D_060097B8, 0, 0, 0);
+ this->action = 36;
+ this->roomNum1 = this->actor.room;
+ this->unk_28C = func_80AEB088(globalCtx);
+ this->actor.room = -1;
+}
+
+void EnRu1_Update(EnRu1* this, GlobalContext* globalCtx) {
+ if (this->action < 0 || this->action >= 46 || D_80AF193C[this->action] == NULL) {
+ osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ return;
+ }
+ D_80AF193C[this->action](this, globalCtx);
+}
+
+void EnRu1_Init(EnRu1* this, GlobalContext* globalCtx) {
+ Actor* thisx = &this->actor;
+ u32 temp_ret;
+
+ ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
+ SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06012700, NULL, &this->actorDrawTable, &this->transitionDrawTable,
+ 17);
+ func_80AEAD20(this, globalCtx);
+ switch (func_80AEADF0(this)) {
+ case 0:
+ func_80AECDA0(this, globalCtx);
+ break;
+ case 1:
+ func_80AEB3DC(this, globalCtx);
+ break;
+ case 2:
+ func_80AEC320(this, globalCtx);
+ break;
+ case 3:
+ func_80AED44C(this, globalCtx);
+ break;
+ case 4:
+ func_80AEFC54(this, globalCtx);
+ break;
+ case 5:
+ func_80AEFD38(this, globalCtx);
+ break;
+ case 6:
+ func_80AEFF94(this, globalCtx);
+ break;
+ case 10:
+ func_80AF0050(this, globalCtx);
+ break;
+ default:
+ Actor_Kill(thisx);
+ osSyncPrintf("該当 arge_data = %d 無し\n", func_80AEADF0(this));
+ break;
+ }
+}
+
+void func_80AF0278(EnRu1* this, GlobalContext* globalCtx, s32 limbIndex, Vec3s* rot) {
+ Vec3s* vec1 = &this->unk_374.unk_0E;
+ Vec3s* vec2 = &this->unk_374.unk_08;
+
+ switch (limbIndex) {
+ case 8:
+ rot->x += vec1->y;
+ rot->y -= vec1->x;
+ break;
+ case 15:
+ rot->x += vec2->y;
+ rot->z += vec2->x;
+ break;
+ }
+}
+
+s32 func_80AF02E8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, EnRu1* actor,
+ Gfx** gfx) {
+ if ((actor->unk_290 < 0) || (actor->unk_290 > 0) || (*D_80AF19F4[actor->unk_290] == NULL)) {
+ osSyncPrintf(VT_FGCOL(RED) "首回しモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ } else {
+ D_80AF19F4[actor->unk_290](actor, globalCtx, limbIndex, rot);
+ }
+ return 0;
+}
+
+void func_80AF0368(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor, Gfx** gfx) {
+ s32 pad;
+ Vec3f vec1;
+ Vec3f vec2;
+
+ if (limbIndex == 15) {
+ vec1 = D_80AF19F8;
+ Matrix_MultVec3f(&vec1, &vec2);
+ actor->posRot2.pos.x = vec2.x;
+ actor->posRot2.pos.y = vec2.y;
+ actor->posRot2.pos.z = vec2.z;
+ actor->posRot2.rot.x = actor->posRot.rot.x;
+ actor->posRot2.rot.y = actor->posRot.rot.y;
+ actor->posRot2.rot.z = actor->posRot.rot.z;
+ }
+}
+
+void func_80AF03F4(EnRu1* this, GlobalContext* globalCtx) {
+}
+
+void func_80AF0400(EnRu1* this, GlobalContext* globalCtx) {
+ s32 pad[2];
+ s16 temp = this->unk_25C;
+ s32 addr1 = D_80AF0858[temp];
+ s16 temp2 = this->unk_260;
+ SkelAnime* skelAnime = &this->skelAnime;
+ s32 addr2 = D_80AF0870[temp2];
+ GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
+ Gfx* dispRefs[5];
+
+ Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru1.c", 1282);
+ func_80093D18(globalCtx->state.gfxCtx);
+
+ gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr1));
+ gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr1));
+ gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr2));
+ gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x00, 0x00, 0x00, 0xFF);
+ gSPSegment(gfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]);
+
+ gfxCtx->polyOpa.p =
+ SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, skelAnime->dListCount, func_80AF02E8,
+ func_80AF0368, &this->actor, gfxCtx->polyOpa.p);
+
+ Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru1.c", 1309);
+}
+
+void func_80AF05D4(EnRu1* this, GlobalContext* globalCtx) {
+ s32 pad[2];
+ s16 temp = this->unk_25C;
+ s32 addr1 = D_80AF0858[temp];
+ s16 temp2 = this->unk_260;
+ SkelAnime* skelAnime = &this->skelAnime;
+ s32 addr2 = D_80AF0870[temp2];
+ GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
+ Gfx* dispRefs[5];
+
+ Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru1.c", 1324);
+ func_80093D84(globalCtx->state.gfxCtx);
+
+ gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr1));
+ gSPSegment(gfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr1));
+ gSPSegment(gfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr2));
+ gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, this->unk_2A8);
+ gSPSegment(gfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]);
+
+ gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl,
+ skelAnime->dListCount, func_80AF02E8, NULL, &this->actor, gfxCtx->polyXlu.p);
+
+ Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru1.c", 1353);
+}
+
+void EnRu1_Draw(EnRu1* this, GlobalContext* globalCtx) {
+ if (this->drawConfig < 0 || this->drawConfig >= 3 || D_80AF1A04[this->drawConfig] == 0) {
+ osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ return;
+ }
+ D_80AF1A04[this->drawConfig](this, globalCtx);
+}
diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h
index ddce050cb..4f00f0900 100644
--- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h
+++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h
@@ -4,9 +4,55 @@
#include <ultra64.h>
#include <global.h>
+#include <overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.h>
+#include <overlays/actors/ovl_Door_Warp1/z_door_warp1.h>
+
typedef struct {
/* 0x0000 */ Actor actor;
- /* 0x014C */ char unk_14C[0x250];
+ /* 0x014C */ SkelAnime skelAnime;
+ /* 0x0190 */ Vec3s actorDrawTable[17];
+ /* 0x01F6 */ Vec3s transitionDrawTable[17];
+ /* 0x025C */ s16 unk_25C;
+ /* 0x025E */ char unk_25E[0x2];
+ /* 0x0260 */ s16 unk_260;
+ /* 0x0262 */ char unk_262[0x2];
+ /* 0x0264 */ s32 action;
+ /* 0x0268 */ s32 drawConfig;
+ /* 0x026C */ f32 unk_26C;
+ /* 0x0270 */ f32 unk_270;
+ /* 0x0274 */ char unk_274[0x4];
+ /* 0x0278 */ DoorWarp1* unk_278;
+ /* 0x027C */ f32 unk_27C;
+ /* 0x0280 */ s32 unk_280;
+ /* 0x0284 */ s8 roomNum1;
+ /* 0x0285 */ s8 roomNum2;
+ /* 0x0286 */ s8 roomNum3;
+ /* 0x0287 */ char unk_287;
+ /* 0x0288 */ f32 unk_288;
+ /* 0x028C */ BgBdanObjects* unk_28C;
+ /* 0x0290 */ s32 unk_290;
+ /* 0x0294 */ char unk_294[0x4];
+ /* 0x0298 */ s32 unk_298;
+ /* 0x029C */ char unk_29C[0x2];
+ /* 0x029E */ s16 unk_29E;
+ /* 0x02A0 */ char unk_2A0[0x4];
+ /* 0x02A4 */ f32 unk_2A4;
+ /* 0x02A8 */ s32 unk_2A8;
+ /* 0x02AC */ s16 unk_2AC;
+ /* 0x02AE */ char unk_2AE[0x2];
+ /* 0x02B0 */ s32 unk_2B0;
+ /* 0x02B4 */ ColliderCylinderMain collider;
+ /* 0x0300 */ ColliderCylinderMain collider2;
+ /* 0x034C */ s32 unk_34C;
+ /* 0x0350 */ s32 unk_350;
+ /* 0x0354 */ f32 unk_354;
+ /* 0x0358 */ f32 unk_358;
+ /* 0x035C */ s16 unk_35C;
+ /* 0x0360 */ f32 unk_360;
+ /* 0x0364 */ Vec3f unk_364;
+ /* 0x0370 */ f32 unk_370;
+ /* 0x0374 */ struct_80034A14_arg1 unk_374;
+ /* 0x0398 */ char unk_398[0x4]; // probably belongs to previous struct
} EnRu1; // size = 0x039C
extern const ActorInit En_Ru1_InitVars;
diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1_cutscene_data.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1_cutscene_data.c
new file mode 100644
index 000000000..ced490f95
--- /dev/null
+++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1_cutscene_data.c
@@ -0,0 +1,130 @@
+#include "z_en_ru1.h"
+
+u32 D_80AF0880[] = {
+ 0x0000000F, 0x0000051A, 0x0000000A, 0x0000000A, 0x00270000, 0x00320000, 0x6C160000, 0x0000000C, 0xFFFFFEAC,
+ 0xFFFFF506, 0x0000000C, 0xFFFFFEAC, 0xFFFFF506, 0x0F671408, 0x00000000, 0x00000001, 0x00030032, 0x00460000,
+ 0x6C160000, 0x0000000C, 0xFFFFFEAC, 0xFFFFF506, 0x0000000C, 0xFFFFFEAC, 0xFFFFF506, 0x0F671408, 0x00000000,
+ 0x00000001, 0x00050046, 0x006D0000, 0x6C160000, 0x0000000C, 0xFFFFFEAC, 0xFFFFF506, 0x0000000C, 0xFFFFFEAC,
+ 0xFFFFF506, 0x0F671408, 0x00000000, 0x00000001, 0x0002006D, 0x00870000, 0x6C160000, 0x0000000C, 0xFFFFFEAC,
+ 0xFFFFF506, 0x00000064, 0xFFFFFEAC, 0xFFFFF451, 0x0F671408, 0x00000000, 0x00000001, 0x00050087, 0x00C70000,
+ 0x6C160000, 0x00000064, 0xFFFFFEAC, 0xFFFFF451, 0x00000064, 0xFFFFFEAC, 0xFFFFF451, 0x0F671408, 0x00000000,
+ 0x00000001, 0x000300C7, 0x00DB0000, 0x6C160000, 0x00000064, 0xFFFFFEAC, 0xFFFFF451, 0x00000064, 0xFFFFFEAC,
+ 0xFFFFF451, 0x0F671408, 0x00000000, 0x00000001, 0x000500DB, 0x01030000, 0x6C160000, 0x00000064, 0xFFFFFEAC,
+ 0xFFFFF451, 0x00000064, 0xFFFFFEAC, 0xFFFFF451, 0x0F671408, 0x00000000, 0x00000001, 0x00030103, 0x01140000,
+ 0x6C160000, 0x00000064, 0xFFFFFEAC, 0xFFFFF451, 0x00000064, 0xFFFFFEAC, 0xFFFFF451, 0x0F671408, 0x00000000,
+ 0x00000001, 0x00020114, 0x01290000, 0x6C160000, 0x00000064, 0xFFFFFEAC, 0xFFFFF451, 0x000000B6, 0xFFFFFEAC,
+ 0xFFFFF3C4, 0x0F671408, 0x00000000, 0x00000001, 0x00050129, 0x034B0000, 0x6C160000, 0x000000B6, 0xFFFFFEAC,
+ 0xFFFFF3C4, 0x000000B6, 0xFFFFFEAC, 0xFFFFF3C4, 0x0F671408, 0x00000000, 0x00000001, 0x0000003F, 0x00000004,
+ 0x00020000, 0x00B20000, 0xEC160000, 0x0000007F, 0xFFFFFEAC, 0xFFFFF41F, 0x0000007F, 0xFFFFFEAC, 0xFFFFF41F,
+ 0x0F671408, 0x00000000, 0x00000001, 0x000300B2, 0x00F50000, 0x6C160000, 0x0000007F, 0xFFFFFEAC, 0xFFFFF41F,
+ 0x0000007F, 0xFFFFFEAC, 0xFFFFF41F, 0x0F671408, 0x00000000, 0x00000001, 0x000400F5, 0x01040000, 0x6C160000,
+ 0x0000007F, 0xFFFFFEAC, 0xFFFFF41F, 0x0000007F, 0xFFFFFEAC, 0xFFFFF41F, 0x0F671408, 0x00000000, 0x00000001,
+ 0x00050104, 0x018C0000, 0x6C160000, 0x0000007F, 0xFFFFFEAC, 0xFFFFF41F, 0x0000007F, 0xFFFFFEAC, 0xFFFFF41F,
+ 0x0F671408, 0x00000000, 0x00000001, 0x00000003, 0x00000001, 0x000C013B, 0x01590000, 0x00000000, 0x00000000,
+ 0xFFFFFFC0, 0x00000032, 0x00000000, 0xFFFFFFC0, 0x00000032, 0x00000000, 0x00000000, 0x00000000, 0x00000013,
+ 0x00000004, 0xFFFF0000, 0x009DFFFF, 0xFFFFFFFF, 0x404B009D, 0x00AF0000, 0xFFFFFFFF, 0xFFFF00AF, 0x00FCFFFF,
+ 0xFFFFFFFF, 0x401E00FC, 0x012C0000, 0xFFFFFFFF, 0x00000001, 0x00010000, 0x00F70000, 0x00000000, 0x4235998B,
+ 0x0037FEDE, 0xF54320BA, 0x00000000, 0x4235998B, 0x0037FEDE, 0xF54344B8, 0x00000000, 0x4235998B, 0x0037FEDE,
+ 0xF5438080, 0x00000000, 0x4235998B, 0x0037FEDE, 0xF543E243, 0x00000000, 0x41F6662C, 0x0037FEDE, 0xF543005E,
+ 0x00000000, 0x41F6662C, 0x0037FEDE, 0xF543FFFF, 0x00000000, 0x41F6662C, 0x0037FEDE, 0xF5430000, 0x00000000,
+ 0x41F6662C, 0x0037FEDE, 0xF5435B80, 0xFF000000, 0x41F6662C, 0x0037FEDE, 0xF54349B4, 0x00000001, 0x00010049,
+ 0x00D00000, 0x00000000, 0x4235998B, 0x0063FECD, 0xF45720BA, 0x00000000, 0x4235998B, 0x0063FECD, 0xF45744B8,
+ 0x00000000, 0x4235998B, 0x0063FECD, 0xF4578080, 0x00000000, 0x4235998B, 0x0063FECD, 0xF457E243, 0x00000000,
+ 0x4235998B, 0x0063FECD, 0xF457005E, 0x00000000, 0x4235998B, 0x0063FECD, 0xF457FFFF, 0xFF000000, 0x4235998B,
+ 0x0063FECD, 0xF4570000, 0x00000001, 0x00010074, 0x04B70000, 0x00000000, 0x42373325, 0x009BFEEC, 0xF4A120BA,
+ 0x00000000, 0x42373325, 0x009BFEEC, 0xF4A144B8, 0x00000000, 0x42373325, 0x009BFEEC, 0xF4A18080, 0x00000000,
+ 0x42373325, 0x009BFEEC, 0xF4A1E243, 0xFF000000, 0x42373325, 0x009BFEEC, 0xF4A1005E, 0x00000001, 0x000100BA,
+ 0x04FD0000, 0x00000000, 0x4235998C, 0x004DFEC5, 0xF45020BA, 0x00000000, 0x4235998C, 0x004DFEC5, 0xF45044B8,
+ 0x00000000, 0x4235998C, 0x004DFEC5, 0xF4508080, 0x00000000, 0x4235998C, 0x004DFEC5, 0xF450E243, 0xFF000000,
+ 0x4235998C, 0x004DFEC5, 0xF450005E, 0x00000001, 0x00010100, 0x01A90000, 0x00000000, 0x41E1995C, 0x015EFF13,
+ 0xF30E20BA, 0x00000000, 0x41E1995C, 0x015EFF13, 0xF30E44B8, 0x00000000, 0x41E1995C, 0x015EFF13, 0xF30E8080,
+ 0x00000000, 0x41E1995C, 0x015EFF13, 0xF30EE243, 0x00000000, 0x423B3327, 0x015EFF13, 0xF30E005E, 0x00000000,
+ 0x423B3327, 0x015EFF13, 0xF30EFFFF, 0x00000000, 0x423B3327, 0x015EFF13, 0xF30E0000, 0xFF000000, 0x423B3327,
+ 0x015EFF13, 0xF30E5B80, 0x00000002, 0x00010000, 0x01140000, 0x00000032, 0x4235998B, 0x0028FF00, 0xF4F920BA,
+ 0x00000032, 0x4235998B, 0x0028FF00, 0xF4F944B8, 0x00000028, 0x4235998B, 0x0016FEC7, 0xF4F98080, 0x0000000A,
+ 0x4235998B, 0x0017FEC7, 0xF4F9E243, 0x00000006, 0x41F6662C, 0x0049FED6, 0xF4F4005E, 0x0000001E, 0x41F6662C,
+ 0x0049FED6, 0xF4F4FFFF, 0x0000001E, 0x41F6662C, 0x0049FED6, 0xF4F40000, 0x0000001E, 0x41F6662C, 0x0049FED6,
+ 0xF4F45B80, 0xFF00001E, 0x41F6662C, 0x0049FED6, 0xF4F449B4, 0x00000002, 0x00010049, 0x00ED0000, 0x0000001E,
+ 0x4270CCCD, 0x0088FEC6, 0xF40C20BA, 0x00000007, 0x42726667, 0x0088FEC6, 0xF40C44B8, 0x00000007, 0x4235998B,
+ 0x0088FEC6, 0xF40C8080, 0x0000001E, 0x4235998B, 0x0088FEC6, 0xF40CE243, 0x0000001E, 0x4235998B, 0x0088FEC6,
+ 0xF40C005E, 0x0000001E, 0x4235998B, 0x0087FEC7, 0xF40CFFFF, 0xFF00001E, 0x4235998B, 0x0087FEC7, 0xF40D0000,
+ 0x00000002, 0x00010074, 0x04D40000, 0x0000001E, 0x42373325, 0x0084FECF, 0xF46720BA, 0x0000001E, 0x42373325,
+ 0x0084FED0, 0xF46744B8, 0x000003E8, 0x42373325, 0x0085FED0, 0xF4678080, 0x0000001E, 0x42373325, 0x0085FED0,
+ 0xF467E243, 0xFF00001E, 0x42373325, 0x0085FED0, 0xF467005E, 0x00000002, 0x000100BA, 0x051A0000, 0x0000001E,
+ 0x4235998C, 0x008AFED3, 0xF42820BA, 0x0000001E, 0x4235998C, 0x008AFED3, 0xF42844B8, 0x000003E8, 0x4235998C,
+ 0x008AFED3, 0xF4288080, 0x0000001E, 0x4235998C, 0x008AFED3, 0xF428E243, 0xFF00001E, 0x4235998C, 0x008AFED3,
+ 0xF428005E, 0x00000002, 0x00010100, 0x01C60000, 0x0000001E, 0x41E1995C, 0x0133FF02, 0xF34620BA, 0x0000001E,
+ 0x41E1995C, 0x0133FF02, 0xF34644B8, 0x00000009, 0x41E1995C, 0x0133FF02, 0xF3468080, 0x00000009, 0x423B3327,
+ 0x0130FEEF, 0xF337E243, 0x0000001E, 0x423B3327, 0x0130FEF0, 0xF336005E, 0x0000001E, 0x423B3327, 0x0130FEF0,
+ 0xF336FFFF, 0x0000001E, 0x423B3327, 0x0130FEF0, 0xF3360000, 0xFF00001E, 0x423B3327, 0x0131FEF0, 0xF3365B80,
+ 0x00000056, 0x00000001, 0x0052004A, 0x004B0000, 0x00000000, 0xFFFFFFF1, 0x00000000, 0x0000004E, 0xFFFFFFF1,
+ 0x00000000, 0x0000004E, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000,
+};
+
+u32 D_80AF10A4[] = {
+ 0x0000000E, 0x00000513, 0x0000000A, 0x00000003, 0x00050000, 0x01100000, 0xC0000000, 0xFFFFFBC3, 0xFFFFFBFF,
+ 0xFFFFF2ED, 0xFFFFFBC3, 0xFFFFFBFF, 0xFFFFF2ED, 0x0F671408, 0x00000000, 0x00000001, 0x00030110, 0x01240000,
+ 0xC0000000, 0xFFFFFBC3, 0xFFFFFBFF, 0xFFFFF2ED, 0xFFFFFBC3, 0xFFFFFBFF, 0xFFFFF2ED, 0x0F671408, 0x00000000,
+ 0x00000001, 0x00050124, 0x03090000, 0xC0000000, 0xFFFFFBC3, 0xFFFFFBFF, 0xFFFFF2ED, 0xFFFFFBC3, 0xFFFFFBFF,
+ 0xFFFFF2ED, 0x0F671408, 0x00000000, 0x00000001, 0x00000003, 0x00000001, 0x000C014A, 0x02730000, 0x00000000,
+ 0x00000000, 0xFFFFFFC0, 0x00000032, 0x00000000, 0xFFFFFFC0, 0x00000032, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000042, 0x00000003, 0x00010000, 0x00280000, 0x40000000, 0xFFFFFAB8, 0xFFFFFC37, 0xFFFFF2F3, 0xFFFFFAB8,
+ 0xFFFFFC37, 0xFFFFF2F3, 0x00000000, 0x00000000, 0x00000001, 0x00020028, 0x00D50000, 0x40000000, 0xFFFFFAB8,
+ 0xFFFFFC37, 0xFFFFF2F3, 0xFFFFFAB0, 0xFFFFFC37, 0xFFFFF2F1, 0x00000000, 0x00000000, 0x00000001, 0x000300D5,
+ 0x03E80000, 0x40000000, 0xFFFFFAB0, 0xFFFFFC37, 0xFFFFF2F1, 0xFFFFFAB0, 0xFFFFFC37, 0xFFFFF2F1, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000030, 0x00000001, 0x00020000, 0x005A0000, 0x00000000, 0xFFFFFAB0, 0xFFFFFC3D,
+ 0xFFFFF2F1, 0xFFFFFAB0, 0xFFFFFC3D, 0xFFFFF2F1, 0x00000000, 0x00000000, 0x00000000, 0x00000030, 0x00000002,
+ 0x0002005A, 0x00D30000, 0x00000000, 0xFFFFFAB8, 0xFFFFFC66, 0xFFFFF2F3, 0xFFFFFAB8, 0xFFFFFC66, 0xFFFFF2F3,
+ 0x00000000, 0x00000000, 0x00000000, 0x000600D3, 0x01370000, 0x00000000, 0xFFFFFAB8, 0xFFFFFC66, 0xFFFFF2F3,
+ 0xFFFFFAB8, 0xFFFFFC66, 0xFFFFF2F3, 0x00000000, 0x00000000, 0x00000000, 0x0000003E, 0x00000003, 0x00040000,
+ 0x00D20000, 0x00000000, 0xFFFFFBD7, 0xFFFFFC34, 0xFFFFF317, 0xFFFFFBD7, 0xFFFFFC2E, 0xFFFFF317, 0x00000000,
+ 0xBCEA0EA1, 0x00000000, 0x000400D2, 0x00DC8000, 0x00000000, 0xFFFFFBD7, 0xFFFFFC2E, 0xFFFFF317, 0xFFFFFBD7,
+ 0xFFFFFC33, 0xFFFFF2F0, 0x00000000, 0x3F000000, 0x00000000, 0x000400DC, 0x019A0000, 0x00000000, 0xFFFFFBD7,
+ 0xFFFFFC33, 0xFFFFF2F0, 0xFFFFFBD7, 0xFFFFFC30, 0xFFFFF2F0, 0x00000000, 0xBC8158ED, 0x00000000, 0x00000013,
+ 0x00000006, 0xFFFF0000, 0x00A2FFFF, 0xFFFFFFFF, 0x405000A2, 0x00D30000, 0xFFFFFFFF, 0xFFFF00D3, 0x00E8FFFF,
+ 0xFFFFFFFF, 0x405100E8, 0x00F10000, 0xFFFFFFFF, 0xFFFF00F1, 0x00F7FFFF, 0xFFFFFFFF, 0x405200F7, 0x012B0000,
+ 0xFFFFFFFF, 0x00000056, 0x00000001, 0x00230070, 0x00710000, 0x00000000, 0x00000000, 0xFFFFFFC7, 0x000000B1,
+ 0x00000000, 0xFFFFFFC7, 0x000000B1, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00010000, 0x04980000,
+ 0x00000000, 0x4227A05C, 0xFA92FC4C, 0xF2F500C6, 0x00000000, 0x4222D38E, 0xFA92FC4C, 0xF2F500C8, 0x00000000,
+ 0x4222D38E, 0xFA92FC4C, 0xF2F500D7, 0x00000000, 0x4222D38E, 0xFA76FC56, 0xF2F700E8, 0x00000000, 0x42346D2B,
+ 0xFA76FC56, 0xF2F700EA, 0x00000000, 0x42346D2B, 0xFA76FC56, 0xF2F7013D, 0x00000000, 0x42346D2B, 0xFA76FC56,
+ 0xF2F7013F, 0xFF000000, 0x42346D2B, 0xFA76FC56, 0xF2F7006D, 0x00000001, 0x0001005B, 0x04F60000, 0x00000000,
+ 0x4233A05F, 0xFAD9FC5A, 0xF2F100C6, 0x00000000, 0x4232D392, 0xFAD9FC58, 0xF2F000C8, 0x00000000, 0x4232D392,
+ 0xFAD9FC58, 0xF2F000D7, 0x00000000, 0x4232D392, 0xFAD9FC58, 0xF2F000E8, 0x00000000, 0x4232D392, 0xFAD2FC78,
+ 0xF2F200EA, 0x00000000, 0x4273A06F, 0xFAD2FC78, 0xF2F2013D, 0x00000000, 0x4273A06F, 0xFAD2FC78, 0xF2F2013F,
+ 0x00000000, 0x4273A06F, 0xFAD2FC78, 0xF2F2014E, 0x00000000, 0x4273A06F, 0xFAD2FC78, 0xF2F2015F, 0x00000000,
+ 0x4273A06F, 0xFAD2FC78, 0xF2F20161, 0xFF000000, 0x4273A06F, 0xFAD2FC00, 0xF2F2652E, 0x00000001, 0x000100D3,
+ 0x014C0000, 0x00000000, 0x41F273D3, 0xFA41FCCD, 0xF3B300C6, 0x00000000, 0x41F273D3, 0xFA41FCCD, 0xF3B300C8,
+ 0x00000000, 0x41F273D3, 0xFA41FCCD, 0xF3B300D7, 0x00000000, 0x41F273D3, 0xFA41FCCD, 0xF3B300E8, 0xFF000000,
+ 0x41F273D3, 0xFA41FCCD, 0xF3B300EA, 0x00000002, 0x00010000, 0x04B50000, 0x0000001E, 0x4222D38E, 0xFAF1FC15,
+ 0xF2E800C6, 0x00000032, 0x4222D38E, 0xFAF0FC15, 0xF2E800C8, 0x00000014, 0x4222D38E, 0xFAF0FC15, 0xF2E800D7,
+ 0x0000000F, 0x42346D2B, 0xFADEFC37, 0xF2EE00E8, 0x0000001E, 0x42346D2B, 0xFADFFC36, 0xF2EE00EA, 0x000003E8,
+ 0x42346D2B, 0xFADFFC37, 0xF2EE013D, 0x0000001E, 0x42346D2B, 0xFADFFC36, 0xF2EE013F, 0xFF00001E, 0x42346D2B,
+ 0xFADFFC36, 0xF2EE006D, 0x00000002, 0x0001005B, 0x05130000, 0x0000001E, 0x4232D392, 0xFA83FC24, 0xF2F100C6,
+ 0x00000007, 0x4232D392, 0xFA82FC23, 0xF2F000C8, 0x00000007, 0x4232D392, 0xFA82FC23, 0xF2F000D7, 0x00000007,
+ 0x4232D392, 0xFA82FC23, 0xF2F000E8, 0x00000007, 0x4273A06F, 0xFA8FFC2E, 0xF2F200EA, 0x0000001E, 0x4273A06F,
+ 0xFA8FFC2F, 0xF2F2013D, 0x0000001E, 0x4273A06F, 0xFA8FFC2F, 0xF2F2013F, 0x000003E8, 0x4273A06F, 0xFA8FFC2F,
+ 0xF2F2014E, 0x0000001E, 0x4273A06F, 0xFA8FFC2F, 0xF2F2015F, 0x0000001E, 0x4273A06F, 0xFA8FFC2F, 0xF2F20161,
+ 0xFF00001E, 0x4273A06F, 0xFA87FBBA, 0xF2ED652E, 0x00000002, 0x000100D3, 0x01690000, 0x0000001E, 0x41F273D3,
+ 0xFA6EFCA7, 0xF38A00C6, 0x0000001E, 0x41F273D3, 0xFA6EFCA7, 0xF38A00C8, 0x0000001E, 0x41F273D3, 0xFA6EFCA7,
+ 0xF38A00D7, 0x0000001E, 0x41F273D3, 0xFA6EFCA7, 0xF38A00E8, 0xFF00001E, 0x41F273D3, 0xFA6EFCA7, 0xF38A00EA,
+ 0xFFFFFFFF, 0x00000000, 0x00000000,
+};
+
+u32 D_80AF1728[] = {
+ 0x00000007, 0x00000488, 0x00000003, 0x00000001, 0x000C004B, 0x02730000, 0x00000000, 0x00000000, 0xFFFFFFC0,
+ 0x00000032, 0x00000000, 0xFFFFFFC0, 0x00000032, 0x00000000, 0x00000000, 0x00000000, 0x00000030, 0x00000001,
+ 0x00020000, 0x005A0000, 0x00000000, 0xFFFFFAB0, 0xFFFFFC3D, 0xFFFFF2F1, 0xFFFFFAB0, 0xFFFFFC3D, 0xFFFFF2F1,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00010000, 0x04430000, 0x00000000, 0x42226662, 0xFA9BFC42,
+ 0xF2FD8BC0, 0x00000000, 0x42226662, 0xFA9BFC42, 0xF2FD2200, 0x00000000, 0x42226662, 0xFA9BFC42, 0xF2FD0000,
+ 0x00000000, 0x42226662, 0xFA9BFC42, 0xF2FDD0E8, 0xFF000000, 0x42226662, 0xFA9BFC42, 0xF2FD0000, 0x00000005,
+ 0x00010028, 0x046B0000, 0x00000000, 0x424B3339, 0x00130028, 0x00358BC0, 0x00000000, 0x424B3339, 0x00130028,
+ 0x00352200, 0x00000000, 0x424B3339, 0x00130028, 0x00350000, 0x00000000, 0x424B3339, 0x00130028, 0x0035D0E8,
+ 0xFF000000, 0x424B3339, 0x00130028, 0x00350000, 0x00000002, 0x00010000, 0x04600000, 0x0000001E, 0x42226662,
+ 0xFB38FC2D, 0xF2DA8BC0, 0x0000001E, 0x42226662, 0xFB38FC2D, 0xF2DA2200, 0x000003E8, 0x42226662, 0xFB38FC2D,
+ 0xF2DA0000, 0x0000001E, 0x42226662, 0xFB38FC2D, 0xF2DAD0E8, 0xFF00001E, 0x42226662, 0xFB38FC2D, 0xF2DA0000,
+ 0x00000006, 0x00010028, 0x04880000, 0x0000001E, 0x424B3339, 0xFFDD0038, 0xFFA38BC0, 0x0000001E, 0x424B3339,
+ 0xFFDD0038, 0xFFA32200, 0x000003E8, 0x424B3339, 0xFFDD0038, 0xFFA30000, 0x0000001E, 0x424B3339, 0xFFDD0038,
+ 0xFFA3D0E8, 0xFF00001E, 0x424B3339, 0xFFDD0038, 0xFFA30000, 0x00000013, 0x00000002, 0xFFFF0000, 0x0023FFFF,
+ 0xFFFFFFFF, 0x404F0023, 0x00460000, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000,
+};
diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c
index ba66c0fb6..a8415dcaf 100644
--- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c
+++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c
@@ -84,14 +84,14 @@ const ActorInit En_Ru2_InitVars = {
(ActorFunc)EnRu2_Draw,
};
-extern AnimationHeader* D_060004CC;
-extern SkeletonHeader* D_0600C700;
-extern AnimationHeader* D_0600D3DC;
-extern AnimationHeader* D_0600DCAC;
-extern AnimationHeader* D_06000DE8;
-extern AnimationHeader* D_0600E630;
-extern AnimationHeader* D_0600F03C;
-extern AnimationHeader* D_0600F8B8;
+extern AnimationHeader D_060004CC;
+extern SkeletonHeader D_0600C700;
+extern AnimationHeader D_0600D3DC;
+extern AnimationHeader D_0600DCAC;
+extern AnimationHeader D_06000DE8;
+extern AnimationHeader D_0600E630;
+extern AnimationHeader D_0600F03C;
+extern AnimationHeader D_0600F8B8;
void func_80AF2550(EnRu2* this, GlobalContext* globalCtx) {
EnRu2* thisLocal = this;
@@ -304,7 +304,8 @@ void func_80AF2BC0(EnRu2* this, GlobalContext* globalCtx) {
if (globalCtx->csCtx.state != 0) {
csCmdActorAction = globalCtx->csCtx.actorActions[3];
if (csCmdActorAction != NULL && csCmdActorAction->action == 3) {
- SkelAnime_ChangeAnim(&this->skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 2, 0.0f);
+ SkelAnime_ChangeAnim(&this->skelAnime, animation, 1.0f, 0.0f,
+ SkelAnime_GetFrameCount(&animation->genericHeader), 2, 0.0f);
this->action = 4;
}
}
@@ -756,7 +757,7 @@ void EnRu2_Update(EnRu2* this, GlobalContext* globalCtx) {
void EnRu2_Init(EnRu2* this, GlobalContext* globalCtx) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
func_80AF2550(this, globalCtx);
- SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600C700, NULL, &this->unk_190, &this->unk_21A, 0x17);
+ SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600C700, NULL, &this->actorDrawTable, &this->transitionDrawTable, 23);
switch (func_80AF26A0(this)) {
case 2:
diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h
index 441e6ccc5..88b25e1e7 100644
--- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h
+++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h
@@ -7,10 +7,8 @@
typedef struct {
/* 0x0000 */ Actor actor;
/* 0x014C */ SkelAnime skelAnime;
- /* 0x0190 */ s8 unk_190; // likely a struct
- /* 0x0191 */ char unk_191[0x89];
- /* 0x021A */ s8 unk_21A; // another of the same struct
- /* 0x021B */ char unk_21B[0x89];
+ /* 0x0190 */ Vec3s actorDrawTable[23];
+ /* 0x021A */ Vec3s transitionDrawTable[23];
/* 0x02A4 */ s16 unk_2A4;
/* 0x02A6 */ s16 unk_2A6;
/* 0x02A8 */ s32 action;