diff --git a/assets/xml/objects/object_ma1.xml b/assets/xml/objects/object_ma1.xml index 3d0ea1fcc5..4d60bb95fa 100644 --- a/assets/xml/objects/object_ma1.xml +++ b/assets/xml/objects/object_ma1.xml @@ -1,96 +1,116 @@  + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c index 217f672529..0cfc9a543d 100644 --- a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c +++ b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c @@ -255,15 +255,15 @@ static Vec3f D_80B4E934 = { 216.0f, -20.0f, 1395.0f }; static s32 D_80B4E940 = 0; -static TexturePtr D_80B4E944[] = { - object_ma1_Tex_00FFC8, object_ma1_Tex_0107C8, object_ma1_Tex_010FC8, object_ma1_Tex_0117C8, object_ma1_Tex_011FC8, +static TexturePtr sRomaniEyeTextures[] = { + gRomaniEyeOpenTex, gRomaniEyeHalfTex, gRomaniEyeClosedTex, gRomaniEyeHappyTex, gRomaniEyeSadTex, }; -static TexturePtr D_80B4E958[] = { - object_ma1_Tex_0127C8, - object_ma1_Tex_012BC8, - object_ma1_Tex_012FC8, - object_ma1_Tex_0133C8, +static TexturePtr sRomaniMouthTextures[] = { + gRomaniMouthHappyTex, + gRomaniMouthFrownTex, + gRomaniMouthHangingOpenTex, + gRomaniMouthSmileTex, }; static s8 D_80B4E968 = 0; @@ -1198,11 +1198,11 @@ void func_80B44F58(void) { if (!D_80B4E968) { D_80B4E968 = true; - for (i = 0, iter = D_80B4E944; i < ARRAY_COUNT(D_80B4E944); i++, iter++) { + for (i = 0, iter = sRomaniEyeTextures; i < ARRAY_COUNT(sRomaniEyeTextures); i++, iter++) { *iter = Lib_SegmentedToVirtual(*iter); } - for (i = 0, iter = D_80B4E958; i < ARRAY_COUNT(D_80B4E958); i++, iter++) { + for (i = 0, iter = sRomaniMouthTextures; i < ARRAY_COUNT(sRomaniMouthTextures); i++, iter++) { *iter = Lib_SegmentedToVirtual(*iter); } } @@ -2427,7 +2427,7 @@ void func_80B4827C(Actor* thisx, PlayState* play) { void func_80B482D4(EnInvadepoh* this) { this->actionTimer = 40; - Animation_MorphToLoop(&this->skelAnime, &object_ma1_Anim_002A8C, -10.0f); + Animation_MorphToLoop(&this->skelAnime, &gRomaniLookAroundAnim, -10.0f); this->actor.draw = NULL; this->actionFunc = func_80B48324; } @@ -2443,7 +2443,7 @@ void func_80B48324(EnInvadepoh* this, PlayState* play) { void func_80B48374(EnInvadepoh* this) { this->actionTimer = 60; - Animation_MorphToLoop(&this->skelAnime, &object_ma1_Anim_002A8C, -10.0f); + Animation_MorphToLoop(&this->skelAnime, &gRomaniLookAroundAnim, -10.0f); this->actor.draw = func_80B4E324; this->actionFunc = func_80B483CC; } @@ -2475,7 +2475,7 @@ void func_80B4843C(EnInvadepoh* this) { this->behaviorInfo.unk44 = 0.1f; this->behaviorInfo.unk48 = 2000; this->actionTimer = 50; - Animation_Change(&this->skelAnime, &object_ma1_Anim_007328, 2.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -5.0f); + Animation_Change(&this->skelAnime, &gRomaniRunAnim, 2.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -5.0f); this->actor.draw = func_80B4E324; this->actionFunc = func_80B484EC; } @@ -2505,7 +2505,7 @@ void func_80B48588(EnInvadepoh* this) { this->behaviorInfo.unk42 = 0; this->behaviorInfo.unk44 = 0.28f; this->behaviorInfo.unk48 = 7000; - Animation_MorphToPlayOnce(&this->skelAnime, &object_ma1_Anim_009E58, -10.0f); + Animation_MorphToPlayOnce(&this->skelAnime, &gRomaniIdleAnim, -10.0f); this->actor.draw = func_80B4E324; this->actionFunc = func_80B48610; } @@ -2522,10 +2522,10 @@ void func_80B48620(Actor* thisx, PlayState* play) { Actor_SetObjectDependency(play, &this->actor); func_80B44F58(); this->actor.update = func_80B4873C; - SkelAnime_InitFlex(play, &this->skelAnime, &object_ma1_Skel_013928, &object_ma1_Anim_009E58, this->jointTable, - this->morphTable, 23); + SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniIdleAnim, this->jointTable, this->morphTable, + ROMANI_LIMB_MAX); func_80B45C04(&this->behaviorInfo, D_80B4EA90, 6, D_80B4EB00, 2, &gZeroVec3s, 5000, 0.05f, 0.3f, 0.12f); - Animation_PlayLoop(&this->skelAnime, &object_ma1_Anim_009E58); + Animation_PlayLoop(&this->skelAnime, &gRomaniIdleAnim); func_80B482D4(this); } } @@ -2558,7 +2558,7 @@ void func_80B487B4(EnInvadepoh* this) { substruct->unk26.z = 0; substruct->unk30 = 0.1f; substruct->unk2C = 800; - Animation_MorphToLoop(&this->skelAnime, &object_ma1_Anim_014088, -10.0f); + Animation_MorphToLoop(&this->skelAnime, &gRomaniWalkAnim, -10.0f); this->actionFunc = func_80B48848; } @@ -2618,7 +2618,7 @@ void func_80B48948(EnInvadepoh* this) { substruct->unk2C = 1000; } - Animation_MorphToLoop(&this->skelAnime, &object_ma1_Anim_009E58, -10.0f); + Animation_MorphToLoop(&this->skelAnime, &gRomaniIdleAnim, -10.0f); this->actionFunc = func_80B48AD4; } @@ -2689,7 +2689,7 @@ void func_80B48DE4(EnInvadepoh* this) { AlienBehaviorInfo* substruct = &this->behaviorInfo; this->actor.speedXZ = 0.0f; - Animation_MorphToLoop(&this->skelAnime, &object_ma1_Anim_009E58, -10.0f); + Animation_MorphToLoop(&this->skelAnime, &gRomaniIdleAnim, -10.0f); this->behaviorInfo.unk4C = 0; substruct->unk30 = 0.05f; substruct->unk2C = 1200; @@ -2726,8 +2726,8 @@ void func_80B48FB0(Actor* thisx, PlayState* play) { this->actor.update = func_80B490F0; this->actor.draw = func_80B4E324; this->actor.textId = 0x3330; - SkelAnime_InitFlex(play, &this->skelAnime, &object_ma1_Skel_013928, &object_ma1_Anim_009E58, this->jointTable, - this->morphTable, 23); + SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniIdleAnim, this->jointTable, this->morphTable, + ROMANI_LIMB_MAX); func_80B45C04(&this->behaviorInfo, D_80B4EA90, 6, D_80B4EB00, 2, &gZeroVec3s, 100, 0.03, 0.3, 0.03); func_80B444F4(this, play); EnInvadepoh_SetPathPointToWorldPos(this, 0); @@ -2996,7 +2996,7 @@ void func_80B49B1C(Actor* thisx, PlayState* play) { void func_80B49BD0(EnInvadepoh* this) { AlienBehaviorInfo* substruct = &this->behaviorInfo; - Animation_MorphToLoop(&this->skelAnime, &object_ma1_Anim_014088, -10.0f); + Animation_MorphToLoop(&this->skelAnime, &gRomaniWalkAnim, -10.0f); substruct->unk26.x = 0; substruct->unk26.y = 0; substruct->unk26.z = 0; @@ -3040,7 +3040,7 @@ void func_80B49DA0(EnInvadepoh* this) { this->behaviorInfo.unk30 = 0.08f; this->behaviorInfo.unk2C = 2000; this->behaviorInfo.unk4C = 0; - Animation_MorphToLoop(&this->skelAnime, &object_ma1_Anim_009E58, -10.0f); + Animation_MorphToLoop(&this->skelAnime, &gRomaniIdleAnim, -10.0f); this->actionFunc = func_80B49DFC; } @@ -3078,8 +3078,8 @@ void func_80B49F88(Actor* thisx, PlayState* play) { this->actor.objBankIndex = this->bankIndex; Actor_SetObjectDependency(play, &this->actor); func_80B44F58(); - SkelAnime_InitFlex(play, &this->skelAnime, &object_ma1_Skel_013928, &object_ma1_Anim_014088, this->jointTable, - this->morphTable, 23); + SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniWalkAnim, this->jointTable, this->morphTable, + ROMANI_LIMB_MAX); func_80B45C04(&this->behaviorInfo, D_80B4EA90, 1, D_80B4EB00, 1, &gZeroVec3s, 100, 0.03, 0.3, 0.03); func_80B44540(this, play); func_80B44570(this); @@ -3145,7 +3145,7 @@ void func_80B4A1B8(Actor* thisx, PlayState* play) { void func_80B4A2C0(EnInvadepoh* this) { AlienBehaviorInfo* substruct = &this->behaviorInfo; - Animation_MorphToLoop(&this->skelAnime, &object_ma1_Anim_009E58, -10.0f); + Animation_MorphToLoop(&this->skelAnime, &gRomaniIdleAnim, -10.0f); substruct->unk26.x = 0; substruct->unk26.y = 0; substruct->unk26.z = 0; @@ -3204,7 +3204,7 @@ void func_80B4A350(EnInvadepoh* this, PlayState* play) { void func_80B4A570(EnInvadepoh* this) { AlienBehaviorInfo* substruct = &this->behaviorInfo; - Animation_MorphToPlayOnce(&this->skelAnime, &object_ma1_Anim_002A8C, -10.0f); + Animation_MorphToPlayOnce(&this->skelAnime, &gRomaniLookAroundAnim, -10.0f); substruct->unk26.x = 0; substruct->unk26.y = 0; substruct->unk26.z = 0; @@ -3223,7 +3223,7 @@ void func_80B4A5E4(EnInvadepoh* this, PlayState* play) { void func_80B4A614(EnInvadepoh* this) { AlienBehaviorInfo* substruct = &this->behaviorInfo; - Animation_MorphToLoop(&this->skelAnime, &object_ma1_Anim_014088, 0.0f); + Animation_MorphToLoop(&this->skelAnime, &gRomaniWalkAnim, 0.0f); substruct->unk26.x = 0; substruct->unk26.y = 0; substruct->unk26.z = 0; @@ -3266,7 +3266,7 @@ void func_80B4A7C0(EnInvadepoh* this) { this->behaviorInfo.unk30 = 0.08f; this->behaviorInfo.unk2C = 2000; this->behaviorInfo.unk4C = 0; - Animation_MorphToLoop(&this->skelAnime, &object_ma1_Anim_009E58, 0.0f); + Animation_MorphToLoop(&this->skelAnime, &gRomaniIdleAnim, 0.0f); this->actionFunc = func_80B4A81C; } @@ -3309,8 +3309,8 @@ void func_80B4A9C8(Actor* thisx, PlayState* play) { this->actor.objBankIndex = this->bankIndex; Actor_SetObjectDependency(play, &this->actor); func_80B44F58(); - SkelAnime_InitFlex(play, &this->skelAnime, &object_ma1_Skel_013928, &object_ma1_Anim_014088, this->jointTable, - this->morphTable, 23); + SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniWalkAnim, this->jointTable, this->morphTable, + ROMANI_LIMB_MAX); func_80B45C04(&this->behaviorInfo, D_80B4EA90, 1, D_80B4EB00, 1, &gZeroVec3s, 100, 0.03f, 0.3f, 0.03f); func_80B44620(this, play); if ((sp38 < CLOCK_TIME(2, 15)) || (sp38 >= CLOCK_TIME(6, 0))) { @@ -3485,9 +3485,9 @@ void func_80B4B0C4(Actor* thisx, PlayState* play) { Actor_SetObjectDependency(play, &this->actor); func_80B44F58(); this->actor.update = func_80B4B218; - SkelAnime_InitFlex(play, &this->skelAnime, &object_ma1_Skel_013928, &object_ma1_Anim_014088, this->jointTable, - this->morphTable, 23); - Animation_MorphToLoop(&this->skelAnime, &object_ma1_Anim_009E58, 0.0f); + SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniWalkAnim, this->jointTable, this->morphTable, + ROMANI_LIMB_MAX); + Animation_MorphToLoop(&this->skelAnime, &gRomaniIdleAnim, 0.0f); substruct = &this->behaviorInfo; func_80B45C04(&this->behaviorInfo, D_80B4EA90, 1, D_80B4EB00, 3, &gZeroVec3s, 2000, 0.08f, 0.3f, 0.03f); substruct->unk30 = 0.08f; @@ -3937,7 +3937,7 @@ void func_80B4C5C0(Actor* thisx, PlayState* play) { void func_80B4C6C8(EnInvadepoh* this) { AlienBehaviorInfo* substruct = &this->behaviorInfo; - Animation_MorphToLoop(&this->skelAnime, &object_ma1_Anim_014088, -10.0f); + Animation_MorphToLoop(&this->skelAnime, &gRomaniWalkAnim, -10.0f); substruct->unk26.x = 0; substruct->unk26.y = 0; substruct->unk26.z = 0; @@ -4020,7 +4020,7 @@ void func_80B4C730(EnInvadepoh* this, PlayState* play) { void func_80B4CAB0(EnInvadepoh* this) { this->behaviorInfo.unk30 = 0.08f; this->behaviorInfo.unk2C = 4000; - Animation_MorphToLoop(&this->skelAnime, &object_ma1_Anim_009E58, -10.0f); + Animation_MorphToLoop(&this->skelAnime, &gRomaniIdleAnim, -10.0f); this->behaviorInfo.unk4C = 0; this->actionFunc = func_80B4CB0C; } @@ -4049,7 +4049,7 @@ void func_80B4CB0C(EnInvadepoh* this, PlayState* play) { void func_80B4CC70(EnInvadepoh* this) { this->behaviorInfo.unk30 = 0.08f; this->behaviorInfo.unk2C = 2000; - Animation_MorphToLoop(&this->skelAnime, &object_ma1_Anim_009E58, -10.0f); + Animation_MorphToLoop(&this->skelAnime, &gRomaniIdleAnim, -10.0f); this->behaviorInfo.unk4C = 0; this->actionFunc = func_80B4CCCC; } @@ -4088,8 +4088,8 @@ void func_80B4CE54(Actor* thisx, PlayState* play) { this->actor.objBankIndex = this->bankIndex; Actor_SetObjectDependency(play, &this->actor); func_80B44F58(); - SkelAnime_InitFlex(play, &this->skelAnime, &object_ma1_Skel_013928, &object_ma1_Anim_014088, this->jointTable, - this->morphTable, 23); + SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniWalkAnim, this->jointTable, this->morphTable, + ROMANI_LIMB_MAX); func_80B45C04(&this->behaviorInfo, D_80B4EA90, 1, D_80B4EB00, 3, &gZeroVec3s, 100, 0.03f, 0.3f, 0.03f); func_80B446D0(this, play); this->actor.world.rot.y = this->actor.shape.rot.y; @@ -4471,13 +4471,13 @@ void func_80B4E1B0(Actor* thisx, PlayState* play) { } s32 func_80B4E200(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - if (limbIndex == 14) { + if (limbIndex == ROMANI_LIMB_HEAD) { EnInvadepoh* this = THIS; // both of these needed to match rot->x += this->behaviorInfo.unk20.y; rot->y += this->behaviorInfo.unk20.z; rot->z += this->behaviorInfo.unk20.x; - } else if (limbIndex == 13) { + } else if (limbIndex == ROMANI_LIMB_TORSO) { EnInvadepoh* this = THIS; // both of these needed to match rot->x += (s16)(this->behaviorInfo.unk34 * this->behaviorInfo.unk20.y); @@ -4489,11 +4489,11 @@ s32 func_80B4E200(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s void func_80B4E2AC(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { EnInvadepoh* this = THIS; - if (limbIndex == 19) { + if (limbIndex == ROMANI_LIMB_LEFT_HAND) { OPEN_DISPS(play->state.gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, object_ma1_DL_0003B0); + gSPDisplayList(POLY_OPA_DISP++, gRomaniBowDL); CLOSE_DISPS(play->state.gfxCtx); - } else if (limbIndex == 14) { + } else if (limbIndex == ROMANI_LIMB_HEAD) { Matrix_MultVec3f(&D_80B4EE30, &this->actor.focus.pos); } } @@ -4503,8 +4503,8 @@ void func_80B4E324(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); func_8012C28C(play->state.gfxCtx); - gSPSegment(POLY_OPA_DISP++, 0x09, D_80B4E958[this->behaviorInfo.unk10.unkF]); - gSPSegment(POLY_OPA_DISP++, 0x08, D_80B4E944[this->behaviorInfo.unk0.unkF]); + gSPSegment(POLY_OPA_DISP++, 0x09, sRomaniMouthTextures[this->behaviorInfo.unk10.unkF]); + gSPSegment(POLY_OPA_DISP++, 0x08, sRomaniEyeTextures[this->behaviorInfo.unk0.unkF]); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, func_80B4E200, func_80B4E2AC, &this->actor); CLOSE_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c b/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c index 5af78062fb..b7d67fbc3d 100644 --- a/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c +++ b/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c @@ -5,7 +5,6 @@ */ #include "z_en_ma4.h" -#include "objects/object_ma1/object_ma1.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_2000000) @@ -90,14 +89,14 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 D_80AC00DC = { 0, 0, 0, 0, MASS_IMMOVABLE }; static TexturePtr sEyeTextures[] = { - object_ma1_Tex_00FFC8, object_ma1_Tex_0107C8, object_ma1_Tex_010FC8, object_ma1_Tex_0117C8, object_ma1_Tex_011FC8, + gRomaniEyeOpenTex, gRomaniEyeHalfTex, gRomaniEyeClosedTex, gRomaniEyeHappyTex, gRomaniEyeSadTex, }; static TexturePtr sMouthTextures[] = { - object_ma1_Tex_0127C8, - object_ma1_Tex_012BC8, - object_ma1_Tex_012FC8, - object_ma1_Tex_0133C8, + gRomaniMouthHappyTex, + gRomaniMouthFrownTex, + gRomaniMouthHangingOpenTex, + gRomaniMouthSmileTex, }; void EnMa4_UpdateEyes(EnMa4* this) { @@ -113,26 +112,26 @@ void EnMa4_UpdateEyes(EnMa4* this) { } static AnimationSpeedInfo sAnimationInfo[] = { - { &object_ma1_Anim_009E58, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_009E58, 1.0f, ANIMMODE_LOOP, -6.0f }, // Idle anim - { &object_ma1_Anim_002A8C, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_002A8C, 1.0f, ANIMMODE_LOOP, -6.0f }, // Looking around anim - { &object_ma1_Anim_018948, 1.0f, ANIMMODE_ONCE, 0.0f }, - { &object_ma1_Anim_018948, 1.0f, ANIMMODE_ONCE, -6.0f }, // Starts holding hands anim - { &object_ma1_Anim_01B76C, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_01B76C, 1.0f, ANIMMODE_LOOP, -6.0f }, // Holnding hands anim - { &object_ma1_Anim_007328, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_007328, 1.0f, ANIMMODE_LOOP, -6.0f }, // Walking anim - { &object_ma1_Anim_014088, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_014088, 1.0f, ANIMMODE_LOOP, -6.0f }, // - { &object_ma1_Anim_015B7C, 1.0f, ANIMMODE_ONCE, 0.0f }, - { &object_ma1_Anim_015B7C, 1.0f, ANIMMODE_ONCE, -6.0f }, // Shoot arrow anim - { &object_ma1_Anim_007D98, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_007D98, 1.0f, ANIMMODE_LOOP, -6.0f }, // Sitting anim - { &object_ma1_Anim_00852C, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_00852C, 1.0f, ANIMMODE_LOOP, -6.0f }, // Sitting traumatized anim - { &object_ma1_Anim_008F6C, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_008F6C, 1.0f, ANIMMODE_LOOP, -6.0f }, // Sitting sad anim + { &gRomaniIdleAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniIdleAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniLookAroundAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniLookAroundAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniSingStartAnim, 1.0f, ANIMMODE_ONCE, 0.0f }, + { &gRomaniSingStartAnim, 1.0f, ANIMMODE_ONCE, -6.0f }, + { &gRomaniSingLoopAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniSingLoopAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniRunAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniRunAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniWalkAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniWalkAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniShootBowAnim, 1.0f, ANIMMODE_ONCE, 0.0f }, + { &gRomaniShootBowAnim, 1.0f, ANIMMODE_ONCE, -6.0f }, + { &gRomaniSittingAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniSittingAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniSittingHeadShakeAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniSittingHeadShakeAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniSittingLookDownAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniSittingLookDownAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, }; void EnMa4_ChangeAnim(EnMa4* this, s32 index) { @@ -145,9 +144,9 @@ void func_80ABDD9C(EnMa4* this, PlayState* play) { Player* player = GET_PLAYER(play); s16 flag; - if (this->unk_1D8.unk_00 == 0 && ((this->skelAnime.animation == &object_ma1_Anim_007328) || - (this->skelAnime.animation == &object_ma1_Anim_002A8C) || - (this->skelAnime.animation == &object_ma1_Anim_015B7C))) { + if (this->unk_1D8.unk_00 == 0 && + ((this->skelAnime.animation == &gRomaniRunAnim) || (this->skelAnime.animation == &gRomaniLookAroundAnim) || + (this->skelAnime.animation == &gRomaniShootBowAnim))) { flag = 1; } else { flag = (this->type == MA4_TYPE_ALIENS_WON && this->actionFunc != EnMa4_DialogueHandler) ? 1 : 0; @@ -183,8 +182,7 @@ void EnMa4_Init(Actor* thisx, PlayState* play) { s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f); - SkelAnime_InitFlex(play, &this->skelAnime, &object_ma1_Skel_013928, NULL, this->jointTable, this->morphTable, - MA1_LIMB_MAX); + SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, NULL, this->jointTable, this->morphTable, ROMANI_LIMB_MAX); Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); @@ -300,7 +298,7 @@ void EnMa4_RunInCircles(EnMa4* this, PlayState* play) { Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4); Actor_MoveWithGravity(&this->actor); - if (this->skelAnime.animation == &object_ma1_Anim_007328) { // Walking animation + if (this->skelAnime.animation == &gRomaniRunAnim) { if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 4.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ROMANI_WALK); } @@ -1031,12 +1029,12 @@ s32 EnMa4_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p EnMa4* this = THIS; Vec3s sp4; - if (limbIndex == MA1_LIMB_HEAD) { + if (limbIndex == ROMANI_LIMB_HEAD) { sp4 = this->unk_1D8.unk_08; rot->x = rot->x + sp4.y; rot->z = rot->z + sp4.x; } - if (limbIndex == MA1_LIMB_TORSO) { + if (limbIndex == ROMANI_LIMB_TORSO) { sp4 = this->unk_1D8.unk_0E; rot->x = rot->x - sp4.y; rot->z = rot->z - sp4.x; @@ -1049,12 +1047,12 @@ void EnMa4_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, EnMa4* this = THIS; Vec3f sp28 = { 800.0f, 0.0f, 0.0f }; - if (limbIndex == MA1_LIMB_HEAD) { + if (limbIndex == ROMANI_LIMB_HEAD) { Matrix_MultVec3f(&sp28, &this->actor.focus.pos); - } else if (limbIndex == MA1_LIMB_HAND_LEFT) { + } else if (limbIndex == ROMANI_LIMB_LEFT_HAND) { if (this->hasBow == true) { OPEN_DISPS(play->state.gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, object_ma1_DL_0003B0); + gSPDisplayList(POLY_OPA_DISP++, gRomaniBowDL); CLOSE_DISPS(play->state.gfxCtx); } } @@ -1066,7 +1064,7 @@ void EnMa4_Draw(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); if (this->type == MA4_TYPE_ALIENS_WON) { gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_OPA_DISP++, object_ma1_DL_000A20); + gSPDisplayList(POLY_OPA_DISP++, gRomaniWoodenBoxDL); } func_8012C28C(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Ma4/z_en_ma4.h b/src/overlays/actors/ovl_En_Ma4/z_en_ma4.h index 41936445b4..148e2ef30d 100644 --- a/src/overlays/actors/ovl_En_Ma4/z_en_ma4.h +++ b/src/overlays/actors/ovl_En_Ma4/z_en_ma4.h @@ -2,7 +2,7 @@ #define Z_EN_MA4_H #include "global.h" -#include "overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.h" +#include "objects/object_ma1/object_ma1.h" struct EnMa4; @@ -15,9 +15,9 @@ typedef struct EnMa4 { /* 0x18C */ ColliderCylinder collider; /* 0x1D8 */ struct_800BD888_arg1 unk_1D8; /* 0x200 */ Vec3s* pathPoints; - /* 0x204 */ Vec3s jointTable[MA1_LIMB_MAX]; + /* 0x204 */ Vec3s jointTable[ROMANI_LIMB_MAX]; /* 0x28E */ UNK_TYPE1 unk28E[0x6]; - /* 0x294 */ Vec3s morphTable[MA1_LIMB_MAX]; + /* 0x294 */ Vec3s morphTable[ROMANI_LIMB_MAX]; /* 0x31E */ UNK_TYPE1 unk31E[0x6]; /* 0x324 */ s16 pathIndex; /* 0x326 */ s16 pathPointsCount; diff --git a/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c b/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c index f43d6ca0d2..72357758a3 100644 --- a/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c +++ b/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c @@ -5,7 +5,6 @@ */ #include "z_en_ma_yts.h" -#include "objects/object_ma1/object_ma1.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_100000 | ACTOR_FLAG_2000000) @@ -79,39 +78,39 @@ static CollisionCheckInfoInit2 sColChkInfoInit2 = { }; static AnimationSpeedInfo sAnimationInfo[] = { - { &object_ma1_Anim_009E58, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_009E58, 1.0f, ANIMMODE_LOOP, -6.0f }, // Idle anim - { &object_ma1_Anim_018948, 1.0f, ANIMMODE_ONCE, 0.0f }, - { &object_ma1_Anim_018948, 1.0f, ANIMMODE_ONCE, -6.0f }, // Starts holding hands anim - { &object_ma1_Anim_01B76C, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_01B76C, 1.0f, ANIMMODE_LOOP, -6.0f }, // Holnding hands anim - { &object_ma1_Anim_007328, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_007328, 1.0f, ANIMMODE_LOOP, -6.0f }, // Walking anim - { &object_ma1_Anim_014088, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_014088, 1.0f, ANIMMODE_LOOP, -6.0f }, // - { &object_ma1_Anim_002A8C, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_002A8C, 1.0f, ANIMMODE_LOOP, -6.0f }, // Looking around anim - { &object_ma1_Anim_015B7C, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_015B7C, 1.0f, ANIMMODE_LOOP, -6.0f }, // Shoot arrow anim - { &object_ma1_Anim_007D98, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_007D98, 1.0f, ANIMMODE_LOOP, -6.0f }, // Sitting anim - { &object_ma1_Anim_00852C, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_00852C, 1.0f, ANIMMODE_LOOP, -6.0f }, // Sitting traumatized anim - { &object_ma1_Anim_008F6C, 1.0f, ANIMMODE_LOOP, 0.0f }, - { &object_ma1_Anim_008F6C, 1.0f, ANIMMODE_LOOP, -6.0f }, // Sitting sad anim - { &object_ma1_Anim_0180DC, 1.0f, ANIMMODE_ONCE, 0.0f }, - { &object_ma1_Anim_0180DC, 1.0f, ANIMMODE_ONCE, -6.0f }, // Turns around anim + { &gRomaniIdleAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniIdleAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniSingStartAnim, 1.0f, ANIMMODE_ONCE, 0.0f }, + { &gRomaniSingStartAnim, 1.0f, ANIMMODE_ONCE, -6.0f }, + { &gRomaniSingLoopAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniSingLoopAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniRunAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniRunAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniWalkAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniWalkAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniLookAroundAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniLookAroundAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniShootBowAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniShootBowAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniSittingAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniSittingAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniSittingHeadShakeAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniSittingHeadShakeAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniSittingLookDownAnim, 1.0f, ANIMMODE_LOOP, 0.0f }, + { &gRomaniSittingLookDownAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, + { &gRomaniTurnAroundAndFlickHairAnim, 1.0f, ANIMMODE_ONCE, 0.0f }, + { &gRomaniTurnAroundAndFlickHairAnim, 1.0f, ANIMMODE_ONCE, -6.0f }, }; static TexturePtr sMouthTextures[] = { - object_ma1_Tex_0127C8, - object_ma1_Tex_012BC8, - object_ma1_Tex_012FC8, - object_ma1_Tex_0133C8, + gRomaniMouthHappyTex, + gRomaniMouthFrownTex, + gRomaniMouthHangingOpenTex, + gRomaniMouthSmileTex, }; static TexturePtr sEyeTextures[] = { - object_ma1_Tex_00FFC8, object_ma1_Tex_0107C8, object_ma1_Tex_010FC8, object_ma1_Tex_0117C8, object_ma1_Tex_011FC8, + gRomaniEyeOpenTex, gRomaniEyeHalfTex, gRomaniEyeClosedTex, gRomaniEyeHappyTex, gRomaniEyeSadTex, }; void EnMaYts_ChangeAnim(EnMaYts* this, s32 index) { @@ -225,8 +224,7 @@ void EnMaYts_Init(Actor* thisx, PlayState* play) { } ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f); - SkelAnime_InitFlex(play, &this->skelAnime, &object_ma1_Skel_013928, NULL, this->jointTable, this->morphTable, - MA1_LIMB_MAX); + SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, NULL, this->jointTable, this->morphTable, ROMANI_LIMB_MAX); EnMaYts_InitAnimation(this, play); Collider_InitCylinder(play, &this->collider); @@ -505,14 +503,13 @@ s32 EnMaYts_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* EnMaYts* this = THIS; Vec3s sp4; - if (limbIndex == MA1_LIMB_HEAD) { + if (limbIndex == ROMANI_LIMB_HEAD) { sp4 = this->unk_1D8.unk_08; rot->x += sp4.y; - if ((this->skelAnime.animation == &object_ma1_Anim_009E58) || - (this->skelAnime.animation == &object_ma1_Anim_007D98)) { + if ((this->skelAnime.animation == &gRomaniIdleAnim) || (this->skelAnime.animation == &gRomaniSittingAnim)) { rot->z += sp4.x; } - } else if (limbIndex == MA1_LIMB_TORSO) { + } else if (limbIndex == ROMANI_LIMB_TORSO) { sp4 = this->unk_1D8.unk_0E; rot->x += sp4.y; rot->z += sp4.x; @@ -524,12 +521,12 @@ s32 EnMaYts_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* void EnMaYts_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { EnMaYts* this = THIS; - if (limbIndex == MA1_LIMB_HEAD) { + if (limbIndex == ROMANI_LIMB_HEAD) { Matrix_MultZero(&this->actor.focus.pos); - } else if (limbIndex == MA1_LIMB_HAND_LEFT) { + } else if (limbIndex == ROMANI_LIMB_LEFT_HAND) { if (this->hasBow == true) { OPEN_DISPS(play->state.gfxCtx); - gSPDisplayList(POLY_OPA_DISP++, object_ma1_DL_0003B0); + gSPDisplayList(POLY_OPA_DISP++, gRomaniBowDL); CLOSE_DISPS(play->state.gfxCtx); } } @@ -556,7 +553,7 @@ void EnMaYts_DrawSleeping(Actor* thisx, PlayState* play) { func_8012C28C(play->state.gfxCtx); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_OPA_DISP++, object_ma1_DL_0043A0); + gSPDisplayList(POLY_OPA_DISP++, gRomaniSleepingDL); CLOSE_DISPS(play->state.gfxCtx); } diff --git a/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.h b/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.h index a16a5e5d8a..c3da6b71d7 100644 --- a/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.h +++ b/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.h @@ -2,38 +2,12 @@ #define Z_EN_MA_YTS_H #include "global.h" +#include "objects/object_ma1/object_ma1.h" struct EnMaYts; typedef void (*EnMaYtsActionFunc)(struct EnMaYts*, PlayState*); -typedef enum { - /* 00 */ MA1_LIMB_NONE, - /* 01 */ MA1_LIMB_ROOT, - /* 02 */ MA1_LIMB_PELVIS, - /* 03 */ MA1_LIMB_TIGHT_LEFT, - /* 04 */ MA1_LIMB_LEG_LEFT, - /* 05 */ MA1_LIMB_FOOT_LEFT, - /* 06 */ MA1_LIMB_TIGHT_RIGHT, - /* 07 */ MA1_LIMB_LEG_RIGHT, - /* 08 */ MA1_LIMB_FOOT_RIGHT, - /* 09 */ MA1_LIMB_DRESS_0, - /* 00 */ MA1_LIMB_DRESS_1, - /* 11 */ MA1_LIMB_DRESS_2, - /* 12 */ MA1_LIMB_DRESS_3, - /* 13 */ MA1_LIMB_TORSO, - /* 14 */ MA1_LIMB_HEAD, - /* 15 */ MA1_LIMB_HAIR_TOP, - /* 16 */ MA1_LIMB_HAIR_BOTTOM, - /* 17 */ MA1_LIMB_ARM_LEFT, - /* 18 */ MA1_LIMB_FOREARM_LEFT, - /* 19 */ MA1_LIMB_HAND_LEFT, - /* 20 */ MA1_LIMB_ARM_RIGHT, - /* 21 */ MA1_LIMB_FOREARM_RIGHT, - /* 22 */ MA1_LIMB_HAND_RIGHT, - /* 23 */ MA1_LIMB_MAX -} ObjectMa1Limbs; - typedef struct EnMaYts { /* 0x000 */ Actor actor; /* 0x144 */ SkelAnime skelAnime; @@ -41,9 +15,9 @@ typedef struct EnMaYts { /* 0x18C */ ColliderCylinder collider; /* 0x1D8 */ struct_800BD888_arg1 unk_1D8; /* 0x200 */ s32 unk_200; // Set, but not used - /* 0x204 */ Vec3s jointTable[MA1_LIMB_MAX]; + /* 0x204 */ Vec3s jointTable[ROMANI_LIMB_MAX]; /* 0x28E */ char unk_28E[0x6]; - /* 0x294 */ Vec3s morphTable[MA1_LIMB_MAX]; + /* 0x294 */ Vec3s morphTable[ROMANI_LIMB_MAX]; /* 0x31E */ char unk_31E[0x8]; /* 0x326 */ s16 blinkTimer; /* 0x328 */ s16 overrideEyeTexIndex; // If non-zero, then this index will be used instead of eyeTexIndex diff --git a/tools/disasm/variables.txt b/tools/disasm/variables.txt index 0af6d62d09..f66742c94b 100644 --- a/tools/disasm/variables.txt +++ b/tools/disasm/variables.txt @@ -14348,8 +14348,8 @@ 0x80B4E934:("D_80B4E934","UNK_TYPE4","",0x4), 0x80B4E938:("D_80B4E938","f32","",0x4), 0x80B4E940:("D_80B4E940","UNK_TYPE4","",0x4), - 0x80B4E944:("D_80B4E944","UNK_TYPE4","",0x4), - 0x80B4E958:("D_80B4E958","UNK_TYPE4","",0x4), + 0x80B4E944:("sRomaniEyeTextures","UNK_TYPE4","",0x4), + 0x80B4E958:("sRomaniMouthTextures","UNK_TYPE4","",0x4), 0x80B4E968:("D_80B4E968","UNK_TYPE1","",0x1), 0x80B4E96C:("D_80B4E96C","UNK_TYPE4","",0x4), 0x80B4E984:("D_80B4E984","UNK_TYPE4","",0x4),