diff --git a/assets/xml/objects/object_du.xml b/assets/xml/objects/object_du.xml
new file mode 100644
index 0000000000..a9bd13f7d8
--- /dev/null
+++ b/assets/xml/objects/object_du.xml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot18.xml b/assets/xml/scenes/overworld/spot18.xml
index 9361d54673..bcc4fa72ac 100644
--- a/assets/xml/scenes/overworld/spot18.xml
+++ b/assets/xml/scenes/overworld/spot18.xml
@@ -1,6 +1,11 @@
+
+
+
+
+
@@ -15,4 +20,4 @@
-
\ No newline at end of file
+
diff --git a/spec b/spec
index 4426b0a3df..450f6c094e 100644
--- a/spec
+++ b/spec
@@ -4344,7 +4344,8 @@ endseg
beginseg
name "object_du"
romalign 0x1000
- include "build/baserom/object_du.o"
+ include "build/assets/objects/object_du/object_du.o"
+ number 6
endseg
beginseg
diff --git a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
index 1290da3abf..43a0e12aec 100644
--- a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
+++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
@@ -1,4 +1,5 @@
#include "z_demo_du.h"
+#include "objects/object_du/object_du.h"
#include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h"
#include "vt.h"
@@ -14,25 +15,13 @@ void DemoDu_Destroy(Actor* thisx, GlobalContext* globalCtx);
void DemoDu_Update(Actor* thisx, GlobalContext* globalCtx);
void DemoDu_Draw(Actor* thisx, GlobalContext* globalCtx);
-extern AnimationHeader D_06000800;
-extern AnimationHeader D_06000D00;
-extern AnimationHeader D_06001D70;
-extern AnimationHeader D_06002374;
-extern AnimationHeader D_0600288C;
-extern AnimationHeader D_06005458;
-extern AnimationHeader D_06006104;
-extern AnimationHeader D_060067CC;
-extern AnimationHeader D_06006EB0;
-extern u64* D_06007FC0;
-extern FlexSkeletonHeader D_06011CA8;
-extern AnimationHeader D_06012014;
-
static s32 sUnused = 0;
#include "z_demo_du_cutscene_data.c" EARLY
-static u64* sEyeTextures[] = { 0x06008080, 0x06008480, 0x06008880, 0x0600A540 };
-static u64* sMouthTextures[] = { 0x06008C80, 0x06009D40, 0x0600A940, 0x0600B180 };
+static u64* sEyeTextures[] = { gDaruniaEyeOpenTex, gDaruniaEyeOpeningTex, gDaruniaEyeShutTex, gDaruniaEyeClosingTex };
+static u64* sMouthTextures[] = { gDaruniaMouthSeriousTex, gDaruniaMouthGrinningTex, gDaruniaMouthOpenTex,
+ gDaruniaMouthHappyTex };
/**
* Cs => Cutscene
@@ -170,7 +159,7 @@ void func_80969DDC(DemoDu* this, AnimationHeader* animation, u8 mode, f32 morphF
}
void DemoDu_InitCs_FireMedallion(DemoDu* this, GlobalContext* globalCtx) {
- SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06011CA8, &D_06006EB0, NULL, NULL, 0);
+ SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gDaruniaSkel, &gDaruniaIdleAnim, NULL, NULL, 0);
this->actor.shape.yOffset = -10000.0f;
DemoDu_SetEyeTexIndex(this, 1);
DemoDu_SetMouthTexIndex(this, 3);
@@ -241,7 +230,8 @@ void DemoDu_CsFireMedallion_AdvanceTo04(DemoDu* this, GlobalContext* globalCtx)
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 2)) {
- Animation_Change(&this->skelAnime, &D_06000800, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000800), 2, 0.0f);
+ Animation_Change(&this->skelAnime, &gDaruniaItemGiveAnim, 1.0f, 0.0f,
+ Animation_GetLastFrame(&gDaruniaItemGiveAnim), 2, 0.0f);
this->updateIndex = CS_FIREMEDALLION_SUBSCENE(4);
}
}
@@ -249,7 +239,8 @@ void DemoDu_CsFireMedallion_AdvanceTo04(DemoDu* this, GlobalContext* globalCtx)
void DemoDu_CsFireMedallion_AdvanceTo05(DemoDu* this, s32 animFinished) {
if (animFinished) {
- Animation_Change(&this->skelAnime, &D_06000D00, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000D00), 0, 0.0f);
+ Animation_Change(&this->skelAnime, &gDaruniaItemGiveIdleAnim, 1.0f, 0.0f,
+ Animation_GetLastFrame(&gDaruniaItemGiveIdleAnim), 0, 0.0f);
this->updateIndex = CS_FIREMEDALLION_SUBSCENE(5);
}
}
@@ -305,7 +296,7 @@ void DemoDu_UpdateCs_FM_06(DemoDu* this, GlobalContext* globalCtx) {
}
void DemoDu_InitCs_GoronsRuby(DemoDu* this, GlobalContext* globalCtx) {
- SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06011CA8, NULL, NULL, NULL, 0);
+ SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gDaruniaSkel, NULL, NULL, NULL, 0);
this->updateIndex = CS_GORONSRUBY_SUBSCENE(0);
}
@@ -479,7 +470,8 @@ void DemoDu_CsGoronsRuby_AdvanceTo02(DemoDu* this, GlobalContext* globalCtx) {
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 1)) {
- Animation_Change(&this->skelAnime, &D_0600288C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600288C), 2, 0.0f);
+ Animation_Change(&this->skelAnime, &gDaruniaStandUpAfterFallingAnim, 1.0f, 0.0f,
+ Animation_GetLastFrame(&gDaruniaStandUpAfterFallingAnim), 2, 0.0f);
this->updateIndex = CS_GORONSRUBY_SUBSCENE(2);
this->drawIndex = 1;
DemoDu_CsGoronsRuby_DaruniaFalling(this, globalCtx);
@@ -512,7 +504,8 @@ void DemoDu_CsGoronsRuby_AdvanceTo04(DemoDu* this, GlobalContext* globalCtx) {
void DemoDu_CsGoronsRuby_AdvanceTo05(DemoDu* this, s32 animFinished) {
if (animFinished) {
- Animation_Change(&this->skelAnime, &D_06006EB0, 1.0f, 0.0f, Animation_GetLastFrame(&D_06006EB0), 0, 0.0f);
+ Animation_Change(&this->skelAnime, &gDaruniaIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gDaruniaIdleAnim), 0,
+ 0.0f);
this->updateIndex = CS_GORONSRUBY_SUBSCENE(5);
}
}
@@ -522,7 +515,8 @@ void DemoDu_CsGoronsRuby_AdvanceTo06(DemoDu* this, GlobalContext* globalCtx) {
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 3)) {
- Animation_Change(&this->skelAnime, &D_06002374, 1.0f, 0.0f, Animation_GetLastFrame(&D_06002374), 2, -4.0f);
+ Animation_Change(&this->skelAnime, &gDaruniaHitBreastAnim, 1.0f, 0.0f,
+ Animation_GetLastFrame(&gDaruniaHitBreastAnim), 2, -4.0f);
this->updateIndex = CS_GORONSRUBY_SUBSCENE(6);
}
}
@@ -530,7 +524,8 @@ void DemoDu_CsGoronsRuby_AdvanceTo06(DemoDu* this, GlobalContext* globalCtx) {
void DemoDu_CsGoronsRuby_AdvanceTo07(DemoDu* this, s32 animFinished) {
if (animFinished) {
- Animation_Change(&this->skelAnime, &D_06006EB0, 1.0f, 0.0f, Animation_GetLastFrame(&D_06006EB0), 0, 0.0f);
+ Animation_Change(&this->skelAnime, &gDaruniaIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gDaruniaIdleAnim), 0,
+ 0.0f);
this->updateIndex = CS_GORONSRUBY_SUBSCENE(7);
}
}
@@ -540,7 +535,8 @@ void DemoDu_CsGoronsRuby_AdvanceTo08(DemoDu* this, GlobalContext* globalCtx) {
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 4)) {
- Animation_Change(&this->skelAnime, &D_06001D70, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001D70), 2, 0.0f);
+ Animation_Change(&this->skelAnime, &gDaruniaHitLinkAnim, 1.0f, 0.0f,
+ Animation_GetLastFrame(&gDaruniaHitLinkAnim), 2, 0.0f);
this->updateIndex = CS_GORONSRUBY_SUBSCENE(8);
}
}
@@ -548,14 +544,16 @@ void DemoDu_CsGoronsRuby_AdvanceTo08(DemoDu* this, GlobalContext* globalCtx) {
void DemoDu_CsGoronsRuby_AdvanceTo09(DemoDu* this, s32 animFinished) {
if (animFinished) {
- Animation_Change(&this->skelAnime, &D_06002374, 1.0f, 0.0f, Animation_GetLastFrame(&D_06002374), 2, 0.0f);
+ Animation_Change(&this->skelAnime, &gDaruniaHitBreastAnim, 1.0f, 0.0f,
+ Animation_GetLastFrame(&gDaruniaHitBreastAnim), 2, 0.0f);
this->updateIndex = CS_GORONSRUBY_SUBSCENE(9);
}
}
void DemoDu_CsGoronsRuby_AdvanceTo10(DemoDu* this, s32 animFinished) {
if (animFinished) {
- Animation_Change(&this->skelAnime, &D_06006EB0, 1.0f, 0.0f, Animation_GetLastFrame(&D_06006EB0), 0, 0.0f);
+ Animation_Change(&this->skelAnime, &gDaruniaIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gDaruniaIdleAnim), 0,
+ 0.0f);
this->updateIndex = CS_GORONSRUBY_SUBSCENE(10);
}
}
@@ -565,7 +563,8 @@ void DemoDu_CsGoronsRuby_AdvanceTo11(DemoDu* this, GlobalContext* globalCtx) {
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 5)) {
- Animation_Change(&this->skelAnime, &D_06000800, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000800), 2, 0.0f);
+ Animation_Change(&this->skelAnime, &gDaruniaItemGiveAnim, 1.0f, 0.0f,
+ Animation_GetLastFrame(&gDaruniaItemGiveAnim), 2, 0.0f);
this->updateIndex = CS_GORONSRUBY_SUBSCENE(11);
}
}
@@ -573,7 +572,8 @@ void DemoDu_CsGoronsRuby_AdvanceTo11(DemoDu* this, GlobalContext* globalCtx) {
void DemoDu_CsGoronsRuby_AdvanceTo12(DemoDu* this, s32 animFinished) {
if (animFinished) {
- Animation_Change(&this->skelAnime, &D_06000D00, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000D00), 0, 0.0f);
+ Animation_Change(&this->skelAnime, &gDaruniaItemGiveIdleAnim, 1.0f, 0.0f,
+ Animation_GetLastFrame(&gDaruniaItemGiveIdleAnim), 0, 0.0f);
this->updateIndex = CS_GORONSRUBY_SUBSCENE(12);
}
}
@@ -583,7 +583,8 @@ void DemoDu_CsGoronsRuby_AdvanceTo13(DemoDu* this, GlobalContext* globalCtx) {
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 6)) {
- Animation_Change(&this->skelAnime, &D_06006EB0, 1.0f, 0.0f, Animation_GetLastFrame(&D_06006EB0), 0, 0.0f);
+ Animation_Change(&this->skelAnime, &gDaruniaIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gDaruniaIdleAnim),
+ 0, 0.0f);
this->updateIndex = CS_GORONSRUBY_SUBSCENE(13);
}
}
@@ -699,10 +700,10 @@ void DemoDu_UpdateCs_GR_13(DemoDu* this, GlobalContext* globalCtx) {
void DemoDu_InitCs_AfterGanon(DemoDu* this, GlobalContext* globalCtx) {
s32 pad[3];
- f32 lastFrame = Animation_GetLastFrame(&D_06012014);
+ f32 lastFrame = Animation_GetLastFrame(&gDaruniaSageFormationAnim);
- SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06011CA8, NULL, NULL, NULL, 0);
- Animation_Change(&this->skelAnime, &D_06012014, 1.0f, 0.0f, lastFrame, 2, 0.0f);
+ SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gDaruniaSkel, NULL, NULL, NULL, 0);
+ Animation_Change(&this->skelAnime, &gDaruniaSageFormationAnim, 1.0f, 0.0f, lastFrame, 2, 0.0f);
this->updateIndex = CS_CHAMBERAFTERGANON_SUBSCENE(0);
this->actor.shape.shadowAlpha = 0;
}
@@ -809,7 +810,7 @@ void DemoDu_Draw_02(Actor* thisx, GlobalContext* globalCtx2) {
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTexture));
gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(mouthTexture));
- gSPSegment(POLY_XLU_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(&D_06007FC0));
+ gSPSegment(POLY_XLU_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(&gDaruniaNoseSeriousTex));
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->shadowAlpha);
@@ -822,7 +823,7 @@ void DemoDu_Draw_02(Actor* thisx, GlobalContext* globalCtx2) {
}
void DemoDu_InitCs_Credits(DemoDu* this, GlobalContext* globalCtx) {
- SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06011CA8, &D_060067CC, NULL, NULL, 0);
+ SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gDaruniaSkel, &gDaruniaCreditsIdleAnim, NULL, NULL, 0);
this->updateIndex = CS_CREDITS_SUBSCENE(0);
this->drawIndex = 0;
this->actor.shape.shadowAlpha = 0;
@@ -862,18 +863,18 @@ void DemoDu_CsCredits_AdvanceTo02(DemoDu* this) {
}
void DemoDu_CsCredits_AdvanceTo03(DemoDu* this) {
- func_80969DDC(this, &D_06005458, ANIMMODE_ONCE, -8.0f, 0);
+ func_80969DDC(this, &gDaruniaLookingUpToSariaAnim, ANIMMODE_ONCE, -8.0f, 0);
this->updateIndex = CS_CREDITS_SUBSCENE(3);
}
void DemoDu_CsCredits_AdvanceTo04(DemoDu* this) {
- func_80969DDC(this, &D_06006104, ANIMMODE_ONCE, 0.0f, 0);
+ func_80969DDC(this, &gDaruniaCreditsHitBreastAnim, ANIMMODE_ONCE, 0.0f, 0);
this->updateIndex = CS_CREDITS_SUBSCENE(4);
}
void DemoDu_CsCredits_BackTo02(DemoDu* this, s32 animFinished) {
if (animFinished) {
- func_80969DDC(this, &D_060067CC, ANIMMODE_LOOP, 0.0f, 0);
+ func_80969DDC(this, &gDaruniaCreditsIdleAnim, ANIMMODE_LOOP, 0.0f, 0);
this->updateIndex = CS_CREDITS_SUBSCENE(2);
}
}
@@ -1004,7 +1005,7 @@ void DemoDu_Draw_01(Actor* thisx, GlobalContext* globalCtx2) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTexture));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(mouthTexture));
- gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(&D_06007FC0));
+ gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(&gDaruniaNoseSeriousTex));
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c
index b9b8b0f11e..a9e07334c6 100644
--- a/src/overlays/actors/ovl_En_Du/z_en_du.c
+++ b/src/overlays/actors/ovl_En_Du/z_en_du.c
@@ -1,4 +1,6 @@
#include "z_en_du.h"
+#include "objects/object_du/object_du.h"
+#include "scenes/overworld/spot18/spot18_scene.h"
#define FLAGS 0x02000009
@@ -59,23 +61,23 @@ static CollisionCheckInfoInit2 sColChkInfoInit = {
};
static struct_80034EC0_Entry sAnimations[] = {
- { 0x06006EB0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f }, { 0x06006EB0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
- { 0x06000800, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f }, { 0x06000D00, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
- { 0x06001D70, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f }, { 0x06002374, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
- { 0x0600288C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f }, { 0x06002D94, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -10.0f },
- { 0x06002D94, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f }, { 0x06003D48, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
- { 0x06004C04, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f }, { 0x06003A30, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
- { 0x060046F4, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f }, { 0x06004ED8, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
- { 0x060041F4, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -6.0f },
+ { &gDaruniaIdleAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ { &gDaruniaIdleAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
+ { &gDaruniaItemGiveAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
+ { &gDaruniaItemGiveIdleAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
+ { &gDaruniaHitLinkAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
+ { &gDaruniaHitBreastAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
+ { &gDaruniaStandUpAfterFallingAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
+ { &gDaruniaDancingLoop1Anim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -10.0f },
+ { &gDaruniaDancingLoop1Anim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
+ { &gDaruniaDancingLoop2Anim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
+ { &gDaruniaDancingLoop3Anim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
+ { &gDaruniaWrongSongAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
+ { &gDaruniaWrongSongEndAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ { &gDaruniaDancingLoop4Anim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
+ { &gDaruniaDancingEndAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -6.0f },
};
-extern CutsceneData D_020059E0[];
-extern CutsceneData D_02006930[];
-extern CutsceneData D_02007DE0[];
-
-extern AnimationHeader D_060041F4;
-extern FlexSkeletonHeader D_06011CA8;
-
void EnDu_SetupAction(EnDu* this, EnDuActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
@@ -160,56 +162,57 @@ void func_809FDE24(EnDu* this, GlobalContext* globalCtx) {
}
void func_809FDE9C(EnDu* this) {
- if (this->unk_1F2 > 0) {
- this->unk_1F2--;
+ if (this->blinkTimer > 0) {
+ this->blinkTimer--;
} else {
- this->unk_1F2 = 0;
+ this->blinkTimer = 0;
}
- if (this->unk_1F2 < 3) {
- this->unk_1EF = this->unk_1F2;
+ if (this->blinkTimer < 3) {
+ this->eyeTexIndex = this->blinkTimer;
}
switch (this->unk_1EC) {
case 0:
- if (this->unk_1F2 == 0) {
- this->unk_1F2 = Rand_S16Offset(0x1E, 0x1E);
+ if (this->blinkTimer == 0) {
+ this->blinkTimer = Rand_S16Offset(30, 30);
}
break;
case 1:
- if (this->unk_1F2 == 0) {
- this->unk_1EF = 2;
+ if (this->blinkTimer == 0) {
+ this->eyeTexIndex = 2;
}
break;
case 2:
- if (this->unk_1F2 == 0) {
- this->unk_1EF = 2;
+ if (this->blinkTimer == 0) {
+ this->eyeTexIndex = 2;
}
break;
case 3:
- if (this->unk_1F2 == 0) {
- this->unk_1EF = 0;
+ if (this->blinkTimer == 0) {
+ this->eyeTexIndex = 0;
}
break;
}
switch (this->unk_1ED) {
case 1:
- this->unk_1F0 = 1;
+ this->mouthTexIndex = 1;
break;
case 2:
- this->unk_1F0 = 2;
+ this->mouthTexIndex = 2;
break;
case 3:
- this->unk_1F0 = 3;
+ this->mouthTexIndex = 3;
break;
default:
- this->unk_1F0 = 0;
+ this->mouthTexIndex = 0;
break;
}
+
if (this->unk_1EE == 1) {
- this->unk_1F1 = 1;
+ this->noseTexIndex = 1;
} else {
- this->unk_1F1 = 0;
+ this->noseTexIndex = 0;
}
}
@@ -255,7 +258,7 @@ void EnDu_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
- SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06011CA8, NULL, 0, 0, 0);
+ SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gDaruniaSkel, NULL, 0, 0, 0);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0x16), &sColChkInfoInit);
@@ -269,7 +272,7 @@ void EnDu_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_1F4.unk_00 = 0;
if (gSaveContext.cutsceneIndex >= 0xFFF0) {
- globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(D_02006930);
+ globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDarunia01Cs);
gSaveContext.cutsceneTrigger = 1;
EnDu_SetupAction(this, func_809FE890);
} else if (globalCtx->sceneNum == 4) {
@@ -317,14 +320,14 @@ void func_809FE4A4(EnDu* this, GlobalContext* globalCtx) {
globalCtx->msgCtx.unk_E3EE = 0;
EnDu_SetupAction(this, func_809FE3C0);
} else if (globalCtx->msgCtx.unk_E3EE >= 6) {
- globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(D_02007DE0);
+ globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaWrongCs);
gSaveContext.cutsceneTrigger = 1;
this->unk_1E8 = 1;
EnDu_SetupAction(this, func_809FE890);
globalCtx->msgCtx.unk_E3EE = 4;
} else if (globalCtx->msgCtx.unk_E3EE == 3) {
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
- globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(D_020059E0);
+ globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaCorrectCs);
gSaveContext.cutsceneTrigger = 1;
this->unk_1E8 = 0;
EnDu_SetupAction(this, func_809FE890);
@@ -435,13 +438,13 @@ void func_809FE890(EnDu* this, GlobalContext* globalCtx) {
}
this->unk_1EA = csAction->action;
if (this->unk_1EA == 7) {
- this->unk_1F2 = 0xB;
+ this->blinkTimer = 11;
this->unk_1EC = 2;
this->unk_1ED = 2;
this->unk_1EE = 1;
}
if (this->unk_1EA == 8) {
- this->unk_1F2 = 0xB;
+ this->blinkTimer = 11;
this->unk_1EC = 3;
this->unk_1ED = 3;
this->unk_1EE = 0;
@@ -473,7 +476,7 @@ void func_809FE890(EnDu* this, GlobalContext* globalCtx) {
}
void func_809FEB08(EnDu* this, GlobalContext* globalCtx) {
- this->unk_1F2 = 0xB;
+ this->blinkTimer = 11;
this->unk_1EC = 0;
this->unk_1ED = 0;
this->unk_1EE = 0;
@@ -492,7 +495,7 @@ void func_809FEB08(EnDu* this, GlobalContext* globalCtx) {
EnDu_SetupAction(this, func_809FE3C0);
}
func_8010B680(globalCtx, this->actor.textId, NULL);
- func_80034EC0(&this->skelAnime, sAnimations, 0xE);
+ func_80034EC0(&this->skelAnime, sAnimations, 14);
this->unk_1F4.unk_00 = 1;
}
@@ -528,7 +531,8 @@ void EnDu_Update(Actor* thisx, GlobalContext* globalCtx) {
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
- if (this->skelAnime.animation == &D_060041F4 && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
+ if (this->skelAnime.animation == &gDaruniaDancingEndAnim &&
+ Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
func_80034EC0(&this->skelAnime, sAnimations, 1);
}
@@ -583,17 +587,19 @@ void EnDu_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
}
void EnDu_Draw(Actor* thisx, GlobalContext* globalCtx) {
- static UNK_TYPE D_809FF418[] = { 0x06008080, 0x06008480, 0x06008880, 0x0600A540 };
- static UNK_TYPE D_809FF428[] = { 0x06008C80, 0x06009D40, 0x0600A940, 0x0600B180 };
- static UNK_TYPE D_809FF438[] = { 0x06007FC0, 0x0600B140 };
+ static u64* sEyeTextures[] = { gDaruniaEyeOpenTex, gDaruniaEyeOpeningTex, gDaruniaEyeShutTex,
+ gDaruniaEyeClosingTex };
+ static u64* sMouthTextures[] = { gDaruniaMouthSeriousTex, gDaruniaMouthGrinningTex, gDaruniaMouthOpenTex,
+ gDaruniaMouthHappyTex };
+ static u64* sNoseTextures[] = { gDaruniaNoseSeriousTex, gDaruniaNoseHappyTex };
EnDu* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_du.c", 1470);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_809FF418[this->unk_1EF]));
- gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_809FF428[this->unk_1F0]));
- gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(D_809FF438[this->unk_1F1]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeTexIndex]));
+ gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[this->mouthTexIndex]));
+ gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sNoseTextures[this->noseTexIndex]));
func_80034BA0(globalCtx, &this->skelAnime, EnDu_OverrideLimbDraw, EnDu_PostLimbDraw, &this->actor, 255);
diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.h b/src/overlays/actors/ovl_En_Du/z_en_du.h
index 0b9ffcbd86..7ad88abd5e 100644
--- a/src/overlays/actors/ovl_En_Du/z_en_du.h
+++ b/src/overlays/actors/ovl_En_Du/z_en_du.h
@@ -22,10 +22,10 @@ typedef struct EnDu {
/* 0x01EC */ u8 unk_1EC;
/* 0x01ED */ u8 unk_1ED;
/* 0x01EE */ u8 unk_1EE;
- /* 0x01EF */ u8 unk_1EF;
- /* 0x01F0 */ u8 unk_1F0;
- /* 0x01F1 */ u8 unk_1F1;
- /* 0x01F2 */ s16 unk_1F2;
+ /* 0x01EF */ u8 eyeTexIndex;
+ /* 0x01F0 */ u8 mouthTexIndex;
+ /* 0x01F1 */ u8 noseTexIndex;
+ /* 0x01F2 */ s16 blinkTimer;
/* 0x01F4 */ struct_80034A14_arg1 unk_1F4;
} EnDu; // size = 0x021C
diff --git a/undefined_syms.txt b/undefined_syms.txt
index 051dfb7568..8fe2a08a38 100644
--- a/undefined_syms.txt
+++ b/undefined_syms.txt
@@ -1721,20 +1721,6 @@ D_060022B0 = 0x060022B0;
D_060035E0 = 0x060035E0;
D_060039D0 = 0x060039D0;
-// z_demo_du
-D_06000800 = 0x06000800;
-D_06000D00 = 0x06000D00;
-D_06001D70 = 0x06001D70;
-D_06002374 = 0x06002374;
-D_0600288C = 0x0600288C;
-D_06005458 = 0x06005458;
-D_06006104 = 0x06006104;
-D_060067CC = 0x060067CC;
-D_06006EB0 = 0x06006EB0;
-D_06007FC0 = 0x06007FC0;
-D_06011CA8 = 0x06011CA8;
-D_06012014 = 0x06012014;
-
// z_demo_ext
D_0600FAA0 = 0x0600FAA0;
@@ -1896,13 +1882,6 @@ D_06000860 = 0x06000860;
D_060009D4 = 0x060009D4;
D_060020E0 = 0x060020E0;
-// z_en_du
-D_020059E0 = 0x020059E0;
-D_02006930 = 0x02006930;
-D_02007DE0 = 0x02007DE0;
-D_060041F4 = 0x060041F4;
-D_06011CA8 = 0x06011CA8;
-
// z_en_eiyer
D_06000288 = 0x06000288;
D_060004C4 = 0x060004C4;