From 9de0b1314139e0d9a243ebdb78a3073a782a638e Mon Sep 17 00:00:00 2001
From: louist103 <35883445+louist103@users.noreply.github.com>
Date: Sun, 30 May 2021 13:10:17 -0400
Subject: [PATCH] Object_RU1, Object_MA1, and warp pad objects Decompiled
(#828)
* Ruto limbs
* RutoLimb enum
* the enum doesn't go in en_door
* Limb DLists
* Name almost all textures and clean up EnRu1.c
* remove padding
* Name all but 1 animation and remove undefined syms
* Object MA limbs OK
* (MA1)Most textures
* Small renames in EnMa1.c
* Object MA1 OK
* add base object for Mjin
* Mjin OK
* Update object_ma1.xml
* PR fixes (Fig)
* PR fixes
* Missed one
* Update assets/xml/objects/object_ru1.xml
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
---
assets/xml/objects/object_link_child.xml | 2 +-
assets/xml/objects/object_ma1.xml | 116 ++++---
assets/xml/objects/object_mjin.xml | 8 +-
assets/xml/objects/object_mjin_dark.xml | 2 +-
assets/xml/objects/object_mjin_flame.xml | 2 +-
assets/xml/objects/object_mjin_flash.xml | 2 +-
assets/xml/objects/object_mjin_ice.xml | 2 +-
assets/xml/objects/object_mjin_oka.xml | 8 +-
assets/xml/objects/object_mjin_soul.xml | 2 +-
assets/xml/objects/object_mjin_wind.xml | 2 +-
assets/xml/objects/object_ru1.xml | 144 ++++----
src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c | 26 +-
src/overlays/actors/ovl_En_Ma1/z_en_ma1.c | 97 +++---
src/overlays/actors/ovl_En_Ma1/z_en_ma1.h | 6 +-
src/overlays/actors/ovl_En_Ru1/z_en_ru1.c | 343 ++++++++++----------
src/overlays/actors/ovl_En_Ru1/z_en_ru1.h | 32 +-
undefined_syms.txt | 36 --
17 files changed, 411 insertions(+), 419 deletions(-)
diff --git a/assets/xml/objects/object_link_child.xml b/assets/xml/objects/object_link_child.xml
index 291149ee31..d4d81edf4d 100644
--- a/assets/xml/objects/object_link_child.xml
+++ b/assets/xml/objects/object_link_child.xml
@@ -174,7 +174,7 @@
-
+
diff --git a/assets/xml/objects/object_ma1.xml b/assets/xml/objects/object_ma1.xml
index 5422430a90..0d68f2d04b 100644
--- a/assets/xml/objects/object_ma1.xml
+++ b/assets/xml/objects/object_ma1.xml
@@ -1,57 +1,67 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_mjin.xml b/assets/xml/objects/object_mjin.xml
index c6a84a8c43..0b817558a0 100644
--- a/assets/xml/objects/object_mjin.xml
+++ b/assets/xml/objects/object_mjin.xml
@@ -1,8 +1,8 @@
-
-
-
-
+
+
+
+
diff --git a/assets/xml/objects/object_mjin_dark.xml b/assets/xml/objects/object_mjin_dark.xml
index ce70269fe1..2fa0bdbe4c 100644
--- a/assets/xml/objects/object_mjin_dark.xml
+++ b/assets/xml/objects/object_mjin_dark.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/assets/xml/objects/object_mjin_flame.xml b/assets/xml/objects/object_mjin_flame.xml
index 33596818ed..6274feaee1 100644
--- a/assets/xml/objects/object_mjin_flame.xml
+++ b/assets/xml/objects/object_mjin_flame.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/assets/xml/objects/object_mjin_flash.xml b/assets/xml/objects/object_mjin_flash.xml
index 145080be73..c1040ea118 100644
--- a/assets/xml/objects/object_mjin_flash.xml
+++ b/assets/xml/objects/object_mjin_flash.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/assets/xml/objects/object_mjin_ice.xml b/assets/xml/objects/object_mjin_ice.xml
index 158cde21c2..1aaeea193d 100644
--- a/assets/xml/objects/object_mjin_ice.xml
+++ b/assets/xml/objects/object_mjin_ice.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/assets/xml/objects/object_mjin_oka.xml b/assets/xml/objects/object_mjin_oka.xml
index 3697b6a2c8..a5fb318d26 100644
--- a/assets/xml/objects/object_mjin_oka.xml
+++ b/assets/xml/objects/object_mjin_oka.xml
@@ -1,8 +1,8 @@
-
-
-
-
+
+
+
+
diff --git a/assets/xml/objects/object_mjin_soul.xml b/assets/xml/objects/object_mjin_soul.xml
index b6fa507741..6386f7f9ea 100644
--- a/assets/xml/objects/object_mjin_soul.xml
+++ b/assets/xml/objects/object_mjin_soul.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/assets/xml/objects/object_mjin_wind.xml b/assets/xml/objects/object_mjin_wind.xml
index e046e8eb34..8bba7eb91b 100644
--- a/assets/xml/objects/object_mjin_wind.xml
+++ b/assets/xml/objects/object_mjin_wind.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/assets/xml/objects/object_ru1.xml b/assets/xml/objects/object_ru1.xml
index 4831f04dae..2d7e26246d 100644
--- a/assets/xml/objects/object_ru1.xml
+++ b/assets/xml/objects/object_ru1.xml
@@ -1,69 +1,83 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c
index 17d0af2c15..1e4a73f504 100644
--- a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c
+++ b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c
@@ -5,6 +5,14 @@
*/
#include "z_bg_mjin.h"
+#include "objects/object_mjin/object_mjin.h"
+#include "objects/object_mjin_wind/object_mjin_wind.h"
+#include "objects/object_mjin_soul/object_mjin_soul.h"
+#include "objects/object_mjin_dark/object_mjin_dark.h"
+#include "objects/object_mjin_ice/object_mjin_ice.h"
+#include "objects/object_mjin_flame/object_mjin_flame.h"
+#include "objects/object_mjin_flash/object_mjin_flash.h"
+#include "objects/object_mjin_oka/object_mjin_oka.h"
#define FLAGS 0x00000010
@@ -16,7 +24,7 @@ void BgMjin_Update(Actor* thisx, GlobalContext* globalCtx);
void BgMjin_Draw(Actor* thisx, GlobalContext* globalCtx);
void func_808A0850(BgMjin* this, GlobalContext* globalCtx);
-void func_808A0920(BgMjin* this, GlobalContext* globalCtx);
+void BgMjin_DoNothing(BgMjin* this, GlobalContext* globalCtx);
const ActorInit Bg_Mjin_InitVars = {
ACTOR_BG_MJIN,
@@ -31,10 +39,6 @@ const ActorInit Bg_Mjin_InitVars = {
};
extern UNK_TYPE D_06000000;
-extern Gfx D_06000140[];
-extern Gfx D_06000330[];
-extern CollisionHeader D_06000330_;
-extern CollisionHeader D_06000658;
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_CONTINUE),
@@ -80,15 +84,15 @@ void func_808A0850(BgMjin* this, GlobalContext* globalCtx) {
this->dyna.actor.objBankIndex = this->objBankIndex;
Actor_SetObjectDependency(globalCtx, &this->dyna.actor);
DynaPolyActor_Init(&this->dyna, 0);
- collision = this->dyna.actor.params != 0 ? &D_06000658 : &D_06000330_;
+ collision = this->dyna.actor.params != 0 ? &gWarpPadCol : &gOcarinaWarpPadCol;
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
- BgMjin_SetupAction(this, func_808A0920);
+ BgMjin_SetupAction(this, BgMjin_DoNothing);
this->dyna.actor.draw = BgMjin_Draw;
}
}
-void func_808A0920(BgMjin* this, GlobalContext* globalCtx) {
+void BgMjin_DoNothing(BgMjin* this, GlobalContext* globalCtx) {
}
void BgMjin_Update(Actor* thisx, GlobalContext* globalCtx) {
@@ -104,15 +108,17 @@ void BgMjin_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mjin.c", 250);
if (thisx->params != 0) {
+ // thisx is required
s32 objBankIndex = Object_GetIndex(&globalCtx->objectCtx, sObjectIDs[thisx->params - 1]);
if (objBankIndex >= 0) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[objBankIndex].segment);
}
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&D_06000000));
- dlist = D_06000330;
+ dlist = gWarpPadBaseDL;
} else {
- dlist = D_06000140;
+ dlist = gOcarinaWarpPadDL;
}
+
func_80093D18(globalCtx->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mjin.c", 285),
G_MTX_NOPUSH | G_MTX_MODELVIEW | G_MTX_LOAD);
diff --git a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c
index cc7f9da85f..d347b7d904 100644
--- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c
+++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c
@@ -5,6 +5,7 @@
*/
#include "z_en_ma1.h"
+#include "objects/object_ma1/object_ma1.h"
#define FLAGS 0x02000039
@@ -25,7 +26,7 @@ void func_80AA0F44(EnMa1* this, GlobalContext* globalCtx);
void func_80AA106C(EnMa1* this, GlobalContext* globalCtx);
void func_80AA10EC(EnMa1* this, GlobalContext* globalCtx);
void func_80AA1150(EnMa1* this, GlobalContext* globalCtx);
-void func_80AA11C8(EnMa1* this, GlobalContext* globalCtx);
+void EnMa1_DoNothing(EnMa1* this, GlobalContext* globalCtx);
const ActorInit En_Ma1_InitVars = {
ACTOR_EN_MA1,
@@ -61,31 +62,27 @@ static ColliderCylinderInit sCylinderInit = {
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
-static struct_D_80AA1678 D_80AA1678[] = {
- { 0x06000820, 1.0f, ANIMMODE_LOOP, 0.0f },
- { 0x06000820, 1.0f, ANIMMODE_LOOP, -10.0f },
- { 0x06008D64, 1.0f, ANIMMODE_LOOP, 0.0f },
- { 0x06008D64, 1.0f, ANIMMODE_LOOP, -10.0f },
+static struct_D_80AA1678 sAnimationInfo[] = {
+ { &gMalonChildIdleAnim, 1.0f, ANIMMODE_LOOP, 0.0f },
+ { &gMalonChildIdleAnim, 1.0f, ANIMMODE_LOOP, -10.0f },
+ { &gMalonChildSingAnim, 1.0f, ANIMMODE_LOOP, 0.0f },
+ { &gMalonChildSingAnim, 1.0f, ANIMMODE_LOOP, -10.0f },
};
static Vec3f D_80AA16B8 = { 800.0f, 0.0f, 0.0f };
-static UNK_PTR D_80AA16C4[] = {
- 0x06001F18,
- 0x06002B18,
- 0x06002F18,
+static void* sMouthTextures[] = {
+ gMalonChildNeutralMouthTex,
+ gMalonChildSmilingMouthTex,
+ gMalonChildTalkingMouthTex,
};
-static UNK_PTR D_80AA16D0[] = {
- 0x06001B18,
- 0x06002318,
- 0x06002718,
+static void* sEyeTextures[] = {
+ gMalonChildEyeOpenTex,
+ gMalonChildEyeHalfTex,
+ gMalonChildEyeClosedTex,
};
-extern AnimationHeader D_06000820;
-extern FlexSkeletonHeader D_06008460;
-extern AnimationHeader D_06008D64;
-
u16 EnMa1_GetText(GlobalContext* globalCtx, Actor* thisx) {
u16 faceReaction = Text_GetFaceReaction(globalCtx, 0x17);
if (faceReaction != 0) {
@@ -207,28 +204,28 @@ s32 func_80AA08C4(EnMa1* this, GlobalContext* globalCtx) {
return 0;
}
-void func_80AA0A0C(EnMa1* this) {
- if (DECR(this->unk_1E2) == 0) {
- this->unk_1E4 += 1;
- if (this->unk_1E4 >= 3) {
- this->unk_1E2 = Rand_S16Offset(0x1E, 0x1E);
- this->unk_1E4 = 0;
+void EnMa1_UpdateEyes(EnMa1* this) {
+ if (DECR(this->blinkTimer) == 0) {
+ this->eyeIndex += 1;
+ if (this->eyeIndex >= 3) {
+ this->blinkTimer = Rand_S16Offset(30, 30);
+ this->eyeIndex = 0;
}
}
}
-void func_80AA0A84(EnMa1* this, UNK_TYPE idx) {
- f32 frameCount = Animation_GetLastFrame(D_80AA1678[idx].animation);
+void EnMa1_ChangeAnimation(EnMa1* this, UNK_TYPE idx) {
+ f32 frameCount = Animation_GetLastFrame(sAnimationInfo[idx].animation);
- Animation_Change(&this->skelAnime, D_80AA1678[idx].animation, 1.0f, 0.0f, frameCount, D_80AA1678[idx].mode,
- D_80AA1678[idx].transitionRate);
+ Animation_Change(&this->skelAnime, sAnimationInfo[idx].animation, 1.0f, 0.0f, frameCount, sAnimationInfo[idx].mode,
+ sAnimationInfo[idx].transitionRate);
}
void func_80AA0AF4(EnMa1* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
s16 phi_a3;
- if ((this->unk_1E8.unk_00 == 0) && (this->skelAnime.animation == &D_06008D64)) {
+ if ((this->unk_1E8.unk_00 == 0) && (this->skelAnime.animation == &gMalonChildSingAnim)) {
phi_a3 = 1;
} else {
phi_a3 = 0;
@@ -241,7 +238,7 @@ void func_80AA0AF4(EnMa1* this, GlobalContext* globalCtx) {
}
void func_80AA0B74(EnMa1* this) {
- if (this->skelAnime.animation == &D_06008D64) {
+ if (this->skelAnime.animation == &gMalonChildSingAnim) {
if (this->unk_1E8.unk_00 == 0) {
if (this->unk_1E0 != 0) {
this->unk_1E0 = 0;
@@ -261,7 +258,7 @@ void EnMa1_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f);
- SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06008460, NULL, NULL, NULL, 0);
+ SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gMalonChildSkel, NULL, NULL, NULL, 0);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(22), &sColChkInfoInit);
@@ -278,10 +275,10 @@ void EnMa1_Init(Actor* thisx, GlobalContext* globalCtx) {
if ((!(gSaveContext.eventChkInf[1] & 0x10)) || (CHECK_QUEST_ITEM(QUEST_SONG_EPONA))) {
this->actionFunc = func_80AA0D88;
- func_80AA0A84(this, 2);
+ EnMa1_ChangeAnimation(this, 2);
} else {
this->actionFunc = func_80AA0F44;
- func_80AA0A84(this, 2);
+ EnMa1_ChangeAnimation(this, 2);
}
}
@@ -294,12 +291,12 @@ void EnMa1_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void func_80AA0D88(EnMa1* this, GlobalContext* globalCtx) {
if (this->unk_1E8.unk_00 != 0) {
- if (this->skelAnime.animation != &D_06000820) {
- func_80AA0A84(this, 1);
+ if (this->skelAnime.animation != &gMalonChildIdleAnim) {
+ EnMa1_ChangeAnimation(this, 1);
}
} else {
- if (this->skelAnime.animation != &D_06008D64) {
- func_80AA0A84(this, 3);
+ if (this->skelAnime.animation != &gMalonChildSingAnim) {
+ EnMa1_ChangeAnimation(this, 3);
}
}
@@ -336,12 +333,12 @@ void func_80AA0F44(EnMa1* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
if (this->unk_1E8.unk_00 != 0) {
- if (this->skelAnime.animation != &D_06000820) {
- func_80AA0A84(this, 1);
+ if (this->skelAnime.animation != &gMalonChildIdleAnim) {
+ EnMa1_ChangeAnimation(this, 1);
}
} else {
- if (this->skelAnime.animation != &D_06008D64) {
- func_80AA0A84(this, 3);
+ if (this->skelAnime.animation != &gMalonChildSingAnim) {
+ EnMa1_ChangeAnimation(this, 3);
}
}
@@ -385,11 +382,11 @@ void func_80AA1150(EnMa1* this, GlobalContext* globalCtx) {
gSaveContext.nextCutsceneIndex = 0xFFF1;
globalCtx->fadeTransition = 42;
globalCtx->sceneLoadFlag = 0x14;
- this->actionFunc = func_80AA11C8;
+ this->actionFunc = EnMa1_DoNothing;
}
}
-void func_80AA11C8(EnMa1* this, GlobalContext* globalCtx) {
+void EnMa1_DoNothing(EnMa1* this, GlobalContext* globalCtx) {
}
void EnMa1_Update(Actor* thisx, GlobalContext* globalCtx) {
@@ -399,9 +396,9 @@ void EnMa1_Update(Actor* thisx, GlobalContext* globalCtx) {
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
SkelAnime_Update(&this->skelAnime);
- func_80AA0A0C(this);
+ EnMa1_UpdateEyes(this);
this->actionFunc(this, globalCtx);
- if (this->actionFunc != func_80AA11C8) {
+ if (this->actionFunc != EnMa1_DoNothing) {
func_800343CC(globalCtx, &this->actor, &this->unk_1E8.unk_00, (f32)this->collider.dim.radius + 30.0f,
EnMa1_GetText, func_80AA0778);
}
@@ -443,18 +440,18 @@ void EnMa1_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
void EnMa1_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnMa1* this = THIS;
Camera* camera;
- f32 someFloat;
+ f32 distFromCamera;
s32 pad;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma1.c", 1226);
camera = ACTIVE_CAM;
- someFloat = Math_Vec3f_DistXZ(&this->actor.world.pos, &camera->eye);
- func_800F6268(someFloat, 0x2F);
+ distFromCamera = Math_Vec3f_DistXZ(&this->actor.world.pos, &camera->eye);
+ func_800F6268(distFromCamera, 0x2F);
func_80093D18(globalCtx->state.gfxCtx);
- gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_80AA16C4[this->unk_1E6]));
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AA16D0[this->unk_1E4]));
+ gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[this->mouthIndex]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex]));
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnMa1_OverrideLimbDraw, EnMa1_PostLimbDraw, this);
diff --git a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h
index c38f78ab74..68074243b1 100644
--- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h
+++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h
@@ -14,9 +14,9 @@ typedef struct EnMa1 {
/* 0x0190 */ EnMa1ActionFunc actionFunc;
/* 0x0194 */ ColliderCylinder collider;
/* 0x01E0 */ s16 unk_1E0;
- /* 0x01E2 */ s16 unk_1E2;
- /* 0x01E4 */ s16 unk_1E4;
- /* 0x01E6 */ s16 unk_1E6;
+ /* 0x01E2 */ s16 blinkTimer;
+ /* 0x01E4 */ s16 eyeIndex;
+ /* 0x01E6 */ s16 mouthIndex;
/* 0x01E8 */ struct_80034A14_arg1 unk_1E8;
} EnMa1; // size = 0x0210
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 225bf09e65..a29a822185 100644
--- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
+++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
@@ -5,6 +5,7 @@
*/
#include "z_en_ru1.h"
+#include "objects/object_ru1/object_ru1.h"
#include "vt.h"
#define FLAGS 0x04000011
@@ -65,9 +66,9 @@ 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);
+void EnRu1_DrawNothing(EnRu1* this, GlobalContext* globalCtx);
+void EnRu1_DrawOpa(EnRu1* this, GlobalContext* globalCtx);
+void EnRu1_DrawXlu(EnRu1* this, GlobalContext* globalCtx);
static ColliderCylinderInitType1 sCylinderInit1 = {
{
@@ -93,14 +94,15 @@ static ColliderCylinderInitType1 sCylinderInit2 = {
{ 20, 30, 0, { 0 } },
};
-static UNK_PTR D_80AF0858[] = {
- 0x0600E3B8, 0x0600F238, 0x0600F638, 0x0600FE38, 0x06010238, 0x06010A38,
+static void* sEyeTextures[] = {
+ gRutoChildEyeOpenTex, gRutoChildEyeHalfTex, gRutoChildEyeClosedTex,
+ gRutoChildEyeRollLeftTex, gRutoChildEyeHalf2Tex, gRutoChildEyeHalfWithBlushTex,
};
-static UNK_PTR D_80AF0870[] = {
- 0x0600E838,
- 0x0600FA38,
- 0x06010638,
+static void* sMouthTextures[] = {
+ gRutoChildMouthClosedTex,
+ gRutoChildMouthFrownTex,
+ gRutoChildMouthOpenTex,
};
static s32 sUnused = 0;
@@ -126,9 +128,9 @@ static EnRu1PreLimbDrawFunc sPreLimbDrawFuncs[] = {
static Vec3f sMultVec = { 0.0f, 10.0f, 0.0f };
static EnRu1DrawFunc sDrawFuncs[] = {
- func_80AF03F4,
- func_80AF0400,
- func_80AF05D4,
+ EnRu1_DrawNothing,
+ EnRu1_DrawOpa,
+ EnRu1_DrawXlu,
};
const ActorInit En_Ru1_InitVars = {
@@ -143,30 +145,6 @@ const ActorInit En_Ru1_InitVars = {
(ActorFunc)EnRu1_Draw,
};
-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 FlexSkeletonHeader D_06012700;
-extern AnimationHeader D_06012E94;
-extern AnimationHeader D_06013A64;
-
void func_80AEAC10(EnRu1* this, GlobalContext* globalCtx) {
s32 pad[5];
@@ -202,7 +180,7 @@ void func_80AEAD20(Actor* thisx, GlobalContext* globalCtx) {
Collider_SetCylinderType1(globalCtx, &this->collider2, &this->actor, &sCylinderInit2);
}
-void func_80AEAD98(EnRu1* this, GlobalContext* globalCtx) {
+void EnRu1_DestroyColliders(EnRu1* this, GlobalContext* globalCtx) {
Collider_DestroyCylinder(globalCtx, &this->collider);
Collider_DestroyCylinder(globalCtx, &this->collider2);
}
@@ -226,30 +204,30 @@ u8 func_80AEADF0(EnRu1* this) {
void EnRu1_Destroy(Actor* thisx, GlobalContext* globalCtx) {
EnRu1* this = THIS;
- func_80AEAD98(this, globalCtx);
+ EnRu1_DestroyColliders(this, globalCtx);
}
-void func_80AEAE1C(EnRu1* this) {
+void EnRu1_UpdateEyes(EnRu1* this) {
s32 pad[3];
- s16* unk_25E = &this->unk_25E;
- s16* unk_25C = &this->unk_25C;
+ s16* blinkTimer = &this->blinkTimer;
+ s16* eyeIndex = &this->eyeIndex;
- if (DECR(*unk_25E) == 0) {
- *unk_25E = Rand_S16Offset(0x3C, 0x3C);
+ if (DECR(*blinkTimer) == 0) {
+ *blinkTimer = Rand_S16Offset(60, 60);
}
- *unk_25C = *unk_25E;
- if (*unk_25C >= 3) {
- *unk_25C = 0;
+ *eyeIndex = *blinkTimer;
+ if (*eyeIndex >= 3) {
+ *eyeIndex = 0;
}
}
-void func_80AEAEA4(EnRu1* this, s16 arg1) {
- this->unk_25C = arg1;
+void EnRu1_SetEyeIndex(EnRu1* this, s16 eyeIndex) {
+ this->eyeIndex = eyeIndex;
}
-void func_80AEAEB8(EnRu1* this, s16 arg1) {
- this->unk_260 = arg1;
+void EnRu1_SetMouthIndex(EnRu1* this, s16 mouthIndex) {
+ this->mouthIndex = mouthIndex;
}
void func_80AEAECC(EnRu1* this, GlobalContext* globalCtx) {
@@ -261,7 +239,7 @@ void func_80AEAECC(EnRu1* this, GlobalContext* globalCtx) {
*velocityY = velocityYHeld;
}
-s32 func_80AEAF38(GlobalContext* globalCtx) {
+s32 EnRu1_IsCsStateIdle(GlobalContext* globalCtx) {
if (globalCtx->csCtx.state == CS_STATE_IDLE) {
return 1;
}
@@ -272,7 +250,7 @@ CsCmdActorAction* func_80AEAF58(GlobalContext* globalCtx, s32 npcActionIdx) {
s32 pad[2];
CsCmdActorAction* ret = NULL;
- if (!func_80AEAF38(globalCtx)) {
+ if (!EnRu1_IsCsStateIdle(globalCtx)) {
ret = globalCtx->csCtx.npcActions[npcActionIdx];
}
return ret;
@@ -314,7 +292,7 @@ s32 func_80AEB020(EnRu1* this, GlobalContext* globalCtx) {
return 0;
}
-BgBdanObjects* func_80AEB088(GlobalContext* globalCtx) {
+BgBdanObjects* EnRu1_FindSwitch(GlobalContext* globalCtx) {
Actor* actorIt = globalCtx->actorCtx.actorLists[ACTORCAT_BG].head;
while (actorIt != NULL) {
@@ -323,6 +301,7 @@ BgBdanObjects* func_80AEB088(GlobalContext* globalCtx) {
}
actorIt = actorIt->next;
}
+ // There is no stand
osSyncPrintf(VT_FGCOL(RED) "お立ち台が無い!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
return NULL;
}
@@ -374,7 +353,7 @@ void func_80AEB1D8(EnRu1* this) {
}
void func_80AEB220(EnRu1* this, GlobalContext* globalCtx) {
- if ((func_80AEAF38(globalCtx)) && (this->actor.params == 0xA)) {
+ if ((EnRu1_IsCsStateIdle(globalCtx)) && (this->actor.params == 0xA)) {
func_80AEB1D8(this);
}
}
@@ -424,11 +403,11 @@ void func_80AEB3CC(EnRu1* this) {
}
void func_80AEB3DC(EnRu1* this, GlobalContext* globalCtx) {
- func_80AEB264(this, &D_06000690, 0, 0, 0);
+ func_80AEB264(this, &gRutoChildWaitHandsBehindBackAnim, 0, 0, 0);
this->action = 0;
this->drawConfig = 1;
- func_80AEAEA4(this, 4);
- func_80AEAEB8(this, 0);
+ EnRu1_SetEyeIndex(this, 4);
+ EnRu1_SetMouthIndex(this, 0);
}
CsCmdActorAction* func_80AEB438(GlobalContext* globalCtx) {
@@ -467,7 +446,7 @@ void func_80AEB59C(EnRu1* this, GlobalContext* globalCtx) {
EnRu1_SpawnRipple(this, globalCtx, kREG(2) + 500, (kREG(3) + 10.0f) * 2.0f);
}
-void func_80AEB680(EnRu1* this, GlobalContext* globalCtx) {
+void EnRu1_SpawnSplash(EnRu1* this, GlobalContext* globalCtx) {
Vec3f pos;
pos.x = this->actor.world.pos.x;
@@ -625,8 +604,8 @@ void func_80AEBC84(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEBCB8(EnRu1* this, UNK_TYPE arg1) {
if (arg1 != 0) {
- Animation_Change(&this->skelAnime, &D_06012E94, 1.0f, 0, Animation_GetLastFrame(&D_06012E94), ANIMMODE_LOOP,
- -8.0f);
+ Animation_Change(&this->skelAnime, &gRutoChildSwimOnBackAnim, 1.0f, 0,
+ Animation_GetLastFrame(&gRutoChildSwimOnBackAnim), ANIMMODE_LOOP, -8.0f);
}
}
@@ -636,7 +615,7 @@ void func_80AEBD1C(EnRu1* this, GlobalContext* globalCtx) {
this->drawConfig = 0;
func_80AEB914(this, globalCtx);
func_80AEAECC(this, globalCtx);
- func_80AEB680(this, globalCtx);
+ EnRu1_SpawnSplash(this, globalCtx);
func_80AEB59C(this, globalCtx);
}
}
@@ -646,10 +625,10 @@ void func_80AEBD94(EnRu1* this, GlobalContext* globalCtx) {
f32 frameCount;
if (func_80AEB480(globalCtx, 3)) {
- frameCount = Animation_GetLastFrame(&D_06009060);
+ frameCount = Animation_GetLastFrame(&gRutoChildAnim_009060);
func_80AEB934(this, globalCtx);
func_80AEB738(this, globalCtx);
- Animation_Change(&this->skelAnime, &D_06009060, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, 0.0f);
+ Animation_Change(&this->skelAnime, &gRutoChildAnim_009060, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, 0.0f);
this->action = 2;
this->drawConfig = 1;
}
@@ -660,9 +639,9 @@ void func_80AEBE3C(EnRu1* this, GlobalContext* globalCtx, s32 arg2) {
f32 frameCount;
if (arg2 != 0) {
- frameCount = Animation_GetLastFrame(&D_06013A64);
+ frameCount = Animation_GetLastFrame(&gRutoChildTreadWaterAnim);
func_80AEB7D0(this);
- Animation_Change(&this->skelAnime, &D_06013A64, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
+ Animation_Change(&this->skelAnime, &gRutoChildTreadWaterAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
this->action = 3;
} else {
func_80AEB954(this, globalCtx);
@@ -674,9 +653,10 @@ void func_80AEBEC8(EnRu1* this, GlobalContext* globalCtx) {
f32 frameCount;
if (func_80AEB458(globalCtx, 6)) {
- frameCount = Animation_GetLastFrame(&D_06008AA8);
+ frameCount = Animation_GetLastFrame(&gRutoChildTransitionToSwimOnBackAnim);
func_80AEB738(this, globalCtx);
- Animation_Change(&this->skelAnime, &D_06008AA8, 1.0f, 0, frameCount, ANIMMODE_ONCE, -8.0f);
+ Animation_Change(&this->skelAnime, &gRutoChildTransitionToSwimOnBackAnim, 1.0f, 0, frameCount, ANIMMODE_ONCE,
+ -8.0f);
this->action = 4;
}
}
@@ -702,8 +682,9 @@ void func_80AEBFD8(EnRu1* this, GlobalContext* globalCtx) {
csCtxFrames = globalCtx->csCtx.frames;
endFrame = csCmdNPCAction->endFrame;
if (csCtxFrames >= endFrame - 2) {
- frameCount = Animation_GetLastFrame(&D_06008100);
- Animation_Change(&this->skelAnime, &D_06008100, 1.0, 0, frameCount, ANIMMODE_ONCE, -8.0f);
+ frameCount = Animation_GetLastFrame(&gRutoChildTransitionFromSwimOnBackAnim);
+ Animation_Change(&this->skelAnime, &gRutoChildTransitionFromSwimOnBackAnim, 1.0, 0, frameCount,
+ ANIMMODE_ONCE, -8.0f);
this->action = 6;
}
}
@@ -749,7 +730,7 @@ void func_80AEC1D4(EnRu1* this, GlobalContext* globalCtx) {
something = EnRu1_FrameUpdateMatrix(this);
func_80AEAECC(this, globalCtx);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEB50C(this, globalCtx);
func_80AEBCB8(this, something);
func_80AEBBF4(this);
@@ -762,7 +743,7 @@ void func_80AEC244(EnRu1* this, GlobalContext* globalCtx) {
something = EnRu1_FrameUpdateMatrix(this);
func_80AEBA2C(this, globalCtx);
func_80AEAECC(this, globalCtx);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEB50C(this, globalCtx);
func_80AEBCB8(this, something);
func_80AEBB78(this);
@@ -774,7 +755,7 @@ void func_80AEC2C0(EnRu1* this, GlobalContext* globalCtx) {
something = EnRu1_FrameUpdateMatrix(this);
func_80AEAECC(this, globalCtx);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEB50C(this, globalCtx);
func_80AEC070(this, globalCtx, something);
}
@@ -783,15 +764,15 @@ void func_80AEC320(EnRu1* this, GlobalContext* globalCtx) {
s8 actorRoom;
if (!(gSaveContext.infTable[20] & 2)) {
- func_80AEB264(this, &D_060097B8, 0, 0, 0);
+ func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
this->action = 7;
- func_80AEAEB8(this, 1);
+ EnRu1_SetMouthIndex(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);
+ func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
actorRoom = this->actor.room;
this->action = 22;
this->actor.room = -1;
@@ -866,8 +847,8 @@ void func_80AEC6B0(EnRu1* this) {
void func_80AEC6E4(EnRu1* this, GlobalContext* globalCtx) {
if ((func_80AEAFA0(globalCtx, 4, 3)) && (this->unk_280 == 0)) {
- Animation_Change(&this->skelAnime, &D_06003784, 1.0f, 0, Animation_GetLastFrame(&D_06003784), ANIMMODE_ONCE,
- -8.0f);
+ Animation_Change(&this->skelAnime, &gRutoChildBringArmsUpAnim, 1.0f, 0,
+ Animation_GetLastFrame(&gRutoChildBringArmsUpAnim), ANIMMODE_ONCE, -8.0f);
this->unk_280 = 1;
func_80AEC6B0(this);
}
@@ -906,16 +887,16 @@ void func_80AEC81C(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEC8B8(EnRu1* this, GlobalContext* globalCtx) {
if (func_80AEAFA0(globalCtx, 3, 3)) {
- Animation_Change(&this->skelAnime, &D_06004074, 1.0f, 0, Animation_GetLastFrame(&D_06004074), ANIMMODE_ONCE,
- -8.0f);
+ Animation_Change(&this->skelAnime, &gRutoChildTurnAroundAnim, 1.0f, 0,
+ Animation_GetLastFrame(&gRutoChildTurnAroundAnim), ANIMMODE_ONCE, -8.0f);
this->action = 10;
}
}
void func_80AEC93C(EnRu1* this, UNK_TYPE arg1) {
if (arg1 != 0) {
- Animation_Change(&this->skelAnime, &D_060078E4, 1.0f, 0, Animation_GetLastFrame(&D_060078E4), ANIMMODE_LOOP,
- -8.0f);
+ Animation_Change(&this->skelAnime, &gRutoChildWalkAnim, 1.0f, 0, Animation_GetLastFrame(&gRutoChildWalkAnim),
+ ANIMMODE_LOOP, -8.0f);
this->actor.world.rot.y += 0x8000;
this->action = 0xB;
this->unk_26C = 0.0f;
@@ -956,7 +937,7 @@ void func_80AECAB4(EnRu1* this, GlobalContext* globalCtx) {
void func_80AECAD4(EnRu1* this, GlobalContext* globalCtx) {
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEAECC(this, globalCtx);
func_80AEC8B8(this, globalCtx);
}
@@ -965,7 +946,7 @@ void func_80AECB18(EnRu1* this, GlobalContext* globalCtx) {
s32 something;
something = EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEAECC(this, globalCtx);
func_80AEC93C(this, something);
}
@@ -973,7 +954,7 @@ void func_80AECB18(EnRu1* this, GlobalContext* globalCtx) {
void func_80AECB60(EnRu1* this, GlobalContext* globalCtx) {
func_80AEC40C(this);
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEAECC(this, globalCtx);
func_80AEC650(this);
func_80AEC9C4(this);
@@ -983,7 +964,7 @@ void func_80AECBB8(EnRu1* this, GlobalContext* globalCtx) {
func_80AEC4CC(this);
func_80AEC6E4(this, globalCtx);
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEAECC(this, globalCtx);
func_80AEC650(this);
func_80AECA18(this);
@@ -993,7 +974,7 @@ void func_80AECC1C(EnRu1* this, GlobalContext* globalCtx) {
func_80AEC4F4(this);
func_80AEC6E4(this, globalCtx);
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEAECC(this, globalCtx);
func_80AEC650(this);
func_80AECA44(this, globalCtx);
@@ -1019,16 +1000,16 @@ void func_80AECCB0(EnRu1* this, GlobalContext* globalCtx) {
spawnX = ((kREG(1) + 12.0f) * Math_SinS(yawTowardsPlayer)) + pos->x;
spawnY = pos->y;
spawnZ = ((kREG(1) + 12.0f) * Math_CosS(yawTowardsPlayer)) + pos->z;
- this->unk_278 = (DoorWarp1*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1,
- spawnX, spawnY, spawnZ, 0, yawTowardsPlayer, 0, 5);
+ this->blueWarp = (DoorWarp1*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1,
+ spawnX, spawnY, spawnZ, 0, yawTowardsPlayer, 0, 5);
}
void func_80AECDA0(EnRu1* this, GlobalContext* globalCtx) {
- func_80AEB264(this, &D_06000E54, 0, 0, 0);
+ func_80AEB264(this, &gRutoChildWaitHandsOnHipsAnim, 0, 0, 0);
this->action = 15;
this->actor.shape.yOffset = -10000.0f;
- func_80AEAEA4(this, 5);
- func_80AEAEB8(this, 2);
+ EnRu1_SetEyeIndex(this, 5);
+ EnRu1_SetMouthIndex(this, 2);
}
void func_80AECE04(EnRu1* this, GlobalContext* globalCtx) {
@@ -1090,15 +1071,15 @@ s32 func_80AECF6C(EnRu1* this, GlobalContext* globalCtx) {
}
s32 func_80AED084(EnRu1* this, UNK_TYPE arg1) {
- if (this->unk_278 != NULL && this->unk_278->unk_1EC == arg1) {
+ if (this->blueWarp != NULL && this->blueWarp->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;
+ if (this->blueWarp != NULL) {
+ this->blueWarp->unk_1EC = arg1;
}
}
@@ -1132,7 +1113,8 @@ void func_80AED154(EnRu1* this, GlobalContext* globalCtx) {
void func_80AED19C(EnRu1* this, s32 cond) {
if (cond) {
- Animation_Change(&this->skelAnime, &D_06001488, 1.0f, 0, Animation_GetLastFrame(&D_06001488), ANIMMODE_ONCE,
+ Animation_Change(&this->skelAnime, &gRutoChildTransitionHandsOnHipToCrossArmsAndLegsAnim, 1.0f, 0,
+ Animation_GetLastFrame(&gRutoChildTransitionHandsOnHipToCrossArmsAndLegsAnim), ANIMMODE_ONCE,
-8.0f);
this->action = 20;
func_80AED0B0(this, 3);
@@ -1142,12 +1124,12 @@ void func_80AED19C(EnRu1* this, s32 cond) {
void func_80AED218(EnRu1* this, UNK_TYPE arg1) {
if (func_80AED084(this, 4)) {
if (arg1 != 0) {
- Animation_Change(&this->skelAnime, &D_06002058, 1.0f, 0, Animation_GetLastFrame(&D_06002058), ANIMMODE_LOOP,
- -8.0f);
+ Animation_Change(&this->skelAnime, &gRutoChildWaitSittingAnim, 1.0f, 0,
+ Animation_GetLastFrame(&gRutoChildWaitSittingAnim), ANIMMODE_LOOP, -8.0f);
}
} else if (func_80AED084(this, 5)) {
- Animation_Change(&this->skelAnime, &D_06002990, 1.0f, 0, Animation_GetLastFrame(&D_06002990), ANIMMODE_ONCE,
- -8.0f);
+ Animation_Change(&this->skelAnime, &gRutoChildWaitInBlueWarpAnim, 1.0f, 0,
+ Animation_GetLastFrame(&gRutoChildWaitInBlueWarpAnim), ANIMMODE_ONCE, -8.0f);
this->action = 21;
this->unk_27C = this->actor.xzDistToPlayer;
}
@@ -1194,7 +1176,7 @@ void func_80AED44C(EnRu1* this, GlobalContext* globalCtx) {
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);
+ func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
actorRoom = this->actor.room;
this->action = 22;
this->actor.room = -1;
@@ -1249,7 +1231,7 @@ s32 func_80AED624(EnRu1* this, GlobalContext* globalCtx) {
(this->actor.yDistToWater > kREG(16) + 50.0f) && (this->action != 33)) {
this->action = 33;
this->drawConfig = 2;
- this->unk_2A8 = 0xFF;
+ this->alpha = 0xFF;
this->unk_2A4 = 0.0f;
}
return 1;
@@ -1280,7 +1262,7 @@ void func_80AED738(EnRu1* this, GlobalContext* 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->alpha = temp_v0;
this->actor.shape.shadowAlpha = temp_v0;
} else {
Actor_Kill(&this->actor);
@@ -1605,9 +1587,9 @@ void func_80AEE628(EnRu1* this, GlobalContext* globalCtx) {
s32 pad[2];
s8 curRoomNum = globalCtx->roomCtx.curRoom.num;
- if (func_80AEAF38(globalCtx)) {
- Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, Animation_GetLastFrame(&D_06006B9C), ANIMMODE_LOOP,
- -8.0f);
+ if (EnRu1_IsCsStateIdle(globalCtx)) {
+ Animation_Change(&this->skelAnime, &gRutoChildSittingAnim, 1.0f, 0,
+ Animation_GetLastFrame(&gRutoChildSittingAnim), ANIMMODE_LOOP, -8.0f);
gSaveContext.infTable[20] |= 0x10;
this->action = 31;
}
@@ -1620,8 +1602,8 @@ s32 func_80AEE6D0(EnRu1* this, GlobalContext* globalCtx) {
if ((!(gSaveContext.infTable[20] & 0x10)) && (func_80AEB124(globalCtx) != 0)) {
if (!Player_InCsMode(globalCtx)) {
- Animation_Change(&this->skelAnime, &D_06004648, 1.0f, 0, Animation_GetLastFrame(&D_06004350), ANIMMODE_LOOP,
- -8.0f);
+ Animation_Change(&this->skelAnime, &gRutoChildSeesSapphireAnim, 1.0f, 0,
+ Animation_GetLastFrame(&gRutoChildSquirmAnim), ANIMMODE_LOOP, -8.0f);
func_80AED600(this);
this->action = 34;
this->unk_26C = 0.0f;
@@ -1642,8 +1624,8 @@ void func_80AEE7C4(EnRu1* this, GlobalContext* globalCtx) {
f32* unk_370 = &this->unk_370;
if (Actor_HasNoParent(&this->actor, globalCtx)) {
- frameCount = Animation_GetLastFrame(&D_06006B9C);
- Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
+ frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim);
+ Animation_Change(&this->skelAnime, &gRutoChildSittingAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP, -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;
@@ -1666,8 +1648,9 @@ void func_80AEE7C4(EnRu1* this, GlobalContext* globalCtx) {
if (this->action != 32) {
if (*unk_370 > 30.0f) {
if (Rand_S16Offset(0, 3) == 0) {
- frameCount = Animation_GetLastFrame(&D_06004350);
- Animation_Change(&this->skelAnime, &D_06004350, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
+ frameCount = Animation_GetLastFrame(&gRutoChildSquirmAnim);
+ Animation_Change(&this->skelAnime, &gRutoChildSquirmAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP,
+ -8.0f);
func_80AED5DC(this);
this->action = 32;
}
@@ -1675,15 +1658,15 @@ void func_80AEE7C4(EnRu1* this, GlobalContext* globalCtx) {
}
} else {
if (*unk_370 > 50.0f) {
- frameCount = Animation_GetLastFrame(&D_06006B9C);
- Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
+ frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim);
+ Animation_Change(&this->skelAnime, &gRutoChildSittingAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
this->action = 31;
*unk_370 = 0.0f;
}
}
} else {
- frameCount = Animation_GetLastFrame(&D_06006B9C);
- Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
+ frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim);
+ Animation_Change(&this->skelAnime, &gRutoChildSittingAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
*unk_370 = 0.0f;
}
}
@@ -1717,7 +1700,7 @@ void func_80AEEBD4(EnRu1* this, GlobalContext* globalCtx) {
func_80AEAC54(this, globalCtx);
func_80AEAECC(this, globalCtx);
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEEBB4(this, globalCtx);
func_80AEE488(this, globalCtx);
func_80AED624(this, globalCtx);
@@ -1731,7 +1714,7 @@ void func_80AEEC5C(EnRu1* this, GlobalContext* globalCtx) {
func_80AEE2F8(this, globalCtx);
func_80AEDFF4(this, globalCtx);
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEE568(this, globalCtx);
func_80AED624(this, globalCtx);
func_80AEDAE0(this, globalCtx);
@@ -1742,7 +1725,7 @@ void func_80AEECF0(EnRu1* this, GlobalContext* globalCtx) {
func_80AEAECC(this, globalCtx);
func_80AEE050(this);
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEEB24(this, globalCtx);
func_80AED624(this, globalCtx);
}
@@ -1752,7 +1735,7 @@ void func_80AEED58(EnRu1* this, GlobalContext* globalCtx) {
func_80AEAECC(this, globalCtx);
Actor_MoveForward(&this->actor);
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEEAC8(this, globalCtx);
func_80AED624(this, globalCtx);
func_80AEDAE0(this, globalCtx);
@@ -1763,7 +1746,7 @@ void func_80AEEDCC(EnRu1* this, GlobalContext* globalCtx) {
EnRu1_FrameUpdateMatrix(this);
func_80AEAECC(this, globalCtx);
func_80AEE2F8(this, globalCtx);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AED6F8(globalCtx);
func_80AEE7C4(this, globalCtx);
}
@@ -1773,7 +1756,7 @@ void func_80AEEE34(EnRu1* this, GlobalContext* globalCtx) {
EnRu1_FrameUpdateMatrix(this);
func_80AEAECC(this, globalCtx);
func_80AEE2F8(this, globalCtx);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AED6F8(globalCtx);
func_80AEE7C4(this, globalCtx);
}
@@ -1783,7 +1766,7 @@ void func_80AEEE9C(EnRu1* this, GlobalContext* globalCtx) {
func_80AEAECC(this, globalCtx);
func_80AEDFF4(this, globalCtx);
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AED738(this, globalCtx);
func_80AED624(this, globalCtx);
}
@@ -1792,7 +1775,7 @@ void func_80AEEF08(EnRu1* this, GlobalContext* globalCtx) {
func_80AED83C(this);
EnRu1_FrameUpdateMatrix(this);
func_80AEAECC(this, globalCtx);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEE628(this, globalCtx);
}
@@ -1830,8 +1813,8 @@ s32 func_80AEF0BC(EnRu1* this, GlobalContext* globalCtx) {
s32 frameCount;
if (gSaveContext.infTable[20] & 4) {
- frameCount = Animation_GetLastFrame(&D_06007534);
- Animation_Change(&this->skelAnime, &D_06007534, 1.0f, 0, frameCount, ANIMMODE_ONCE, -8.0f);
+ frameCount = Animation_GetLastFrame(&gRutoChildSitAnim);
+ Animation_Change(&this->skelAnime, &gRutoChildSitAnim, 1.0f, 0, frameCount, ANIMMODE_ONCE, -8.0f);
globalCtx->msgCtx.msgMode = 0x37;
this->action = 26;
this->actor.flags &= ~0x9;
@@ -1856,8 +1839,8 @@ void func_80AEF188(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEF1F0(EnRu1* this, GlobalContext* globalCtx, UNK_TYPE arg2) {
if (arg2 != 0) {
- Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0.0f, Animation_GetLastFrame(&D_06006B9C), ANIMMODE_LOOP,
- 0.0f);
+ Animation_Change(&this->skelAnime, &gRutoChildSittingAnim, 1.0f, 0.0f,
+ Animation_GetLastFrame(&gRutoChildSittingAnim), ANIMMODE_LOOP, 0.0f);
func_80106CCC(globalCtx);
gSaveContext.infTable[20] |= 8;
func_80AED6DC(this, globalCtx);
@@ -1882,7 +1865,7 @@ void func_80AEF2D0(EnRu1* this, GlobalContext* globalCtx) {
func_80AEEF68(this, globalCtx);
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEAC10(this, globalCtx);
func_80AEAECC(this, globalCtx);
cond = func_80AEE264(this, globalCtx);
@@ -1893,7 +1876,7 @@ void func_80AEF2D0(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEF354(EnRu1* this, GlobalContext* globalCtx) {
func_80AEEFEC(this, globalCtx);
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEAECC(this, globalCtx);
func_80AEF188(this, globalCtx);
}
@@ -1904,7 +1887,7 @@ void func_80AEF3A8(EnRu1* this, GlobalContext* globalCtx) {
func_80AED83C(this);
something = EnRu1_FrameUpdateMatrix(this);
func_80AEF080(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEAECC(this, globalCtx);
func_80AEF1F0(this, globalCtx, something);
}
@@ -1935,10 +1918,10 @@ void func_80AEF51C(EnRu1* this) {
void func_80AEF540(EnRu1* this) {
if (func_80AEB104(this) == 2) {
- func_80AEAEA4(this, 3);
- func_80AEAEB8(this, 2);
+ EnRu1_SetEyeIndex(this, 3);
+ EnRu1_SetMouthIndex(this, 2);
if (this->skelAnime.mode != 2) {
- func_80AEB264(this, &D_06004BF0, 2, -8.0f, 0);
+ func_80AEB264(this, &gRutoChildShutterAnim, 2, -8.0f, 0);
func_80AEF51C(this);
}
}
@@ -1950,8 +1933,8 @@ void func_80AEF5B8(EnRu1* this) {
if (D_80AF1938 == 0) {
curFrame = this->skelAnime.curFrame;
if (curFrame >= 60.0f) {
- func_80AEAEA4(this, 3);
- func_80AEAEB8(this, 0);
+ EnRu1_SetEyeIndex(this, 3);
+ EnRu1_SetMouthIndex(this, 0);
func_80AED57C(this);
D_80AF1938 = 1;
}
@@ -1965,7 +1948,7 @@ void func_80AEF624(EnRu1* this, GlobalContext* globalCtx) {
s16 newRotTmp;
if (func_80AEAFE0(globalCtx, 1, 3)) {
- frameCount = Animation_GetLastFrame(&D_060063F4);
+ frameCount = Animation_GetLastFrame(&gRutoChildWalkToAndHoldUpSapphireAnim);
// this weird part with the redundant variable is necessary to match for some reason
csCmdNPCAction2 = globalCtx->csCtx.npcActions[3];
csCmdNPCAction = csCmdNPCAction2;
@@ -1981,7 +1964,8 @@ void func_80AEF624(EnRu1* this, GlobalContext* globalCtx) {
newRotTmp = csCmdNPCAction->rot.z;
this->actor.shape.rot.z = newRotTmp;
this->actor.world.rot.z = newRotTmp;
- Animation_Change(&this->skelAnime, &D_060063F4, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, 0.0f);
+ Animation_Change(&this->skelAnime, &gRutoChildWalkToAndHoldUpSapphireAnim, 1.0f, 0.0f, frameCount,
+ ANIMMODE_ONCE, 0.0f);
func_80AEB3A4(this, globalCtx);
this->action = 37;
this->drawConfig = 1;
@@ -1991,8 +1975,8 @@ void func_80AEF624(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEF728(EnRu1* this, UNK_TYPE arg1) {
if (arg1 != 0) {
- Animation_Change(&this->skelAnime, &D_06003608, 1.0f, 0.0f, Animation_GetLastFrame(&D_06003608), ANIMMODE_LOOP,
- 0.0f);
+ Animation_Change(&this->skelAnime, &gRutoChildHoldArmsUpAnim, 1.0f, 0.0f,
+ Animation_GetLastFrame(&gRutoChildHoldArmsUpAnim), ANIMMODE_LOOP, 0.0f);
func_80AEB3CC(this);
this->action = 38;
}
@@ -2000,16 +1984,16 @@ void func_80AEF728(EnRu1* this, UNK_TYPE arg1) {
void func_80AEF79C(EnRu1* this, GlobalContext* globalCtx) {
if (func_80AEAFE0(globalCtx, 2, 3)) {
- Animation_Change(&this->skelAnime, &D_06002EC0, 1.0f, 0, Animation_GetLastFrame(&D_06002EC0), ANIMMODE_ONCE,
- -8.0f);
+ Animation_Change(&this->skelAnime, &gRutoChildBringHandsDownAnim, 1.0f, 0,
+ Animation_GetLastFrame(&gRutoChildBringHandsDownAnim), ANIMMODE_ONCE, -8.0f);
this->action = 39;
}
}
void func_80AEF820(EnRu1* this, UNK_TYPE arg1) {
if (arg1 != 0) {
- Animation_Change(&this->skelAnime, &D_060097B8, 1.0f, 0, Animation_GetLastFrame(&D_060097B8), ANIMMODE_LOOP,
- -8.0f);
+ Animation_Change(&this->skelAnime, &gRutoChildWait2Anim, 1.0f, 0, Animation_GetLastFrame(&gRutoChildWait2Anim),
+ ANIMMODE_LOOP, -8.0f);
this->action = 40;
}
}
@@ -2018,7 +2002,7 @@ void func_80AEF890(EnRu1* this, GlobalContext* globalCtx) {
s32 pad[2];
s8 curRoomNum;
- if ((gSaveContext.sceneSetupIndex < 4) && (func_80AEAF38(globalCtx))) {
+ if ((gSaveContext.sceneSetupIndex < 4) && (EnRu1_IsCsStateIdle(globalCtx))) {
curRoomNum = globalCtx->roomCtx.curRoom.num;
gSaveContext.infTable[20] |= 0x20;
Flags_SetSwitch(globalCtx, func_80AEADE0(this));
@@ -2049,7 +2033,7 @@ void func_80AEF99C(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEF9D8(EnRu1* this, GlobalContext* globalCtx) {
func_80AED83C(this);
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEF624(this, globalCtx);
func_80AEB220(this, globalCtx);
}
@@ -2082,7 +2066,7 @@ void func_80AEFB04(EnRu1* this, GlobalContext* globalCtx) {
func_80AED83C(this);
func_80AEAECC(this, globalCtx);
something = EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEF820(this, something);
func_80AEB220(this, globalCtx);
}
@@ -2091,7 +2075,7 @@ void func_80AEFB68(EnRu1* this, GlobalContext* globalCtx) {
func_80AED83C(this);
func_80AEAECC(this, globalCtx);
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEF890(this, globalCtx);
func_80AEB220(this, globalCtx);
}
@@ -2100,7 +2084,7 @@ void func_80AEFBC8(EnRu1* this, GlobalContext* globalCtx) {
func_80AED83C(this);
func_80AEAECC(this, globalCtx);
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEF540(this);
func_80AEF930(this, globalCtx);
}
@@ -2112,9 +2096,9 @@ void func_80AEFC24(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEFC54(EnRu1* this, GlobalContext* globalCtx) {
if ((gSaveContext.infTable[20] & 0x20) && (!(gSaveContext.infTable[20] & 0x40))) {
- func_80AEB264(this, &D_060097B8, 0, 0, 0);
+ func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
this->action = 41;
- this->unk_28C = func_80AEB088(globalCtx);
+ this->unk_28C = EnRu1_FindSwitch(globalCtx);
func_80AEB0EC(this, 1);
this->actor.flags &= ~0x9;
} else {
@@ -2123,7 +2107,7 @@ void func_80AEFC54(EnRu1* this, GlobalContext* globalCtx) {
}
void func_80AEFCE8(EnRu1* this, GlobalContext* globalCtx) {
- this->unk_28C = func_80AEB088(globalCtx);
+ this->unk_28C = EnRu1_FindSwitch(globalCtx);
if (this->unk_28C != NULL) {
this->action = 42;
this->drawConfig = 1;
@@ -2133,7 +2117,7 @@ void func_80AEFCE8(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEFD38(EnRu1* this, GlobalContext* globalCtx) {
if ((gSaveContext.eventChkInf[3] & 0x80) && (gSaveContext.linkAge == 1)) {
- func_80AEB264(this, &D_060097B8, 0, 0, 0);
+ func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
this->actor.flags &= ~0x10;
this->action = 44;
this->drawConfig = 1;
@@ -2178,7 +2162,7 @@ void func_80AEFE9C(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEFECC(EnRu1* this, GlobalContext* globalCtx) {
func_80AEEF68(this, globalCtx);
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEAC10(this, globalCtx);
func_80AEAECC(this, globalCtx);
func_80AEFE84(this, globalCtx, func_80AEFDC0(this, globalCtx));
@@ -2187,7 +2171,7 @@ void func_80AEFECC(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEFF40(EnRu1* this, GlobalContext* globalCtx) {
func_80AEEFEC(this, globalCtx);
EnRu1_FrameUpdateMatrix(this);
- func_80AEAE1C(this);
+ EnRu1_UpdateEyes(this);
func_80AEAECC(this, globalCtx);
func_80AEFE9C(this, globalCtx);
}
@@ -2197,7 +2181,7 @@ void func_80AEFF94(EnRu1* this, GlobalContext* globalCtx) {
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);
+ func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
actorRoom = this->actor.room;
this->action = 22;
this->actor.room = -1;
@@ -2215,10 +2199,10 @@ void func_80AEFF94(EnRu1* this, GlobalContext* globalCtx) {
}
void func_80AF0050(EnRu1* this, GlobalContext* globalCtx) {
- func_80AEB264(this, &D_060097B8, 0, 0, 0);
+ func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
this->action = 36;
this->roomNum1 = this->actor.room;
- this->unk_28C = func_80AEB088(globalCtx);
+ this->unk_28C = EnRu1_FindSwitch(globalCtx);
this->actor.room = -1;
}
@@ -2230,6 +2214,7 @@ void EnRu1_Update(Actor* thisx, GlobalContext* globalCtx) {
osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
return;
}
+
sActionFuncs[this->action](this, globalCtx);
}
@@ -2238,7 +2223,7 @@ void EnRu1_Init(Actor* thisx, GlobalContext* globalCtx) {
EnRu1* this = THIS;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
- SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06012700, NULL, this->jointTable, this->morphTable, 17);
+ SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gRutoChildSkel, NULL, this->jointTable, this->morphTable, 17);
func_80AEAD20(&this->actor, globalCtx);
switch (func_80AEADF0(this)) {
case 0:
@@ -2278,11 +2263,11 @@ void func_80AF0278(EnRu1* this, GlobalContext* globalCtx, s32 limbIndex, Vec3s*
Vec3s* vec2 = &this->unk_374.unk_08;
switch (limbIndex) {
- case 8:
+ case RUTO_CHILD_LEFT_UPPER_ARM:
rot->x += vec1->y;
rot->y -= vec1->x;
break;
- case 15:
+ case RUTO_CHILD_TORSO:
rot->x += vec2->y;
rot->z += vec2->x;
break;
@@ -2307,7 +2292,7 @@ void EnRu1_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
Vec3f vec1;
Vec3f vec2;
- if (limbIndex == 15) {
+ if (limbIndex == RUTO_CHILD_TORSO) {
vec1 = sMultVec;
Matrix_MultVec3f(&vec1, &vec2);
this->actor.focus.pos.x = vec2.x;
@@ -2319,25 +2304,25 @@ void EnRu1_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
}
}
-void func_80AF03F4(EnRu1* this, GlobalContext* globalCtx) {
+void EnRu1_DrawNothing(EnRu1* this, GlobalContext* globalCtx) {
}
-void func_80AF0400(EnRu1* this, GlobalContext* globalCtx) {
+void EnRu1_DrawOpa(EnRu1* this, GlobalContext* globalCtx) {
s32 pad[2];
- s16 temp = this->unk_25C;
- s32 addr1 = D_80AF0858[temp];
- s16 temp2 = this->unk_260;
+ s16 eyeIndex = this->eyeIndex;
+ void* eyeTex = sEyeTextures[eyeIndex];
+ s16 mouthIndex = this->mouthIndex;
SkelAnime* skelAnime = &this->skelAnime;
- s32 addr2 = D_80AF0870[temp2];
+ void* mouthTex = sMouthTextures[mouthIndex];
s32 pad1;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ru1.c", 1282);
func_80093D18(globalCtx->state.gfxCtx);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr1));
- gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr1));
- gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr2));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTex));
+ gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTex));
+ gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(mouthTex));
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
@@ -2347,23 +2332,23 @@ void func_80AF0400(EnRu1* this, GlobalContext* globalCtx) {
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ru1.c", 1309);
}
-void func_80AF05D4(EnRu1* this, GlobalContext* globalCtx) {
+void EnRu1_DrawXlu(EnRu1* this, GlobalContext* globalCtx) {
s32 pad[2];
- s16 temp = this->unk_25C;
- s32 addr1 = D_80AF0858[temp];
- s16 temp2 = this->unk_260;
+ s16 eyeIndex = this->eyeIndex;
+ void* eyeTex = sEyeTextures[eyeIndex];
+ s16 mouthIndex = this->mouthIndex;
SkelAnime* skelAnime = &this->skelAnime;
- s32 addr2 = D_80AF0870[temp2];
+ void* mouthTex = sMouthTextures[mouthIndex];
s32 pad1;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ru1.c", 1324);
func_80093D84(globalCtx->state.gfxCtx);
- gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr1));
- gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr1));
- gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr2));
- gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->unk_2A8);
+ gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTex));
+ gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTex));
+ gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(mouthTex));
+ gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha);
gSPSegment(POLY_XLU_DISP++, 0x0C, &D_80116280[0]);
POLY_XLU_DISP = SkelAnime_DrawFlex(globalCtx, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
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 bfcdacb227..2d4a5726ad 100644
--- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h
+++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h
@@ -18,22 +18,20 @@ typedef struct EnRu1 {
/* 0x014C */ SkelAnime skelAnime;
/* 0x0190 */ Vec3s jointTable[17];
/* 0x01F6 */ Vec3s morphTable[17];
- /* 0x025C */ s16 unk_25C;
- /* 0x025E */ s16 unk_25E;
- /* 0x0260 */ s16 unk_260;
- /* 0x0262 */ char unk_262[0x2];
+ /* 0x025C */ s16 eyeIndex;
+ /* 0x025E */ s16 blinkTimer;
+ /* 0x0260 */ s16 mouthIndex;
/* 0x0264 */ s32 action;
/* 0x0268 */ s32 drawConfig;
/* 0x026C */ f32 unk_26C;
/* 0x0270 */ f32 unk_270;
/* 0x0274 */ char unk_274[0x4];
- /* 0x0278 */ DoorWarp1* unk_278;
+ /* 0x0278 */ DoorWarp1* blueWarp;
/* 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;
@@ -43,9 +41,8 @@ typedef struct EnRu1 {
/* 0x029E */ s16 unk_29E;
/* 0x02A0 */ char unk_2A0[0x4];
/* 0x02A4 */ f32 unk_2A4;
- /* 0x02A8 */ s32 unk_2A8;
+ /* 0x02A8 */ s32 alpha;
/* 0x02AC */ s16 unk_2AC;
- /* 0x02AE */ char unk_2AE[0x2];
/* 0x02B0 */ s32 unk_2B0;
/* 0x02B4 */ ColliderCylinder collider;
/* 0x0300 */ ColliderCylinder collider2;
@@ -60,6 +57,25 @@ typedef struct EnRu1 {
/* 0x0374 */ struct_80034A14_arg1 unk_374;
} EnRu1; // size = 0x039C
+typedef enum {
+ /* 0 */ RUTO_CHILD_ROOT,
+ /* 1 */ RUTO_CHILD_LEFT_THIGH,
+ /* 2 */ RUTO_CHILD_LEFT_SHIN,
+ /* 3 */ RUTO_CHILD_LEFT_FOOT,
+ /* 4 */ RUTO_CHILD_RIGHT_THIGH,
+ /* 5 */ RUTO_CHILD_RIGHT_SHIN,
+ /* 6 */ RUTO_CHILD_RIGHT_FOOT,
+ /* 7 */ RUTO_CHILD_CHEST,
+ /* 8 */ RUTO_CHILD_LEFT_UPPER_ARM,
+ /* 9 */ RUTO_CHILD_LEFT_FIN,
+ /* 10 */ RUTO_CHILD_LEFT_HAND,
+ /* 11 */ RUTO_CHILD_RIGHT_UPPER_ARM,
+ /* 12 */ RUTO_CHILD_RIGHT_FIN,
+ /* 13 */ RUTO_CHILD_RIGHT_HAND,
+ /* 14 */ RUTO_CHILD_HEAD,
+ /* 15 */ RUTO_CHILD_TORSO
+} RutoLimb;
+
extern const ActorInit En_Ru1_InitVars;
#endif
diff --git a/undefined_syms.txt b/undefined_syms.txt
index b7d4fd4406..e35ae4a9d6 100644
--- a/undefined_syms.txt
+++ b/undefined_syms.txt
@@ -276,11 +276,6 @@ D_06015F90 = 0x06015F90;
D_06016990 = 0x06016990;
D_06016E10 = 0x06016E10;
-// z_en_ma1
-D_06000820 = 0x06000820;
-D_06008460 = 0x06008460;
-D_06008D64 = 0x06008D64;
-
// z_en_ma2
D_06005420 = 0x06005420;
D_06008D90 = 0x06008D90;
@@ -609,31 +604,6 @@ D_06015380 = 0x06015380;
D_06000000 = 0x06000000;
D_06000350 = 0x06000350;
-// z_en_ru1
-D_06000690 = 0x06000690;
-D_06000E54 = 0x06000E54;
-D_06001488 = 0x06001488;
-D_06002058 = 0x06002058;
-D_06002990 = 0x06002990;
-D_06002EC0 = 0x06002EC0;
-D_06003608 = 0x06003608;
-D_06003784 = 0x06003784;
-D_06004074 = 0x06004074;
-D_06004350 = 0x06004350;
-D_06004648 = 0x06004648;
-D_06004BF0 = 0x06004BF0;
-D_060063F4 = 0x060063F4;
-D_06006B9C = 0x06006B9C;
-D_06007534 = 0x06007534;
-D_060078E4 = 0x060078E4;
-D_06008100 = 0x06008100;
-D_06008AA8 = 0x06008AA8;
-D_06009060 = 0x06009060;
-D_060097B8 = 0x060097B8;
-D_06012700 = 0x06012700;
-D_06012E94 = 0x06012E94;
-D_06013A64 = 0x06013A64;
-
// z_en_ru2
D_060004CC = 0x060004CC;
D_06000F20 = 0x06000F20;
@@ -647,12 +617,6 @@ D_0600E630 = 0x0600E630;
D_0600F03C = 0x0600F03C;
D_0600F8B8 = 0x0600F8B8;
-// z_bg_mjin
-D_06000140 = 0x06000140;
-D_06000330 = 0x06000330;
-D_06000330_ = 0x06000330;
-D_06000658 = 0x06000658;
-
// z_en_lightbox
D_06000B70 = 0x06000B70;
D_06001F10 = 0x06001F10;