diff --git a/assets/xml/objects/object_zo.xml b/assets/xml/objects/object_zo.xml new file mode 100644 index 0000000000..557703cdfd --- /dev/null +++ b/assets/xml/objects/object_zo.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/include/functions.h b/include/functions.h index c6d32fe3fe..7818322ad1 100644 --- a/include/functions.h +++ b/include/functions.h @@ -2267,12 +2267,16 @@ void func_800F47FC(void); void func_800F483C(UNK_TYPE arg0, UNK_TYPE arg1); void func_800F4870(u8); // ? func_800F491C(?); +void func_800F4A54(u8); // ? func_800F4A70(?); void func_800F4BF4(Vec3f*, u16 sfxId, s8); void func_800F4C58(Vec3f*, u16 sfxId, u8); void func_800F4E30(Vec3f*, f32); // ? func_800F50CC(?); +void func_800F50EC(Vec3f*); // ? func_800F510C(?); +void func_800F52A0(Vec3f*, u16, u16); +void func_800F5504(); // ? func_800F5510(?); // ? func_800F5550(?); // ? func_800F56A8(?); @@ -2311,7 +2315,7 @@ void func_800F6C14(); // ? func_800F6C34(?); void func_800F6D58(u8, u8, u8); // ? func_800F6E7C(?); -// ? func_800F6FB4(?); +void func_800F6FB4(u8); void func_800F70F8(); void func_800F711C(); // ? func_800F7170(?); diff --git a/spec b/spec index 7f421b877e..efbb9d04ab 100644 --- a/spec +++ b/spec @@ -4940,7 +4940,8 @@ endseg beginseg name "object_zo" romalign 0x1000 - include "build/baserom/object_zo.o" + include "build/assets/objects/object_zo/object_zo.o" + number 6 endseg beginseg diff --git a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c index bd3891ecad..b77860adf2 100644 --- a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c +++ b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c @@ -1,4 +1,11 @@ +/* + * File: z_demo_ec.c + * Overlay: ovl_Demo_Ec + * Description: Credits revelers in Lon Lon + */ + #include "z_demo_ec.h" +#include "objects/object_zo/object_zo.h" #include "vt.h" #define FLAGS 0x00000010 @@ -751,7 +758,7 @@ void DemoEc_DrawGerudo(DemoEc* this, GlobalContext* globalCtx) { void DemoEc_InitDancingZora(DemoEc* this, GlobalContext* globalCtx) { DemoEc_UseDrawObject(this, globalCtx); - DemoEc_InitSkelAnime(this, globalCtx, &D_0600BFA8); + DemoEc_InitSkelAnime(this, globalCtx, &gZoraSkel); DemoEc_UseAnimationObject(this, globalCtx); DemoEc_ChangeAnimation(this, &D_0600C918, 0, 0.0f, false); func_8096D5D4(this, globalCtx); @@ -768,7 +775,7 @@ void DemoEc_UpdateDancingZora(DemoEc* this, GlobalContext* globalCtx) { } void DemoEc_DrawDancingZora(DemoEc* this, GlobalContext* globalCtx) { - static void* eyeTextures[] = { 0x06003E40, 0x06004640, 0x06004E40 }; + static void* eyeTextures[] = { gZoraEyeOpenTex, gZoraEyeHalfTex, gZoraEyeClosedTex }; s32 eyeTexIndex = this->eyeTexIndex; void* eyeTexture = eyeTextures[eyeTexIndex]; diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c index 8280e3a6a2..cb98613ea6 100644 --- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c +++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c @@ -5,8 +5,9 @@ */ #include "z_en_diving_game.h" -#include "vt.h" #include "overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h" +#include "objects/object_zo/object_zo.h" +#include "vt.h" #define FLAGS 0x00000019 @@ -70,21 +71,17 @@ static ColliderCylinderInit sCylinderInit = { }; static u64* sEyeTextures[] = { - 0x06003E40, - 0x06004640, - 0x06004E40, + gZoraEyeOpenTex, + gZoraEyeHalfTex, + gZoraEyeClosedTex, }; -extern FlexSkeletonHeader D_0600BFA8; -extern AnimationHeader D_06002FE8; // Stand/static. -extern AnimationHeader D_0600219C; // Throw rupees animation. - void EnDivingGame_Init(Actor* thisx, GlobalContext* globalCtx) { EnDivingGame* this = THIS; this->actor.gravity = -3.0f; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); - SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600BFA8, &D_06002FE8, this->jointTable, this->morphTable, 20); + SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gZoraSkel, &gZoraIdleAnim, this->jointTable, this->morphTable, 20); Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 素もぐりGO ☆☆☆☆☆ \n" VT_RST); @@ -178,9 +175,9 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, GlobalContext* globalCt // EnDivingGame_FinishMinigame ? // Reset probably void func_809EDCB0(EnDivingGame* this, GlobalContext* globalCtx) { - f32 frameCount = Animation_GetLastFrame(&D_06002FE8); + f32 frameCount = Animation_GetLastFrame(&gZoraIdleAnim); - Animation_Change(&this->skelAnime, &D_06002FE8, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f); + Animation_Change(&this->skelAnime, &gZoraIdleAnim, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f); this->notPlayingMinigame = true; this->actionFunc = EnDivingGame_Talk; } @@ -283,9 +280,9 @@ void func_809EE048(EnDivingGame* this, GlobalContext* globalCtx) { // another "start minigame" step void func_809EE0FC(EnDivingGame* this, GlobalContext* globalCtx) { - f32 frameCount = Animation_GetLastFrame(&D_0600219C); + f32 frameCount = Animation_GetLastFrame(&gZoraThrowRupeesAnim); - Animation_Change(&this->skelAnime, &D_0600219C, 1.0f, 0.0f, (s16)frameCount, 2, -10.0f); + Animation_Change(&this->skelAnime, &gZoraThrowRupeesAnim, 1.0f, 0.0f, (s16)frameCount, 2, -10.0f); this->notPlayingMinigame = false; this->actionFunc = func_809EE194; } diff --git a/src/overlays/actors/ovl_En_Zo/z_en_zo.c b/src/overlays/actors/ovl_En_Zo/z_en_zo.c index 07d8e061da..50a1175bfc 100644 --- a/src/overlays/actors/ovl_En_Zo/z_en_zo.c +++ b/src/overlays/actors/ovl_En_Zo/z_en_zo.c @@ -5,6 +5,7 @@ */ #include "z_en_zo.h" +#include "objects/object_zo/object_zo.h" #define FLAGS 0x00000009 @@ -29,20 +30,6 @@ void EnZo_Surface(EnZo* this, GlobalContext* globalCtx); void EnZo_TreadWater(EnZo* this, GlobalContext* globalCtx); void EnZo_Dive(EnZo* this, GlobalContext* globalCtx); -extern Gfx D_060022F0[]; -extern Gfx D_06002350[]; -extern Gfx D_060024A0[]; -extern Gfx D_06002510[]; -extern Gfx D_0600BFC0[]; -extern Gfx D_0600C028[]; -extern FlexSkeletonHeader D_0600BFA8; - -extern AnimationHeader D_06002FE8; -extern AnimationHeader D_06002F10; -extern AnimationHeader D_0600219C; -extern AnimationHeader D_06000598; -extern AnimationHeader D_06000D48; - void EnZo_Ripple(EnZo* this, Vec3f* pos, f32 scale, f32 targetScale, u8 alpha) { EnZoEffect* effect; Vec3f vec = { 0.0f, 0.0f, 0.0f }; @@ -198,7 +185,7 @@ void EnZo_DrawRipples(EnZo* this, GlobalContext* globalCtx) { if (!setup) { if (1) {} gDPPipeSync(POLY_XLU_DISP++); - gSPDisplayList(POLY_XLU_DISP++, D_0600BFC0); + gSPDisplayList(POLY_XLU_DISP++, gZoraRipplesVisualDL); gDPSetEnvColor(POLY_XLU_DISP++, 155, 155, 155, 0); setup = true; } @@ -208,7 +195,7 @@ void EnZo_DrawRipples(EnZo* this, GlobalContext* globalCtx) { Matrix_Scale(effect->scale, 1.0f, effect->scale, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_zo_eff.c", 242), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, D_0600C028); + gSPDisplayList(POLY_XLU_DISP++, gZoraRipplesGeometryDL); } effect++; } @@ -216,11 +203,10 @@ void EnZo_DrawRipples(EnZo* this, GlobalContext* globalCtx) { } void EnZo_DrawBubbles(EnZo* this, GlobalContext* globalCtx) { - EnZoEffect* effect; + EnZoEffect* effect = this->effects; s16 i; u8 setup; - effect = this->effects; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zo_eff.c", 260); setup = false; func_80093D84(globalCtx->state.gfxCtx); @@ -228,7 +214,7 @@ void EnZo_DrawBubbles(EnZo* this, GlobalContext* globalCtx) { if (effect->type == ENZO_EFFECT_BUBBLE) { if (!setup) { if (1) {} - gSPDisplayList(POLY_XLU_DISP++, D_060022F0); + gSPDisplayList(POLY_XLU_DISP++, gZoraBubblesVisualDL); gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 150, 150, 150, 0); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255); @@ -242,7 +228,7 @@ void EnZo_DrawBubbles(EnZo* this, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_zo_eff.c", 281), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, D_06002350); + gSPDisplayList(POLY_XLU_DISP++, gZoraBubblesGeometryDL); } effect++; } @@ -262,7 +248,7 @@ void EnZo_DrawSplashes(EnZo* this, GlobalContext* globalCtx) { if (effect->type == ENZO_EFFECT_SPLASH) { if (!setup) { if (1) {} - gSPDisplayList(POLY_XLU_DISP++, D_060024A0); + gSPDisplayList(POLY_XLU_DISP++, gZoraSplashesVisualDL); gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 200, 200, 200, 0); setup = true; @@ -275,7 +261,7 @@ void EnZo_DrawSplashes(EnZo* this, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_zo_eff.c", 325), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, D_06002510); + gSPDisplayList(POLY_XLU_DISP++, gZoraSplashesGeometryDL); } effect++; } @@ -326,10 +312,14 @@ const ActorInit En_Zo_InitVars = { }; static struct_80034EC0_Entry sAnimations[] = { - { &D_06002FE8, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f }, { &D_06002FE8, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f }, - { &D_06002F10, 0.0f, 1.0f, 1.0f, ANIMMODE_ONCE, 0.0f }, { &D_06002F10, 1.0f, 1.0f, -1.0f, ANIMMODE_LOOP, -8.0f }, - { &D_06002F10, 1.0f, 8.0f, -1.0f, ANIMMODE_LOOP, -8.0f }, { &D_0600219C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f }, - { &D_06000598, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f }, { &D_06000D48, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f }, + { &gZoraIdleAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f }, + { &gZoraIdleAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f }, + { &gZoraSurfaceAnim, 0.0f, 1.0f, 1.0f, ANIMMODE_ONCE, 0.0f }, + { &gZoraSurfaceAnim, 1.0f, 1.0f, -1.0f, ANIMMODE_LOOP, -8.0f }, + { &gZoraSurfaceAnim, 1.0f, 8.0f, -1.0f, ANIMMODE_LOOP, -8.0f }, + { &gZoraThrowRupeesAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f }, + { &gZoraHandsOnHipsTappingFootAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f }, + { &gZoraOpenArmsAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f }, }; void EnZo_SpawnSplashes(EnZo* this) { @@ -540,7 +530,8 @@ s32 EnZo_PlayerInProximity(EnZo* this, GlobalContext* globalCtx) { void EnZo_SetAnimation(EnZo* this) { s32 animId = 8; - if (this->skelAnime.animation == &D_06000598 || this->skelAnime.animation == &D_06000D48) { + if (this->skelAnime.animation == &gZoraHandsOnHipsTappingFootAnim || + this->skelAnime.animation == &gZoraOpenArmsAnim) { if (this->unk_194.unk_00 == 0) { if (this->actionFunc == EnZo_Standing) { animId = 0; @@ -550,11 +541,12 @@ void EnZo_SetAnimation(EnZo* this) { } } - if (this->unk_194.unk_00 != 0 && this->actor.textId == 0x4006 && this->skelAnime.animation != &D_06000598) { + if (this->unk_194.unk_00 != 0 && this->actor.textId == 0x4006 && + this->skelAnime.animation != &gZoraHandsOnHipsTappingFootAnim) { animId = 6; } - if (this->unk_194.unk_00 != 0 && this->actor.textId == 0x4007 && this->skelAnime.animation != &D_06000D48) { + if (this->unk_194.unk_00 != 0 && this->actor.textId == 0x4007 && this->skelAnime.animation != &gZoraOpenArmsAnim) { animId = 7; } @@ -571,7 +563,7 @@ void EnZo_Init(Actor* thisx, GlobalContext* globalCtx) { EnZo* this = THIS; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); - SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600BFA8, NULL, this->jointTable, this->morphTable, 20); + SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gZoraSkel, NULL, this->jointTable, this->morphTable, 20); Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInit); @@ -786,7 +778,7 @@ void EnZo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec void EnZo_Draw(Actor* thisx, GlobalContext* globalCtx) { EnZo* this = THIS; - UNK_PTR eyeTextures[] = { 0x06003E40, 0x06004640, 0x06004E40 }; + void* eyeTextures[] = { gZoraEyeOpenTex, gZoraEyeHalfTex, gZoraEyeClosedTex }; Matrix_Push(); EnZo_DrawRipples(this, globalCtx); diff --git a/tools/xmlcreate.py b/tools/xmlcreate.py old mode 100644 new mode 100755 diff --git a/undefined_syms.txt b/undefined_syms.txt index 2416d0f0ba..91b34d1c25 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -954,11 +954,6 @@ D_060009E0 = 0x060009E0; D_06000660 = 0x06000660; D_06000FC0 = 0x06000FC0; -// z_en_diving_game -D_0600BFA8 = 0x0600BFA8; -D_06002FE8 = 0x06002FE8; -D_0600219C = 0x0600219C; - // z_en_poh D_060001A8 = 0x060001A8; D_0600020C = 0x0600020C; @@ -2395,17 +2390,6 @@ D_0601B874 = 0x0601B874; D_0601BCF0 = 0x0601BCF0; D_0601CE08 = 0x0601CE08; -// z_en_zo -D_06000598 = 0x06000598; -D_06000D48 = 0x06000D48; -D_060022F0 = 0x060022F0; -D_06002350 = 0x06002350; -D_060024A0 = 0x060024A0; -D_06002510 = 0x06002510; -D_0600BFA8 = 0x0600BFA8; -D_0600BFC0 = 0x0600BFC0; -D_0600C028 = 0x0600C028; - // z_fishing D_0600007C = 0x0600007C; D_060029C0 = 0x060029C0;