diff --git a/assets/xml/objects/object_tw.xml b/assets/xml/objects/object_tw.xml index bb471aee51..ac05ccd0aa 100644 --- a/assets/xml/objects/object_tw.xml +++ b/assets/xml/objects/object_tw.xml @@ -1,17 +1,18 @@  - - - - - - - - - - - - + + + + + + + + + + + + + @@ -38,37 +39,40 @@ + - - - - + + + + + - + - - - - + + + + - - - + + + - - + + - - - + + + - - - - - + + + + + + @@ -115,8 +119,8 @@ - - + + @@ -135,51 +139,96 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -206,127 +255,150 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index d1085f3a18..041f3ead7c 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -550,8 +550,8 @@ void BossTw_Init(Actor* thisx, PlayState* play2) { this->actor.colChkInfo.health = 24; this->actor.update = BossTw_TwinrovaUpdate; this->actor.draw = BossTw_TwinrovaDraw; - SkelAnime_InitFlex(play, &this->skelAnime, &object_tw_Skel_032020, &object_tw_Anim_0244B4, NULL, NULL, 0); - Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_0244B4, -3.0f); + SkelAnime_InitFlex(play, &this->skelAnime, &gTwinrovaSkel, &gTwinrovaTPoseAnim, NULL, NULL, 0); + Animation_MorphToLoop(&this->skelAnime, &gTwinrovaTPoseAnim, -3.0f); if (GET_EVENTCHKINF(EVENTCHKINF_75)) { // began twinrova battle @@ -807,7 +807,7 @@ s32 BossTw_BeamHitPlayerCheck(BossTw* this, PlayState* play) { this->beamDist = sqrtf(SQ(offset.x) + SQ(offset.y) + SQ(offset.z)); func_8002F6D4(play, &this->actor, 3.0f, this->actor.shape.rot.y, 0.0f, 0x20); - if (this->actor.params == 0) { + if (this->actor.params == TW_KOTAKE) { if (sFreezeState == 0) { sFreezeState = 1; } @@ -1038,7 +1038,7 @@ void BossTw_ShootBeam(BossTw* this, PlayState* play) { Math_ApproachF(&this->spawnPortalAlpha, 0, 1.0f, 30.0f); } else { Math_ApproachF(&this->flameAlpha, 255.0f, 1.0f, 10.0f); - if (this->actor.params == 1) { + if (this->actor.params == TW_KOUME) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_TWINROBA_MS_FIRE - SFX_FLAG); } else { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_TWINROBA_MS_FREEZE - SFX_FLAG); @@ -1132,7 +1132,7 @@ void BossTw_ShootBeam(BossTw* this, PlayState* play) { SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &this->beamReflectionOrigin, &this->unk_54C, &this->actor.projectedW); - if (this->actor.params == 1) { + if (this->actor.params == TW_KOUME) { Audio_PlaySfxGeneral(NA_SE_EN_TWINROBA_SHOOT_FIRE - SFX_FLAG, &this->unk_54C, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { @@ -1162,7 +1162,7 @@ void BossTw_ShootBeam(BossTw* this, PlayState* play) { SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &this->unk_530, &this->unk_558, &this->actor.projectedW); - if (this->actor.params == 1) { + if (this->actor.params == TW_KOUME) { Audio_PlaySfxGeneral(NA_SE_EN_TWINROBA_SHOOT_FIRE - SFX_FLAG, &this->unk_558, 4U, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); Audio_PlaySfxGeneral(NA_SE_EN_TWINROBA_REFL_FIRE - SFX_FLAG, &this->unk_558, 4, @@ -1344,7 +1344,7 @@ void BossTw_SetupHitByBeam(BossTw* this, PlayState* play) { this->timers[0] = 53; this->actor.speedXZ = 0.0f; - if (this->actor.params == 0) { + if (this->actor.params == TW_KOTAKE) { this->work[FOG_TIMER] = 20; } } @@ -1369,11 +1369,11 @@ void BossTw_HitByBeam(BossTw* this, PlayState* play) { accel.y = 0.1f; accel.z = 0.0f; - BossTw_AddDmgCloud(play, this->actor.params + 2, &pos, &velocity, &accel, Rand_ZeroFloat(10.0f) + 15.0f, 0, 0, - 150); + BossTw_AddDmgCloud(play, this->actor.params + TWEFF_2, &pos, &velocity, &accel, Rand_ZeroFloat(10.0f) + 15.0f, + 0, 0, 150); } - if (this->actor.params == 1) { + if (this->actor.params == TW_KOUME) { Math_ApproachF(&this->fogR, 255.0f, 1.0f, 30.0f); Math_ApproachF(&this->fogG, 255.0f, 1.0f, 30.0f); Math_ApproachF(&this->fogB, 255.0f, 1.0f, 30.0f); @@ -1636,8 +1636,8 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { BossTw_SetupWait(sKotakePtr, play); BossTw_SetupWait(sKoumePtr, play); Actor_SetScale(&this->actor, 0.0f); - Animation_MorphToPlayOnce(&this->skelAnime, &object_tw_Anim_038E2C, 0.0f); - this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&object_tw_Anim_038E2C); + Animation_MorphToPlayOnce(&this->skelAnime, &gTwinrovaIntroAnim, 0.0f); + this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&gTwinrovaIntroAnim); this->timers[0] = 50; func_8002DF54(play, &this->actor, 2); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_TWINROBA_TRANSFORM); @@ -1651,7 +1651,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { case 1: if (Animation_OnFrame(&this->skelAnime, this->workf[ANIM_SW_TGT])) { - Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_032BF8, -15.0f); + Animation_MorphToLoop(&this->skelAnime, &gTwinrovaHoverAnim, -15.0f); } sEnvType = -1; @@ -2214,7 +2214,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) { play->envCtx.prevLightSetting = 1; play->envCtx.lightSetting = 1; play->envCtx.lightBlend = 0.0f; - TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(object_tw_Blob_02E170), + TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gTwinrovaTitleCardTex), 0xA0, 0xB4, 0x80, 0x28); SET_EVENTCHKINF(EVENTCHKINF_75); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS); @@ -2337,7 +2337,7 @@ void BossTw_DeathBall(BossTw* this, PlayState* play) { } } - if (this->actor.params == 0x69) { + if (this->actor.params == TW_DEATHBALL_KOUME) { this->targetPos.x = sKoumePtr->actor.world.pos.x; this->targetPos.z = sKoumePtr->actor.world.pos.z; } else { @@ -2369,7 +2369,7 @@ void BossTw_DeathBall(BossTw* this, PlayState* play) { void BossTw_TwinrovaSetupDeathCS(BossTw* this, PlayState* play) { this->actionFunc = BossTw_TwinrovaDeathCS; - Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_024374, -3.0f); + Animation_MorphToLoop(&this->skelAnime, &gTwinrovaDamageAnim, -3.0f); this->actor.world.rot.y = this->actor.shape.rot.y; this->actor.flags &= ~ACTOR_FLAG_0; this->csState2 = this->csState1 = 0; @@ -2622,7 +2622,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { switch (this->csState1) { case 0: if (this->work[CS_TIMER_1] == 15) { - Animation_MorphToPlayOnce(&this->skelAnime, &object_tw_Anim_0216DC, -3.0f); + Animation_MorphToPlayOnce(&this->skelAnime, &gTwinrovaDeathAnim, -3.0f); } if (this->work[CS_TIMER_1] >= 15) { @@ -2910,7 +2910,7 @@ void BossTw_Update(Actor* thisx, PlayState* play) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); } - if (this->actor.params == 0) { + if (this->actor.params == TW_KOTAKE) { this->workf[OUTR_CRWN_TX_X2] += 1.0f; this->workf[OUTR_CRWN_TX_Y2] -= 7.0f; this->workf[INNR_CRWN_TX_Y1] += 1.0f; @@ -3180,7 +3180,7 @@ s32 BossTw_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* if (limbIndex == 21) { if (this->unk_5F8 == 0) { - if (this->actor.params == 0) { + if (this->actor.params == TW_KOTAKE) { *dList = object_tw_DL_012CE0; } else { *dList = object_tw_DL_0134B8; @@ -3192,7 +3192,7 @@ s32 BossTw_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* if (this->actionFunc == BossTw_DeathCS) { *dList = NULL; } else if (this->scepterAlpha == 0.0f) { - if (this->actor.params == 0) { + if (this->actor.params == TW_KOTAKE) { *dList = object_tw_DL_012B38; } else { *dList = object_tw_DL_013310; @@ -3222,7 +3222,7 @@ void BossTw_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot if (this->unk_5F8 != 0) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 6190), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); - if (this->actor.params == 0) { + if (this->actor.params == TW_KOTAKE) { gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_013AE8)); } else { gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_013D68)); @@ -3239,7 +3239,7 @@ void BossTw_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot if (this->scepterAlpha > 0.0f) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 6221), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); - if (this->actor.params == 0) { + if (this->actor.params == TW_KOTAKE) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 225, 255, (s16)this->scepterAlpha); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_013E98)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, (s16)this->scepterAlpha); @@ -3270,7 +3270,7 @@ void func_80941BC0(BossTw* this, PlayState* play) { G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s16)this->workf[UNK_F11]); gDPSetEnvColor(POLY_XLU_DISP++, 0, 40, 30, 80); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01BC00)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaIcePoolDL)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 215, 215, 215, (s16)this->workf[UNK_F11] * this->workf[UNK_F14]); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 128); gSPSegment(POLY_XLU_DISP++, 8, @@ -3280,7 +3280,7 @@ void func_80941BC0(BossTw* this, PlayState* play) { Matrix_RotateY(this->workf[UNK_F15], MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 6423), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01C1C0)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaIcePoolShineDL)); Matrix_Pop(); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 6427), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); @@ -3295,7 +3295,7 @@ void func_80941BC0(BossTw* this, PlayState* play) { GBL_c1(G_BL_CLR_FOG, G_BL_A_SHADE, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_OVL_SURF2); gSPSetGeometryMode(POLY_XLU_DISP++, G_CULL_BACK | G_FOG); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A790)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaEffectHaloDL)); Matrix_Pop(); CLOSE_DISPS(play->state.gfxCtx, "../z_boss_tw.c", 6461); @@ -3319,7 +3319,7 @@ void func_80942180(BossTw* this, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 100, 40, 00, (s16)this->workf[KM_GRND_CRTR_A]); gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 255, 245, 255, 128); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_019D40)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaFirePoolDL)); Matrix_ReplaceRotation(&play->billboardMtxF); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 6514), @@ -3331,7 +3331,7 @@ void func_80942180(BossTw* this, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 80, 0, 0, (s16)this->workf[KM_GD_SMOKE_A]); gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, 100); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_018FC0)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaFireSmokeDL)); gSPSegment(POLY_XLU_DISP++, 8, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (-this->work[CS_TIMER_1] * 3) & 0x7F, 0, 0x20, @@ -3342,7 +3342,7 @@ void func_80942180(BossTw* this, PlayState* play) { Matrix_Scale(this->workf[KM_GD_FLM_SCL], this->workf[KM_GD_FLM_SCL], this->workf[KM_GD_FLM_SCL], MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 6575), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_019938)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaBigFlameDL)); Matrix_Pop(); @@ -3366,19 +3366,19 @@ void func_809426F0(BossTw* this, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 6614), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); - if (this->actor.params == 0) { + if (this->actor.params == TW_KOTAKE) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 135, 175, 165, (s16)this->spawnPortalAlpha); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01CEE0)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaKotakeMagicSigilDL)); } else { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 0, (s16)this->spawnPortalAlpha); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01DBE8)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaKoumeMagicSigilDL)); } Matrix_Pop(); - if (this->actor.params == 0) { + if (this->actor.params == TW_KOTAKE) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, (s16)this->flameAlpha); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A998)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaIceMaterialDL)); } else { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 200, 20, 0, (s16)this->flameAlpha); gDPSetEnvColor(POLY_XLU_DISP++, 255, 215, 255, 128); @@ -3397,7 +3397,7 @@ void func_809426F0(BossTw* this, PlayState* play) { Matrix_ReplaceRotation(&play->billboardMtxF); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 6751), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A430)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaFireDL)); Matrix_Pop(); } @@ -3416,7 +3416,7 @@ void func_80942C70(Actor* thisx, PlayState* play) { Gfx_TexScroll(play->state.gfxCtx, 0, (u8)(this->work[CS_TIMER_1] * -0xF), 0x20, 0x40)); alpha = this->beamScale * 100.0f * 255.0f; - if (this->actor.params == 1) { + if (this->actor.params == TW_KOUME) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 60, alpha); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 128); } else { @@ -3431,7 +3431,7 @@ void func_80942C70(Actor* thisx, PlayState* play) { Matrix_Scale(this->beamScale, this->beamScale, (this->beamDist * 0.01f * 98.0f) / 20000.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 6846), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01DDF0)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaBeamDL)); if (this->beamReflectionDist > 10.0f) { Matrix_Translate(this->beamReflectionOrigin.x, this->beamReflectionOrigin.y, this->beamReflectionOrigin.z, @@ -3443,7 +3443,7 @@ void func_80942C70(Actor* thisx, PlayState* play) { MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 6870), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01DDF0)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaBeamDL)); } Matrix_Pop(); @@ -3463,7 +3463,7 @@ void func_80943028(Actor* thisx, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 6908), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01F608)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaHaloDL)); Gfx_SetupDL_44Xlu(play->state.gfxCtx); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, 200); Matrix_Translate(this->actor.world.pos.x, 240.0f, this->actor.world.pos.z, MTXMODE_NEW); @@ -3564,10 +3564,10 @@ void BossTw_Draw(Actor* thisx, PlayState* play2) { CLOSE_DISPS(play->state.gfxCtx, "../z_boss_tw.c", 7123); } -void* D_8094A9B0[] = { - object_tw_Tex_02A9B0, - object_tw_Tex_02A070, - object_tw_Tex_02A470, +void* sTwinrovaEyeTextures[] = { + gTwinrovaEyeOpenTex, + gTwinrovaEyeHalfTex, + gTwinrovaEyeClosedTex, }; s32 BossTw_TwinrovaOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { @@ -3576,53 +3576,53 @@ s32 BossTw_TwinrovaOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, OPEN_DISPS(play->state.gfxCtx, "../z_boss_tw.c", 7139); switch (limbIndex) { - case 21: + case TWINROVA_LIMB_HEAD: gSPSegment(POLY_OPA_DISP++, 0xC, Gfx_TexScroll(play->state.gfxCtx, 0, (s16)(f32)this->work[CS_TIMER_1], 8, 8)); - gSPSegment(POLY_OPA_DISP++, 8, SEGMENTED_TO_VIRTUAL(D_8094A9B0[this->eyeTexIdx])); - gSPSegment(POLY_OPA_DISP++, 9, SEGMENTED_TO_VIRTUAL(D_8094A9B0[this->leftEyeTexIdx])); + gSPSegment(POLY_OPA_DISP++, 8, SEGMENTED_TO_VIRTUAL(sTwinrovaEyeTextures[this->eyeTexIdx])); + gSPSegment(POLY_OPA_DISP++, 9, SEGMENTED_TO_VIRTUAL(sTwinrovaEyeTextures[this->leftEyeTexIdx])); gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, this->work[UNK_S8]); break; - case 17: - case 41: + case TWINROVA_LIMB_HAIR_FIRE_JET: + case TWINROVA_LIMB_BROOM_FIRE_JET: *dList = NULL; gSPSegment(POLY_XLU_DISP++, 0xA, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x20, 1, 0, -this->work[CS_TIMER_1] * 0xF, 0x20, 0x40)); break; - case 18: - case 42: + case TWINROVA_LIMB_HAIR_FIRE_TRAIL: + case TWINROVA_LIMB_BROOM_FIRE_TRAIL: *dList = NULL; gSPSegment(POLY_XLU_DISP++, 0xB, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x20, 1, 0, -this->work[CS_TIMER_1] * 0xA, 0x20, 0x40)); break; - case 16: - case 32: + case TWINROVA_LIMB_HAIR_ICE_JET: + case TWINROVA_LIMB_BROOM_ICE_JET: *dList = NULL; gSPSegment(POLY_XLU_DISP++, 8, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x20, 1, this->work[CS_TIMER_1], -this->work[CS_TIMER_1] * 7, 0x20, 0x40)); break; - case 15: - case 31: + case TWINROVA_LIMB_HAIR_ICE_TRAIL: + case TWINROVA_LIMB_BROOM_ICE_TRAIL: *dList = NULL; gSPSegment(POLY_XLU_DISP++, 9, Gfx_TexScroll(play->state.gfxCtx, 0, this->work[CS_TIMER_1], 0x20, 0x40)); break; - case 19: + case TWINROVA_LIMB_LEFT_HAIR_BUN: if (this->unk_5F8 != 0) { - *dList = object_tw_DL_02D940; + *dList = gTwinrovaLeftHairBunDL; } break; - case 20: + case TWINROVA_LIMB_RIGHT_HAIR_BUN: if (this->unk_5F8 != 0) { - *dList = object_tw_DL_02D890; + *dList = gTwinrovaRightHairBunDL; } break; } - if (this->unk_5F8 != 0 && ((limbIndex == 34) || (limbIndex == 40))) { + if ((this->unk_5F8 != 0) && ((limbIndex == TWINROVA_LIMB_LEFT_BROOM) || (limbIndex == TWINROVA_LIMB_RIGHT_BROOM))) { *dList = NULL; } @@ -3642,24 +3642,24 @@ void BossTw_TwinrovaPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve OPEN_DISPS(play->state.gfxCtx, "../z_boss_tw.c", 7262); switch (limbIndex) { - case 34: + case TWINROVA_LIMB_LEFT_BROOM: Matrix_MultVec3f(&D_8094A9D4, &this->leftScepterPos); break; - case 40: + case TWINROVA_LIMB_RIGHT_BROOM: Matrix_MultVec3f(&D_8094A9E0, &this->rightScepterPos); break; - case 21: + case TWINROVA_LIMB_HEAD: Matrix_MultVec3f(&D_8094A9BC, &this->actor.focus.pos); Matrix_MultVec3f(&D_8094A9C8, &this->crownPos); break; - case 15: - case 16: - case 17: - case 18: - case 31: - case 32: - case 41: - case 42: + case TWINROVA_LIMB_HAIR_ICE_TRAIL: + case TWINROVA_LIMB_HAIR_ICE_JET: + case TWINROVA_LIMB_HAIR_FIRE_JET: + case TWINROVA_LIMB_HAIR_FIRE_TRAIL: + case TWINROVA_LIMB_BROOM_ICE_TRAIL: + case TWINROVA_LIMB_BROOM_ICE_JET: + case TWINROVA_LIMB_BROOM_FIRE_JET: + case TWINROVA_LIMB_BROOM_FIRE_TRAIL: Matrix_Push(); Matrix_Scale(this->workf[UNK_F12], this->workf[UNK_F12], this->workf[UNK_F12], MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 7295), @@ -3718,21 +3718,21 @@ void BossTw_ShieldChargeDraw(BossTw* this, PlayState* play) { temp_a0 = (Math_SinS(this->work[CS_TIMER_1] * 2730 * temp_t0) * D_8094C854 * 0.5f) + (D_8094C854 * 0.5f); if (sShieldFireCharge != 0) { gDPSetEnvColor(POLY_XLU_DISP++, 255, 245, 255, temp_a0); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01E0E0)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaMirrorShieldFireChargeSidesDL)); gSPSegment(POLY_XLU_DISP++, 8, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (this->work[CS_TIMER_1] * 2) * temp_t0, 0, 0x20, 0x20, 1, (-this->work[CS_TIMER_1] * 2) * temp_t0, 0, 0x20, 0x20)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 100, 20, 0, (s16)D_8094C854); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01E020)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaMirrorShieldFireChargeCenterDL)); } else { gDPSetEnvColor(POLY_XLU_DISP++, 225, 255, 255, temp_a0); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01E3A0)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaMirrorShieldIceChargeSidesDL)); gSPSegment(POLY_XLU_DISP++, 8, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (-this->work[CS_TIMER_1] * 5) * temp_t0, 0x20, 0x40, 1, (this->work[CS_TIMER_1] * 4) * temp_t0, 0, 0x20, 0x20)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 175, 205, 195, (s16)D_8094C854); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01E2C0)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaMirrorShieldIceChargeCenterDL)); } } } @@ -3767,7 +3767,7 @@ void BossTw_ShieldChargeDraw(BossTw* this, PlayState* play) { gSPSegment(POLY_XLU_DISP++, 8, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, this->work[CS_TIMER_1] * D_8094C872, 0x20, 0x40, 1, 0, this->work[CS_TIMER_1] * D_8094C872, 0x20, 0x20)); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01E9F0)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaShieldAbsorbAndReflectEffectDL)); } Matrix_Pop(); @@ -3792,28 +3792,28 @@ void BossTw_SpawnPortalDraw(BossTw* this, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, (s16)this->spawnPortalAlpha); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 7582), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01EC68)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaSpawnPortalShadowDL)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 135, 175, 165, (s16)this->spawnPortalAlpha); Matrix_Translate(0.0f, 2.0f, 0.0f, MTXMODE_APPLY); Matrix_RotateX(M_PI / 2.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 7596), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01CEE0)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaKotakeMagicSigilDL)); Matrix_Translate(0.0f, 232.0f, 600.0f, MTXMODE_NEW); Matrix_Scale(this->spawnPortalScale, this->spawnPortalScale, this->spawnPortalScale, MTXMODE_APPLY); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, (s16)this->spawnPortalAlpha); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 7617), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01EC68)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaSpawnPortalShadowDL)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 0, (s16)this->spawnPortalAlpha); Matrix_Translate(0.0f, 2.0f, 0.0f, MTXMODE_APPLY); Matrix_RotateX(M_PI / 2.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 7631), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01DBE8)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaKoumeMagicSigilDL)); Matrix_Pop(); @@ -3833,7 +3833,7 @@ void func_80944C50(BossTw* this, PlayState* play) { Matrix_Scale(this->workf[UNK_F19], this->workf[UNK_F19], this->workf[UNK_F19], MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 7671), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01F390)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaLightCircleDL)); Matrix_Pop(); gSPSegment(POLY_XLU_DISP++, 8, @@ -3842,7 +3842,7 @@ void func_80944C50(BossTw* this, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s16)this->workf[UNK_F18] / 2); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 7694), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01F238)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaLightRaysDL)); gSPSegment(POLY_XLU_DISP++, 8, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, -sKoumePtr->work[CS_TIMER_1] * 5, @@ -3856,7 +3856,7 @@ void func_80944C50(BossTw* this, PlayState* play) { Matrix_Scale(scale, 1.0f, scale, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 7728), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01EEB0)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaLightPillarDL)); Matrix_Pop(); CLOSE_DISPS(play->state.gfxCtx, "../z_boss_tw.c", 7732); @@ -4253,13 +4253,14 @@ void BossTw_BlastIce(BossTw* this, PlayState* play) { accel.x = 0.0f; accel.y = 0.13f; accel.z = 0.0f; - BossTw_AddDmgCloud(play, 3, &pos, &velocity, &accel, Rand_ZeroFloat(5.0f) + 20.0f, 0, 0, 80); + BossTw_AddDmgCloud(play, TWEFF_3, &pos, &velocity, &accel, Rand_ZeroFloat(5.0f) + 20.0f, 0, 0, 80); velocity.x = Rand_CenteredFloat(10.0f); velocity.z = Rand_CenteredFloat(10.0f); velocity.y = Rand_ZeroFloat(3.0f) + 3.0f; pos.x = sKotakePtr->groundBlastPos2.x + (velocity.x * 0.5f); pos.z = sKotakePtr->groundBlastPos2.z + (velocity.z * 0.5f); - BossTw_AddDmgCloud(play, 3, &pos, &velocity, &accel, Rand_ZeroFloat(5.0f) + 15.0f, 255, 2, 130); + BossTw_AddDmgCloud(play, TWEFF_3, &pos, &velocity, &accel, Rand_ZeroFloat(5.0f) + 15.0f, 255, 2, + 130); } Math_ApproachF(&sKotakePtr->workf[UNK_F9], 80.0f, 1.0f, 3.0f); @@ -4292,7 +4293,8 @@ void BossTw_BlastIce(BossTw* this, PlayState* play) { accel.x = 0.0f; accel.y = 0.13f; accel.z = 0.0f; - BossTw_AddDmgCloud(play, 3, &pos, &velocity, &accel, Rand_ZeroFloat(5.0f) + 20, 0, 0, 80); + BossTw_AddDmgCloud(play, TWEFF_3, &pos, &velocity, &accel, Rand_ZeroFloat(5.0f) + 20, 0, 0, + 80); } } sp80 = 3.0f; @@ -4456,7 +4458,7 @@ void BossTw_BlastDraw(Actor* thisx, PlayState* play2) { Matrix_ReplaceRotation(&play->billboardMtxF); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 8865), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A430)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaFireDL)); } break; @@ -4465,7 +4467,7 @@ void BossTw_BlastDraw(Actor* thisx, PlayState* play2) { case TW_ICE_BLAST: gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, (s8)this->workf[TAIL_ALPHA]); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A998)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaIceMaterialDL)); for (i = 9; i >= 0; i--) { gSPSegment(POLY_XLU_DISP++, 8, Gfx_TwoTexScroll( @@ -4480,7 +4482,7 @@ void BossTw_BlastDraw(Actor* thisx, PlayState* play2) { Matrix_ReplaceRotation(&play->billboardMtxF); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 9004), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01AB00)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaIceModelDL)); } break; @@ -4520,11 +4522,11 @@ void BossTw_DrawDeathBall(Actor* thisx, PlayState* play2) { Matrix_ReplaceRotation(&play->billboardMtxF); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 9071), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A430)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaFireDL)); } } else { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, (s8)this->workf[TAIL_ALPHA]); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A998)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaIceMaterialDL)); for (i = 9; i >= 0; i--) { gSPSegment(POLY_XLU_DISP++, 8, @@ -4540,7 +4542,7 @@ void BossTw_DrawDeathBall(Actor* thisx, PlayState* play2) { Matrix_ReplaceRotation(&play->billboardMtxF); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 9107), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01AB00)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaIceModelDL)); } } @@ -4573,7 +4575,7 @@ void BossTw_UpdateEffects(PlayState* play) { Actor* unk44; for (i = 0; i < BOSS_TW_EFFECT_COUNT; i++) { - if (eff->type != 0) { + if (eff->type != TWEFF_NONE) { eff->pos.x += eff->curSpeed.x; eff->pos.y += eff->curSpeed.y; eff->pos.z += eff->curSpeed.z; @@ -4582,7 +4584,7 @@ void BossTw_UpdateEffects(PlayState* play) { eff->curSpeed.y += eff->accel.y; eff->curSpeed.z += eff->accel.z; - if (eff->type == 1) { + if (eff->type == TWEFF_DOT) { colorIdx = eff->frame % 4; if (eff->work[EFF_ARGS] == 0) { @@ -4599,7 +4601,7 @@ void BossTw_UpdateEffects(PlayState* play) { eff->type = TWEFF_NONE; } - } else if ((eff->type == 3) || (eff->type == 2)) { + } else if ((eff->type == TWEFF_3) || (eff->type == TWEFF_2)) { if (eff->work[EFF_ARGS] == 2) { eff->alpha -= 20; if (eff->alpha <= 0) { @@ -4763,7 +4765,7 @@ void BossTw_UpdateEffects(PlayState* play) { } BossTw_AddFlameEffect(play, &eff->pos, &sZeroVector, &sZeroVector, 10, eff->work[EFF_ARGS]); - } else if (eff->type == 4) { + } else if (eff->type == TWEFF_RING) { if (eff->work[EFF_UNKS1] == 0) { Math_ApproachF(&eff->workf[EFF_SCALE], eff->workf[EFF_DIST], 0.05f, 1.0f); @@ -4851,8 +4853,8 @@ void BossTw_UpdateEffects(PlayState* play) { spA8.y = 0.1f; spA8.z = 0.0f; - BossTw_AddDmgCloud(play, 3, &spC0, &spB4, &spA8, phi_f22 + Rand_ZeroFloat(phi_f22 * 0.5f), 0, 0, - 150); + BossTw_AddDmgCloud(play, TWEFF_3, &spC0, &spB4, &spA8, phi_f22 + Rand_ZeroFloat(phi_f22 * 0.5f), + 0, 0, 150); } } } @@ -4905,9 +4907,9 @@ void BossTw_DrawEffects(PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); for (i = 0; i < BOSS_TW_EFFECT_COUNT; i++) { - if (currentEffect->type == 1) { + if (currentEffect->type == TWEFF_DOT) { if (materialFlag == 0) { - gSPDisplayList(POLY_XLU_DISP++, object_tw_DL_01A528); + gSPDisplayList(POLY_XLU_DISP++, gTwinrovaMagicParticleMaterialDL); materialFlag++; } @@ -4918,7 +4920,7 @@ void BossTw_DrawEffects(PlayState* play) { Matrix_Scale(currentEffect->workf[EFF_SCALE], currentEffect->workf[EFF_SCALE], 1.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_tw.c", 9617), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, object_tw_DL_01A5A8); + gSPDisplayList(POLY_XLU_DISP++, gTwinrovaMagicParticleModelDL); } currentEffect++; @@ -4928,9 +4930,9 @@ void BossTw_DrawEffects(PlayState* play) { currentEffect = effectHead; for (i = 0; i < BOSS_TW_EFFECT_COUNT; i++) { - if (currentEffect->type == 3) { + if (currentEffect->type == TWEFF_3) { if (materialFlag == 0) { - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A998)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaIceMaterialDL)); materialFlag++; } @@ -4943,7 +4945,7 @@ void BossTw_DrawEffects(PlayState* play) { Matrix_Scale(currentEffect->workf[EFF_SCALE], currentEffect->workf[EFF_SCALE], 1.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_tw.c", 9660), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01AB00)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaIceModelDL)); } currentEffect++; } @@ -4952,7 +4954,7 @@ void BossTw_DrawEffects(PlayState* play) { currentEffect = effectHead; for (i = 0; i < BOSS_TW_EFFECT_COUNT; i++) { - if (currentEffect->type == 2) { + if (currentEffect->type == TWEFF_2) { if (materialFlag == 0) { gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 255, 215, 255, 128); @@ -4968,7 +4970,7 @@ void BossTw_DrawEffects(PlayState* play) { Matrix_Scale(currentEffect->workf[EFF_SCALE], currentEffect->workf[EFF_SCALE], 1.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_tw.c", 9709), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A430)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaFireDL)); } currentEffect++; @@ -4978,7 +4980,7 @@ void BossTw_DrawEffects(PlayState* play) { currentEffect = effectHead; for (i = 0; i < BOSS_TW_EFFECT_COUNT; i++) { - if (currentEffect->type == 4) { + if (currentEffect->type == TWEFF_RING) { if (materialFlag == 0) { materialFlag++; } @@ -5013,7 +5015,7 @@ void BossTw_DrawEffects(PlayState* play) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_AA_ZB_XLU_SURF2); gSPClearGeometryMode(POLY_XLU_DISP++, G_CULL_BACK | G_FOG); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A790)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaEffectHaloDL)); } currentEffect++; @@ -5028,7 +5030,7 @@ void BossTw_DrawEffects(PlayState* play) { if (currentEffect->type == TWEFF_PLYR_FRZ) { if (materialFlag == 0) { - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01AA50)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaIceSurroundingPlayerMaterialDL)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, 255); gSPSegment( POLY_XLU_DISP++, 8, @@ -5059,7 +5061,7 @@ void BossTw_DrawEffects(PlayState* play) { Matrix_RotateX((BossTw_RandZeroOne() - 0.5f) * M_PI * 0.5f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_tw.c", 9855), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01AB00)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaIceModelDL)); } } @@ -5070,10 +5072,10 @@ void BossTw_DrawEffects(PlayState* play) { currentEffect = effectHead; for (i = 0; i < BOSS_TW_EFFECT_COUNT; i++) { - if (currentEffect->type >= 6) { + if (currentEffect->type >= TWEFF_FLAME) { if (currentEffect->work[EFF_ARGS] == 0) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, currentEffect->alpha); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A998)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaIceMaterialDL)); } else { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 200, 20, 0, currentEffect->alpha); gDPPipeSync(POLY_XLU_DISP++); @@ -5090,9 +5092,9 @@ void BossTw_DrawEffects(PlayState* play) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (currentEffect->work[EFF_ARGS] == 0) { - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01AB00)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaIceModelDL)); } else { - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A430)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaFireDL)); } } @@ -5104,7 +5106,7 @@ void BossTw_DrawEffects(PlayState* play) { void BossTw_TwinrovaSetupArriveAtTarget(BossTw* this, PlayState* play) { this->actionFunc = BossTw_TwinrovaArriveAtTarget; - Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_032BF8, -3.0f); + Animation_MorphToLoop(&this->skelAnime, &gTwinrovaHoverAnim, -3.0f); this->work[CS_TIMER_1] = Rand_ZeroFloat(100.0f); this->timers[1] = 25; this->rotateSpeed = 0.0f; @@ -5127,8 +5129,8 @@ void BossTw_TwinrovaArriveAtTarget(BossTw* this, PlayState* play) { void BossTw_TwinrovaSetupChargeBlast(BossTw* this, PlayState* play) { this->actionFunc = BossTw_TwinrovaChargeBlast; - Animation_MorphToPlayOnce(&this->skelAnime, &object_tw_Anim_036FBC, -5.0f); - this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&object_tw_Anim_036FBC); + Animation_MorphToPlayOnce(&this->skelAnime, &gTwinrovaWindUpAnim, -5.0f); + this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&gTwinrovaWindUpAnim); this->csState1 = 0; } @@ -5160,12 +5162,12 @@ void BossTw_TwinrovaSetupShootBlast(BossTw* this, PlayState* play) { this->actionFunc = BossTw_TwinrovaShootBlast; if (sTwinrovaBlastType == 0) { - Animation_MorphToPlayOnce(&this->skelAnime, &object_tw_Anim_022700, 0.0f); + Animation_MorphToPlayOnce(&this->skelAnime, &gTwinrovaIceAttackAnim, 0.0f); } else { - Animation_MorphToPlayOnce(&this->skelAnime, &object_tw_Anim_023750, 0.0f); + Animation_MorphToPlayOnce(&this->skelAnime, &gTwinrovaFireAttackAnim, 0.0f); } - this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&object_tw_Anim_023750); + this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&gTwinrovaFireAttackAnim); } void BossTw_TwinrovaShootBlast(BossTw* this, PlayState* play) { @@ -5222,7 +5224,7 @@ void BossTw_TwinrovaShootBlast(BossTw* this, PlayState* play) { void BossTw_TwinrovaSetupDoneBlastShoot(BossTw* this, PlayState* play) { this->actionFunc = BossTw_TwinrovaDoneBlastShoot; - Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_032BF8, -10.0f); + Animation_MorphToLoop(&this->skelAnime, &gTwinrovaHoverAnim, -10.0f); this->timers[1] = 60; } @@ -5243,7 +5245,7 @@ void BossTw_TwinrovaDoneBlastShoot(BossTw* this, PlayState* play) { void BossTw_TwinrovaDamage(BossTw* this, PlayState* play, u8 damage) { if (this->actionFunc != BossTw_TwinrovaStun) { - Animation_MorphToPlayOnce(&this->skelAnime, &object_tw_Anim_0338F0, -15.0f); + Animation_MorphToPlayOnce(&this->skelAnime, &gTwinrovaChargedAttackHitAnim, -15.0f); this->timers[0] = 150; this->timers[1] = 20; this->csState1 = 0; @@ -5251,8 +5253,8 @@ void BossTw_TwinrovaDamage(BossTw* this, PlayState* play, u8 damage) { } else { this->work[FOG_TIMER] = 10; this->work[INVINC_TIMER] = 20; - Animation_MorphToPlayOnce(&this->skelAnime, &object_tw_Anim_024374, -3.0f); - this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&object_tw_Anim_024374); + Animation_MorphToPlayOnce(&this->skelAnime, &gTwinrovaDamageAnim, -3.0f); + this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&gTwinrovaDamageAnim); this->csState1 = 1; if ((s8)(this->actor.colChkInfo.health -= damage) < 0) { @@ -5279,7 +5281,7 @@ void BossTw_TwinrovaStun(BossTw* this, PlayState* play) { this->unk_5F8 = 1; this->actor.flags |= ACTOR_FLAG_10; - cloudType = sTwinrovaBlastType == 0 ? 3 : 2; + cloudType = sTwinrovaBlastType == 0 ? TWEFF_3 : TWEFF_2; if ((this->work[CS_TIMER_1] % 8) == 0) { Vec3f pos; @@ -5314,12 +5316,12 @@ void BossTw_TwinrovaStun(BossTw* this, PlayState* play) { if (this->csState1 == 0) { if (this->timers[1] == 0) { this->csState1 = 1; - this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&object_tw_Anim_0343B4); - Animation_Change(&this->skelAnime, &object_tw_Anim_0343B4, 1.0f, 0.0f, this->workf[ANIM_SW_TGT], 3, 0.0f); + this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&gTwinrovaStunStartAnim); + Animation_Change(&this->skelAnime, &gTwinrovaStunStartAnim, 1.0f, 0.0f, this->workf[ANIM_SW_TGT], 3, 0.0f); } } else if (Animation_OnFrame(&this->skelAnime, this->workf[ANIM_SW_TGT])) { this->workf[ANIM_SW_TGT] = 1000.0f; - Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_035030, 0.0f); + Animation_MorphToLoop(&this->skelAnime, &gTwinrovaStunLoopAnim, 0.0f); } if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { @@ -5332,8 +5334,8 @@ void BossTw_TwinrovaStun(BossTw* this, PlayState* play) { } void BossTw_TwinrovaSetupGetUp(BossTw* this, PlayState* play) { - Animation_MorphToPlayOnce(&this->skelAnime, &object_tw_Anim_035988, 0.0f); - this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&object_tw_Anim_035988); + Animation_MorphToPlayOnce(&this->skelAnime, &gTwinrovaStunEndAnim, 0.0f); + this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&gTwinrovaStunEndAnim); this->actionFunc = BossTw_TwinrovaGetUp; this->timers[0] = 50; } @@ -5344,7 +5346,7 @@ void BossTw_TwinrovaGetUp(BossTw* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, this->workf[ANIM_SW_TGT])) { this->workf[ANIM_SW_TGT] = 1000.0f; - Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_032BF8, 0.0f); + Animation_MorphToLoop(&this->skelAnime, &gTwinrovaHoverAnim, 0.0f); } if (this->timers[0] == 0) { @@ -5378,7 +5380,7 @@ void BossTw_TwinrovaSetupFly(BossTw* this, PlayState* play) { this->actor.world.rot.y = RAD_TO_BINANG(Math_FAtan2F(xDiff, zDiff)); xzDist = sqrtf(SQ(xDiff) + SQ(zDiff)); this->actor.world.rot.x = RAD_TO_BINANG(Math_FAtan2F(yDiff, xzDist)); - Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_032BF8, -10.0f); + Animation_MorphToLoop(&this->skelAnime, &gTwinrovaHoverAnim, -10.0f); } void BossTw_TwinrovaFly(BossTw* this, PlayState* play) { @@ -5414,7 +5416,7 @@ void BossTw_TwinrovaFly(BossTw* this, PlayState* play) { void BossTw_TwinrovaSetupSpin(BossTw* this, PlayState* play) { this->actionFunc = BossTw_TwinrovaSpin; - Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_032BF8, 0.0f); + Animation_MorphToLoop(&this->skelAnime, &gTwinrovaHoverAnim, 0.0f); this->timers[0] = 20; this->actor.speedXZ = 0.0f; } @@ -5435,8 +5437,8 @@ void BossTw_TwinrovaSpin(BossTw* this, PlayState* play) { void BossTw_TwinrovaSetupLaugh(BossTw* this, PlayState* play) { this->actionFunc = BossTw_TwinrovaLaugh; - Animation_MorphToPlayOnce(&this->skelAnime, &object_tw_Anim_03A2D0, 0.0f); - this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&object_tw_Anim_03A2D0); + Animation_MorphToPlayOnce(&this->skelAnime, &gTwinrovaLaughAnim, 0.0f); + this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&gTwinrovaLaughAnim); this->actor.speedXZ = 0.0f; } diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h index ebffaaeafa..9007ea93b4 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h @@ -55,6 +55,54 @@ typedef enum { /* 26 */ FWORK_MAX } TwFwork; +typedef enum { + /* 0 */ TWINROVA_LIMB_NONE, + /* 1 */ TWINROVA_LIMB_PELVIS, + /* 2 */ TWINROVA_LIMB_SASH_1, + /* 3 */ TWINROVA_LIMB_SASH_2, + /* 4 */ TWINROVA_LIMB_SASH_3, + /* 5 */ TWINROVA_LIMB_SASH_4, + /* 6 */ TWINROVA_LIMB_LEFT_THIGH, + /* 7 */ TWINROVA_LIMB_LEFT_SHIN, + /* 8 */ TWINROVA_LIMB_LEFT_FOOT, + /* 9 */ TWINROVA_LIMB_RIGHT_THIGH, + /* 10 */ TWINROVA_LIMB_RIGHT_SHIN, + /* 11 */ TWINROVA_LIMB_RIGHT_FOOT, + /* 12 */ TWINROVA_LIMB_TORSO, + /* 13 */ TWINROVA_LIMB_LEFT_BREAST, + /* 14 */ TWINROVA_LIMB_RIGHT_BREAST, + /* 15 */ TWINROVA_LIMB_HAIR_ICE_TRAIL, + /* 16 */ TWINROVA_LIMB_HAIR_ICE_JET, + /* 17 */ TWINROVA_LIMB_HAIR_FIRE_JET, + /* 18 */ TWINROVA_LIMB_HAIR_FIRE_TRAIL, + /* 19 */ TWINROVA_LIMB_LEFT_HAIR_BUN, + /* 20 */ TWINROVA_LIMB_RIGHT_HAIR_BUN, + /* 21 */ TWINROVA_LIMB_HEAD, + /* 22 */ TWINROVA_LIMB_RIGHT_BRAID_START, + /* 23 */ TWINROVA_LIMB_RIGHT_BRAID_END, + /* 24 */ TWINROVA_LIMB_LEFT_BRAID_START, + /* 25 */ TWINROVA_LIMB_LEFT_BRAID_END, + /* 26 */ TWINROVA_LIMB_LEFT_SHOULDER, + /* 27 */ TWINROVA_LIMB_LEFT_UPPER_ARM, + /* 28 */ TWINROVA_LIMB_LEFT_FOREARM, + /* 29 */ TWINROVA_LIMB_LEFT_SLEEVE_START, + /* 30 */ TWINROVA_LIMB_LEFT_SLEEVE_END, + /* 31 */ TWINROVA_LIMB_BROOM_ICE_TRAIL, + /* 32 */ TWINROVA_LIMB_BROOM_ICE_JET, + /* 33 */ TWINROVA_LIMB_LEFT_HAND, + /* 34 */ TWINROVA_LIMB_LEFT_BROOM, + /* 35 */ TWINROVA_LIMB_RIGHT_SHOULDER, + /* 36 */ TWINROVA_LIMB_RIGHT_UPPER_ARM, + /* 37 */ TWINROVA_LIMB_RIGHT_FOREARM, + /* 38 */ TWINROVA_LIMB_RIGHT_SLEEVE_START, + /* 39 */ TWINROVA_LIMB_RIGHT_SLEEVE_END, + /* 40 */ TWINROVA_LIMB_RIGHT_BROOM, + /* 41 */ TWINROVA_LIMB_BROOM_FIRE_JET, + /* 42 */ TWINROVA_LIMB_BROOM_FIRE_TRAIL, + /* 43 */ TWINROVA_LIMB_RIGHT_HAND, + /* 44 */ TWINROVA_LIMB_MAX +} TwinrovaLimb; + typedef struct BossTw { /* 0x0000 */ Actor actor; /* 0x014C */ BossTwActionFunc actionFunc;