mirror of
https://github.com/zeldaret/mm.git
synced 2026-09-07 19:10:38 -04:00
sys_matrix OK, documented, rename some other mathematics functions (#787)
* Import data and bss, add some name options * Decomp rest of stack functions, remove RSPMatrix, split header * sys_matrix OK (thanks Tharo) Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * pragma weaks in sinf and cosf, change documentation change mcros to use 0x8000 * Rename sinf and cosf * Correct initialisation of sMtxFClear * More minor cleanup * Rename stack functions * Matrix_InsertMatrix -> Matrix_Mult * The big transpose rename * Fix MirRay_DrawReflectedBeam * Matrix_InsertTranslation -> Matrix_Translate * Matrix_Insert.Rotation_s -> Matrix_Rotate$1S + RotateY -> RotateYS * Matrix_Insert(.)Rotation_f -> Matrix_Rotate$1F * Matrix_RotateStateAroundXAxis -> Matrix_RotateXFApply Matrix_SetStateXRotation -> Matrix_RotateXFNew * Matrix_MultiplyVector3fByState -> Matrix_MultVec3f * Matrix_MultiplyVector3fXZByCurrentState -> Matrix_MultVec3fXZ * Matrix_GetStateTranslation -> Matrix_MultZero * Matrix_GetStateTranslationAndScaled(.) -> Matrix_MultVec$1 * Matrix_FromRSPMatrix -> Matrix_MtxToMtxF * Matrix_MultiplyVector3fByMatrix -> Matrix_MultVec3fExt * Matrix_TransposeXYZ -> Matrix_Transpose * Matrix_ToRSPMatrix -> Matrix_MtxFToMtx * Matrix_AppendToPolyOpaDisp -> Matrix_MtxFToNewMtx and document the conversion functions * Matrix_NormalizeXYZ -> Matrix_ReplaceRotation * Matrix_InsertRotationAroundUnitVector_f -> Matrix_RotateAxisF and S * Matrix_InsertRotation -> Matrix_RotateZYX * Document the last functions * Small cleanup * Matrix_JointPosition -> Matrix_TranslateRotateZYX * Matrix_SetStateRotationAndTranslation -> Matrix_SetTranslateRotateYXZ * func_8018219C -> Matrix_MtxFToYXZRot * func_801822C4 -> Matrix_MtxFToZYXRot * Fix files * Format * Review 1 * Renames * Fix warning in EnDragon * Format * Convert `mode` to an actual enum * Add enums, typedefs, externs to sys_matrix header * Review * One more * More review * Fix function names * Format * Fix names * Format * Review * engineer's review * Fix build * Format * Fix again Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
This commit is contained in:
@@ -309,14 +309,14 @@ void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
if ((ArmsHook_Shoot != this->actionFunc) || (this->timer <= 0)) {
|
||||
Matrix_MultiplyVector3fByState(&D_808C1C10, &this->unk1E0);
|
||||
Matrix_MultiplyVector3fByState(&D_808C1C28, &sp5C);
|
||||
Matrix_MultiplyVector3fByState(&D_808C1C34, &sp50);
|
||||
Matrix_MultVec3f(&D_808C1C10, &this->unk1E0);
|
||||
Matrix_MultVec3f(&D_808C1C28, &sp5C);
|
||||
Matrix_MultVec3f(&D_808C1C34, &sp50);
|
||||
this->unk1C4.active = false;
|
||||
} else {
|
||||
Matrix_MultiplyVector3fByState(&D_808C1C1C, &this->unk1E0);
|
||||
Matrix_MultiplyVector3fByState(&D_808C1C40, &sp5C);
|
||||
Matrix_MultiplyVector3fByState(&D_808C1C4C, &sp50);
|
||||
Matrix_MultVec3f(&D_808C1C1C, &this->unk1E0);
|
||||
Matrix_MultVec3f(&D_808C1C40, &sp5C);
|
||||
Matrix_MultVec3f(&D_808C1C4C, &sp50);
|
||||
}
|
||||
func_80126440(globalCtx, &this->collider, &this->unk1C4, &sp5C, &sp50);
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
@@ -324,13 +324,12 @@ void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_link_child_DL_01D960);
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Math_Vec3f_Diff(&player->rightHandWorld.pos, &this->actor.world.pos, &sp68);
|
||||
sp48 = SQXZ(sp68);
|
||||
sp4C = sqrtf(SQXZ(sp68));
|
||||
Matrix_RotateY(Math_Atan2S(sp68.x, sp68.z), MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(Math_Atan2S(-sp68.y, sp4C), MTXMODE_APPLY);
|
||||
Matrix_RotateYS(Math_Atan2S(sp68.x, sp68.z), MTXMODE_APPLY);
|
||||
Matrix_RotateXS(Math_Atan2S(-sp68.y, sp4C), MTXMODE_APPLY);
|
||||
f0 = sqrtf(SQ(sp68.y) + sp48);
|
||||
Matrix_Scale(0.015f, 0.015f, f0 * 0.01f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -225,15 +225,15 @@ void FireArrow_SetQuadVerticies(ArrowFire* this) {
|
||||
Vec3f sp2C;
|
||||
Vec3f sp20;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&D_80922284, &sp44);
|
||||
Matrix_MultiplyVector3fByState(&D_80922290, &sp38);
|
||||
Matrix_MultiplyVector3fByState(&D_8092229C, &sp2C);
|
||||
Matrix_MultiplyVector3fByState(&D_809222A8, &sp20);
|
||||
Matrix_MultVec3f(&D_80922284, &sp44);
|
||||
Matrix_MultVec3f(&D_80922290, &sp38);
|
||||
Matrix_MultVec3f(&D_8092229C, &sp2C);
|
||||
Matrix_MultVec3f(&D_809222A8, &sp20);
|
||||
Collider_SetQuadVertices(&this->collider1, &sp44, &sp38, &sp2C, &sp20);
|
||||
Matrix_MultiplyVector3fByState(&D_809222B4, &sp44);
|
||||
Matrix_MultiplyVector3fByState(&D_809222C0, &sp38);
|
||||
Matrix_MultiplyVector3fByState(&D_809222CC, &sp2C);
|
||||
Matrix_MultiplyVector3fByState(&D_809222D8, &sp20);
|
||||
Matrix_MultVec3f(&D_809222B4, &sp44);
|
||||
Matrix_MultVec3f(&D_809222C0, &sp38);
|
||||
Matrix_MultVec3f(&D_809222CC, &sp2C);
|
||||
Matrix_MultVec3f(&D_809222D8, &sp20);
|
||||
Collider_SetQuadVertices(&this->collider2, &sp44, &sp38, &sp2C, &sp20);
|
||||
}
|
||||
|
||||
@@ -249,10 +249,10 @@ void ArrowFire_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Actor* transform = (arrow->unk_261 & 2) ? &this->actor : &arrow->actor;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
Matrix_InsertTranslation(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(transform->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(transform->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(transform->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(transform->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(transform->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(transform->shape.rot.z, MTXMODE_APPLY);
|
||||
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
if (this->screenFillIntensity > 0.0f) {
|
||||
@@ -271,16 +271,16 @@ void ArrowFire_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 200, 0, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 128);
|
||||
|
||||
Matrix_InsertRotation(0x4000, 0, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(0x4000, 0, 0, MTXMODE_APPLY);
|
||||
|
||||
if (this->timer != 0) {
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_InsertTranslation(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
Matrix_Scale(this->radius * 0.2f, this->height * 4.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
|
||||
@@ -196,10 +196,10 @@ void ArrowIce_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_InsertTranslation(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(transform->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(transform->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(transform->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(transform->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(transform->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(transform->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
|
||||
// Draw blue effect over the screen when arrow hits
|
||||
@@ -217,14 +217,14 @@ void ArrowIce_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 170, 255, 255, (s32)(this->alpha * 0.5f) & 0xFF);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 255, 128);
|
||||
Matrix_InsertRotation(0x4000, 0, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(0x4000, 0, 0, MTXMODE_APPLY);
|
||||
if (this->timer != 0) {
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_InsertTranslation(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
Matrix_Scale(this->radius * 0.2f, this->height * 3.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gIceArrowMaterialDL);
|
||||
gSPDisplayList(POLY_XLU_DISP++,
|
||||
|
||||
@@ -190,10 +190,10 @@ void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_InsertTranslation(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(transform->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(transform->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(transform->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(transform->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(transform->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(transform->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
if (this->screenFillIntensity > 0.0f) {
|
||||
POLY_XLU_DISP = func_8012BFC4(POLY_XLU_DISP);
|
||||
@@ -210,14 +210,14 @@ void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 170, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 128);
|
||||
|
||||
Matrix_InsertRotation(0x4000, 0, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(0x4000, 0, 0, MTXMODE_APPLY);
|
||||
if (this->timer != 0) {
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_InsertTranslation(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
Matrix_Scale(this->radius * 0.2f, this->height * 4.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gLightArrowMaterialDL);
|
||||
|
||||
@@ -74,15 +74,15 @@ void BgCtowerGear_Splash(BgCtowerGear* this, GlobalContext* globalCtx) {
|
||||
s16 rotZ = this->dyna.actor.shape.rot.z & 0x1FFF;
|
||||
|
||||
if (flag40 && (rotZ < 0x1B58) && (rotZ >= 0x1388)) {
|
||||
Matrix_RotateY(this->dyna.actor.home.rot.y, MTXMODE_NEW);
|
||||
Matrix_InsertXRotation_s(this->dyna.actor.home.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->dyna.actor.home.rot.z, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->dyna.actor.home.rot.y, MTXMODE_NEW);
|
||||
Matrix_RotateXS(this->dyna.actor.home.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->dyna.actor.home.rot.z, MTXMODE_APPLY);
|
||||
for (i = 0; i < 4; i++) {
|
||||
if ((u32)Rand_Next() >= 0x40000000) {
|
||||
splashOffset.x = sExitSplashOffsets[i].x - (Rand_ZeroOne() * 30.0f);
|
||||
splashOffset.y = sExitSplashOffsets[i].y;
|
||||
splashOffset.z = sExitSplashOffsets[i].z;
|
||||
Matrix_MultiplyVector3fByState(&splashOffset, &splashSpawnPos);
|
||||
Matrix_MultVec3f(&splashOffset, &splashSpawnPos);
|
||||
splashSpawnPos.x += this->dyna.actor.world.pos.x + ((Rand_ZeroOne() * 20.0f) - 10.0f);
|
||||
splashSpawnPos.y += this->dyna.actor.world.pos.y;
|
||||
splashSpawnPos.z += this->dyna.actor.world.pos.z + ((Rand_ZeroOne() * 20.0f) - 10.0f);
|
||||
@@ -92,15 +92,15 @@ void BgCtowerGear_Splash(BgCtowerGear* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
if ((rotZ < 0x1F4) && (rotZ >= 0)) {
|
||||
if (flag40) {
|
||||
Matrix_RotateY(this->dyna.actor.home.rot.y, MTXMODE_NEW);
|
||||
Matrix_InsertXRotation_s(this->dyna.actor.home.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->dyna.actor.home.rot.z, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->dyna.actor.home.rot.y, MTXMODE_NEW);
|
||||
Matrix_RotateXS(this->dyna.actor.home.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->dyna.actor.home.rot.z, MTXMODE_APPLY);
|
||||
for (i = 0; i < 3; i++) {
|
||||
for (j = 0; j < 2; j++) {
|
||||
splashOffset.x = sEnterSplashOffsets[i].x + (Rand_ZeroOne() * 10.0f);
|
||||
splashOffset.y = sEnterSplashOffsets[i].y;
|
||||
splashOffset.z = sEnterSplashOffsets[i].z;
|
||||
Matrix_MultiplyVector3fByState(&splashOffset, &splashSpawnPos);
|
||||
Matrix_MultVec3f(&splashOffset, &splashSpawnPos);
|
||||
splashSpawnPos.x += this->dyna.actor.world.pos.x + ((Rand_ZeroOne() * 20.0f) - 10.0f);
|
||||
splashSpawnPos.y += this->dyna.actor.world.pos.y;
|
||||
splashSpawnPos.z += this->dyna.actor.world.pos.z + ((Rand_ZeroOne() * 20.0f) - 10.0f);
|
||||
|
||||
@@ -110,22 +110,22 @@ void func_80B823B0(BgDblueBalance* this) {
|
||||
s32 pad;
|
||||
Vec3f sp28;
|
||||
|
||||
Matrix_InsertTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->dyna.actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->dyna.actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->dyna.actor.shape.rot.z, MTXMODE_APPLY);
|
||||
|
||||
sp28.x = -138.28f;
|
||||
sp28.y = 0.0f;
|
||||
sp28.z = 0.0f;
|
||||
|
||||
if (this->unk_15C != NULL) {
|
||||
Matrix_MultiplyVector3fByState(&sp28, &this->unk_15C->dyna.actor.world.pos);
|
||||
Matrix_MultVec3f(&sp28, &this->unk_15C->dyna.actor.world.pos);
|
||||
}
|
||||
|
||||
sp28.x = 138.28f;
|
||||
if (this->unk_160 != NULL) {
|
||||
Matrix_MultiplyVector3fByState(&sp28, &this->unk_160->dyna.actor.world.pos);
|
||||
Matrix_MultVec3f(&sp28, &this->unk_160->dyna.actor.world.pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,16 +136,16 @@ s32 func_80B82454(BgDblueBalance* this, GlobalContext* globalCtx) {
|
||||
Vec3f sp48;
|
||||
Vec3f sp3C;
|
||||
|
||||
Matrix_InsertTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->dyna.actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->dyna.actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->dyna.actor.shape.rot.z, MTXMODE_APPLY);
|
||||
|
||||
sp48.x = -138.28f;
|
||||
sp48.y = 0.0f;
|
||||
sp48.z = 0.0f;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp48, &sp3C);
|
||||
Matrix_MultVec3f(&sp48, &sp3C);
|
||||
|
||||
this->unk_15C = (BgDblueBalance*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_BG_DBLUE_BALANCE, sp3C.x,
|
||||
sp3C.y, sp3C.z, 0, this->dyna.actor.shape.rot.y, 0, 0x100);
|
||||
@@ -157,7 +157,7 @@ s32 func_80B82454(BgDblueBalance* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
sp48.x = 138.28f;
|
||||
Matrix_MultiplyVector3fByState(&sp48, &sp3C);
|
||||
Matrix_MultVec3f(&sp48, &sp3C);
|
||||
|
||||
this->unk_160 = (BgDblueBalance*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_BG_DBLUE_BALANCE, sp3C.x,
|
||||
sp3C.y, sp3C.z, 0, this->dyna.actor.shape.rot.y, 0, 0x200);
|
||||
@@ -212,20 +212,20 @@ void func_80B8264C(BgDblueBalance* this) {
|
||||
}
|
||||
}
|
||||
|
||||
Matrix_InsertTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->dyna.actor.shape.rot.y, MTXMODE_APPLY);
|
||||
|
||||
for (i = 0, phi_s0 = &this->unk_188[0], phi_s2 = 0; i < ARRAY_COUNT(this->unk_188);
|
||||
i++, phi_s2 += 0x2000, phi_s0++) {
|
||||
phi_s0->unk_0C = this->dyna.actor.shape.rot.x + phi_s2;
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertXRotation_s(phi_s0->unk_0C, MTXMODE_NEW);
|
||||
Matrix_InsertTranslation(-545.0f, 0.0f, 270.0f, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslation(&sp78);
|
||||
Matrix_StatePop();
|
||||
Matrix_MultiplyVector3fByState(&sp78, &phi_s0->unk_00);
|
||||
Matrix_Push();
|
||||
Matrix_RotateXS(phi_s0->unk_0C, MTXMODE_NEW);
|
||||
Matrix_Translate(-545.0f, 0.0f, 270.0f, MTXMODE_APPLY);
|
||||
Matrix_MultZero(&sp78);
|
||||
Matrix_Pop();
|
||||
Matrix_MultVec3f(&sp78, &phi_s0->unk_00);
|
||||
|
||||
temp_f0 = (sp78.z - 135.0f);
|
||||
if (sp78.z > 135.0f) {
|
||||
@@ -486,10 +486,10 @@ void func_80B82DE0(BgDblueBalance* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_182) {
|
||||
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_SEESAW_WATER_BOUND);
|
||||
sp5C = this->unk_15C;
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateY(BINANG_SUB(this->dyna.actor.shape.rot.y, 0x4000), MTXMODE_NEW);
|
||||
Matrix_GetStateTranslationAndScaledZ(45.0f, &sp60);
|
||||
Matrix_StatePop();
|
||||
Matrix_Push();
|
||||
Matrix_RotateYS(BINANG_SUB(this->dyna.actor.shape.rot.y, 0x4000), MTXMODE_NEW);
|
||||
Matrix_MultVecZ(45.0f, &sp60);
|
||||
Matrix_Pop();
|
||||
|
||||
sp50.x = sp5C->dyna.actor.world.pos.x + sp60.x;
|
||||
sp50.y = this->unk_228;
|
||||
@@ -511,10 +511,10 @@ void func_80B82DE0(BgDblueBalance* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_182) {
|
||||
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_SEESAW_WATER_BOUND);
|
||||
sp3C = this->unk_160;
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateY(BINANG_ADD(this->dyna.actor.shape.rot.y, 0x4000), MTXMODE_NEW);
|
||||
Matrix_GetStateTranslationAndScaledZ(30.0f, &sp40);
|
||||
Matrix_StatePop();
|
||||
Matrix_Push();
|
||||
Matrix_RotateYS(BINANG_ADD(this->dyna.actor.shape.rot.y, 0x4000), MTXMODE_NEW);
|
||||
Matrix_MultVecZ(30.0f, &sp40);
|
||||
Matrix_Pop();
|
||||
|
||||
sp30.x = sp3C->dyna.actor.world.pos.x + sp40.x;
|
||||
sp30.y = this->unk_228;
|
||||
@@ -653,9 +653,9 @@ void BgDblueBalance_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
if (!(BGDBLUEBALANCE_GET_300(&this->dyna.actor)) && (this->unk_160 != NULL)) {
|
||||
AnimatedMat_Draw(globalCtx, D_80B83C74);
|
||||
sp38 = this->unk_160;
|
||||
Matrix_SetStateRotationAndTranslation(sp38->dyna.actor.world.pos.x, sp38->dyna.actor.world.pos.y,
|
||||
sp38->dyna.actor.world.pos.z, &sp38->dyna.actor.shape.rot);
|
||||
Matrix_InsertTranslation(30.0f, 15.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_SetTranslateRotateYXZ(sp38->dyna.actor.world.pos.x, sp38->dyna.actor.world.pos.y,
|
||||
sp38->dyna.actor.world.pos.z, &sp38->dyna.actor.shape.rot);
|
||||
Matrix_Translate(30.0f, 15.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(sp38->dyna.actor.scale.x, sp38->dyna.actor.scale.y, sp38->dyna.actor.scale.z, MTXMODE_APPLY);
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
@@ -708,9 +708,9 @@ void func_80B83758(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
for (i = 0, ptr = &this->unk_188[0]; i < ARRAY_COUNT(this->unk_188); i++, ptr++) {
|
||||
if (ptr->unk_0E != 0) {
|
||||
Matrix_InsertTranslation(ptr->unk_00.x, ptr->unk_00.y, ptr->unk_00.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(ptr->unk_0C, MTXMODE_APPLY);
|
||||
Matrix_Translate(ptr->unk_00.x, ptr->unk_00.y, ptr->unk_00.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->dyna.actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(ptr->unk_0C, MTXMODE_APPLY);
|
||||
Matrix_Scale(ptr->unk_10, ptr->unk_10, ptr->unk_10, MTXMODE_APPLY);
|
||||
|
||||
temp = ptr->unk_0E * (f32)this->unk_183 * 0.003921569f;
|
||||
|
||||
@@ -259,9 +259,9 @@ void BgDblueMovebg_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->unk_178 = func_80A29A80(globalCtx, this->unk_1C0, this->unk_1BC);
|
||||
this->unk_1CC = D_80A2B96C[this->unk_178];
|
||||
this->unk_1CE = this->unk_1CC;
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_GetStateTranslationAndScaledX(2240.0f, &this->unk_190);
|
||||
Matrix_GetStateTranslationAndScaledX(-10.0f, &this->unk_19C);
|
||||
Matrix_RotateYS(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_MultVecX(2240.0f, &this->unk_190);
|
||||
Matrix_MultVecX(-10.0f, &this->unk_19C);
|
||||
Math_Vec3f_Sum(&this->unk_190, &this->dyna.actor.world.pos, &this->unk_190);
|
||||
Math_Vec3f_Sum(&this->unk_19C, &this->dyna.actor.world.pos, &this->unk_19C);
|
||||
D_80A2BBF0 = this;
|
||||
@@ -591,10 +591,10 @@ void func_80A2ABD0(BgDblueMovebg* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
for (j = 0; j < ARRAY_COUNT(this->unk_1D8[0]); j++) {
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_InsertXRotation_s(this->dyna.actor.shape.rot.x + (j * 0x2000), MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->dyna.actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_MultiplyVector3fByState(&D_80A2B988, &spAC);
|
||||
Matrix_RotateYS(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_RotateXS(this->dyna.actor.shape.rot.x + (j * 0x2000), MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->dyna.actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_80A2B988, &spAC);
|
||||
Math_Vec3f_Sum(&this->dyna.actor.world.pos, &spAC, &spAC);
|
||||
Math_Vec3f_Copy(&this->unk_238[i][j], &spAC);
|
||||
temp_f20 = spAC.y - this->unk_2F8[i]->world.pos.y;
|
||||
@@ -770,7 +770,7 @@ void BgDblueMovebg_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
Gfx* gfx;
|
||||
Gfx* gfx2;
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
@@ -808,7 +808,7 @@ void BgDblueMovebg_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
}
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
@@ -817,11 +817,11 @@ void BgDblueMovebg_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_InsertTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->dyna.actor.shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->dyna.actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->dyna.actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->dyna.actor.shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->dyna.actor.shape.rot.z, MTXMODE_APPLY);
|
||||
gfx = func_8012C2B4(POLY_XLU_DISP);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_1D8[0]); i++) {
|
||||
@@ -834,11 +834,11 @@ void BgDblueMovebg_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
(s32)(((globalCtx->gameplayFrames % 128) * -9.0f) / this->unk_1F8[j][i]),
|
||||
0x20, 0x20, 1, 0, 0, 0x20, 0x20));
|
||||
}
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertXRotation_s(i * 0x2000, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(1785.0f, 0.0f, 270.0f, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
Matrix_RotateXS(i * 0x2000, MTXMODE_APPLY);
|
||||
Matrix_Translate(1785.0f, 0.0f, 270.0f, MTXMODE_APPLY);
|
||||
if (j != 0) {
|
||||
Matrix_InsertZRotation_s(-0x8000, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-0x8000, MTXMODE_APPLY);
|
||||
}
|
||||
Matrix_Scale(this->unk_1F8[j][i] * this->dyna.actor.scale.x,
|
||||
this->unk_1F8[j][i] * this->dyna.actor.scale.y,
|
||||
@@ -849,7 +849,7 @@ void BgDblueMovebg_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
gDPSetEnvColor(gfx++, 255, 255, 255, this->unk_1D8[j][i]);
|
||||
gSPDisplayList(gfx++, object_dblue_object_DL_00CD10);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,10 +314,10 @@ void func_80B84610(BgDblueWaterfall* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateY(BINANG_ADD(this->actor.yawTowardsPlayer, 0x4000), MTXMODE_NEW);
|
||||
Matrix_GetStateTranslationAndScaledZ(this->unk_1A8, &sp34);
|
||||
Matrix_StatePop();
|
||||
Matrix_Push();
|
||||
Matrix_RotateYS(BINANG_ADD(this->actor.yawTowardsPlayer, 0x4000), MTXMODE_NEW);
|
||||
Matrix_MultVecZ(this->unk_1A8, &sp34);
|
||||
Matrix_Pop();
|
||||
|
||||
player->actor.world.pos.x += sp34.x;
|
||||
player->actor.world.pos.z += sp34.z;
|
||||
|
||||
@@ -118,10 +118,10 @@ void BgHakaTomb_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Vec3f vec;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
Matrix_RotateY(this->dyna.actor.world.rot.y, MTXMODE_NEW);
|
||||
Matrix_InsertXRotation_s(this->dyna.actor.world.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->dyna.actor.world.rot.z, MTXMODE_APPLY);
|
||||
Matrix_MultiplyVector3fByState(&D_80BD68A4, &vec);
|
||||
Matrix_RotateYS(this->dyna.actor.world.rot.y, MTXMODE_NEW);
|
||||
Matrix_RotateXS(this->dyna.actor.world.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->dyna.actor.world.rot.z, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_80BD68A4, &vec);
|
||||
Math_Vec3f_Sum(&this->dyna.actor.world.pos, &vec, &this->dyna.actor.focus.pos);
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ void func_80ABBFC0(BgHakuginBombwall* this, GlobalContext* globalCtx) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
temp = (i + 1) * (80.0f / 3.0f);
|
||||
@@ -146,8 +146,8 @@ void func_80ABBFC0(BgHakuginBombwall* this, GlobalContext* globalCtx) {
|
||||
spCC.y = (Rand_ZeroOne() * 7.0f) - 2.0f;
|
||||
spCC.z = spD8.z * 0.3f;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&spD8, &spF0);
|
||||
Matrix_MultiplyVector3fByState(&spCC, &spE4);
|
||||
Matrix_MultVec3f(&spD8, &spF0);
|
||||
Matrix_MultVec3f(&spCC, &spE4);
|
||||
|
||||
spF0.x += this->dyna.actor.world.pos.x;
|
||||
spF0.y += this->dyna.actor.world.pos.y;
|
||||
@@ -245,7 +245,7 @@ void func_80ABC58C(BgHakuginBombwall* this, GlobalContext* globalCtx) {
|
||||
spA8.y = 0.0f;
|
||||
spB4.y = 0.3f;
|
||||
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
|
||||
for (i = 0, phi_s1 = 0; i < 21; i++, phi_s1 += 0x618) {
|
||||
temp_f20 = Math_SinS(phi_s1);
|
||||
@@ -261,9 +261,9 @@ void func_80ABC58C(BgHakuginBombwall* this, GlobalContext* globalCtx) {
|
||||
spB4.x = spA8.x * -0.09f;
|
||||
spB4.z = spA8.z * -0.09f;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp9C, &spC0);
|
||||
Matrix_MultiplyVector3fByState(&spA8, &spCC);
|
||||
Matrix_MultiplyVector3fByState(&spB4, &spD8);
|
||||
Matrix_MultVec3f(&sp9C, &spC0);
|
||||
Matrix_MultVec3f(&spA8, &spCC);
|
||||
Matrix_MultVec3f(&spB4, &spD8);
|
||||
|
||||
spC0.x += this->dyna.actor.world.pos.x;
|
||||
spC0.y += this->dyna.actor.world.pos.y;
|
||||
|
||||
@@ -230,7 +230,7 @@ BgHakuginPostUnkStruct1* func_80A9B32C(BgHakuginPostUnkStruct* unkStruct, BgHaku
|
||||
}
|
||||
|
||||
void func_80A9B384(Vec3f* arg0) {
|
||||
MtxF* matrix = Matrix_GetCurrentState();
|
||||
MtxF* matrix = Matrix_GetCurrent();
|
||||
|
||||
matrix->mf[3][0] = arg0->x;
|
||||
matrix->mf[3][1] = arg0->y;
|
||||
@@ -1010,8 +1010,8 @@ void func_80A9D61C(Actor* thisx, GlobalContext* globalCtx) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
Matrix_SetStateRotationAndTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
|
||||
|
||||
for (i = 0; i < D_80A9E028.count; i++) {
|
||||
@@ -1032,8 +1032,8 @@ void func_80A9D61C(Actor* thisx, GlobalContext* globalCtx) {
|
||||
for (i = 0; i < ARRAY_COUNT(D_80A9E028.unk_02A4); i++) {
|
||||
unkStruct2 = &D_80A9E028.unk_02A4[i];
|
||||
if (unkStruct2->unk_2C > 0) {
|
||||
Matrix_SetStateRotationAndTranslation(unkStruct2->unk_04.x, unkStruct2->unk_04.y, unkStruct2->unk_04.z,
|
||||
&unkStruct2->unk_20);
|
||||
Matrix_SetTranslateRotateYXZ(unkStruct2->unk_04.x, unkStruct2->unk_04.y, unkStruct2->unk_04.z,
|
||||
&unkStruct2->unk_20);
|
||||
Matrix_Scale(unkStruct2->unk_00, unkStruct2->unk_00, unkStruct2->unk_00, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
|
||||
@@ -111,7 +111,7 @@ s32 func_80B7EB94(BgIkanaBlock* this, GlobalContext* globalCtx) {
|
||||
sp70.y = this->dyna.actor.world.pos.y + this->unk_170 + 2.0f;
|
||||
sp70.z = this->dyna.actor.world.pos.z;
|
||||
|
||||
Matrix_RotateY(phi_a0, MTXMODE_NEW);
|
||||
Matrix_RotateYS(phi_a0, MTXMODE_NEW);
|
||||
|
||||
if (sp4C) {
|
||||
phi_f12 = 89.0f;
|
||||
@@ -119,7 +119,7 @@ s32 func_80B7EB94(BgIkanaBlock* this, GlobalContext* globalCtx) {
|
||||
phi_f12 = 119.0f;
|
||||
}
|
||||
|
||||
Matrix_GetStateTranslationAndScaledZ(phi_f12, &sp64);
|
||||
Matrix_MultVecZ(phi_f12, &sp64);
|
||||
|
||||
sp64.x += this->dyna.actor.world.pos.x;
|
||||
sp64.y += this->dyna.actor.world.pos.y + this->unk_170 + 2.0f;
|
||||
@@ -137,10 +137,10 @@ void func_80B7ED54(BgIkanaBlock* this) {
|
||||
s32 pad;
|
||||
Vec3f sp18;
|
||||
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_InsertXRotation_s(this->dyna.actor.shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->dyna.actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslationAndScaledY(30.0f, &sp18);
|
||||
Matrix_RotateYS(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_RotateXS(this->dyna.actor.shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->dyna.actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_MultVecY(30.0f, &sp18);
|
||||
this->unk_170 = sp18.y - 30.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,8 +109,8 @@ void func_80BD4720(BgIkanaBombwall* this, GlobalContext* globalCtx) {
|
||||
s16 temp;
|
||||
s16 phi_t0;
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_Push();
|
||||
Matrix_RotateYS(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
temp_fs0 = 0.0f;
|
||||
phi_fs1 = 0.0f;
|
||||
|
||||
@@ -130,8 +130,8 @@ void func_80BD4720(BgIkanaBombwall* this, GlobalContext* globalCtx) {
|
||||
spBC.y = (Rand_ZeroOne() * 7.0f) - 2.0f;
|
||||
spBC.z = (Rand_ZeroOne() * 4.0f) - 2.0f;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&spC8, &spE0);
|
||||
Matrix_MultiplyVector3fByState(&spBC, &spD4);
|
||||
Matrix_MultVec3f(&spC8, &spE0);
|
||||
Matrix_MultVec3f(&spBC, &spD4);
|
||||
|
||||
spE0.x += this->dyna.actor.world.pos.x;
|
||||
spE0.y += this->dyna.actor.world.pos.y;
|
||||
@@ -161,7 +161,7 @@ void func_80BD4720(BgIkanaBombwall* this, GlobalContext* globalCtx) {
|
||||
-1, OBJECT_IKANA_OBJ, object_ikana_obj_DL_000288);
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
#else
|
||||
void func_80BD4720(BgIkanaBombwall* this, GlobalContext* globalCtx);
|
||||
|
||||
@@ -140,8 +140,8 @@ CollisionHeader* D_80B82218[] = { &object_ikana_obj_Colheader_006368, &object_ik
|
||||
void func_80B802E0(BgIkanaRotaryroom* this) {
|
||||
s32 pad;
|
||||
|
||||
Matrix_SetStateRotationAndTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_Scale(this->dyna.actor.scale.x, this->dyna.actor.scale.y, this->dyna.actor.scale.z, MTXMODE_APPLY);
|
||||
|
||||
Collider_UpdateSpheres(0, &this->collider);
|
||||
@@ -164,21 +164,21 @@ void func_80B80440(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
Vec3f sp50;
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_SetStateRotationAndTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_Push();
|
||||
Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
if (Flags_GetSwitch(globalCtx, BGIKANAROTARYROOM_GET_7F00(&this->dyna.actor))) {
|
||||
Matrix_InsertTranslation(D_80B82178.x, D_80B82178.y, D_80B82178.z, MTXMODE_APPLY);
|
||||
Matrix_Translate(D_80B82178.x, D_80B82178.y, D_80B82178.z, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_InsertTranslation(D_80B8216C.x, D_80B8216C.y, D_80B8216C.z, MTXMODE_APPLY);
|
||||
Matrix_Translate(D_80B8216C.x, D_80B8216C.y, D_80B8216C.z, MTXMODE_APPLY);
|
||||
}
|
||||
Matrix_GetStateTranslation(&sp50);
|
||||
Matrix_MultZero(&sp50);
|
||||
func_80B80358(&sp50);
|
||||
this->unk_204.unk_00 = Actor_SpawnAsChildAndCutscene(
|
||||
&globalCtx->actorCtx, globalCtx, ACTOR_BG_IKANA_BLOCK, sp50.x, sp50.y, sp50.z, this->dyna.actor.shape.rot.x,
|
||||
this->dyna.actor.shape.rot.y, this->dyna.actor.shape.rot.z, -1,
|
||||
ActorCutscene_GetAdditionalCutscene(this->dyna.actor.cutscene), this->dyna.actor.unk20, NULL);
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
void func_80B80550(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
@@ -200,12 +200,12 @@ void func_80B80550(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
actor = globalCtx->actorCtx.actorLists[ACTORCAT_DOOR].first;
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
sp60.x = BINANG_ROT180(this->dyna.actor.home.rot.x);
|
||||
sp60.y = this->dyna.actor.home.rot.y;
|
||||
sp60.z = this->dyna.actor.home.rot.z;
|
||||
Matrix_SetStateRotationAndTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &sp60);
|
||||
Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &sp60);
|
||||
|
||||
while (actor != NULL) {
|
||||
if (actor->id == ACTOR_DOOR_SHUTTER) {
|
||||
@@ -215,24 +215,24 @@ void func_80B80550(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
ptr = &D_80B82184[spC8][i];
|
||||
|
||||
if ((Math3D_Vec3fDistSq(&spB4, &D_80B82184[spC8][i].unk_04) < SQ(250.0f)) &&
|
||||
((ptr->unk_00 ^ spC4) && (ptr->unk_01 == 0U))) {
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertTranslation(spB4.x, spB4.y, spB4.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(actor->shape.rot.y - this->dyna.actor.home.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(actor->shape.rot.x - this->dyna.actor.home.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(actor->shape.rot.z - this->dyna.actor.home.rot.z, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslation(&actor->world.pos);
|
||||
((ptr->unk_00 ^ spC4) && (ptr->unk_01 == 0))) {
|
||||
Matrix_Push();
|
||||
Matrix_Translate(spB4.x, spB4.y, spB4.z, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(actor->shape.rot.y - this->dyna.actor.home.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(actor->shape.rot.x - this->dyna.actor.home.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(actor->shape.rot.z - this->dyna.actor.home.rot.z, MTXMODE_APPLY);
|
||||
Matrix_MultZero(&actor->world.pos);
|
||||
func_80B80358(&actor->world.pos);
|
||||
Matrix_CopyCurrentState(&sp68);
|
||||
func_8018219C(&sp68, &actor->shape.rot, 0);
|
||||
Matrix_StatePop();
|
||||
Matrix_Get(&sp68);
|
||||
Matrix_MtxFToYXZRot(&sp68, &actor->shape.rot, false);
|
||||
Matrix_Pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
actor = actor->next;
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
BgIkanaRotaryroomStruct4* func_80B80778(BgIkanaRotaryroom* this, GlobalContext* globalCtx, Actor* arg2) {
|
||||
@@ -246,21 +246,20 @@ BgIkanaRotaryroomStruct4* func_80B80778(BgIkanaRotaryroom* this, GlobalContext*
|
||||
if (1) {}
|
||||
|
||||
if (arg2->id == ACTOR_DOOR_SHUTTER) {
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_80B82184); i++) {
|
||||
ptr = &D_80B82184[temp_s3][i];
|
||||
if ((ptr->unk_01 == 0) &&
|
||||
(Matrix_SetStateRotationAndTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot),
|
||||
Matrix_MultiplyVector3fByState(&ptr->unk_04, &sp68),
|
||||
(Math3D_Vec3fDistSq(&arg2->world.pos, &sp68) < SQ(250.0f)))) {
|
||||
(Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot),
|
||||
Matrix_MultVec3f(&ptr->unk_04, &sp68), (Math3D_Vec3fDistSq(&arg2->world.pos, &sp68) < SQ(250.0f)))) {
|
||||
sp58 = ptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
return sp58;
|
||||
}
|
||||
@@ -270,24 +269,24 @@ void func_80B80894(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
Actor* actor = this->unk_204.unk_00;
|
||||
s32 i;
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
Matrix_InsertZRotation_s(-this->dyna.actor.shape.rot.z, MTXMODE_NEW);
|
||||
Matrix_InsertXRotation_s(-this->dyna.actor.shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateY(-this->dyna.actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(-this->dyna.actor.world.pos.x, -this->dyna.actor.world.pos.y,
|
||||
-this->dyna.actor.world.pos.z, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-this->dyna.actor.shape.rot.z, MTXMODE_NEW);
|
||||
Matrix_RotateXS(-this->dyna.actor.shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(-this->dyna.actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Translate(-this->dyna.actor.world.pos.x, -this->dyna.actor.world.pos.y, -this->dyna.actor.world.pos.z,
|
||||
MTXMODE_APPLY);
|
||||
|
||||
if (actor != NULL) {
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
Matrix_InsertTranslation(actor->world.pos.x, actor->world.pos.y, actor->world.pos.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(actor->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(actor->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(actor->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_CopyCurrentState(&this->unk_204.unk_04);
|
||||
Matrix_Translate(actor->world.pos.x, actor->world.pos.y, actor->world.pos.z, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(actor->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(actor->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(actor->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Get(&this->unk_204.unk_04);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_248); i++) {
|
||||
@@ -300,15 +299,15 @@ void func_80B80894(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
if (func_80B80778(this, globalCtx, actor) && (i < 2)) {
|
||||
this->unk_248[i].unk_00 = actor;
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
Matrix_InsertTranslation(actor->world.pos.x, actor->world.pos.y, actor->world.pos.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(actor->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(actor->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(actor->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_CopyCurrentState(&this->unk_248[i].unk_04);
|
||||
Matrix_Translate(actor->world.pos.x, actor->world.pos.y, actor->world.pos.z, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(actor->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(actor->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(actor->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Get(&this->unk_248[i].unk_04);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
i++;
|
||||
}
|
||||
actor = actor->next;
|
||||
@@ -324,15 +323,15 @@ void func_80B80894(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
if ((actor->id == ACTOR_EN_TORCH2) && (actor->update != NULL) && (i < ARRAY_COUNT(this->unk_2D0))) {
|
||||
this->unk_2D0[i].unk_00 = actor;
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
Matrix_InsertTranslation(actor->world.pos.x, actor->world.pos.y, actor->world.pos.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(actor->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(actor->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(actor->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_CopyCurrentState(&this->unk_2D0[i].unk_04);
|
||||
Matrix_Translate(actor->world.pos.x, actor->world.pos.y, actor->world.pos.z, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(actor->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(actor->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(actor->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Get(&this->unk_2D0[i].unk_04);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
i++;
|
||||
}
|
||||
actor = actor->next;
|
||||
@@ -350,15 +349,15 @@ void func_80B80894(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
this->unk_3E0[i].unk_44 = actor->shape.rot;
|
||||
this->unk_3E0[i].unk_4C = 0.0f;
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
Matrix_InsertTranslation(actor->world.pos.x, actor->world.pos.y, actor->world.pos.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(actor->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(actor->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(actor->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_CopyCurrentState(&this->unk_3E0[i].unk_04);
|
||||
Matrix_Translate(actor->world.pos.x, actor->world.pos.y, actor->world.pos.z, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(actor->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(actor->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(actor->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Get(&this->unk_3E0[i].unk_04);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
i++;
|
||||
}
|
||||
actor = actor->next;
|
||||
@@ -368,18 +367,18 @@ void func_80B80894(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
if (actor->update != NULL) {
|
||||
this->unk_520.unk_40 = actor->shape.rot;
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
Matrix_InsertTranslation(actor->world.pos.x, actor->world.pos.y, actor->world.pos.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(actor->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(actor->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(actor->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_CopyCurrentState(&this->unk_520.unk_00);
|
||||
Matrix_Translate(actor->world.pos.x, actor->world.pos.y, actor->world.pos.z, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(actor->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(actor->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(actor->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Get(&this->unk_520.unk_00);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
void func_80B80C88(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
@@ -392,83 +391,83 @@ void func_80B80C88(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
s32 i;
|
||||
MtxF sp3C;
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_SetStateRotationAndTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_Push();
|
||||
Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
|
||||
if (ikanaBlock != NULL) {
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
Matrix_InsertMatrix(&this->unk_204.unk_04, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslation(&ikanaBlock->dyna.actor.world.pos);
|
||||
Matrix_Mult(&this->unk_204.unk_04, MTXMODE_APPLY);
|
||||
Matrix_MultZero(&ikanaBlock->dyna.actor.world.pos);
|
||||
func_80B80358(&ikanaBlock->dyna.actor.world.pos);
|
||||
Matrix_CopyCurrentState(&sp3C);
|
||||
func_8018219C(&sp3C, &ikanaBlock->dyna.actor.shape.rot, 0);
|
||||
Matrix_Get(&sp3C);
|
||||
Matrix_MtxFToYXZRot(&sp3C, &ikanaBlock->dyna.actor.shape.rot, false);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_248); i++) {
|
||||
ptr = this->unk_248[i].unk_00;
|
||||
if (ptr != NULL) {
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
Matrix_InsertMatrix(&this->unk_248[i].unk_04, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslation(&ptr->world.pos);
|
||||
Matrix_Mult(&this->unk_248[i].unk_04, MTXMODE_APPLY);
|
||||
Matrix_MultZero(&ptr->world.pos);
|
||||
func_80B80358(&ptr->world.pos);
|
||||
Matrix_CopyCurrentState(&sp3C);
|
||||
func_8018219C(&sp3C, &ptr->shape.rot, 0);
|
||||
Matrix_Get(&sp3C);
|
||||
Matrix_MtxFToYXZRot(&sp3C, &ptr->shape.rot, false);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_2D0); i++) {
|
||||
ptr2 = this->unk_2D0[i].unk_00;
|
||||
if (ptr2 != NULL) {
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
Matrix_InsertMatrix(&this->unk_2D0[i].unk_04, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslation(&ptr2->world.pos);
|
||||
Matrix_Mult(&this->unk_2D0[i].unk_04, MTXMODE_APPLY);
|
||||
Matrix_MultZero(&ptr2->world.pos);
|
||||
func_80B80358(&ptr2->world.pos);
|
||||
Matrix_CopyCurrentState(&sp3C);
|
||||
func_8018219C(&sp3C, &ptr2->shape.rot, 0);
|
||||
Matrix_Get(&sp3C);
|
||||
Matrix_MtxFToYXZRot(&sp3C, &ptr2->shape.rot, false);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_3E0); i++) {
|
||||
ptr3 = this->unk_3E0[i].unk_00;
|
||||
if (ptr3 != NULL) {
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
Matrix_InsertMatrix(&this->unk_3E0[i].unk_04, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslation(&ptr3->world.pos);
|
||||
Matrix_Mult(&this->unk_3E0[i].unk_04, MTXMODE_APPLY);
|
||||
Matrix_MultZero(&ptr3->world.pos);
|
||||
func_80B80358(&ptr3->world.pos);
|
||||
Matrix_CopyCurrentState(&sp3C);
|
||||
func_8018219C(&sp3C, &ptr3->shape.rot, 0);
|
||||
Matrix_Get(&sp3C);
|
||||
Matrix_MtxFToYXZRot(&sp3C, &ptr3->shape.rot, false);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
}
|
||||
|
||||
player = GET_PLAYER(globalCtx);
|
||||
if (player != NULL) {
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
Matrix_InsertMatrix(&this->unk_520.unk_00, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslation(&player->actor.world.pos);
|
||||
Matrix_Mult(&this->unk_520.unk_00, MTXMODE_APPLY);
|
||||
Matrix_MultZero(&player->actor.world.pos);
|
||||
Math_Vec3f_Copy(&player->actor.home.pos, &player->actor.world.pos);
|
||||
func_80B80358(&player->actor.world.pos);
|
||||
Matrix_CopyCurrentState(&sp3C);
|
||||
func_8018219C(&sp3C, &player->actor.shape.rot, 0);
|
||||
Matrix_Get(&sp3C);
|
||||
Matrix_MtxFToYXZRot(&sp3C, &player->actor.shape.rot, false);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
player->actor.freezeTimer = 2;
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
s32 func_80B80F08(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
@@ -479,18 +478,18 @@ s32 func_80B80F08(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
s32 sp24 = false;
|
||||
|
||||
if (ikanaBlock != NULL) {
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
Matrix_SetStateRotationAndTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_InsertTranslation(D_80B82178.x, D_80B82178.y, D_80B82178.z, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslation(&sp34);
|
||||
Matrix_SetStateRotationAndTranslation(ikanaBlock->dyna.actor.world.pos.x,
|
||||
ikanaBlock->dyna.actor.world.pos.y + ikanaBlock->unk_170,
|
||||
ikanaBlock->dyna.actor.world.pos.z, &ikanaBlock->dyna.actor.shape.rot);
|
||||
Matrix_GetStateTranslation(&sp28);
|
||||
Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_Translate(D_80B82178.x, D_80B82178.y, D_80B82178.z, MTXMODE_APPLY);
|
||||
Matrix_MultZero(&sp34);
|
||||
Matrix_SetTranslateRotateYXZ(ikanaBlock->dyna.actor.world.pos.x,
|
||||
ikanaBlock->dyna.actor.world.pos.y + ikanaBlock->unk_170,
|
||||
ikanaBlock->dyna.actor.world.pos.z, &ikanaBlock->dyna.actor.shape.rot);
|
||||
Matrix_MultZero(&sp28);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
if (Math3D_Vec3fDistSq(&sp34, &sp28) < 3.0f) {
|
||||
if (!Flags_GetSwitch(globalCtx, BGIKANAROTARYROOM_GET_7F00(&this->dyna.actor))) {
|
||||
@@ -604,14 +603,14 @@ void func_80B81234(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
ptr->unk_4C.y += ptr->unk_48;
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
Matrix_RotateY(player->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_InsertXRotation_s(player->actor.shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(player->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslationAndScaledY(sp44, &sp4C);
|
||||
Matrix_RotateYS(player->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_RotateXS(player->actor.shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(player->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_MultVecY(sp44, &sp4C);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
temp_f0 = BgCheck_EntityRaycastFloor5_2(globalCtx, &globalCtx->colCtx, &sp40, &sp3C, NULL, &sp58);
|
||||
if (ptr->unk_4C.y <= temp_f0) {
|
||||
@@ -666,15 +665,15 @@ void func_80B81570(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
s32 pad2;
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_Push();
|
||||
Matrix_RotateYS(this->dyna.actor.shape.rot.y, MTXMODE_NEW);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_80B821C4); i++) {
|
||||
sp64.x = D_80B821C4[i].x;
|
||||
sp64.y = D_80B821C4[i].y;
|
||||
sp64.z = D_80B821C4[i].z;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp64, &sp70);
|
||||
Matrix_MultVec3f(&sp64, &sp70);
|
||||
|
||||
sp70.x += this->dyna.actor.world.pos.x;
|
||||
sp70.y += this->dyna.actor.world.pos.y;
|
||||
@@ -683,7 +682,7 @@ void func_80B81570(BgIkanaRotaryroom* this, GlobalContext* globalCtx) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_WATER_EFFECT, sp70.x, sp70.y, sp70.z, 0, 0, 0, 1);
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
s32 func_80B816A4(BgIkanaRotaryroom* this) {
|
||||
|
||||
@@ -142,11 +142,11 @@ void BgKin2Fence_SpawnEyeSparkles(BgKin2Fence* this, GlobalContext* globalCtx, s
|
||||
Vec3f sp58;
|
||||
s32 pad[2];
|
||||
|
||||
Matrix_SetStateRotationAndTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
Matrix_MultiplyVector3fByState(&eyeSparkleSpawnPositions[mask][i], &sp58);
|
||||
Matrix_MultVec3f(&eyeSparkleSpawnPositions[mask][i], &sp58);
|
||||
EffectSsKirakira_SpawnDispersed(globalCtx, &sp58, &gZeroVec3f, &gZeroVec3f, &primColor, &envColor, 6000, -10);
|
||||
}
|
||||
}
|
||||
@@ -160,8 +160,8 @@ void BgKin2Fence_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &object_kin2_obj_Colheader_000908);
|
||||
Collider_InitJntSph(globalCtx, &this->collider);
|
||||
Collider_SetJntSph(globalCtx, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements);
|
||||
Matrix_SetStateRotationAndTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_Scale(this->dyna.actor.scale.x, this->dyna.actor.scale.y, this->dyna.actor.scale.z, MTXMODE_APPLY);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
||||
@@ -77,22 +77,22 @@ s32 func_80B6FB30(BgKin2Shelf* this, GlobalContext* globalCtx) {
|
||||
|
||||
spA4 = D_80B70750[temp_v1] + ((this->dyna.pushForce < 0.0f) ? 28.0f : -2.0f) + D_80B70768[temp_v1];
|
||||
|
||||
Matrix_InsertTranslation(0.0f, 10.0f, D_80B70760[temp_v1], MTXMODE_NEW);
|
||||
Matrix_RotateY(spA2, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 10.0f, D_80B70760[temp_v1], MTXMODE_NEW);
|
||||
Matrix_RotateYS(spA2, MTXMODE_APPLY);
|
||||
|
||||
sp58.x = 0.0f;
|
||||
sp58.y = 0.0f;
|
||||
sp58.z = 0.0f;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp58, &sp94);
|
||||
Matrix_MultVec3f(&sp58, &sp94);
|
||||
|
||||
sp58.z = spA4;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp58, &sp88);
|
||||
Matrix_SetStateRotationAndTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_MultiplyVector3fByState(&sp94, &sp7C);
|
||||
Matrix_MultiplyVector3fByState(&sp88, &sp70);
|
||||
Matrix_MultVec3f(&sp58, &sp88);
|
||||
Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_MultVec3f(&sp94, &sp7C);
|
||||
Matrix_MultVec3f(&sp88, &sp70);
|
||||
|
||||
return BgCheck_EntityLineTest3(&globalCtx->colCtx, &sp7C, &sp70, &sp64, &sp54, true, false, false, true, &sp50,
|
||||
&this->dyna.actor, 0.0f);
|
||||
@@ -119,22 +119,22 @@ s32 func_80B6FCA4(BgKin2Shelf* this, GlobalContext* globalCtx) {
|
||||
|
||||
spA0 = D_80B70758[0] + ((this->dyna.pushForce < 0.0f) ? 28.0f : -2.0f) + D_80B70770[0];
|
||||
|
||||
Matrix_InsertTranslation(0.0f, 10.0f, *D_80B70760, MTXMODE_NEW);
|
||||
Matrix_RotateY(sp9E, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 10.0f, *D_80B70760, MTXMODE_NEW);
|
||||
Matrix_RotateYS(sp9E, MTXMODE_APPLY);
|
||||
|
||||
sp54.x = 0.0f;
|
||||
sp54.y = 0.0f;
|
||||
sp54.z = 0.0f;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp54, &sp90);
|
||||
Matrix_MultVec3f(&sp54, &sp90);
|
||||
|
||||
sp54.z = spA0;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp54, &sp84);
|
||||
Matrix_SetStateRotationAndTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_MultiplyVector3fByState(&sp90, &sp78);
|
||||
Matrix_MultiplyVector3fByState(&sp84, &sp6C);
|
||||
Matrix_MultVec3f(&sp54, &sp84);
|
||||
Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_MultVec3f(&sp90, &sp78);
|
||||
Matrix_MultVec3f(&sp84, &sp6C);
|
||||
|
||||
return BgCheck_EntityLineTest3(&globalCtx->colCtx, &sp78, &sp6C, &sp60, &sp50, true, false, false, true, &sp4C,
|
||||
&this->dyna.actor, 0.0f);
|
||||
|
||||
@@ -391,14 +391,14 @@ void BgNumaHana_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
innerPetalPosRot = &this->innerPetalPosRot[i];
|
||||
outerPetalPosRot = &this->outerPetalPosRot[i];
|
||||
|
||||
Matrix_SetStateRotationAndTranslation(innerPetalPosRot->pos.x, innerPetalPosRot->pos.y, innerPetalPosRot->pos.z,
|
||||
&innerPetalPosRot->rot);
|
||||
Matrix_SetTranslateRotateYXZ(innerPetalPosRot->pos.x, innerPetalPosRot->pos.y, innerPetalPosRot->pos.z,
|
||||
&innerPetalPosRot->rot);
|
||||
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gWoodenFlowerInnerPetalDL);
|
||||
|
||||
Matrix_SetStateRotationAndTranslation(outerPetalPosRot->pos.x, outerPetalPosRot->pos.y, outerPetalPosRot->pos.z,
|
||||
&outerPetalPosRot->rot);
|
||||
Matrix_SetTranslateRotateYXZ(outerPetalPosRot->pos.x, outerPetalPosRot->pos.y, outerPetalPosRot->pos.z,
|
||||
&outerPetalPosRot->rot);
|
||||
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gWoodenFlowerOuterPetalDL);
|
||||
@@ -406,8 +406,8 @@ void BgNumaHana_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
objectIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_SYOKUDAI);
|
||||
if ((objectIndex >= 0) && (Object_IsLoaded(&globalCtx->objectCtx, objectIndex))) {
|
||||
Matrix_SetStateRotationAndTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y - 64.5f,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y - 64.5f,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_Scale(1.5f, 1.5f, 1.5f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[objectIndex].segment);
|
||||
|
||||
@@ -186,12 +186,12 @@ void func_809CE068(BgSpdweb* this) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
Matrix_SetStateRotationAndTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z, &this->dyna.actor.shape.rot);
|
||||
|
||||
for (i = 0; i < this->collider.count; i++) {
|
||||
for (j = 0; j < ARRAY_COUNT(sp64); j++) {
|
||||
Matrix_MultiplyVector3fByState(this->collider.elements[i].dim.vtx + j, &sp64[j]);
|
||||
Matrix_MultVec3f(this->collider.elements[i].dim.vtx + j, &sp64[j]);
|
||||
}
|
||||
Collider_SetTrisVertices(&this->collider, i, &sp64[0], &sp64[1], &sp64[2]);
|
||||
}
|
||||
@@ -513,7 +513,7 @@ void BgSpdweb_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gSPMatrix(&gfx[1], Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(&gfx[2], object_spdweb_DL_000060);
|
||||
} else {
|
||||
Matrix_InsertTranslation(0.0f, (thisx->home.pos.y - thisx->world.pos.y) * 10.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, (thisx->home.pos.y - thisx->world.pos.y) * 10.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(1.0f, ((thisx->home.pos.y - thisx->world.pos.y) + 10.0f) * 0.1f, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(&gfx[1], Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -912,8 +912,8 @@ void func_809DAB78(Boss02* this, GlobalContext* globalCtx) {
|
||||
this->unk_0152 = 15;
|
||||
if ((s16)(BREG(71) + 140) < this->unk_0146[1]) {
|
||||
if (this->unk_0146[0] == 0) {
|
||||
Matrix_RotateY(Math_Atan2S(-player->actor.world.pos.x, -player->actor.world.pos.z), MTXMODE_NEW);
|
||||
Matrix_GetStateTranslationAndScaledZ(1500.0f * D_809DF5B0, &spA4);
|
||||
Matrix_RotateYS(Math_Atan2S(-player->actor.world.pos.x, -player->actor.world.pos.z), MTXMODE_NEW);
|
||||
Matrix_MultVecZ(1500.0f * D_809DF5B0, &spA4);
|
||||
this->unk_0146[0] = 50;
|
||||
this->unk_01B0.x = player->actor.world.pos.x + spA4.x;
|
||||
this->unk_01B0.y = randPlusMinusPoint5Scaled(500.0f * D_809DF5B0) + (600.0f * D_809DF5B0);
|
||||
@@ -1023,15 +1023,14 @@ void func_809DAB78(Boss02* this, GlobalContext* globalCtx) {
|
||||
sp9C = Rand_ZeroFloat(M_PI);
|
||||
|
||||
for (i = 0; i < 15; i++) {
|
||||
Matrix_InsertYRotation_f(((2.0f * (i * M_PI)) / 15.0f) + sp9C, MTXMODE_NEW);
|
||||
Matrix_GetStateTranslationAndScaledZ((10 - this->unk_0146[0]) * (D_809DF5B0 * 300.0f) * 0.1f,
|
||||
&sp90);
|
||||
Matrix_RotateYF(((2.0f * (i * M_PI)) / 15.0f) + sp9C, MTXMODE_NEW);
|
||||
Matrix_MultVecZ((10 - this->unk_0146[0]) * (D_809DF5B0 * 300.0f) * 0.1f, &sp90);
|
||||
spD0.x = this->unk_0170.x + sp90.x;
|
||||
spD0.y = this->unk_0170.y + (1000.0f * D_809DF5B0);
|
||||
spD0.z = this->unk_0170.z + sp90.z;
|
||||
if (BgCheck_EntityRaycastFloor3(&globalCtx->colCtx, &sp8C, &sp88, &spD0) != BGCHECK_Y_MIN) {
|
||||
spA0 = BgCheck_EntityRaycastFloor1(&globalCtx->colCtx, &sp8C, &spD0);
|
||||
Matrix_GetStateTranslationAndScaledZ(5.0f * D_809DF5B0, &sp70);
|
||||
Matrix_MultVecZ(5.0f * D_809DF5B0, &sp70);
|
||||
sp70.y = 2.0f * D_809DF5B0;
|
||||
sp64.y = 0.3f * D_809DF5B0;
|
||||
sp64.z = 0.0f;
|
||||
@@ -1376,14 +1375,14 @@ void Boss02_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
}
|
||||
|
||||
idx = (this->unk_014E + 196) % ARRAY_COUNT(this->unk_01BC);
|
||||
Matrix_InsertTranslation(this->unk_01BC[idx].x, this->unk_01BC[idx].y, this->unk_01BC[idx].z, MTXMODE_NEW);
|
||||
Matrix_InsertYRotation_f(this->unk_0B1C[idx].y + spA8, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(spAC - this->unk_0B1C[idx].x);
|
||||
Matrix_Translate(this->unk_01BC[idx].x, this->unk_01BC[idx].y, this->unk_01BC[idx].z, MTXMODE_NEW);
|
||||
Matrix_RotateYF(this->unk_0B1C[idx].y + spA8, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(spAC - this->unk_0B1C[idx].x);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, 250.0f, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslationAndScaledZ(150.0f, &this->unk_147C[0]);
|
||||
Matrix_Translate(0.0f, 0.0f, 250.0f, MTXMODE_APPLY);
|
||||
Matrix_MultVecZ(150.0f, &this->unk_147C[0]);
|
||||
this->unk_0188 = this->unk_017C;
|
||||
Matrix_GetStateTranslationAndScaledZ(300.0f, &this->unk_017C);
|
||||
Matrix_MultVecZ(300.0f, &this->unk_017C);
|
||||
Math_Vec3f_Copy(&this->actor.focus.pos, &this->unk_017C);
|
||||
|
||||
if ((this->unk_0156 & 1) && (this->unk_0158 == 0)) {
|
||||
@@ -1407,14 +1406,13 @@ void Boss02_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
spA0 = spA8;
|
||||
}
|
||||
|
||||
Matrix_InsertTranslation(this->unk_01BC[phi_v0].x, this->unk_01BC[phi_v0].y, this->unk_01BC[phi_v0].z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_InsertYRotation_f(this->unk_0B1C[phi_v0].y + spA0, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(spA4 - this->unk_0B1C[phi_v0].x);
|
||||
Matrix_InsertZRotation_f(this->unk_0B1C[phi_v0].z, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->unk_01BC[phi_v0].x, this->unk_01BC[phi_v0].y, this->unk_01BC[phi_v0].z, MTXMODE_NEW);
|
||||
Matrix_RotateYF(this->unk_0B1C[phi_v0].y + spA0, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(spA4 - this->unk_0B1C[phi_v0].x);
|
||||
Matrix_RotateZF(this->unk_0B1C[phi_v0].z, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_InsertYRotation_f(M_PI / 2, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(-(M_PI / 2));
|
||||
Matrix_RotateYF(M_PI / 2, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(-(M_PI / 2));
|
||||
Matrix_ToMtx(mtxIter);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, mtxIter, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -1436,13 +1434,13 @@ void Boss02_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
phi_f12 = 200.0f;
|
||||
}
|
||||
|
||||
Matrix_GetStateTranslationAndScaledX(phi_f12, &this->unk_147C[i + 1]);
|
||||
Matrix_MultVecX(phi_f12, &this->unk_147C[i + 1]);
|
||||
|
||||
if (i == 21) {
|
||||
Actor* child = this->actor.child;
|
||||
|
||||
if (child != NULL) {
|
||||
Matrix_GetStateTranslationAndScaledX(500.0f, &this->actor.child->world.pos);
|
||||
Matrix_MultVecX(500.0f, &this->actor.child->world.pos);
|
||||
}
|
||||
|
||||
func_809DA50C(1, &this->colliderSphere2, &this->unk_147C[i + 1]);
|
||||
@@ -1543,8 +1541,8 @@ void func_809DD2F8(GlobalContext* globalCtx) {
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, effect->unk_26 + (i * 3),
|
||||
(effect->unk_26 + (i * 3)) * 5, 32, 64, 1, 0, 0, 32, 32));
|
||||
|
||||
Matrix_InsertTranslation(effect->unk_00.x, effect->unk_00.y, effect->unk_00.z, MTXMODE_NEW);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(effect->unk_00.x, effect->unk_00.y, effect->unk_00.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(effect->unk_34 * D_809DF5B0, effect->unk_34 * D_809DF5B0, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
@@ -1562,9 +1560,9 @@ void func_809DD2F8(GlobalContext* globalCtx) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0x01, 100, 100, 120, 255);
|
||||
flag++;
|
||||
}
|
||||
Matrix_InsertTranslation(effect->unk_00.x, effect->unk_00.y, effect->unk_00.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(effect->unk_30, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(effect->unk_2E, MTXMODE_APPLY);
|
||||
Matrix_Translate(effect->unk_00.x, effect->unk_00.y, effect->unk_00.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(effect->unk_30, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(effect->unk_2E, MTXMODE_APPLY);
|
||||
Matrix_Scale(effect->unk_34 * D_809DF5B0, effect->unk_34 * D_809DF5B0, effect->unk_34 * D_809DF5B0,
|
||||
MTXMODE_APPLY);
|
||||
|
||||
@@ -1584,8 +1582,8 @@ void func_809DD2F8(GlobalContext* globalCtx) {
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 200, (u8)effect->unk_2C);
|
||||
|
||||
Matrix_InsertTranslation(effect->unk_00.x, effect->unk_00.y, effect->unk_00.z, MTXMODE_NEW);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(effect->unk_00.x, effect->unk_00.y, effect->unk_00.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(effect->unk_34 * D_809DF5B0, effect->unk_34 * D_809DF5B0, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
@@ -1608,8 +1606,8 @@ void func_809DD2F8(GlobalContext* globalCtx) {
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, effect->unk_26 + (i * 3),
|
||||
(effect->unk_26 + (i * 3)) * 5, 32, 64, 1, 0, 0, 32, 32));
|
||||
|
||||
Matrix_InsertTranslation(effect->unk_00.x, effect->unk_00.y, effect->unk_00.z, MTXMODE_NEW);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(effect->unk_00.x, effect->unk_00.y, effect->unk_00.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(effect->unk_34 * D_809DF5B0, effect->unk_34 * D_809DF5B0, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
@@ -2021,8 +2019,8 @@ void func_809DD934(Boss02* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if ((this->unk_1D18 != 0) && (this->unk_1D22 != 0)) {
|
||||
Matrix_RotateY(player->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_GetStateTranslationAndScaledZ(this->unk_1D64, &sp58);
|
||||
Matrix_RotateYS(player->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_MultVecZ(this->unk_1D64, &sp58);
|
||||
|
||||
this->unk_1D24.x = player->actor.world.pos.x + sp58.x;
|
||||
this->unk_1D24.y = player->actor.world.pos.y + sp58.y + this->unk_1D68;
|
||||
@@ -2033,8 +2031,8 @@ void func_809DD934(Boss02* this, GlobalContext* globalCtx) {
|
||||
this->unk_1D30.z = player->actor.world.pos.z;
|
||||
|
||||
this->unk_1D54 = Math_SinS(this->unk_1D14 * 1512) * this->unk_1D58;
|
||||
Matrix_InsertZRotation_f(this->unk_1D54, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslationAndScaledY(1.0f, &this->unk_1D3C);
|
||||
Matrix_RotateZF(this->unk_1D54, MTXMODE_APPLY);
|
||||
Matrix_MultVecY(1.0f, &this->unk_1D3C);
|
||||
Play_CameraSetAtEyeUp(globalCtx, this->unk_1D22, &this->unk_1D30, &this->unk_1D24, &this->unk_1D3C);
|
||||
ShrinkWindow_SetLetterboxTarget(27);
|
||||
}
|
||||
@@ -2084,9 +2082,8 @@ void func_809DEAC4(Boss02* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
this->unk_0150 += 0x4000;
|
||||
sp58 = (Math_SinS(this->unk_0150) * (BREG(19) + 5)) * 0.1f;
|
||||
Matrix_InsertZRotation_f(Math_SinS(this->unk_1D1C * 0x3000) * ((KREG(28) * 0.001f) + 0.017f),
|
||||
MTXMODE_NEW);
|
||||
Matrix_GetStateTranslationAndScaledY(1.0f, &this->unk_1D3C);
|
||||
Matrix_RotateZF(Math_SinS(this->unk_1D1C * 0x3000) * ((KREG(28) * 0.001f) + 0.017f), MTXMODE_NEW);
|
||||
Matrix_MultVecY(1.0f, &this->unk_1D3C);
|
||||
func_8019F128(NA_SE_EV_EARTHQUAKE_LAST - SFX_FLAG);
|
||||
}
|
||||
|
||||
|
||||
@@ -491,10 +491,10 @@ void Boss03_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
f32 rand;
|
||||
|
||||
rand = Boss03_RandZeroOne();
|
||||
Matrix_InsertYRotation_f((rand * M_PI * 0.2f) + ((2.0f * M_PI / 5.0f) * i), MTXMODE_NEW);
|
||||
Matrix_RotateYF((rand * M_PI * 0.2f) + ((2.0f * M_PI / 5.0f) * i), MTXMODE_NEW);
|
||||
|
||||
rand = Boss03_RandZeroOne();
|
||||
Matrix_GetStateTranslationAndScaledZ((rand * 800.0f) + 400.0f, &sp70);
|
||||
Matrix_MultVecZ((rand * 800.0f) + 400.0f, &sp70);
|
||||
|
||||
rand = Boss03_RandZeroOne();
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_BOSS_03, sp70.x, sp70.y, sp70.z, 0, rand * 0x10000, 0,
|
||||
@@ -574,8 +574,8 @@ void func_809E34B8(Boss03* this, GlobalContext* globalCtx) {
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(this->actor.world.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->actor.world.rot.y, MTXMODE_APPLY);
|
||||
|
||||
xDiff = this->unk_268.x - this->actor.world.pos.x;
|
||||
yDiff = this->unk_268.y - this->actor.world.pos.y;
|
||||
@@ -589,10 +589,10 @@ void func_809E34B8(Boss03* this, GlobalContext* globalCtx) {
|
||||
|
||||
Math_ApproachS(&this->unk_274, this->unk_276, 1, 0x100);
|
||||
Math_ApproachF(&this->actor.speedXZ, this->unk_278, 1.0f, this->unk_27C);
|
||||
Math_ApproachF(&this->unk_260, __sinf(this->skelAnime.curFrame * (M_PI / 5.0f)) * 10.0f * 0.01f, 0.5f, 1.0f);
|
||||
Math_ApproachF(&this->unk_260, sinf(this->skelAnime.curFrame * (M_PI / 5.0f)) * 10.0f * 0.01f, 0.5f, 1.0f);
|
||||
|
||||
if ((this->workTimer[WORK_TIMER_UNK2_A] == 0) && (this->actor.bgCheckFlags & 8)) {
|
||||
Matrix_GetStateTranslationAndScaledZ(-500.0f, &this->unk_268);
|
||||
Matrix_MultVecZ(-500.0f, &this->unk_268);
|
||||
this->unk_268.y = Rand_ZeroFloat(100.0f) + 150.0f;
|
||||
this->workTimer[WORK_TIMER_UNK2_A] = 60;
|
||||
this->workTimer[WORK_TIMER_UNK0_A] = Rand_ZeroFloat(60.0f) + 60.0f;
|
||||
@@ -677,7 +677,7 @@ void Boss03_ChasePlayer(Boss03* this, GlobalContext* globalCtx) {
|
||||
|
||||
Math_ApproachS(&this->unk_274, this->unk_276, 1, 0x100);
|
||||
Math_ApproachF(&this->actor.speedXZ, this->unk_278, 1.0f, this->unk_27C);
|
||||
Math_ApproachF(&this->unk_260, __sinf(this->skelAnime.curFrame * (M_PI / 5.0f)) * 10.0f * 0.01f, 0.5f, 1.0f);
|
||||
Math_ApproachF(&this->unk_260, sinf(this->skelAnime.curFrame * (M_PI / 5.0f)) * 10.0f * 0.01f, 0.5f, 1.0f);
|
||||
Actor_MoveWithoutGravityReverse(&this->actor);
|
||||
|
||||
Math_ApproachS(&this->actor.shape.rot.x, this->actor.world.rot.x, 2, this->unk_274 * 2);
|
||||
@@ -706,10 +706,9 @@ void Boss03_ChasePlayer(Boss03* this, GlobalContext* globalCtx) {
|
||||
sp44 = 100.0f;
|
||||
}
|
||||
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateY(this->actor.world.rot.y, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslationAndScaledZ(sp44, &sp50);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->actor.world.rot.y, MTXMODE_APPLY);
|
||||
Matrix_MultVecZ(sp44, &sp50);
|
||||
|
||||
xDiff = sp50.x - player->actor.world.pos.x;
|
||||
zDiff = sp50.z - player->actor.world.pos.z;
|
||||
@@ -774,7 +773,7 @@ void Boss03_CatchPlayer(Boss03* this, GlobalContext* globalCtx) {
|
||||
5, 0x100);
|
||||
Math_ApproachS(&this->unk_274, this->unk_276, 1, 0x100);
|
||||
Math_ApproachF(&this->actor.speedXZ, this->unk_278, 1.0f, this->unk_27C);
|
||||
Math_ApproachF(&this->unk_260, __sinf(this->skelAnime.curFrame * (M_PI / 5.0f)) * 10.0f * 0.01f, 0.5f, 1.0f);
|
||||
Math_ApproachF(&this->unk_260, sinf(this->skelAnime.curFrame * (M_PI / 5.0f)) * 10.0f * 0.01f, 0.5f, 1.0f);
|
||||
Actor_MoveWithoutGravityReverse(&this->actor);
|
||||
Math_ApproachS(&this->actor.shape.rot.x, this->actor.world.rot.x, 2, this->unk_274 * 2);
|
||||
Math_ApproachS(&this->actor.shape.rot.y, this->actor.world.rot.y, 2, this->unk_274 * 2);
|
||||
@@ -834,12 +833,12 @@ void Boss03_SetupChewPlayer(Boss03* this, GlobalContext* globalCtx) {
|
||||
this->actionFunc = Boss03_ChewPlayer;
|
||||
|
||||
pitchAngle = Math_FAtan2F(this->actor.world.pos.z, this->actor.world.pos.x);
|
||||
Matrix_RotateY(pitchAngle, MTXMODE_NEW);
|
||||
Matrix_RotateYS(pitchAngle, MTXMODE_NEW);
|
||||
|
||||
out.x = 0.0f;
|
||||
out.y = 200.0f;
|
||||
out.z = 700.0f;
|
||||
Matrix_MultiplyVector3fByState(&out, &this->unk_268);
|
||||
Matrix_MultVec3f(&out, &this->unk_268);
|
||||
|
||||
this->unk_276 = 0x800;
|
||||
this->unk_242 = 0;
|
||||
@@ -864,8 +863,8 @@ void Boss03_ChewPlayer(Boss03* this, GlobalContext* globalCtx) {
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(this->actor.world.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->actor.world.rot.y, MTXMODE_APPLY);
|
||||
|
||||
xDiff = this->unk_268.x - this->actor.world.pos.x;
|
||||
yDiff = this->unk_268.y - this->actor.world.pos.y;
|
||||
@@ -877,7 +876,7 @@ void Boss03_ChewPlayer(Boss03* this, GlobalContext* globalCtx) {
|
||||
-0.5f,
|
||||
5, 0x100);
|
||||
Math_ApproachS(&this->unk_274, this->unk_276, 1, 0x100);
|
||||
Math_ApproachF(&this->unk_260, __sinf(this->skelAnime.curFrame * (M_PI / 5.0f)) * 10.0f * 0.01f, 0.5f, 1.0f);
|
||||
Math_ApproachF(&this->unk_260, sinf(this->skelAnime.curFrame * (M_PI / 5.0f)) * 10.0f * 0.01f, 0.5f, 1.0f);
|
||||
|
||||
switch (this->unk_242) {
|
||||
case 0:
|
||||
@@ -1041,7 +1040,7 @@ void Boss03_Charge(Boss03* this, GlobalContext* globalCtx) {
|
||||
this->actor.shape.rot = this->actor.world.rot;
|
||||
|
||||
Math_ApproachF(&this->actor.speedXZ, 25.0f, 1.0f, 3.0f);
|
||||
Math_ApproachF(&this->unk_260, __sinf(this->skelAnime.curFrame * (M_PI / 5.0f)) * 10.0f * 0.01f, 0.5f, 1.0f);
|
||||
Math_ApproachF(&this->unk_260, sinf(this->skelAnime.curFrame * (M_PI / 5.0f)) * 10.0f * 0.01f, 0.5f, 1.0f);
|
||||
Actor_MoveWithoutGravityReverse(&this->actor);
|
||||
|
||||
if (this->actor.speedXZ >= 20.0f) {
|
||||
@@ -1394,12 +1393,11 @@ void Boss03_IntroCutscene(Boss03* this, GlobalContext* globalCtx) {
|
||||
phi_f2 = CLAMP_MAX(phi_f2, 0.12f);
|
||||
|
||||
sp5C = Math_SinS(this->unk_240 * sp5A) * phi_f2;
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateY(this->actor.world.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertYRotation_f(sp5C, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->actor.world.rot.x, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslationAndScaledZ(100.0f, &this->csCamAt);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->actor.world.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(sp5C, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->actor.world.rot.x, MTXMODE_APPLY);
|
||||
Matrix_MultVecZ(100.0f, &this->csCamAt);
|
||||
|
||||
this->csCamEye = this->actor.world.pos;
|
||||
|
||||
@@ -1491,8 +1489,8 @@ void Boss03_DeathCutscene(Boss03* this, GlobalContext* globalCtx) {
|
||||
this->csCamTargetAt.z = this->actor.world.pos.z;
|
||||
|
||||
this->unk_568 += this->unk_56C;
|
||||
Matrix_InsertYRotation_f(this->unk_568, MTXMODE_NEW);
|
||||
Matrix_MultiplyVector3fByState(&sp90, &this->csCamTargetEye);
|
||||
Matrix_RotateYF(this->unk_568, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp90, &this->csCamTargetEye);
|
||||
|
||||
this->csCamTargetEye.x += this->actor.world.pos.x;
|
||||
this->csCamTargetEye.y += this->waterHeight;
|
||||
@@ -1517,8 +1515,8 @@ void Boss03_DeathCutscene(Boss03* this, GlobalContext* globalCtx) {
|
||||
Math_ApproachF(&this->actor.world.pos.y, Math_SinS(this->unk_240 * 0x1000) * 80.0f + this->waterHeight,
|
||||
1.0f, 10.0f);
|
||||
this->actor.shape.rot.z += 0x100;
|
||||
Matrix_RotateY(this->unk_2BE, MTXMODE_NEW);
|
||||
Matrix_GetStateTranslationAndScaledZ(500.0f, &sp84);
|
||||
Matrix_RotateYS(this->unk_2BE, MTXMODE_NEW);
|
||||
Matrix_MultVecZ(500.0f, &sp84);
|
||||
Math_ApproachF(&this->actor.world.pos.x, sp84.x, 0.1f, 5.0f);
|
||||
Math_ApproachF(&this->actor.world.pos.z, sp84.z, 0.1f, 5.0f);
|
||||
|
||||
@@ -1692,10 +1690,10 @@ void Boss03_SpawnSmallFishesCutscene(Boss03* this, GlobalContext* globalCtx) {
|
||||
|
||||
player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.world.rot.y + 0x8000;
|
||||
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateY(this->actor.shape.rot.y + this->unk_2BE, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslationAndScaledZ(340.0f, &this->csCamEye);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->actor.shape.rot.y + this->unk_2BE, MTXMODE_APPLY);
|
||||
Matrix_MultVecZ(340.0f, &this->csCamEye);
|
||||
|
||||
this->csCamAt.x = this->actor.world.pos.x;
|
||||
this->csCamAt.y = this->actor.world.pos.y;
|
||||
@@ -2065,8 +2063,8 @@ void Boss03_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
if (this->unk_290 != 0) {
|
||||
this->unk_294 += 0.1f;
|
||||
this->unk_298 += 0.12f;
|
||||
this->leftFinYRot = __sinf(this->unk_294) * 1280.0f;
|
||||
this->rightFinYRot = __sinf(this->unk_298) * 1280.0f;
|
||||
this->leftFinYRot = sinf(this->unk_294) * 1280.0f;
|
||||
this->rightFinYRot = sinf(this->unk_298) * 1280.0f;
|
||||
} else {
|
||||
Math_ApproachS(&this->rightFinYRot, 0, 0xA, 0x100);
|
||||
Math_ApproachS(&this->leftFinYRot, 0, 0xA, 0x100);
|
||||
@@ -2132,8 +2130,8 @@ void Boss03_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
yRot = 0.0f;
|
||||
|
||||
for (j = 0, i = 0; i < 20; j++) {
|
||||
Matrix_InsertYRotation_f(yRot, MTXMODE_NEW);
|
||||
Matrix_GetStateTranslationAndScaledZ(Rand_ZeroFloat(60.000004f) + 312.0f, &dropletPos);
|
||||
Matrix_RotateYF(yRot, MTXMODE_NEW);
|
||||
Matrix_MultVecZ(Rand_ZeroFloat(60.000004f) + 312.0f, &dropletPos);
|
||||
dropletPos.x += this->unk_284 + randPlusMinusPoint5Scaled(40.0f);
|
||||
dropletPos.y = PLATFORM_HEIGHT;
|
||||
dropletPos.z += this->unk_28C + randPlusMinusPoint5Scaled(40.0f);
|
||||
@@ -2236,12 +2234,12 @@ void Boss03_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (limbIndex == GYORG_LIMB_HEAD) {
|
||||
Matrix_MultiplyVector3fByState(&D_809E9148, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&D_809E9148, &this->actor.focus.pos);
|
||||
}
|
||||
|
||||
sphereElementIndex = sGyorgSphElementIndices[limbIndex];
|
||||
if (sphereElementIndex >= 0) {
|
||||
Matrix_MultiplyVector3fByState(&D_809E9154[sphereElementIndex], &spherePos);
|
||||
Matrix_MultVec3f(&D_809E9154[sphereElementIndex], &spherePos);
|
||||
|
||||
if (sphereElementIndex < 2) {
|
||||
if ((this->actionFunc == Boss03_Stunned) && (this->waterHeight < player->actor.world.pos.y)) {
|
||||
@@ -2258,9 +2256,9 @@ void Boss03_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V
|
||||
MtxF mf;
|
||||
|
||||
D_809E91B4.x = this->unk_2C4 + 300.0f;
|
||||
Matrix_MultiplyVector3fByState(&D_809E91B4, &this->insideJawPos);
|
||||
Matrix_CopyCurrentState(&mf);
|
||||
func_8018219C(&mf, &this->unk_2A2, 0);
|
||||
Matrix_MultVec3f(&D_809E91B4, &this->insideJawPos);
|
||||
Matrix_Get(&mf);
|
||||
Matrix_MtxFToYXZRot(&mf, &this->unk_2A2, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2276,8 +2274,8 @@ void Boss03_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
POLY_OPA_DISP = Gfx_SetFog(POLY_OPA_DISP, 255, 0, 0, 255, 900, 1099);
|
||||
}
|
||||
|
||||
Matrix_InsertYRotation_f(this->unk_260, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, -600.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(this->unk_260, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -600.0f, 0.0f, MTXMODE_APPLY);
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, Boss03_OverrideLimbDraw, Boss03_PostLimbDraw, &this->actor);
|
||||
POLY_OPA_DISP = func_801660B8(globalCtx, POLY_OPA_DISP);
|
||||
@@ -2346,11 +2344,11 @@ void Boss03_UpdateEffects(GlobalContext* globalCtx) {
|
||||
eff->alphaDelta = Rand_ZeroFloat(4.0f) + 5.0f;
|
||||
|
||||
for (j = 0; j < 4; j++) {
|
||||
Matrix_InsertYRotation_f((2.0f * (j * M_PI)) / 6.0f, 0);
|
||||
Matrix_RotateYF((2.0f * (j * M_PI)) / 6.0f, MTXMODE_NEW);
|
||||
sp94.x = 0.0f;
|
||||
sp94.y = Rand_ZeroFloat(4.0f) + 2.0f;
|
||||
sp94.z = Rand_ZeroFloat(1.5f) + 1.5f;
|
||||
Matrix_MultiplyVector3fByState(&sp94, &velocity);
|
||||
Matrix_MultVec3f(&sp94, &velocity);
|
||||
Boss03_SpawnEffectSplash(globalCtx, &eff->pos, &velocity);
|
||||
}
|
||||
}
|
||||
@@ -2413,9 +2411,9 @@ void Boss03_DrawEffects(GlobalContext* globalCtx) {
|
||||
flag = true;
|
||||
}
|
||||
|
||||
Matrix_InsertTranslation(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(eff->unk_34.x, eff->unk_34.x, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -2444,18 +2442,17 @@ void Boss03_DrawEffects(GlobalContext* globalCtx) {
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (u8)eff->unk_40, (u8)((((void)0, eff->unk_40) + 55.0f)), 225, 150);
|
||||
|
||||
Matrix_InsertTranslation(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW);
|
||||
|
||||
if (eff->type == GYORG_EFFECT_DROPLET) {
|
||||
Matrix_InsertYRotation_f(Camera_GetInputDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera]) *
|
||||
(M_PI / 0x8000),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_RotateYF(Camera_GetInputDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera]) * (M_PI / 0x8000),
|
||||
MTXMODE_APPLY);
|
||||
} else { // GYORG_EFFECT_SPLASH
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
}
|
||||
|
||||
Matrix_Scale(eff->unk_34.x, eff->unk_34.y, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_f(eff->unk_34.z, MTXMODE_APPLY);
|
||||
Matrix_RotateZF(eff->unk_34.z, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_water_effect_DL_0042B0);
|
||||
@@ -2481,10 +2478,10 @@ void Boss03_DrawEffects(GlobalContext* globalCtx) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s16)eff->unk_40, ((void)0, ((s16)eff->unk_40) + 55), 225,
|
||||
eff->alpha);
|
||||
|
||||
Matrix_InsertTranslation(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW);
|
||||
|
||||
Matrix_Scale(eff->unk_34.x, 1.0f, eff->unk_34.x, MTXMODE_APPLY);
|
||||
Matrix_InsertYRotation_f(eff->unk_34.z, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(eff->unk_34.z, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_water_effect_DL_0042F8);
|
||||
@@ -2610,27 +2607,27 @@ void Boss03_SeaweedDraw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0D, mtx);
|
||||
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(0x4000, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(0x4000, MTXMODE_APPLY);
|
||||
// The indices looks a bit random...
|
||||
Matrix_RotateY(this->jointTable[5].x * -5.0f * 0.1f, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->jointTable[3].y * -5.0f * 0.1f, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->jointTable[2].z * 6.0f * 0.1f, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->jointTable[5].x * -5.0f * 0.1f, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->jointTable[3].y * -5.0f * 0.1f, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->jointTable[2].z * 6.0f * 0.1f, MTXMODE_APPLY);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sGyorgSeaweedDLs); i++, mtx++) {
|
||||
Matrix_RotateY(this->jointTable[i].x + this->morphTable[i].x, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->jointTable[i].y + this->morphTable[i].y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->jointTable[i].z + this->morphTable[i].z, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->jointTable[i].x + this->morphTable[i].x, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->jointTable[i].y + this->morphTable[i].y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->jointTable[i].z + this->morphTable[i].z, MTXMODE_APPLY);
|
||||
|
||||
Matrix_ToMtx(mtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, sGyorgSeaweedDLs[i]);
|
||||
|
||||
Matrix_GetStateTranslation(&this->seaweedSegmentPositions[i]);
|
||||
Matrix_InsertTranslation(4000.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_MultZero(&this->seaweedSegmentPositions[i]);
|
||||
Matrix_Translate(4000.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
@@ -214,8 +214,8 @@ void Boss04_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
this->unk_6F6 = 82;
|
||||
phi_s0_2 = 0;
|
||||
for (i = 0; i < 82; i++) {
|
||||
Matrix_RotateY(phi_s0_2, MTXMODE_NEW);
|
||||
Matrix_GetStateTranslationAndScaledZ(phi_f20, &sp90);
|
||||
Matrix_RotateYS(phi_s0_2, MTXMODE_NEW);
|
||||
Matrix_MultVecZ(phi_f20, &sp90);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_TANRON2, this->unk_6E8 + sp90.x,
|
||||
phi_f24, this->unk_6F0 + sp90.z, 0, 0, 0, i);
|
||||
phi_f20 += 2.5f;
|
||||
@@ -245,7 +245,7 @@ void func_809EC568(Boss04* this, GlobalContext* globalCtx) {
|
||||
this->unk_1FE = 15;
|
||||
if ((this->unk_708 != 0) && (this->unk_708 < 10)) {
|
||||
this->actor.world.pos.y = (Math_SinS(this->unk_1F4 * 512) * 10.0f) + (this->actor.floorHeight + 160.0f);
|
||||
Matrix_RotateY(this->actor.yawTowardsPlayer, MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->actor.yawTowardsPlayer, MTXMODE_NEW);
|
||||
}
|
||||
|
||||
switch (this->unk_708) {
|
||||
@@ -339,7 +339,7 @@ void func_809EC568(Boss04* this, GlobalContext* globalCtx) {
|
||||
case 1:
|
||||
player->actor.shape.rot.y = 0x7FFF;
|
||||
player->actor.world.rot.y = player->actor.shape.rot.y;
|
||||
Matrix_GetStateTranslationAndScaledZ(-100.0f, &this->unk_70C);
|
||||
Matrix_MultVecZ(-100.0f, &this->unk_70C);
|
||||
|
||||
this->unk_70C.x += player->actor.world.pos.x;
|
||||
this->unk_70C.y = Player_GetHeight(player) + player->actor.world.pos.y + 36.0f;
|
||||
@@ -358,7 +358,7 @@ void func_809EC568(Boss04* this, GlobalContext* globalCtx) {
|
||||
|
||||
case 2:
|
||||
case 3:
|
||||
Matrix_GetStateTranslationAndScaledZ(500.0f, &this->unk_70C);
|
||||
Matrix_MultVecZ(500.0f, &this->unk_70C);
|
||||
this->unk_70C.x += this->actor.world.pos.x;
|
||||
this->unk_70C.y += this->actor.world.pos.y - 50.0f;
|
||||
this->unk_70C.z += this->actor.world.pos.z;
|
||||
@@ -591,82 +591,82 @@ void func_809ED50C(Boss04* this) {
|
||||
this->unk_2DE += this->unk_2E2;
|
||||
this->unk_2DC += this->unk_2E0;
|
||||
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, 10.0f, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslation(&this->unk_6BC);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, 10.0f, MTXMODE_APPLY);
|
||||
Matrix_MultZero(&this->unk_6BC);
|
||||
Matrix_Scale(this->actor.scale.x * 13.0f, this->actor.scale.y * 13.0f, this->actor.scale.z * 16.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_2DC, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_2DE, MTXMODE_APPLY);
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateYS(this->unk_2DC, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_2DE, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_2E4); i++) {
|
||||
Matrix_RotateStateAroundXAxis(0.3926991f);
|
||||
Matrix_GetStateTranslationAndScaledZ(100.0f, &this->unk_2E4[i]);
|
||||
Matrix_RotateXFApply(0.3926991f);
|
||||
Matrix_MultVecZ(100.0f, &this->unk_2E4[i]);
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertTranslation(38.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Pop();
|
||||
Matrix_Push();
|
||||
Matrix_Translate(38.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_3A4); i++) {
|
||||
Matrix_RotateStateAroundXAxis(0.41887903f);
|
||||
Matrix_GetStateTranslationAndScaledZ(92.0f, &this->unk_3A4[i]);
|
||||
Matrix_RotateXFApply(0.41887903f);
|
||||
Matrix_MultVecZ(92.0f, &this->unk_3A4[i]);
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertTranslation(-38.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Pop();
|
||||
Matrix_Push();
|
||||
Matrix_Translate(-38.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_458); i++) {
|
||||
Matrix_RotateStateAroundXAxis(0.41887903f);
|
||||
Matrix_GetStateTranslationAndScaledZ(92.0f, &this->unk_458[i]);
|
||||
Matrix_RotateXFApply(0.41887903f);
|
||||
Matrix_MultVecZ(92.0f, &this->unk_458[i]);
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertTranslation(71.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Pop();
|
||||
Matrix_Push();
|
||||
Matrix_Translate(71.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_50C); i++) {
|
||||
Matrix_RotateStateAroundXAxis(0.5711987f);
|
||||
Matrix_GetStateTranslationAndScaledZ(71.0f, &this->unk_50C[i]);
|
||||
Matrix_RotateXFApply(0.5711987f);
|
||||
Matrix_MultVecZ(71.0f, &this->unk_50C[i]);
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertTranslation(-71.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Pop();
|
||||
Matrix_Push();
|
||||
Matrix_Translate(-71.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_590); i++) {
|
||||
Matrix_RotateStateAroundXAxis(0.5711987f);
|
||||
Matrix_GetStateTranslationAndScaledZ(71.0f, &this->unk_590[i]);
|
||||
Matrix_RotateXFApply(0.5711987f);
|
||||
Matrix_MultVecZ(71.0f, &this->unk_590[i]);
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertTranslation(92.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Pop();
|
||||
Matrix_Push();
|
||||
Matrix_Translate(92.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_614); i++) {
|
||||
Matrix_RotateStateAroundXAxis(1.0471976f);
|
||||
Matrix_GetStateTranslationAndScaledZ(38.0f, &this->unk_614[i]);
|
||||
Matrix_RotateXFApply(1.0471976f);
|
||||
Matrix_MultVecZ(38.0f, &this->unk_614[i]);
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertTranslation(-92.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Pop();
|
||||
Matrix_Push();
|
||||
Matrix_Translate(-92.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_65C); i++) {
|
||||
Matrix_RotateStateAroundXAxis(1.0471976f);
|
||||
Matrix_GetStateTranslationAndScaledZ(38.0f, &this->unk_65C[i]);
|
||||
Matrix_RotateXFApply(1.0471976f);
|
||||
Matrix_MultVecZ(38.0f, &this->unk_65C[i]);
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertTranslation(100.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Pop();
|
||||
Matrix_Push();
|
||||
Matrix_Translate(100.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
||||
Matrix_GetStateTranslation(&this->unk_6A4);
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertTranslation(-100.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_GetStateTranslation(&this->unk_6B0);
|
||||
Matrix_MultZero(&this->unk_6A4);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(-100.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_MultZero(&this->unk_6B0);
|
||||
}
|
||||
|
||||
void Boss04_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
@@ -805,10 +805,10 @@ void Boss04_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V
|
||||
Vec3f sp18;
|
||||
|
||||
if (limbIndex == 1) {
|
||||
Matrix_GetStateTranslationAndScaledY(-500.0f, &this->actor.focus.pos);
|
||||
Matrix_MultiplyVector3fByState(&D_809EE228, &sp18);
|
||||
Matrix_MultVecY(-500.0f, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&D_809EE228, &sp18);
|
||||
func_809EC040(0, &this->collider1, &sp18);
|
||||
Matrix_MultiplyVector3fByState(&D_809EE234, &sp18);
|
||||
Matrix_MultVec3f(&D_809EE234, &sp18);
|
||||
func_809EC040(0, &this->collider2, &sp18);
|
||||
}
|
||||
}
|
||||
@@ -824,7 +824,7 @@ void Boss04_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
POLY_OPA_DISP = Gfx_SetFog(POLY_OPA_DISP, 255, 0, 0, 255, 900, 1099);
|
||||
}
|
||||
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, 800.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, 800.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->unk_6F8, this->unk_6FC, this->unk_700, MTXMODE_APPLY);
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
Boss04_OverrideLimbDraw, Boss04_PostLimbDraw, &this->actor);
|
||||
@@ -837,9 +837,9 @@ void Boss04_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, 150);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_boss04_DL_004510);
|
||||
|
||||
Matrix_InsertTranslation(this->unk_6BC.x, this->actor.floorHeight, this->unk_6BC.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, -20.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->unk_6BC.x, this->actor.floorHeight, this->unk_6BC.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, -20.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->unk_6F8 * 1.8f, 0.0f, this->unk_700 * 2.8f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -467,15 +467,14 @@ void Boss06_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
phi_f24 = 0.0f;
|
||||
|
||||
for (i = 0; i < 1024; i++) {
|
||||
temp_f22 =
|
||||
(((__sinf(phi_f24) * this->unk_1D4) + 1.0f) * ((__sinf(phi_f26) * this->unk_1D0) + this->unk_1D0)) +
|
||||
this->unk_1CC;
|
||||
temp_f22 = (((sinf(phi_f24) * this->unk_1D4) + 1.0f) * ((sinf(phi_f26) * this->unk_1D0) + this->unk_1D0)) +
|
||||
this->unk_1CC;
|
||||
|
||||
phi_f26 += (M_PI / 64);
|
||||
phi_f24 += 0.030679617f;
|
||||
|
||||
Matrix_InsertZRotation_f(i * (M_PI / 512), MTXMODE_NEW);
|
||||
Matrix_GetStateTranslationAndScaledY(temp_f22, &sp7C);
|
||||
Matrix_RotateZF(i * (M_PI / 512), MTXMODE_NEW);
|
||||
Matrix_MultVecY(temp_f22, &sp7C);
|
||||
|
||||
sp7C.x += 32.0f + this->unk_1BC;
|
||||
sp7C.y += 32.0f + this->unk_1C0;
|
||||
@@ -573,10 +572,10 @@ void Boss06_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
}
|
||||
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&object_knight_Matanimheader_019360));
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y - 234.0f,
|
||||
this->actor.world.pos.z + 30.0f, 0);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y - 234.0f, this->actor.world.pos.z + 30.0f,
|
||||
MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, -1112.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, -1112.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 155, 255, maxColor, (u8)((140.0f * sp68) + 115.0f), spD3);
|
||||
@@ -590,18 +589,18 @@ void Boss06_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
if (this->unk_144 & 1) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(&this->unk_200));
|
||||
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y + this->unk_1A8,
|
||||
this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y + this->unk_1A8, this->actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_knight_DL_0193B0);
|
||||
|
||||
if (this->unk_1D8 > 0.0f) {
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y + 84.0f,
|
||||
this->actor.world.pos.z - 2.0f, MTXMODE_NEW);
|
||||
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y + 84.0f, this->actor.world.pos.z - 2.0f,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
func_809F2120(1, 0x71A5, 0x263A);
|
||||
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 10, 0, 0);
|
||||
@@ -609,18 +608,18 @@ void Boss06_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_809F4370); i++) {
|
||||
if ((fabsf(D_809F4370[i].x - 32.0f) < 30.0f) && (fabsf(D_809F4370[i].y - 32.0f) < 30.0f)) {
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0,
|
||||
((globalCtx->gameplayFrames + (i * 10)) * -20) % 512, 0x20, 0x80));
|
||||
|
||||
Matrix_InsertTranslation((D_809F4370[i].x - 32.0f) * -2.4f, (D_809F4370[i].y - 32.0f) * -2.4f, 0.0f,
|
||||
MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_f(i * (M_PI / 64), MTXMODE_APPLY);
|
||||
Matrix_Translate((D_809F4370[i].x - 32.0f) * -2.4f, (D_809F4370[i].y - 32.0f) * -2.4f, 0.0f,
|
||||
MTXMODE_APPLY);
|
||||
Matrix_RotateZF(i * (M_PI / 64), MTXMODE_APPLY);
|
||||
|
||||
if (func_809F2140() < 0.5f) {
|
||||
Matrix_InsertYRotation_f(M_PI, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(M_PI, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
Matrix_Scale(-0.02f / 10.0f, -this->unk_1D8, 1.0f, MTXMODE_APPLY);
|
||||
@@ -629,7 +628,7 @@ void Boss06_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGameplayKeepDrawFlameDL);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -640,16 +639,15 @@ void Boss06_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
if (this->unk_1DC > 0.0f) {
|
||||
u8 temp_s2 = (this->unk_1E0 - 50.0f) + (50.0f * sp68);
|
||||
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x + this->unk_1B0,
|
||||
this->actor.world.pos.y + 84.0f + this->unk_1B4,
|
||||
(this->actor.world.pos.z - 2.0f) + spE0, MTXMODE_NEW);
|
||||
Matrix_Translate(this->actor.world.pos.x + this->unk_1B0, this->actor.world.pos.y + 84.0f + this->unk_1B4,
|
||||
(this->actor.world.pos.z - 2.0f) + spE0, MTXMODE_NEW);
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gLightOrb1DL);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, (u8)((140.0f * sp68) + 115.0f), temp_s2);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 205, (u8)((100.0f * sp68) + 65.0f), 128);
|
||||
|
||||
Matrix_Scale(this->unk_1DC, this->unk_1DC, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(globalCtx->gameplayFrames * 64, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(globalCtx->gameplayFrames * 64, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gLightOrbVtxDL);
|
||||
|
||||
@@ -297,15 +297,15 @@ void func_808CE078(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, this->unk_168[0], this->unk_168[1], this->unk_168[2], 255);
|
||||
|
||||
Matrix_InsertMatrix(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertZRotation_s(sp46, MTXMODE_APPLY);
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
Matrix_RotateZS(sp46, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_023288);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertZRotation_s(sp46 * -1, MTXMODE_APPLY);
|
||||
Matrix_Pop();
|
||||
Matrix_RotateZS(sp46 * -1, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_023288);
|
||||
|
||||
@@ -153,12 +153,9 @@ void DemoKakyo_LostWoodsSparkleActionFunc(DemoKankyo* this, GlobalContext* globa
|
||||
|
||||
Math_SmoothStepToF(&this->particles[i].scale, 0.1, 0.1f, 0.001f, 0.00001f);
|
||||
Math_SmoothStepToF(&this->particles[i].speed, this->particles[i].speedTarget, 0.5f, 0.2f, 0.02f);
|
||||
this->particles[i].posOffset.x +=
|
||||
__sinf(this->particles[i].speedClock.x) * this->particles[i].speed;
|
||||
this->particles[i].posOffset.y +=
|
||||
__sinf(this->particles[i].speedClock.y) * this->particles[i].speed;
|
||||
this->particles[i].posOffset.z +=
|
||||
__sinf(this->particles[i].speedClock.z) * this->particles[i].speed;
|
||||
this->particles[i].posOffset.x += sinf(this->particles[i].speedClock.x) * this->particles[i].speed;
|
||||
this->particles[i].posOffset.y += sinf(this->particles[i].speedClock.y) * this->particles[i].speed;
|
||||
this->particles[i].posOffset.z += sinf(this->particles[i].speedClock.z) * this->particles[i].speed;
|
||||
|
||||
switch ((i >> 1) & 3) {
|
||||
case 0:
|
||||
@@ -205,7 +202,7 @@ void DemoKakyo_LostWoodsSparkleActionFunc(DemoKankyo* this, GlobalContext* globa
|
||||
this->particles[i].LostWoodsSkyFishPosOffsetMax,
|
||||
0.5f, 2.0f, 0.2f);
|
||||
this->particles[i].LostWoodsSkyFishSpeedXZClock += this->particles[i].LostWoodsSkyFishSpeedXZ;
|
||||
this->particles[i].posOffset.y += __sinf(this->particles[i].speedClock.y);
|
||||
this->particles[i].posOffset.y += sinf(this->particles[i].speedClock.y);
|
||||
this->particles[i].speedClock.x += 0.2f * Rand_ZeroOne(); // unused calculation
|
||||
this->particles[i].speedClock.y += this->particles[i].LostWoodsSkyFishSpeedY;
|
||||
this->particles[i].speedClock.z += 0.1f * Rand_ZeroOne(); // unused calculation
|
||||
@@ -377,9 +374,9 @@ void DemoKakyo_MoonSparklesActionFunc(DemoKankyo* this, GlobalContext* globalCtx
|
||||
Math_SmoothStepToF(&this->particles[i].scale, 0.2f, 0.1f, 0.001f, 0.00001f);
|
||||
Math_SmoothStepToF(&this->particles[i].speed, this->particles[i].speedTarget, 0.5f, 0.2f, 0.02f);
|
||||
|
||||
this->particles[i].posOffset.x += __sinf(this->particles[i].speedClock.x) * this->particles[i].speed;
|
||||
this->particles[i].posOffset.y += __sinf(this->particles[i].speedClock.y) * this->particles[i].speed;
|
||||
this->particles[i].posOffset.z += __sinf(this->particles[i].speedClock.z) * this->particles[i].speed;
|
||||
this->particles[i].posOffset.x += sinf(this->particles[i].speedClock.x) * this->particles[i].speed;
|
||||
this->particles[i].posOffset.y += sinf(this->particles[i].speedClock.y) * this->particles[i].speed;
|
||||
this->particles[i].posOffset.z += sinf(this->particles[i].speedClock.z) * this->particles[i].speed;
|
||||
|
||||
switch ((i >> 1) & 3) {
|
||||
case 0:
|
||||
@@ -536,7 +533,7 @@ void DemoKakyo_DrawLostWoodsSparkle(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
// checking if particle is on screen
|
||||
if (screenPos.x >= 0.0f && screenPos.x < SCREEN_WIDTH && screenPos.y >= 0.0f &&
|
||||
screenPos.y < SCREEN_HEIGHT) {
|
||||
Matrix_InsertTranslation(worldPos.x, worldPos.y, worldPos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(worldPos.x, worldPos.y, worldPos.z, MTXMODE_NEW);
|
||||
scaleAlpha = this->particles[i].alpha / 50.0f;
|
||||
if (scaleAlpha > 1.0f) {
|
||||
scaleAlpha = 1.0f;
|
||||
@@ -586,8 +583,8 @@ void DemoKakyo_DrawLostWoodsSparkle(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
break;
|
||||
}
|
||||
|
||||
Matrix_InsertMatrix(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_f(DEGF_TO_RADF(globalCtx->state.frames * 20.0f), MTXMODE_APPLY);
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_RotateZF(DEGF_TO_RADF(globalCtx->state.frames * 20.0f), MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -625,7 +622,7 @@ void DemoKankyo_DrawMoonAndGiant(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
// checking if particle is on screen
|
||||
if (screenPos.x >= 0.0f && screenPos.x < SCREEN_WIDTH && screenPos.y >= 0.0f &&
|
||||
screenPos.y < SCREEN_HEIGHT) {
|
||||
Matrix_InsertTranslation(worldPos.x, worldPos.y, worldPos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(worldPos.x, worldPos.y, worldPos.z, MTXMODE_NEW);
|
||||
alphaScale = this->particles[i].alpha / 50.0f;
|
||||
if (alphaScale > 1.0f) {
|
||||
alphaScale = 1.0f;
|
||||
@@ -657,9 +654,9 @@ void DemoKankyo_DrawMoonAndGiant(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, &gLightOrb1DL);
|
||||
|
||||
Matrix_InsertMatrix(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
|
||||
Matrix_InsertZRotation_f(DEGF_TO_RADF(globalCtx->state.frames * 20.0f), MTXMODE_APPLY);
|
||||
Matrix_RotateZF(DEGF_TO_RADF(globalCtx->state.frames * 20.0f), MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -489,7 +489,7 @@ void func_80C173B4(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
if (matrix != NULL) {
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
Matrix_InsertMatrix(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
func_8018450C(globalCtx, &this->unk_144, matrix, (void*)func_80C170F8, 0, &this->actor);
|
||||
}
|
||||
}
|
||||
@@ -518,14 +518,14 @@ void DemoSyoten_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
|
||||
if (this->unk_3E4 & 4) {
|
||||
Matrix_InsertZRotation_s(-this->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_InsertMatrix(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-this->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Scale(1.0f, 5.0f, 1.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (this->unk_3E4 & 1) {
|
||||
Matrix_InsertMatrix(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (this->unk_3E4 & 8) {
|
||||
@@ -555,7 +555,7 @@ void func_80C17690(Actor* thisx, GlobalContext* globalCtx) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
Matrix_RotateY(BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx))), MTXMODE_APPLY);
|
||||
Matrix_RotateYS(BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx))), MTXMODE_APPLY);
|
||||
|
||||
if (this->unk_3E4 & 8) {
|
||||
func_80C17468(globalCtx);
|
||||
|
||||
@@ -280,21 +280,21 @@ void func_80C1CD80(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
if ((limbIndex == OBJECT_AN1_LIMB_05) && (this->unk_2D4 != 0)) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_JointPosition(&D_80C1D2C8, &D_80C1D2D4);
|
||||
Matrix_Push();
|
||||
Matrix_TranslateRotateZYX(&D_80C1D2C8, &D_80C1D2D4);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[sp2A].segment);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gMoonMaskDL);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[sp2B].segment);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
if (limbIndex == OBJECT_AN1_LIMB_09) {
|
||||
Matrix_MultiplyVector3fByState(&D_80C1D2DC, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&D_80C1D2DC, &this->actor.focus.pos);
|
||||
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.world.rot);
|
||||
}
|
||||
}
|
||||
@@ -320,23 +320,23 @@ void func_80C1CEFC(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
|
||||
SubS_UpdateLimb(this->unk_2BE + this->unk_2C2 + 0x4000,
|
||||
this->unk_2C0 + this->unk_2C4 + this->actor.shape.rot.y + 0x4000, &this->unk_18C,
|
||||
&this->unk_1A4, stepRot, overrideRot);
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertTranslation(this->unk_18C.x, this->unk_18C.y, this->unk_18C.z, MTXMODE_NEW);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(this->unk_18C.x, this->unk_18C.y, this->unk_18C.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_1A4.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_1A4.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_1A4.z, MTXMODE_APPLY);
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateYS(this->unk_1A4.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_1A4.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_1A4.z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
} else if (limbIndex == OBJECT_AN1_LIMB_02) {
|
||||
SubS_UpdateLimb(this->unk_2C2 + 0x4000, this->unk_2C4 + this->actor.shape.rot.y + 0x4000, &this->unk_194,
|
||||
&this->unk_1AA, stepRot, overrideRot);
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertTranslation(this->unk_194.x, this->unk_194.y, this->unk_194.z, MTXMODE_NEW);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(this->unk_194.x, this->unk_194.y, this->unk_194.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_1AA.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_1AA.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_1AA.z, MTXMODE_APPLY);
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateYS(this->unk_1AA.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_1AA.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_1AA.z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -901,8 +901,8 @@ s32 DmChar00_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLi
|
||||
|
||||
if (limbIndex == 6) {
|
||||
sp28 = ((Math_SinS(this->unk_262 * 0x1000) * 0.1f) + 1.0f) * 0.012f * (this->actor.scale.x * 124.99999f);
|
||||
Matrix_MultiplyVector3fByState(&D_80AA7808, &sp1C);
|
||||
Matrix_InsertTranslation(sp1C.x, sp1C.y, sp1C.z, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&D_80AA7808, &sp1C);
|
||||
Matrix_Translate(sp1C.x, sp1C.y, sp1C.z, MTXMODE_NEW);
|
||||
Matrix_Scale(sp28, sp28, sp28, MTXMODE_APPLY);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -411,7 +411,7 @@ void DmChar01_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&object_mtoride_Matanimheader_0110B8));
|
||||
Gfx_DrawDListOpa(globalCtx, object_mtoride_DL_010FD8);
|
||||
Gfx_DrawDListXlu(globalCtx, object_mtoride_DL_010EF0);
|
||||
Matrix_InsertTranslation(0.0f, 10.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 10.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&object_mtoride_Matanimheader_009D70));
|
||||
|
||||
|
||||
@@ -671,7 +671,7 @@ void func_80AADC00(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (globalCtx->csCtx.actorActions[actionIndex]->action == 4) {
|
||||
Matrix_InsertTranslation(-600.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(-600.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Gfx_DrawDListOpa(globalCtx, object_dmask_DL_001E70);
|
||||
}
|
||||
}
|
||||
@@ -716,8 +716,8 @@ void DmChar05_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
void func_80AADD9C(GlobalContext* globalCtx, DmChar05* this) {
|
||||
if (this->actor.objBankIndex == this->unk_18F) {
|
||||
Matrix_InsertTranslation(this->unk_190.x, this->unk_190.y, this->unk_190.z, MTXMODE_NEW);
|
||||
Matrix_InsertRotation(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->unk_190.x, this->unk_190.y, this->unk_190.z, MTXMODE_NEW);
|
||||
Matrix_RotateZYX(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
|
||||
GetItem_Draw(globalCtx, GID_44);
|
||||
}
|
||||
@@ -729,8 +729,8 @@ void func_80AADD9C(GlobalContext* globalCtx, DmChar05* this) {
|
||||
|
||||
void func_80AADE78(GlobalContext* globalCtx, DmChar05* this) {
|
||||
if (this->actor.objBankIndex == this->unk_18F) {
|
||||
Matrix_InsertTranslation(this->unk_190.x, this->unk_190.y, this->unk_190.z, MTXMODE_NEW);
|
||||
Matrix_InsertRotation(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->unk_190.x, this->unk_190.y, this->unk_190.z, MTXMODE_NEW);
|
||||
Matrix_RotateZYX(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
|
||||
GetItem_Draw(globalCtx, GID_45);
|
||||
}
|
||||
@@ -742,8 +742,8 @@ void func_80AADE78(GlobalContext* globalCtx, DmChar05* this) {
|
||||
|
||||
void func_80AADF54(GlobalContext* globalCtx, DmChar05* this) {
|
||||
if (this->actor.objBankIndex == this->unk_18F) {
|
||||
Matrix_InsertTranslation(this->unk_190.x, this->unk_190.y, this->unk_190.z, MTXMODE_NEW);
|
||||
Matrix_InsertRotation(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->unk_190.x, this->unk_190.y, this->unk_190.z, MTXMODE_NEW);
|
||||
Matrix_RotateZYX(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
|
||||
GetItem_Draw(globalCtx, GID_6B);
|
||||
}
|
||||
@@ -756,8 +756,8 @@ void func_80AADF54(GlobalContext* globalCtx, DmChar05* this) {
|
||||
void func_80AAE030(GlobalContext* globalCtx, DmChar05* this) {
|
||||
if (this->unk_18E != 0) {
|
||||
if (this->actor.objBankIndex == this->unk_18F) {
|
||||
Matrix_InsertTranslation(this->unk_190.x, this->unk_190.y, this->unk_190.z, MTXMODE_NEW);
|
||||
Matrix_InsertRotation(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->unk_190.x, this->unk_190.y, this->unk_190.z, MTXMODE_NEW);
|
||||
Matrix_RotateZYX(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
|
||||
GetItem_Draw(globalCtx, GID_03);
|
||||
}
|
||||
@@ -776,9 +776,8 @@ void func_80AAE114(GlobalContext* globalCtx, DmChar05* this) {
|
||||
|
||||
sp34 = DMCHAR05_GET(&this->actor) - DMCHAR05_5;
|
||||
if (this->actor.objBankIndex == this->unk_18F) {
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_InsertRotation(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateZYX(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
|
||||
GetItem_Draw(globalCtx, sp24[sp34]);
|
||||
}
|
||||
|
||||
@@ -280,21 +280,21 @@ void DmGm_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
||||
if ((limbIndex == OBJECT_AN1_LIMB_05) && (this->unk_2D4 != 0)) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_JointPosition(&D_80C25218, &D_80C25224);
|
||||
Matrix_Push();
|
||||
Matrix_TranslateRotateZYX(&D_80C25218, &D_80C25224);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[sp2A].segment);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gMoonMaskDL);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[sp2B].segment);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
if (limbIndex == OBJECT_AN1_LIMB_09) {
|
||||
Matrix_MultiplyVector3fByState(&D_80C2522C, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&D_80C2522C, &this->actor.focus.pos);
|
||||
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.world.rot);
|
||||
}
|
||||
}
|
||||
@@ -320,23 +320,23 @@ void DmGm_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* this
|
||||
SubS_UpdateLimb(this->unk_2BE + this->unk_2C2 + 0x4000,
|
||||
this->unk_2C0 + this->unk_2C4 + this->actor.shape.rot.y + 0x4000, &this->unk_18C,
|
||||
&this->unk_1A4, stepRot, overrideRot);
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertTranslation(this->unk_18C.x, this->unk_18C.y, this->unk_18C.z, MTXMODE_NEW);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(this->unk_18C.x, this->unk_18C.y, this->unk_18C.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_1A4.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_1A4.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_1A4.z, MTXMODE_APPLY);
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateYS(this->unk_1A4.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_1A4.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_1A4.z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
} else if (limbIndex == OBJECT_AN1_LIMB_02) {
|
||||
SubS_UpdateLimb(this->unk_2C2 + 0x4000, this->unk_2C4 + this->actor.shape.rot.y + 0x4000, &this->unk_194,
|
||||
&this->unk_1AA, stepRot, overrideRot);
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertTranslation(this->unk_194.x, this->unk_194.y, this->unk_194.z, MTXMODE_NEW);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(this->unk_194.x, this->unk_194.y, this->unk_194.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_1AA.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_1AA.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_1AA.z, MTXMODE_APPLY);
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateYS(this->unk_1AA.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_1AA.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_1AA.z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1618,7 +1618,7 @@ void DmStk_PostLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V
|
||||
DmStk* this = THIS;
|
||||
|
||||
if (limbIndex == 17) {
|
||||
Matrix_GetStateTranslation(&this->unk_304);
|
||||
Matrix_MultZero(&this->unk_304);
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
@@ -1658,7 +1658,7 @@ void DmStk_PostLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V
|
||||
if (Cutscene_CheckActorAction(globalCtx, 513) &&
|
||||
(globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 513)]->action == 2) &&
|
||||
(this->unk_337 >= 0)) {
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY);
|
||||
gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->unk_337].segment);
|
||||
|
||||
@@ -1670,7 +1670,7 @@ void DmStk_PostLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[this->unk_336].segment);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1706,9 +1706,9 @@ void DmStk_PostLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V
|
||||
break;
|
||||
|
||||
case 5:
|
||||
Matrix_InsertTranslation(-20.0f, -660.0f, 860.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateY(0x6142, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(-0x1988, MTXMODE_APPLY);
|
||||
Matrix_Translate(-20.0f, -660.0f, 860.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(0x6142, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(-0x1988, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -673,9 +673,9 @@ void DoorShutter_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
|
||||
if (this->unk_164 == 7) {
|
||||
Matrix_InsertTranslation(0.0f, 64.96f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->actor.home.rot.z, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, -64.96f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 64.96f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->actor.home.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -64.96f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (sp44->unk_04 != 0) {
|
||||
@@ -687,10 +687,10 @@ void DoorShutter_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s16 yaw = this->actor.shape.rot.y - Math_Vec3f_Yaw(&globalCtx->view.eye, &this->actor.world.pos);
|
||||
|
||||
if (ABS_ALT(yaw) < 0x4000) {
|
||||
Matrix_InsertYRotation_f(M_PI, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(M_PI, MTXMODE_APPLY);
|
||||
}
|
||||
} else if (this->actor.room == transitionEntry->sides[0].room) {
|
||||
Matrix_InsertYRotation_f(M_PI, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(M_PI, MTXMODE_APPLY);
|
||||
}
|
||||
} else if (this->doorType == 5) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_808A22DC[this->unk_15E]));
|
||||
@@ -700,7 +700,7 @@ void DoorShutter_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, sp44->unk_00);
|
||||
|
||||
if ((this->unk_168 != 0.0f) && (sp44->unk_04 != 0)) {
|
||||
Matrix_InsertTranslation(0.0f, sp44->unk_08 * (1.0f - this->unk_168), sp44->translateZ, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, sp44->unk_08 * (1.0f - this->unk_168), sp44->translateZ, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -972,8 +972,8 @@ void func_808BAE9C(DoorWarp1* this, GlobalContext* globalCtx) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255.0f * sp84, 255, 255, (u8)this->unk_1B4);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 255.0f * sp84, 255, 255);
|
||||
|
||||
Matrix_InsertTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y + 1.0f,
|
||||
this->dyna.actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y + 1.0f, this->dyna.actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
phi_f12 = 1.0f;
|
||||
if (this->unk_203 != 0) {
|
||||
phi_f12 = this->unk_204 * phi_f12;
|
||||
@@ -981,19 +981,19 @@ void func_808BAE9C(DoorWarp1* this, GlobalContext* globalCtx) {
|
||||
Matrix_Scale(phi_f12, phi_f12, phi_f12, MTXMODE_APPLY);
|
||||
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0A, Matrix_NewMtx(globalCtx->state.gfxCtx));
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, sp94 & 0xFF, -((s16)(2.0f * this->unk_1AC) & 0x1FF), 0x100,
|
||||
0x100, 1, sp94 & 0xFF, -((s16)(2.0f * this->unk_1AC) & 0x1FF), 0x100, 0x100));
|
||||
|
||||
Matrix_InsertTranslation(0.0f, this->unk_1A4 * 230.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, this->unk_1A4 * 230.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(((this->unk_1C6 * sp90) / 100.0f) + 1.0f, 1.0f, ((this->unk_1C6 * sp90) / 100.0f) + 1.0f,
|
||||
MTXMODE_APPLY);
|
||||
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09, Matrix_NewMtx(globalCtx->state.gfxCtx));
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_warp1_DL_0001A0);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
if (this->unk_1B0 > 0.0f) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255.0f * sp84, 255, 255, (u8)this->unk_1B0);
|
||||
@@ -1004,7 +1004,7 @@ void func_808BAE9C(DoorWarp1* this, GlobalContext* globalCtx) {
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, sp94 & 0xFF, -((s16)this->unk_1AC & 0x1FF), 0x100,
|
||||
0x100, 1, sp94 & 0xFF, -((s16)this->unk_1AC & 0x1FF), 0x100, 0x100));
|
||||
|
||||
Matrix_InsertTranslation(0.0f, this->unk_1A8 * 60.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, this->unk_1A8 * 60.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(((this->unk_1C8 * sp8C) / 100.0f) + 1.0f, 1.0f, ((this->unk_1C8 * sp8C) / 100.0f) + 1.0f,
|
||||
MTXMODE_APPLY);
|
||||
|
||||
@@ -1031,8 +1031,8 @@ void func_808BB4F4(DoorWarp1* this, GlobalContext* globalCtx2) {
|
||||
s32 sp60 = 0;
|
||||
|
||||
if (this->unk_1D4 != 0) {
|
||||
Matrix_InsertTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y + this->unk_1A4,
|
||||
this->dyna.actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y + this->unk_1A4,
|
||||
this->dyna.actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(4.0f, this->unk_1AC, 4.0f, MTXMODE_APPLY);
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(object_warp1_Matanimheader_0044D8));
|
||||
Gfx_DrawDListXlu(globalCtx, object_warp1_DL_003230);
|
||||
@@ -1049,9 +1049,9 @@ void func_808BB4F4(DoorWarp1* this, GlobalContext* globalCtx2) {
|
||||
}
|
||||
}
|
||||
|
||||
Matrix_InsertTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateY(this->dyna.actor.world.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->dyna.actor.world.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Scale(1.0f, this->unk_1A8, 1.0f, MTXMODE_APPLY);
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(object_warp1_Matanimheader_0057D8));
|
||||
|
||||
@@ -1069,9 +1069,9 @@ void func_808BB4F4(DoorWarp1* this, GlobalContext* globalCtx2) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(object_warp1_Matanimheader_007238));
|
||||
Matrix_InsertTranslation(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateY(this->dyna.actor.world.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->dyna.actor.world.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Scale(1.0f, 0.0f, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
|
||||
@@ -283,14 +283,14 @@ void func_80919768(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
for (i = 0; i < ARRAY_COUNT(this->distanceTraveled); i++) {
|
||||
if (*distanceTraveled < 1.0f) {
|
||||
aux = 1.0f - SQ(*distanceTraveled);
|
||||
Matrix_InsertTranslation(thisx->world.pos.x, thisx->world.pos.y, thisx->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(sp92, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(initialPositions->x * ((this->dx * aux) + (1.0f - this->dx)),
|
||||
initialPositions->y * ((this->dy * aux) + (1.0f - this->dy)),
|
||||
initialPositions->z * ((this->dz * aux) + (1.0f - this->dz)), MTXMODE_APPLY);
|
||||
Matrix_Translate(thisx->world.pos.x, thisx->world.pos.y, thisx->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(sp92, MTXMODE_APPLY);
|
||||
Matrix_Translate(initialPositions->x * ((this->dx * aux) + (1.0f - this->dx)),
|
||||
initialPositions->y * ((this->dy * aux) + (1.0f - this->dy)),
|
||||
initialPositions->z * ((this->dz * aux) + (1.0f - this->dz)), MTXMODE_APPLY);
|
||||
Matrix_Scale(this->scalingFactor, this->scalingFactor, this->scalingFactor, MTXMODE_APPLY);
|
||||
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -339,15 +339,15 @@ void func_809199FC(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (*distanceTraveled * 255.0f));
|
||||
|
||||
aux = 1.0f - SQ(*distanceTraveled);
|
||||
Matrix_InsertMatrix(&player->mf_CC4, MTXMODE_NEW);
|
||||
Matrix_InsertTranslation(initialPositions->x * ((this->dx * aux) + (1.0f - this->dx)),
|
||||
(initialPositions->y * (1.0f - *distanceTraveled)) + 320.0f,
|
||||
(initialPositions->z * (1.0f - *distanceTraveled)) + -20.0f, MTXMODE_APPLY);
|
||||
Matrix_Mult(&player->mf_CC4, MTXMODE_NEW);
|
||||
Matrix_Translate(initialPositions->x * ((this->dx * aux) + (1.0f - this->dx)),
|
||||
(initialPositions->y * (1.0f - *distanceTraveled)) + 320.0f,
|
||||
(initialPositions->z * (1.0f - *distanceTraveled)) + -20.0f, MTXMODE_APPLY);
|
||||
|
||||
Matrix_Scale(*distanceTraveled * this->scalingFactor, *distanceTraveled * this->scalingFactor,
|
||||
*distanceTraveled * this->scalingFactor, MTXMODE_APPLY);
|
||||
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPClearGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
||||
|
||||
@@ -568,7 +568,7 @@ void EnAh_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
||||
EnAh* this = THIS;
|
||||
|
||||
if (limbIndex == 7) {
|
||||
Matrix_MultiplyVector3fByState(&D_80BD3F00, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&D_80BD3F00, &this->actor.focus.pos);
|
||||
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.world.rot);
|
||||
}
|
||||
}
|
||||
@@ -594,23 +594,23 @@ void EnAh_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* this
|
||||
SubS_UpdateLimb(BINANG_ADD(this->unk_2EC + this->unk_2F0, 0x4000),
|
||||
BINANG_ADD(this->unk_2EE + this->unk_2F2 + this->actor.shape.rot.y, 0x4000), this->unk_1E8,
|
||||
this->unk_200, stepRot, overrideRot);
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertTranslation(this->unk_1E8[0].x, this->unk_1E8[0].y, this->unk_1E8[0].z, MTXMODE_NEW);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(this->unk_1E8[0].x, this->unk_1E8[0].y, this->unk_1E8[0].z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_200[0].y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_200[0].x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_200[0].z, MTXMODE_APPLY);
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateYS(this->unk_200[0].y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_200[0].x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_200[0].z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
} else if (limbIndex == 2) {
|
||||
SubS_UpdateLimb(BINANG_ADD(this->unk_2F0, 0x4000), BINANG_ADD(this->unk_2F2 + this->actor.shape.rot.y, 0x4000),
|
||||
&this->unk_1E8[1], &this->unk_200[1], stepRot, overrideRot);
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertTranslation(this->unk_1E8[1].x, this->unk_1E8[1].y, this->unk_1E8[1].z, MTXMODE_NEW);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(this->unk_1E8[1].x, this->unk_1E8[1].y, this->unk_1E8[1].z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_200[1].y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_200[1].x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_200[1].z, MTXMODE_APPLY);
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateYS(this->unk_200[1].y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_200[1].x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_200[1].z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1699,7 +1699,7 @@ void EnAkindonuts_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Act
|
||||
}
|
||||
|
||||
if (limbIndex == 24) {
|
||||
Matrix_RotateY(this->unk_352, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->unk_352, MTXMODE_APPLY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -839,31 +839,31 @@ void EnAl_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
||||
|
||||
switch (limbIndex) {
|
||||
case 3:
|
||||
Matrix_CopyCurrentState(&this->unk_190[0]);
|
||||
Matrix_Get(&this->unk_190[0]);
|
||||
break;
|
||||
|
||||
case 11:
|
||||
Matrix_CopyCurrentState(&this->unk_190[1]);
|
||||
Matrix_Get(&this->unk_190[1]);
|
||||
break;
|
||||
|
||||
case 12:
|
||||
Matrix_CopyCurrentState(&this->unk_190[2]);
|
||||
Matrix_Get(&this->unk_190[2]);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
Matrix_CopyCurrentState(&this->unk_190[3]);
|
||||
Matrix_Get(&this->unk_190[3]);
|
||||
break;
|
||||
|
||||
case 14:
|
||||
Matrix_CopyCurrentState(&this->unk_190[4]);
|
||||
Matrix_Get(&this->unk_190[4]);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
Matrix_CopyCurrentState(&this->unk_190[5]);
|
||||
Matrix_Get(&this->unk_190[5]);
|
||||
break;
|
||||
|
||||
case 16:
|
||||
Matrix_MultiplyVector3fByState(&D_80BE0070, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&D_80BE0070, &this->actor.focus.pos);
|
||||
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.world.rot);
|
||||
break;
|
||||
}
|
||||
@@ -889,13 +889,13 @@ void EnAl_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* this
|
||||
if (limbIndex == 16) {
|
||||
SubS_UpdateLimb(this->unk_4DC + 0x4000, this->unk_4DE + this->actor.shape.rot.y + 0x4000, &this->unk_36C,
|
||||
&this->unk_378, stepRot, overrideRot);
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertTranslation(this->unk_36C.x, this->unk_36C.y, this->unk_36C.z, MTXMODE_NEW);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(this->unk_36C.x, this->unk_36C.y, this->unk_36C.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_378.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_378.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_378.z, MTXMODE_APPLY);
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateYS(this->unk_378.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_378.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_378.z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -907,13 +907,13 @@ void EnAl_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, 850.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, 850.0f, MTXMODE_APPLY);
|
||||
SkelAnime_DrawTransformFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, EnAl_OverrideLimbDraw, EnAl_PostLimbDraw,
|
||||
EnAl_TransformLimbDraw, &this->actor);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_190); i++) {
|
||||
Matrix_SetCurrentState(&this->unk_190[i]);
|
||||
Matrix_Put(&this->unk_190[i]);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -551,7 +551,7 @@ void EnAm_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
||||
phi_s3 = 0;
|
||||
}
|
||||
for (i = 0; i < phi_s3; i++, phi_s2++, phi_s1++) {
|
||||
Matrix_MultiplyVector3fByState(phi_s1, phi_s2);
|
||||
Matrix_MultVec3f(phi_s1, phi_s2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ void EnAni_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
|
||||
static Vec3f D_809686A4 = { 800.0f, 500.0f, 0.0f };
|
||||
|
||||
if (limbIndex == ANI_LIMB_HEAD) {
|
||||
Matrix_MultiplyVector3fByState(&D_809686A4, &thisx->focus.pos);
|
||||
Matrix_MultVec3f(&D_809686A4, &thisx->focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ void EnAni_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, -1000.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, -1000.0f, MTXMODE_APPLY);
|
||||
func_8012C5B0(globalCtx->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sEyeTextures[this->eyeState]));
|
||||
|
||||
@@ -999,15 +999,15 @@ s32 EnAob01_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
|
||||
}
|
||||
|
||||
if (limbIndex == MAMAMU_YAN_LIMB_HEAD) {
|
||||
Matrix_InsertTranslation(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->headRot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->headRot.x * -1, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->headRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->headRot.x * -1, MTXMODE_APPLY);
|
||||
Matrix_Translate(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == MAMAMU_YAN_LIMB_TORSO) {
|
||||
Matrix_InsertXRotation_s(this->torsoRot.y * -1, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->torsoRot.x * -1, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->torsoRot.y * -1, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->torsoRot.x * -1, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if ((limbIndex == MAMAMU_YAN_LIMB_TORSO) || (limbIndex == MAMAMU_YAN_LIMB_LEFT_UPPER_ARM) ||
|
||||
@@ -1023,7 +1023,7 @@ void EnAob01_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
EnAob01* this = THIS;
|
||||
|
||||
if (limbIndex == MAMAMU_YAN_LIMB_HEAD) {
|
||||
Matrix_MultiplyVector3fByState(&D_809C3968, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&D_809C3968, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -579,15 +579,15 @@ void func_8088B88C(GlobalContext* globalCtx, EnArrow* this, EnArrowUnkStruct* ar
|
||||
Vec3f sp34;
|
||||
s32 sp30;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&arg2->unk_48, &this->unk_234);
|
||||
Matrix_MultVec3f(&arg2->unk_48, &this->unk_234);
|
||||
if (func_8088ACE0 == this->actionFunc) {
|
||||
if (!this->unk_244.active) {
|
||||
sp4C = arg2->unk_00;
|
||||
} else {
|
||||
sp4C = arg2->unk_18[globalCtx->gameplayFrames % 2];
|
||||
}
|
||||
Matrix_MultiplyVector3fByState(&sp4C[0], &sp40);
|
||||
Matrix_MultiplyVector3fByState(&sp4C[1], &sp34);
|
||||
Matrix_MultVec3f(&sp4C[0], &sp40);
|
||||
Matrix_MultVec3f(&sp4C[1], &sp34);
|
||||
if (this->actor.params < ENARROW_8) {
|
||||
sp30 = this->actor.params < ENARROW_6;
|
||||
if (this->unk_264 == 0) {
|
||||
@@ -666,7 +666,7 @@ void EnArrow_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
Matrix_Scale(this->bubble.unk_144 * sp9C, this->bubble.unk_144 * sp9C, this->bubble.unk_144 * spA0,
|
||||
MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, 460.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, 460.0f, MTXMODE_APPLY);
|
||||
|
||||
if (this->actor.speedXZ == 0.0f) {
|
||||
func_800B8118(&this->actor, globalCtx, MTXMODE_NEW);
|
||||
@@ -677,7 +677,7 @@ void EnArrow_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
COMBINED, 0, ENVIRONMENT, 0, COMBINED, 0, ENVIRONMENT, 0);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 230, 225, 150, spA4);
|
||||
|
||||
Matrix_NormalizeXYZ(&gIdentityMtxF);
|
||||
Matrix_ReplaceRotation(&gIdentityMtxF);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -718,8 +718,8 @@ void EnArrow_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
sp5C = 150.0f;
|
||||
}
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertMatrix(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
|
||||
if (this->actor.speedXZ == 0.0f) {
|
||||
phi_v0 = 0;
|
||||
@@ -727,21 +727,21 @@ void EnArrow_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
phi_v0 = (globalCtx->gameplayFrames % 256) * 4000;
|
||||
}
|
||||
|
||||
Matrix_InsertZRotation_s(phi_v0, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(phi_v0, MTXMODE_APPLY);
|
||||
Matrix_Scale(sp5C, sp5C, sp5C, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffSparklesDL);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_RotateY(this->actor.world.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Pop();
|
||||
Matrix_RotateYS(this->actor.world.rot.y, MTXMODE_APPLY);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
} else if (this->actor.velocity.y != 0.0f) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
Matrix_InsertMatrix(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_058BA0);
|
||||
|
||||
@@ -700,19 +700,19 @@ s32 EnBaba_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
|
||||
EnBaba* this = THIS;
|
||||
|
||||
if (limbIndex == 6) {
|
||||
Matrix_InsertTranslation(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->headRot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(-this->headRot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->headRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-this->headRot.x, MTXMODE_APPLY);
|
||||
Matrix_Translate(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == 5) {
|
||||
Matrix_InsertXRotation_s(-this->torsoRot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(-this->torsoRot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(-this->torsoRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-this->torsoRot.x, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if ((limbIndex == 6) && (this->unk_1E2 != 0) && ((globalCtx->state.frames % 2) == 0)) {
|
||||
Matrix_InsertTranslation(40.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(40.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if ((limbIndex == 5) || (limbIndex == 10) || (limbIndex == 14)) {
|
||||
@@ -736,7 +736,7 @@ void EnBaba_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V
|
||||
this->actor.focus.pos.x = this->actor.world.pos.x;
|
||||
this->actor.focus.pos.y = this->actor.world.pos.y;
|
||||
this->actor.focus.pos.z = this->actor.world.pos.z;
|
||||
Matrix_MultiplyVector3fByState(&sp18, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&sp18, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -498,10 +498,10 @@ void EnBaguo_DrawRockParticles(EnBaguo* this, GlobalContext* globalCtx) {
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
for (i = 0; i < ARRAY_COUNT(this->particles); i++, particle++) {
|
||||
if (particle->isVisible) {
|
||||
Matrix_InsertTranslation(particle->position.x, particle->position.y, particle->position.z, MTXMODE_NEW);
|
||||
Matrix_InsertXRotation_s(particle->rotation.x, MTXMODE_APPLY);
|
||||
Matrix_RotateY(particle->rotation.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(particle->rotation.z, MTXMODE_APPLY);
|
||||
Matrix_Translate(particle->position.x, particle->position.y, particle->position.z, MTXMODE_NEW);
|
||||
Matrix_RotateXS(particle->rotation.x, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(particle->rotation.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(particle->rotation.z, MTXMODE_APPLY);
|
||||
Matrix_Scale(particle->scale, particle->scale, particle->scale, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -640,17 +640,17 @@ void EnBb_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
||||
if (this->bodyPartDrawStatus == BB_BODY_PART_DRAW_STATUS_ALIVE) {
|
||||
if (sLimbIndexToBodyPartsIndex[limbIndex] != -1) {
|
||||
if (sLimbIndexToBodyPartsIndex[limbIndex] == 0) {
|
||||
Matrix_GetStateTranslationAndScaledX(1000.0f, &this->bodyPartsPos[0]);
|
||||
Matrix_MultVecX(1000.0f, &this->bodyPartsPos[0]);
|
||||
} else if (sLimbIndexToBodyPartsIndex[limbIndex] == 3) {
|
||||
Matrix_GetStateTranslationAndScaledX(-1000.0f, &this->bodyPartsPos[3]);
|
||||
Matrix_MultiplyVector3fByState(&sDuplicateCraniumBodyPartOffset, &this->bodyPartsPos[4]);
|
||||
Matrix_MultVecX(-1000.0f, &this->bodyPartsPos[3]);
|
||||
Matrix_MultVec3f(&sDuplicateCraniumBodyPartOffset, &this->bodyPartsPos[4]);
|
||||
} else {
|
||||
Matrix_GetStateTranslation(&this->bodyPartsPos[sLimbIndexToBodyPartsIndex[limbIndex]]);
|
||||
Matrix_MultZero(&this->bodyPartsPos[sLimbIndexToBodyPartsIndex[limbIndex]]);
|
||||
}
|
||||
}
|
||||
} else if (this->bodyPartDrawStatus > BB_BODY_PART_DRAW_STATUS_ALIVE) {
|
||||
if (sLimbIndexToBodyPartsIndex[limbIndex] != -1) {
|
||||
Matrix_GetStateTranslation(&this->bodyPartsPos[sLimbIndexToBodyPartsIndex[limbIndex]]);
|
||||
Matrix_MultZero(&this->bodyPartsPos[sLimbIndexToBodyPartsIndex[limbIndex]]);
|
||||
}
|
||||
|
||||
if (limbIndex == BUBBLE_LIMB_CRANIUM) {
|
||||
@@ -660,11 +660,11 @@ void EnBb_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
||||
if (sLimbIndexToBodyPartsIndex[limbIndex] != -1) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
currentMatrixState = Matrix_GetCurrentState();
|
||||
currentMatrixState = Matrix_GetCurrent();
|
||||
currentMatrixState->mf[3][0] = this->bodyPartsPos[sLimbIndexToBodyPartsIndex[limbIndex]].x;
|
||||
currentMatrixState->mf[3][1] = this->bodyPartsPos[sLimbIndexToBodyPartsIndex[limbIndex]].y;
|
||||
currentMatrixState->mf[3][2] = this->bodyPartsPos[sLimbIndexToBodyPartsIndex[limbIndex]].z;
|
||||
Matrix_InsertZRotation_s(thisx->world.rot.z, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(thisx->world.rot.z, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, this->limbDList);
|
||||
@@ -689,9 +689,9 @@ void EnBb_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnBb_PostLimbDraw, &this->actor);
|
||||
|
||||
if (this->flameScaleX > 0.0f) {
|
||||
currentMatrixState = Matrix_GetCurrentState();
|
||||
currentMatrixState = Matrix_GetCurrent();
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
Matrix_RotateY(
|
||||
Matrix_RotateYS(
|
||||
((Camera_GetCamDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera]) - this->actor.shape.rot.y) + 0x8000),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_Scale(this->flameScaleX, this->flameScaleY, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
@@ -255,7 +255,7 @@ s32 EnBba01_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
|
||||
|
||||
bodyPart = gEnHyBodyParts[limbIndex];
|
||||
if (bodyPart >= 0) {
|
||||
Matrix_MultiplyVector3fByState(&zeroVec, &this->enHy.bodyPartsPos[bodyPart]);
|
||||
Matrix_MultVec3f(&zeroVec, &this->enHy.bodyPartsPos[bodyPart]);
|
||||
}
|
||||
|
||||
if (limbIndex == BBA_LIMB_RIGHT_LOWER_ARM_ROOT) {
|
||||
@@ -266,20 +266,20 @@ s32 EnBba01_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
if (limbIndex == BBA_LIMB_RIGHT_LOWER_ARM_ROOT) {
|
||||
Matrix_InsertTranslation(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->enHy.headRot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(-this->enHy.headRot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->enHy.headRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-this->enHy.headRot.x, MTXMODE_APPLY);
|
||||
Matrix_Translate(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == BBA_LIMB_BAG) {
|
||||
Matrix_InsertXRotation_s(-this->enHy.torsoRot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(-this->enHy.torsoRot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(-this->enHy.torsoRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-this->enHy.torsoRot.x, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if ((limbIndex == BBA_LIMB_RIGHT_LOWER_ARM_ROOT) && this->enHy.inMsgState3 &&
|
||||
((globalCtx->state.frames % 2) == 0)) {
|
||||
Matrix_InsertTranslation(40.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(40.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if ((limbIndex == BBA_LIMB_BAG) || (limbIndex == BBA_LIMB_TORSO) || (limbIndex == BBA_LIMB_LEFT_FOREARM)) {
|
||||
@@ -303,7 +303,7 @@ void EnBba01_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
}
|
||||
|
||||
if (limbIndex == BBA_LIMB_RIGHT_LOWER_ARM_ROOT) {
|
||||
Matrix_MultiplyVector3fByState(&zeroVec, &this->enHy.actor.focus.pos);
|
||||
Matrix_MultVec3f(&zeroVec, &this->enHy.actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@ void EnBba01_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
SkelAnime_DrawTransformFlexOpa(globalCtx, this->enHy.skelAnime.skeleton, this->enHy.skelAnime.jointTable,
|
||||
this->enHy.skelAnime.dListCount, EnBba01_OverrideLimbDraw, EnBba01_PostLimbDraw,
|
||||
EnBba01_TransformLimbDraw, &this->enHy.actor);
|
||||
Matrix_InsertXRotation_s(0, MTXMODE_NEW);
|
||||
Matrix_RotateXS(0, MTXMODE_NEW);
|
||||
|
||||
for (i = 0, shadowTexIter = shadowTex; i < SUBS_SHADOW_TEX_SIZE; i++) {
|
||||
*shadowTexIter++ = 0;
|
||||
|
||||
@@ -674,17 +674,17 @@ void EnBbfall_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
if (this->bodyPartDrawStatus == BBFALL_BODY_PART_DRAW_STATUS_ALIVE) {
|
||||
if (sLimbIndexToBodyPartsIndex[limbIndex] != -1) {
|
||||
if (sLimbIndexToBodyPartsIndex[limbIndex] == 0) {
|
||||
Matrix_GetStateTranslationAndScaledX(1000.0f, &this->bodyPartsPos[0]);
|
||||
Matrix_MultVecX(1000.0f, &this->bodyPartsPos[0]);
|
||||
} else if (sLimbIndexToBodyPartsIndex[limbIndex] == 3) {
|
||||
Matrix_GetStateTranslationAndScaledX(-1000.0f, &this->bodyPartsPos[3]);
|
||||
Matrix_MultiplyVector3fByState(&sDuplicateCraniumBodyPartOffset, &this->bodyPartsPos[4]);
|
||||
Matrix_MultVecX(-1000.0f, &this->bodyPartsPos[3]);
|
||||
Matrix_MultVec3f(&sDuplicateCraniumBodyPartOffset, &this->bodyPartsPos[4]);
|
||||
} else {
|
||||
Matrix_GetStateTranslation(&this->bodyPartsPos[sLimbIndexToBodyPartsIndex[limbIndex]]);
|
||||
Matrix_MultZero(&this->bodyPartsPos[sLimbIndexToBodyPartsIndex[limbIndex]]);
|
||||
}
|
||||
}
|
||||
} else if (this->bodyPartDrawStatus > BBFALL_BODY_PART_DRAW_STATUS_ALIVE) {
|
||||
if (sLimbIndexToBodyPartsIndex[limbIndex] != -1) {
|
||||
Matrix_GetStateTranslation(&this->bodyPartsPos[sLimbIndexToBodyPartsIndex[limbIndex]]);
|
||||
Matrix_MultZero(&this->bodyPartsPos[sLimbIndexToBodyPartsIndex[limbIndex]]);
|
||||
}
|
||||
|
||||
if (limbIndex == BUBBLE_LIMB_CRANIUM) {
|
||||
@@ -694,11 +694,11 @@ void EnBbfall_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
if (sLimbIndexToBodyPartsIndex[limbIndex] != -1) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
currentMatrixState = Matrix_GetCurrentState();
|
||||
currentMatrixState = Matrix_GetCurrent();
|
||||
currentMatrixState->mf[3][0] = this->bodyPartsPos[sLimbIndexToBodyPartsIndex[limbIndex]].x;
|
||||
currentMatrixState->mf[3][1] = this->bodyPartsPos[sLimbIndexToBodyPartsIndex[limbIndex]].y;
|
||||
currentMatrixState->mf[3][2] = this->bodyPartsPos[sLimbIndexToBodyPartsIndex[limbIndex]].z;
|
||||
Matrix_InsertZRotation_s(thisx->world.rot.z, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(thisx->world.rot.z, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, this->limbDList);
|
||||
@@ -727,12 +727,12 @@ void EnBbfall_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
if (this->flameOpacity > 0) {
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
Matrix_RotateY(
|
||||
Matrix_RotateYS(
|
||||
((Camera_GetCamDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera]) - this->actor.shape.rot.y) + 0x8000),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_Scale(this->flameScaleX, this->flameScaleY, 1.0f, MTXMODE_APPLY);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
|
||||
currentMatrixState = Matrix_GetCurrentState();
|
||||
currentMatrixState = Matrix_GetCurrent();
|
||||
|
||||
opacity = this->flameOpacity;
|
||||
pos = &this->flamePos[0];
|
||||
|
||||
@@ -636,12 +636,12 @@ void EnBigokuta_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
|
||||
|
||||
if (limbPosIndex != -1) {
|
||||
if (limbPosIndex < 6) {
|
||||
Matrix_GetStateTranslationAndScaledX(800.0f, &this->limbPos[limbPosIndex]);
|
||||
Matrix_MultVecX(800.0f, &this->limbPos[limbPosIndex]);
|
||||
} else if (limbPosIndex < 8) {
|
||||
Matrix_GetStateTranslation(&this->limbPos[limbPosIndex]);
|
||||
Matrix_MultZero(&this->limbPos[limbPosIndex]);
|
||||
} else {
|
||||
for (i = 0; i < ARRAY_COUNT(D_80AC45D0); i++) {
|
||||
Matrix_MultiplyVector3fByState(&D_80AC45D0[i], &this->limbPos[limbPosIndex + i]);
|
||||
Matrix_MultVec3f(&D_80AC45D0[i], &this->limbPos[limbPosIndex + i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -734,9 +734,9 @@ void EnBigpo_BurnAwayDeath(EnBigpo* this, GlobalContext* globalCtx) {
|
||||
void EnBigpo_SetupLanternDrop(EnBigpo* this, GlobalContext* globalCtx) {
|
||||
this->actor.draw = EnBigpo_DrawLantern;
|
||||
this->actor.shape.shadowDraw = NULL;
|
||||
this->actor.world.pos.x = this->drawMtxF.wx;
|
||||
this->actor.world.pos.y = this->drawMtxF.wy;
|
||||
this->actor.world.pos.z = this->drawMtxF.wz;
|
||||
this->actor.world.pos.x = this->drawMtxF.xw;
|
||||
this->actor.world.pos.y = this->drawMtxF.yw;
|
||||
this->actor.world.pos.z = this->drawMtxF.zw;
|
||||
|
||||
Actor_SetScale(&this->actor, 0.014f);
|
||||
this->actor.gravity = -1.0f;
|
||||
@@ -1249,31 +1249,31 @@ void EnBigpo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
|
||||
if (limbIndex == 7) {
|
||||
// we scale the vec3f... then do nothing with it?
|
||||
Matrix_GetStateTranslationAndScaledY(1400.0f, &unusedVec);
|
||||
Matrix_MultVecY(1400.0f, &unusedVec);
|
||||
if ((this->actionFunc == EnBigpo_BurnAwayDeath) && (this->idleTimer > 18)) {
|
||||
if (this->actor.scale.x != 0.0f) {
|
||||
Matrix_Scale(0.014f / this->actor.scale.x, 0.014f / this->actor.scale.x, 0.014f / this->actor.scale.x,
|
||||
1);
|
||||
}
|
||||
}
|
||||
Matrix_CopyCurrentState(&this->drawMtxF);
|
||||
Matrix_Get(&this->drawMtxF);
|
||||
}
|
||||
|
||||
limbByte = D_80B65078[limbIndex];
|
||||
if (limbByte != -1) {
|
||||
if (limbByte < 3) {
|
||||
Matrix_GetStateTranslation(&this->limbPos[limbByte]);
|
||||
Matrix_MultZero(&this->limbPos[limbByte]);
|
||||
} else if (limbByte == 3) {
|
||||
Matrix_GetStateTranslationAndScaledX(3000.0f, &this->limbPos[limbByte]);
|
||||
Matrix_MultVecX(3000.0f, &this->limbPos[limbByte]);
|
||||
} else if (limbByte == 4) {
|
||||
Matrix_GetStateTranslationAndScaledY(-2000.0f, &this->limbPos[limbByte]);
|
||||
Matrix_MultVecY(-2000.0f, &this->limbPos[limbByte]);
|
||||
} else {
|
||||
v2ptr = &this->limbPos[limbByte + 1];
|
||||
v1ptr = D_80B65084;
|
||||
Matrix_GetStateTranslationAndScaledX(-4000.0f, &this->limbPos[limbByte]);
|
||||
Matrix_MultVecX(-4000.0f, &this->limbPos[limbByte]);
|
||||
|
||||
for (i = limbByte + 1; i < ARRAY_COUNT(this->limbPos); i++) {
|
||||
Matrix_MultiplyVector3fByState(v1ptr, v2ptr);
|
||||
Matrix_MultVec3f(v1ptr, v2ptr);
|
||||
v2ptr++;
|
||||
v1ptr++;
|
||||
}
|
||||
@@ -1315,7 +1315,7 @@ void EnBigpo_DrawMainBigpo(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->actor.scale.x * 71.428566f * this->drawDmgEffScale, 0.0f, this->drawDmgEffAlpha,
|
||||
ACTOR_DRAW_DMGEFF_LIGHT_ORBS);
|
||||
|
||||
Matrix_SetCurrentState(&this->drawMtxF);
|
||||
Matrix_Put(&this->drawMtxF);
|
||||
EnBigpo_DrawLantern(&this->actor, globalCtx);
|
||||
if (this->actionFunc == EnBigpo_SpawnCutsceneStage6) {
|
||||
EnBigpo_DrawCircleFlames(&this->actor, globalCtx);
|
||||
@@ -1344,7 +1344,7 @@ void EnBigpo_DrawScoopSoul(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->actor.world.pos.z, this->mainColor.r, this->mainColor.g, this->mainColor.b,
|
||||
this->mainColor.a * 2);
|
||||
|
||||
Matrix_RotateY(BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx))), MTXMODE_APPLY);
|
||||
Matrix_RotateYS(BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx))), MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -1386,7 +1386,7 @@ void EnBigpo_DrawLantern(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
gSPSegment(&dispHead[1], 0x0A, Gfx_EnvColor(globalCtx->state.gfxCtx, 160, 0, 255, this->mainColor.a));
|
||||
|
||||
Matrix_GetStateTranslationAndScaledY(1400.0f, &vec2);
|
||||
Matrix_MultVecY(1400.0f, &vec2);
|
||||
Lights_PointGlowSetInfo(&this->fires[0].info, vec2.x + vec1.x, vec2.y + vec1.y, vec2.z + vec1.z,
|
||||
this->lanternColor.r, this->lanternColor.g, this->lanternColor.b, this->lanternColor.a);
|
||||
|
||||
@@ -1415,11 +1415,11 @@ void EnBigpo_DrawCircleFlames(Actor* thisx, GlobalContext* globalCtx) {
|
||||
MtxF* mtfxPtr;
|
||||
s32 i;
|
||||
|
||||
mtfxPtr = Matrix_GetCurrentState();
|
||||
mtfxPtr = Matrix_GetCurrent();
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
Matrix_RotateY(BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx))), MTXMODE_NEW);
|
||||
Matrix_RotateYS(BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx))), MTXMODE_NEW);
|
||||
if (this->actionFunc == EnBigpo_SpawnCutsceneStage6) {
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
fireRadius = 500;
|
||||
@@ -1439,9 +1439,9 @@ void EnBigpo_DrawCircleFlames(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
Lights_PointNoGlowSetInfo(&this->fires[i].info, this->fires[i].pos.x, this->fires[i].pos.y,
|
||||
this->fires[i].pos.z, 170, 255, 255, fireRadius);
|
||||
mtfxPtr->wx = firePtr->pos.x;
|
||||
mtfxPtr->wy = firePtr->pos.y;
|
||||
mtfxPtr->wz = firePtr->pos.z;
|
||||
mtfxPtr->xw = firePtr->pos.x;
|
||||
mtfxPtr->yw = firePtr->pos.y;
|
||||
mtfxPtr->zw = firePtr->pos.z;
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
|
||||
@@ -2873,35 +2873,35 @@ void EnBigslime_UpdateGekko(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EnBigslime_SetSysMatrix(Vec3f* pos, GlobalContext* globalCtx, Gfx* shadowDList, f32 scaleX, f32 scalez, f32 scaleY,
|
||||
s16 rotation, f32 alpha) {
|
||||
f32 yDistMinY;
|
||||
f32 xz;
|
||||
MtxF* sysMatrix = Matrix_GetCurrentState();
|
||||
f32 zx;
|
||||
MtxF* sysMatrix = Matrix_GetCurrent();
|
||||
|
||||
yDistMinY = pos->y - scaleY - GBT_ROOM_5_MIN_Y;
|
||||
yDistMinY = CLAMP((yDistMinY), 0.0f, (GBT_ROOM_5_CENTER_Y - GBT_ROOM_5_MIN_Y) / 2);
|
||||
xz = 1.0f - (yDistMinY * (1.0f / 1550.0f));
|
||||
zx = 1.0f - (yDistMinY * (1.0f / 1550.0f));
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C);
|
||||
sysMatrix->xx = xz;
|
||||
sysMatrix->xx = zx;
|
||||
sysMatrix->yy = 1.0f;
|
||||
sysMatrix->zz = xz;
|
||||
sysMatrix->xz = sysMatrix->xy = 0.0f;
|
||||
sysMatrix->yz = sysMatrix->yx = 0.0f;
|
||||
sysMatrix->zy = sysMatrix->zx = 0.0f;
|
||||
sysMatrix->wx = pos->x;
|
||||
sysMatrix->wy = GBT_ROOM_5_MIN_Y;
|
||||
sysMatrix->wz = pos->z;
|
||||
sysMatrix->xw = sysMatrix->yw = sysMatrix->zw = 0.0f;
|
||||
sysMatrix->zz = zx;
|
||||
sysMatrix->zx = sysMatrix->yx = 0.0f;
|
||||
sysMatrix->zy = sysMatrix->xy = 0.0f;
|
||||
sysMatrix->yz = sysMatrix->xz = 0.0f;
|
||||
sysMatrix->xw = pos->x;
|
||||
sysMatrix->yw = GBT_ROOM_5_MIN_Y;
|
||||
sysMatrix->zw = pos->z;
|
||||
sysMatrix->wx = sysMatrix->wy = sysMatrix->wz = 0.0f;
|
||||
sysMatrix->ww = 1.0f;
|
||||
|
||||
Matrix_RotateY(rotation, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(rotation, MTXMODE_APPLY);
|
||||
Matrix_Scale(scaleX, 1.0f, scalez, MTXMODE_APPLY);
|
||||
if (shadowDList != gBigslimeShadowDL) {
|
||||
gDPSetCombineLERP(POLY_OPA_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0,
|
||||
COMBINED);
|
||||
}
|
||||
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, (u8)(alpha * xz));
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, (u8)(alpha * zx));
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, shadowDList);
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
@@ -2940,14 +2940,14 @@ void EnBigslime_DrawMinislime(EnBigslime* this, GlobalContext* globalCtx2) {
|
||||
Lights_Draw(lights, globalCtx->state.gfxCtx);
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
func_800B8118(&minislime->actor, globalCtx, 0);
|
||||
Matrix_SetStateRotationAndTranslation(minislime->actor.world.pos.x, minislime->actor.world.pos.y,
|
||||
minislime->actor.world.pos.z, &minislime->actor.shape.rot);
|
||||
Matrix_SetTranslateRotateYXZ(minislime->actor.world.pos.x, minislime->actor.world.pos.y,
|
||||
minislime->actor.world.pos.z, &minislime->actor.shape.rot);
|
||||
Matrix_Scale(minislime->actor.scale.x, minislime->actor.scale.y, minislime->actor.scale.z, MTXMODE_APPLY);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 255, minislime->actor.shape.shadowAlpha);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, &gMinislimeNormalDL);
|
||||
if (minislime->frozenAlpha > 0) {
|
||||
Matrix_InsertTranslation(0.0f, (0.1f - minislime->frozenScale) * -4000.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, (0.1f - minislime->frozenScale) * -4000.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.1f, minislime->frozenScale, 0.1f, MTXMODE_APPLY);
|
||||
AnimatedMat_Draw(globalCtx, this->minislimeFrozenTexAnim);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 255, minislime->frozenAlpha);
|
||||
@@ -2999,18 +2999,18 @@ void EnBigslime_DrawBigslime(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
// Draw bubbles inside Bigslime
|
||||
if (this->actor.scale.x > 0.0f) {
|
||||
Matrix_SetCurrentState(&globalCtx->billboardMtxF);
|
||||
Matrix_Put(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(0.0050000003f, 0.0050000003f, 0.0050000003f, MTXMODE_APPLY);
|
||||
billboardMtxF = Matrix_GetCurrentState();
|
||||
billboardMtxF = Matrix_GetCurrent();
|
||||
|
||||
for (i = 0; i < 28; i++) {
|
||||
bubblesInfoPtr = &bubblesInfo[i];
|
||||
dynamicVtx = &sBigslimeDynamicVtx[this->dynamicVtxState][bubblesInfoPtr->v];
|
||||
billboardMtxF->wx =
|
||||
billboardMtxF->xw =
|
||||
dynamicVtx->n.ob[0] * this->actor.scale.x * bubblesInfoPtr->scaleVtx + this->actor.world.pos.x;
|
||||
billboardMtxF->wy =
|
||||
billboardMtxF->yw =
|
||||
dynamicVtx->n.ob[1] * this->actor.scale.y * bubblesInfoPtr->scaleVtx + this->actor.world.pos.y;
|
||||
billboardMtxF->wz =
|
||||
billboardMtxF->zw =
|
||||
dynamicVtx->n.ob[2] * this->actor.scale.z * bubblesInfoPtr->scaleVtx + this->actor.world.pos.z;
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -3048,16 +3048,16 @@ void EnBigslime_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
|
||||
Vec3f rightFootOffset;
|
||||
|
||||
if (limbIndex == GEKKO_LIMB_HEAD) {
|
||||
Matrix_GetStateTranslation(&this->actor.focus.pos);
|
||||
Matrix_MultZero(&this->actor.focus.pos);
|
||||
this->actor.focus.rot.y = this->gekkoRot.y;
|
||||
}
|
||||
|
||||
if (limbPosIndex[limbIndex] != -1) {
|
||||
Matrix_GetStateTranslation(&this->limbPos[limbPosIndex[limbIndex]]);
|
||||
Matrix_MultZero(&this->limbPos[limbPosIndex[limbIndex]]);
|
||||
}
|
||||
|
||||
if (limbIndex == GEKKO_LIMB_R_ANKLE) {
|
||||
Matrix_MultiplyVector3fByState(&rightFootOffsetRef, &rightFootOffset);
|
||||
Matrix_MultVec3f(&rightFootOffsetRef, &rightFootOffset);
|
||||
this->gekkoCollider.dim.pos.y = rightFootOffset.y;
|
||||
}
|
||||
}
|
||||
@@ -3087,7 +3087,7 @@ void EnBigslime_DrawGekko(Actor* thisx, GlobalContext* globalCtx) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Math_Vec3f_Sum(&this->actor.world.pos, &this->gekkoPosOffset, &gekkoPos);
|
||||
Matrix_SetStateRotationAndTranslation(gekkoPos.x, gekkoPos.y, gekkoPos.z, &this->gekkoRot);
|
||||
Matrix_SetTranslateRotateYXZ(gekkoPos.x, gekkoPos.y, gekkoPos.z, &this->gekkoRot);
|
||||
Matrix_Scale(this->gekkoScale, this->gekkoScale, this->gekkoScale, MTXMODE_APPLY);
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &gekkoPos, &this->gekkoProjectedPos);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -3131,7 +3131,7 @@ void EnBigslime_DrawShatteringEffects(EnBigslime* this, GlobalContext* globalCtx
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, globalCtx->gameplayFrames % 128,
|
||||
(u8)(globalCtx->gameplayFrames * 8), 32, 64, 1,
|
||||
(-globalCtx->gameplayFrames * 2) % 64, 0, 16, 16));
|
||||
Matrix_InsertTranslation(this->frozenPos.x, this->frozenPos.y, this->frozenPos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(this->frozenPos.x, this->frozenPos.y, this->frozenPos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->shockwaveScale, this->shockwaveScale, this->shockwaveScale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, &gBigslimeShockwaveDL);
|
||||
@@ -3144,8 +3144,8 @@ void EnBigslime_DrawShatteringEffects(EnBigslime* this, GlobalContext* globalCtx
|
||||
for (i = 0; i < BIGSLIME_NUM_ICE_SHARD; i++) {
|
||||
iceShardEffect = &this->iceShardEffect[i];
|
||||
if (iceShardEffect->isActive > false) {
|
||||
Matrix_SetStateRotationAndTranslation(iceShardEffect->pos.x, iceShardEffect->pos.y, iceShardEffect->pos.z,
|
||||
&iceShardEffect->rotation);
|
||||
Matrix_SetTranslateRotateYXZ(iceShardEffect->pos.x, iceShardEffect->pos.y, iceShardEffect->pos.z,
|
||||
&iceShardEffect->rotation);
|
||||
Matrix_Scale(iceShardEffect->scale, iceShardEffect->scale, iceShardEffect->scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -97,7 +97,7 @@ typedef struct EnBigslime {
|
||||
/* 0x02C4 */ s16 numGekkoPosGrabPlayer; // The Gekko will melee-attack link at 6 positions while engulfed in bigslime
|
||||
/* 0x02C6 */ s16 subCamId;
|
||||
/* 0x02C8 */ s16 subCamYawGrabPlayer;
|
||||
/* 0x02CA */ s16 rotation; // is always 0, used in Matrix_RotateY
|
||||
/* 0x02CA */ s16 rotation; // is always 0, used in Matrix_RotateYS
|
||||
/* 0x02CC */ s16 itemDropTimer; // items only drop when zero, Set to 40 then decrements, prevents itemDrop spam
|
||||
/* 0x02CE */ Vec3s gekkoRot;
|
||||
/* 0x02D4 */ Vec3f gekkoPosOffset; // Used when Bigslime grabs link
|
||||
|
||||
@@ -428,7 +428,7 @@ void EnBji01_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
sp20.x += temp_f4 * 0.1f;
|
||||
sp20.y += temp_f4 * 0.1f;
|
||||
sp20.z += temp_f4 * 0.1f;
|
||||
Matrix_MultiplyVector3fByState(&sp20, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&sp20, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -383,8 +383,8 @@ void func_808715B8(EnBom* this, GlobalContext* globalCtx) {
|
||||
spCC = Rand_ZeroFloat(M_PI);
|
||||
|
||||
for (i = 0; i < 15; i++) {
|
||||
Matrix_InsertYRotation_f(((2.0f * (i * M_PI)) / 15.0f) + spCC, MTXMODE_NEW);
|
||||
Matrix_GetStateTranslationAndScaledZ((10 - this->timer) * 300.0f * 0.1f, &spC0);
|
||||
Matrix_RotateYF(((2.0f * (i * M_PI)) / 15.0f) + spCC, MTXMODE_NEW);
|
||||
Matrix_MultVecZ((10 - this->timer) * 300.0f * 0.1f, &spC0);
|
||||
spB4.x = this->actor.world.pos.x + spC0.x;
|
||||
spB4.y = this->actor.world.pos.y + 500.0f;
|
||||
spB4.z = this->actor.world.pos.z + spC0.z;
|
||||
@@ -400,7 +400,7 @@ void func_808715B8(EnBom* this, GlobalContext* globalCtx) {
|
||||
sp84 = D_80872E94;
|
||||
sp80 = D_80872E94;
|
||||
}
|
||||
Matrix_GetStateTranslationAndScaledZ(5.0f, &sp94);
|
||||
Matrix_MultVecZ(5.0f, &sp94);
|
||||
sp88.x = sp88.z = 0.0f;
|
||||
sp94.y = 2.0f;
|
||||
sp88.y = 0.2f;
|
||||
@@ -606,14 +606,14 @@ void EnBom_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
if (!this->isPowderKeg) {
|
||||
func_800B8050(&this->actor, globalCtx, 0);
|
||||
Matrix_MultiplyVector3fByState(&D_80872EE0, &this->actor.home.pos);
|
||||
Matrix_MultVec3f(&D_80872EE0, &this->actor.home.pos);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_015FA0);
|
||||
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_InsertXRotation_s(0x4000, MTXMODE_APPLY);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_RotateXS(0x4000, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -629,15 +629,15 @@ void EnBom_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s16 sp4A = this->actor.world.rot.y - this->actor.shape.rot.y;
|
||||
f32 sp44 = (1000.0f / Math_CosS(ABS_ALT((s16)(this->unk_1FA % 10922)) - 0x1555)) + -1000.0f;
|
||||
|
||||
Matrix_RotateY(sp4A, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, sp44, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_1FA, MTXMODE_APPLY);
|
||||
Matrix_RotateY(-sp4A, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(sp4A, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, sp44, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_1FA, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(-sp4A, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
Matrix_MultiplyVector3fByState(&D_80872EEC, &this->actor.home.pos);
|
||||
Matrix_MultiplyVector3fByState(&D_80872EF8, &sp58);
|
||||
Matrix_MultiplyVector3fByState(&D_80872F04, &sp4C);
|
||||
Matrix_MultVec3f(&D_80872EEC, &this->actor.home.pos);
|
||||
Matrix_MultVec3f(&D_80872EF8, &sp58);
|
||||
Matrix_MultVec3f(&D_80872F04, &sp4C);
|
||||
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 255);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
@@ -776,8 +776,8 @@ void func_80872BC0(GlobalContext* globalCtx, s32 arg1) {
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_InsertTranslation(ptr->unk_00.x, ptr->unk_00.y, ptr->unk_00.z, MTXMODE_NEW);
|
||||
Matrix_InsertRotation(ptr->unk_1A, ptr->unk_18, 0, MTXMODE_APPLY);
|
||||
Matrix_Translate(ptr->unk_00.x, ptr->unk_00.y, ptr->unk_00.z, MTXMODE_NEW);
|
||||
Matrix_RotateZYX(ptr->unk_1A, ptr->unk_18, 0, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -787,8 +787,8 @@ void func_80872BC0(GlobalContext* globalCtx, s32 arg1) {
|
||||
ptr2 = &D_80874650[1];
|
||||
|
||||
for (i = 1; i < temp_s5; i++, ptr2++) {
|
||||
Matrix_InsertTranslation(ptr2->unk_00.x, ptr2->unk_00.y, ptr2->unk_00.z, MTXMODE_NEW);
|
||||
Matrix_InsertRotation(ptr2->unk_1A, ptr2->unk_18, 0, MTXMODE_APPLY);
|
||||
Matrix_Translate(ptr2->unk_00.x, ptr2->unk_00.y, ptr2->unk_00.z, MTXMODE_NEW);
|
||||
Matrix_RotateZYX(ptr2->unk_1A, ptr2->unk_18, 0, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -136,8 +136,8 @@ s32 EnBomChu_UpdateFloorPoly(EnBomChu* this, CollisionPoly* floorPoly, GlobalCon
|
||||
}
|
||||
|
||||
Math_Vec3f_Scale(&vec, 1.0f / magnitude);
|
||||
Matrix_InsertRotationAroundUnitVector_f(angle, &vec, MTXMODE_NEW);
|
||||
Matrix_MultiplyVector3fByState(&this->axisLeft, &vec);
|
||||
Matrix_RotateAxisF(angle, &vec, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&this->axisLeft, &vec);
|
||||
Math_Vec3f_Copy(&this->axisLeft, &vec);
|
||||
Math3D_CrossProduct(&this->axisLeft, &normal, &this->axisForwards);
|
||||
|
||||
@@ -156,18 +156,18 @@ void EnBomChu_UpdateRotation(EnBomChu* this) {
|
||||
MtxF mf;
|
||||
|
||||
mf.xx = this->axisLeft.x;
|
||||
mf.xy = this->axisLeft.y;
|
||||
mf.xz = this->axisLeft.z;
|
||||
mf.yx = this->axisLeft.y;
|
||||
mf.zx = this->axisLeft.z;
|
||||
|
||||
mf.yx = this->axisUp.x;
|
||||
mf.xy = this->axisUp.x;
|
||||
mf.yy = this->axisUp.y;
|
||||
mf.yz = this->axisUp.z;
|
||||
mf.zy = this->axisUp.z;
|
||||
|
||||
mf.zx = this->axisForwards.x;
|
||||
mf.zy = this->axisForwards.y;
|
||||
mf.xz = this->axisForwards.x;
|
||||
mf.yz = this->axisForwards.y;
|
||||
mf.zz = this->axisForwards.z;
|
||||
|
||||
func_8018219C(&mf, &this->actor.world.rot, 0);
|
||||
Matrix_MtxFToYXZRot(&mf, &this->actor.world.rot, false);
|
||||
this->actor.world.rot.x = -this->actor.world.rot.x;
|
||||
}
|
||||
|
||||
@@ -205,13 +205,13 @@ s32 EnBomChu_IsOnCollisionPoly(GlobalContext* globalCtx, Vec3f* posA, Vec3f* pos
|
||||
void EnBomChu_SetupMove(EnBomChu* this) {
|
||||
func_800BE3D0(&this->actor, this->actor.shape.rot.y, &this->actor.shape.rot);
|
||||
|
||||
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_InsertXRotation_s(this->actor.shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_RotateXS(this->actor.shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
|
||||
Matrix_GetStateTranslationAndScaledY(1.0f, &this->axisUp);
|
||||
Matrix_GetStateTranslationAndScaledZ(1.0f, &this->axisForwards);
|
||||
Matrix_GetStateTranslationAndScaledX(1.0f, &this->axisLeft);
|
||||
Matrix_MultVecY(1.0f, &this->axisUp);
|
||||
Matrix_MultVecZ(1.0f, &this->axisForwards);
|
||||
Matrix_MultVecX(1.0f, &this->axisLeft);
|
||||
|
||||
this->actor.world.rot.x = -this->actor.shape.rot.x;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
@@ -564,7 +564,7 @@ void EnBomChu_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
colorIntensity = blinkTime / (f32)blinkHalfPeriod;
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, (s32)(colorIntensity * 209.0f) + 9, (s32)(colorIntensity * 34.0f) + 9,
|
||||
(s32)(colorIntensity * -35.0f) + 35, 255);
|
||||
Matrix_InsertTranslation(this->visualJitter * (1.0f / BOMBCHU_SCALE), 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->visualJitter * (1.0f / BOMBCHU_SCALE), 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gBombchuDL);
|
||||
|
||||
|
||||
@@ -450,7 +450,7 @@ Gfx* func_808AF86C(GraphicsContext* gfxCtx, GlobalContext* globalCtx) {
|
||||
Gfx* head = GRAPH_ALLOC(gfxCtx, sizeof(Gfx) * 6);
|
||||
Gfx* gfx = head;
|
||||
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
|
||||
gSPMatrix(gfx++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPEndDisplayList(gfx++);
|
||||
@@ -473,7 +473,7 @@ void EnBombf_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_bombf_DL_000340);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_bombf_DL_000530);
|
||||
|
||||
Matrix_InsertTranslation(0.0f, 1000.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 1000.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->unk_204, this->unk_204, this->unk_204, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
|
||||
@@ -325,19 +325,18 @@ void EnBoom_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_RotateY(this->actor.world.rot.y, MTXMODE_APPLY);
|
||||
|
||||
Matrix_InsertZRotation_s((this->actor.params != 0) ? 0x1F40 : -0x1F40, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->actor.world.rot.x, MTXMODE_APPLY);
|
||||
Matrix_MultiplyVector3fByState(&sp58->unk_04, &sp4C);
|
||||
Matrix_MultiplyVector3fByState(&sp58->unk_10, &sp40);
|
||||
Matrix_RotateYS(this->actor.world.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS((this->actor.params != 0) ? 0x1F40 : -0x1F40, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->actor.world.rot.x, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&sp58->unk_04, &sp4C);
|
||||
Matrix_MultVec3f(&sp58->unk_10, &sp40);
|
||||
|
||||
if (func_80126440(globalCtx, &this->collider, &this->weaponInfo, &sp4C, &sp40)) {
|
||||
EffectBlure_AddVertex(Effect_GetByIndex(this->effectIndex), &sp4C, &sp40);
|
||||
}
|
||||
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
Matrix_RotateY(this->unk_1CD * 0x2EE0, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->unk_1CD * 0x2EE0, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sp58->unk_00);
|
||||
|
||||
@@ -53,10 +53,10 @@ void EnBu_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_InsertZRotation_s(this->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->actor.shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateZS(this->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->actor.shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, this->displayListPtr);
|
||||
|
||||
@@ -144,12 +144,12 @@ void func_8091C178(EnButte* this, GlobalContext* globalCtx) {
|
||||
sp48 = CLAMP(sp48, 0, 255);
|
||||
|
||||
func_800DFC90(&sp40, GET_ACTIVE_CAM(globalCtx));
|
||||
Matrix_RotateY(sp40.y, MTXMODE_NEW);
|
||||
Matrix_InsertXRotation_s(sp40.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(sp40.z, MTXMODE_APPLY);
|
||||
Matrix_MultiplyVector3fByState(&D_8091D3A4, &sp4C);
|
||||
Matrix_SetStateRotationAndTranslation(this->actor.focus.pos.x + sp4C.x, this->actor.focus.pos.y + sp4C.y,
|
||||
this->actor.focus.pos.z + sp4C.z, &sp40);
|
||||
Matrix_RotateYS(sp40.y, MTXMODE_NEW);
|
||||
Matrix_RotateXS(sp40.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(sp40.z, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_8091D3A4, &sp4C);
|
||||
Matrix_SetTranslateRotateYXZ(this->actor.focus.pos.x + sp4C.x, this->actor.focus.pos.y + sp4C.y,
|
||||
this->actor.focus.pos.z + sp4C.z, &sp40);
|
||||
Matrix_Scale(D_8091D39C, D_8091D39C, D_8091D39C, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -116,7 +116,7 @@ void EnCha_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnCha* this = THIS;
|
||||
|
||||
Gfx_DrawDListOpa(globalCtx, object_cha_DL_000710);
|
||||
Matrix_InsertTranslation(-1094.0f, 4950.0f, 9.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->actor.home.rot.x, MTXMODE_APPLY);
|
||||
Matrix_Translate(-1094.0f, 4950.0f, 9.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->actor.home.rot.x, MTXMODE_APPLY);
|
||||
Gfx_DrawDListOpa(globalCtx, object_cha_DL_000958);
|
||||
}
|
||||
|
||||
@@ -427,9 +427,9 @@ void EnClearTag_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
for (i = 0; i < 54; i++) {
|
||||
lightRayMaxScale =
|
||||
sLightRayMaxScale[thisx->params] + Rand_ZeroFloat(sLightRayMaxScale[thisx->params]);
|
||||
Matrix_InsertYRotation_f(Rand_ZeroFloat(M_PI * 2), MTXMODE_NEW);
|
||||
Matrix_RotateStateAroundXAxis(Rand_ZeroFloat(M_PI * 2));
|
||||
Matrix_GetStateTranslationAndScaledZ(lightRayMaxScale, &vel);
|
||||
Matrix_RotateYF(Rand_ZeroFloat(M_PI * 2), MTXMODE_NEW);
|
||||
Matrix_RotateXFApply(Rand_ZeroFloat(M_PI * 2));
|
||||
Matrix_MultVecZ(lightRayMaxScale, &vel);
|
||||
accel.x = vel.x * -0.03f;
|
||||
accel.y = vel.y * -0.03f;
|
||||
accel.z = vel.z * -0.03f;
|
||||
@@ -478,8 +478,8 @@ void EnClearTag_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
if (thisx->params != CLEAR_TAG_POP) {
|
||||
pos.y = this->actor.world.pos.y;
|
||||
for (i = 0; i < 18; i++) {
|
||||
vel.x = __sinf(i * (33.0f / 40.0f)) * i * .5f;
|
||||
vel.z = __cosf(i * (33.0f / 40.0f)) * i * .5f;
|
||||
vel.x = sinf(i * (33.0f / 40.0f)) * i * .5f;
|
||||
vel.z = cosf(i * (33.0f / 40.0f)) * i * .5f;
|
||||
vel.y = Rand_ZeroFloat(8.0f) + 7.0f;
|
||||
|
||||
vel.x += randPlusMinusPoint5Scaled(0.5f);
|
||||
@@ -500,9 +500,9 @@ void EnClearTag_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
pos = this->actor.world.pos;
|
||||
for (i = 0; i < 44; i++) {
|
||||
lightRayMaxScale = sLightRayMaxScale[thisx->params] + Rand_ZeroFloat(sLightRayMaxScale[thisx->params]);
|
||||
Matrix_InsertYRotation_f(Rand_ZeroFloat(2 * M_PI), MTXMODE_NEW);
|
||||
Matrix_RotateStateAroundXAxis(Rand_ZeroFloat(2 * M_PI));
|
||||
Matrix_GetStateTranslationAndScaledZ(lightRayMaxScale, &vel);
|
||||
Matrix_RotateYF(Rand_ZeroFloat(2 * M_PI), MTXMODE_NEW);
|
||||
Matrix_RotateXFApply(Rand_ZeroFloat(2 * M_PI));
|
||||
Matrix_MultVecZ(lightRayMaxScale, &vel);
|
||||
accel.x = vel.x * -0.03f;
|
||||
accel.y = vel.y * -0.03f;
|
||||
accel.z = vel.z * -0.03f;
|
||||
@@ -809,10 +809,10 @@ void EnClearTag_DrawEffects(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
// Draw the debris effect.
|
||||
Matrix_InsertTranslation(effect->position.x, effect->position.y, effect->position.z, MTXMODE_NEW);
|
||||
Matrix_Translate(effect->position.x, effect->position.y, effect->position.z, MTXMODE_NEW);
|
||||
Matrix_Scale(effect->scale, effect->scale, effect->scale, MTXMODE_APPLY);
|
||||
Matrix_InsertYRotation_f(effect->rotationY, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(effect->rotationX);
|
||||
Matrix_RotateYF(effect->rotationY, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(effect->rotationX);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gClearTagDebrisEffectDL);
|
||||
}
|
||||
@@ -828,7 +828,7 @@ void EnClearTag_DrawEffects(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, (s8)effect->primColor.a);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s8)effect->primColor.a);
|
||||
func_800C0094(this->actor.floorPoly, effect->position.x, effect->position.y, effect->position.z, &mtxF);
|
||||
Matrix_SetCurrentState(&mtxF);
|
||||
Matrix_Put(&mtxF);
|
||||
Matrix_Scale(effect->scale, 1.0f, effect->scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_030100);
|
||||
@@ -853,7 +853,7 @@ void EnClearTag_DrawEffects(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 200, (s8)(effect->primColor.a * 0.7f));
|
||||
func_800C0094(this->actor.floorPoly, effect->position.x, this->actor.floorHeight, effect->position.z,
|
||||
&mtxF);
|
||||
Matrix_SetCurrentState(&mtxF);
|
||||
Matrix_Put(&mtxF);
|
||||
Matrix_Scale(effect->scale * 3.0f, 1.0f, effect->scale * 3.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gClearTagFlashEffectGroundDL);
|
||||
@@ -881,10 +881,10 @@ void EnClearTag_DrawEffects(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gSPSegment(
|
||||
POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, -effect->actionTimer * 5, 32, 64, 1, 0, 0, 32, 32));
|
||||
Matrix_InsertTranslation(effect->position.x, effect->position.y, effect->position.z, MTXMODE_NEW);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(effect->position.x, effect->position.y, effect->position.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(effect->smokeScaleX * effect->scale, effect->smokeScaleY * effect->scale, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, 20.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 20.0f, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gClearTagFireEffectDL);
|
||||
}
|
||||
@@ -907,8 +907,8 @@ void EnClearTag_DrawEffects(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gSPSegment(
|
||||
POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, -effect->actionTimer * 15, 32, 64, 1, 0, 0, 32, 32));
|
||||
Matrix_InsertTranslation(effect->position.x, effect->position.y, effect->position.z, MTXMODE_NEW);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(effect->position.x, effect->position.y, effect->position.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gClearTagFireEffectDL);
|
||||
@@ -929,8 +929,8 @@ void EnClearTag_DrawEffects(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
// Draw the flash billboard effect.
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 200, (s8)effect->primColor.a);
|
||||
Matrix_InsertTranslation(effect->position.x, effect->position.y, effect->position.z, MTXMODE_NEW);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(effect->position.x, effect->position.y, effect->position.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(2.0f * effect->scale, 2.0f * effect->scale, 1.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gClearTagFlashEffectDL);
|
||||
@@ -954,12 +954,12 @@ void EnClearTag_DrawEffects(Actor* thisx, GlobalContext* globalCtx) {
|
||||
// Draw the light ray effect.
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (u8)effect->primColor.r, (u8)effect->primColor.g,
|
||||
(u8)effect->primColor.b, (u8)effect->primColor.a);
|
||||
Matrix_InsertTranslation(effect->position.x, effect->position.y, effect->position.z, MTXMODE_NEW);
|
||||
Matrix_InsertYRotation_f(effect->rotationY, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(effect->rotationX);
|
||||
Matrix_InsertZRotation_f(effect->rotationZ, MTXMODE_APPLY);
|
||||
Matrix_Translate(effect->position.x, effect->position.y, effect->position.z, MTXMODE_NEW);
|
||||
Matrix_RotateYF(effect->rotationY, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(effect->rotationX);
|
||||
Matrix_RotateZF(effect->rotationZ, MTXMODE_APPLY);
|
||||
Matrix_Scale(effect->scale * 0.5f, effect->scale * 0.5f, effect->maxScale * effect->scale, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(M_PI / 2);
|
||||
Matrix_RotateXFApply(M_PI / 2);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gClearTagLightRayEffectDL);
|
||||
}
|
||||
@@ -979,8 +979,8 @@ void EnClearTag_DrawEffects(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
// Apply material 16 times along a circle to give the appearance of a splash
|
||||
for (j = 0; j < 16; j++) {
|
||||
Matrix_InsertYRotation_f(2.0f * (j * M_PI) * (1.0f / 16.0f), MTXMODE_NEW);
|
||||
Matrix_GetStateTranslationAndScaledZ(effect->maxScale, &vec);
|
||||
Matrix_RotateYF(2.0f * (j * M_PI) * (1.0f / 16.0f), MTXMODE_NEW);
|
||||
Matrix_MultVecZ(effect->maxScale, &vec);
|
||||
/**
|
||||
* Get the water surface at point (`x`, `ySurface`, `z`). `ySurface` doubles as position y input
|
||||
* returns true if point is within the xz boundaries of an active water box, else false
|
||||
@@ -991,10 +991,9 @@ void EnClearTag_DrawEffects(Actor* thisx, GlobalContext* globalCtx) {
|
||||
effect->position.z + vec.z, &ySurface, &waterBox)) {
|
||||
if ((effect->position.y - ySurface) < 200.0f) {
|
||||
// Draw the splash effect.
|
||||
Matrix_InsertTranslation(effect->position.x + vec.x, ySurface, effect->position.z + vec.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_InsertYRotation_f(2.0f * (j * M_PI) * (1.0f / 16.0f), MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(effect->rotationX);
|
||||
Matrix_Translate(effect->position.x + vec.x, ySurface, effect->position.z + vec.z, MTXMODE_NEW);
|
||||
Matrix_RotateYF(2.0f * (j * M_PI) * (1.0f / 16.0f), MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(effect->rotationX);
|
||||
Matrix_Scale(effect->scale, effect->scale, effect->scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gExplosionSplashDL);
|
||||
|
||||
@@ -245,7 +245,7 @@ s32 EnCne01_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
|
||||
|
||||
bodyPart = gEnHyBodyParts[limbIndex];
|
||||
if (bodyPart >= 0) {
|
||||
Matrix_MultiplyVector3fByState(&zeroVec, &this->enHy.bodyPartsPos[bodyPart]);
|
||||
Matrix_MultVec3f(&zeroVec, &this->enHy.bodyPartsPos[bodyPart]);
|
||||
}
|
||||
|
||||
if (limbIndex == CNE_LIMB_HEAD) {
|
||||
@@ -257,19 +257,19 @@ s32 EnCne01_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
if (limbIndex == CNE_LIMB_HEAD) {
|
||||
Matrix_InsertTranslation(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->enHy.headRot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(-this->enHy.headRot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->enHy.headRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-this->enHy.headRot.x, MTXMODE_APPLY);
|
||||
Matrix_Translate(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == CNE_LIMB_TORSO) {
|
||||
Matrix_InsertXRotation_s(-this->enHy.torsoRot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(-this->enHy.torsoRot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(-this->enHy.torsoRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-this->enHy.torsoRot.x, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if ((limbIndex == CNE_LIMB_HEAD) && this->enHy.inMsgState3 && ((globalCtx->state.frames % 2) == 0)) {
|
||||
Matrix_InsertTranslation(40.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(40.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if ((limbIndex == CNE_LIMB_TORSO) || (limbIndex == CNE_LIMB_LEFT_UPPER_ARM) ||
|
||||
@@ -294,7 +294,7 @@ void EnCne01_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
}
|
||||
|
||||
if (limbIndex == CNE_LIMB_HEAD) {
|
||||
Matrix_MultiplyVector3fByState(&zeroVec, &this->enHy.actor.focus.pos);
|
||||
Matrix_MultVec3f(&zeroVec, &this->enHy.actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ void EnCne01_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
SkelAnime_DrawTransformFlexOpa(globalCtx, this->enHy.skelAnime.skeleton, this->enHy.skelAnime.jointTable,
|
||||
this->enHy.skelAnime.dListCount, EnCne01_OverrideLimbDraw, EnCne01_PostLimbDraw,
|
||||
EnCne01_TransformLimbDraw, &this->enHy.actor);
|
||||
Matrix_InsertXRotation_s(0, MTXMODE_NEW);
|
||||
Matrix_RotateXS(0, MTXMODE_NEW);
|
||||
|
||||
for (i = 0, shadowTexIter = shadowTex; i < SUBS_SHADOW_TEX_SIZE; i++) {
|
||||
*shadowTexIter++ = 0;
|
||||
|
||||
@@ -414,7 +414,7 @@ void EnCow_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
|
||||
EnCow* this = THIS;
|
||||
|
||||
if (limbIndex == COW_LIMB_HEAD) {
|
||||
Matrix_MultiplyVector3fByState(&D_8099D63C, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&D_8099D63C, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -551,12 +551,12 @@ void EnCrow_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V
|
||||
EnCrow* this = (EnCrow*)thisx;
|
||||
|
||||
if (limbIndex == OBJECT_CROW_LIMB_BODY) {
|
||||
Matrix_GetStateTranslationAndScaledX(2500.0f, this->bodyPartsPos);
|
||||
Matrix_MultVecX(2500.0f, this->bodyPartsPos);
|
||||
return;
|
||||
}
|
||||
if ((limbIndex == OBJECT_CROW_LIMB_RIGHT_WING_TIP) || (limbIndex == OBJECT_CROW_LIMB_LEFT_WING_TIP) ||
|
||||
(limbIndex == OBJECT_CROW_LIMB_TAIL)) {
|
||||
Matrix_GetStateTranslation(&this->bodyPartsPos[(limbIndex >> 1) - 1]);
|
||||
Matrix_MultZero(&this->bodyPartsPos[(limbIndex >> 1) - 1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ void func_80B3E168(EnDaiParticle* particle, GlobalContext* globalCtx2) {
|
||||
isDisplayListSet = true;
|
||||
}
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
alpha = (particle->unk_02 / (f32)particle->unk_01);
|
||||
alpha *= 255.0f;
|
||||
@@ -85,15 +85,15 @@ void func_80B3E168(EnDaiParticle* particle, GlobalContext* globalCtx2) {
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (particle->unk_02 + (i * 3)) * 3,
|
||||
(particle->unk_02 + (i * 3)) * 15, 0x20, 0x40, 1, 0, 0, 0x20, 0x20));
|
||||
|
||||
Matrix_InsertTranslation(particle->unk_10.x, particle->unk_10.y, particle->unk_10.z, MTXMODE_NEW);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(particle->unk_10.x, particle->unk_10.y, particle->unk_10.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(particle->unk_34, particle->unk_34, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_dai_DL_0002E8);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -580,7 +580,7 @@ s32 EnDai_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
}
|
||||
|
||||
if (limbIndex == 11) {
|
||||
Matrix_MultiplyVector3fByState(&gZeroVec3f, &this->unk_1E4);
|
||||
Matrix_MultVec3f(&gZeroVec3f, &this->unk_1E4);
|
||||
}
|
||||
|
||||
if (limbIndex == 10) {
|
||||
@@ -602,15 +602,15 @@ void EnDai_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
|
||||
D_80B3FE4C.x = sREG(0);
|
||||
D_80B3FE4C.y = sREG(1);
|
||||
D_80B3FE4C.z = sREG(2);
|
||||
Matrix_MultiplyVector3fByState(&D_80B3FE4C, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&D_80B3FE4C, &this->actor.focus.pos);
|
||||
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.world.rot);
|
||||
Matrix_CopyCurrentState(&sp24);
|
||||
func_8018219C(&sp24, &sp64, 0);
|
||||
Matrix_Get(&sp24);
|
||||
Matrix_MtxFToYXZRot(&sp24, &sp64, false);
|
||||
this->unk_1D4 = BINANG_SUB(sp64.y, 0x4000);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
Matrix_CopyCurrentState(&this->unk_18C);
|
||||
Matrix_Get(&this->unk_18C);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -662,7 +662,7 @@ void func_80B3F78C(EnDai* this, GlobalContext* globalCtx) {
|
||||
this->skelAnime.dListCount, EnDai_OverrideLimbDraw, EnDai_PostLimbDraw,
|
||||
EnDai_TransformLimbDraw, &this->actor, POLY_XLU_DISP);
|
||||
if (this->unk_1CE & 0x40) {
|
||||
Matrix_SetCurrentState(&this->unk_18C);
|
||||
Matrix_Put(&this->unk_18C);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_dai_DL_00C538);
|
||||
@@ -694,7 +694,7 @@ void func_80B3F920(EnDai* this, GlobalContext* globalCtx) {
|
||||
POLY_OPA_DISP = SubS_DrawTransformFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, EnDai_OverrideLimbDraw, EnDai_PostLimbDraw,
|
||||
EnDai_TransformLimbDraw, &this->actor, POLY_OPA_DISP);
|
||||
Matrix_SetCurrentState(&this->unk_18C);
|
||||
Matrix_Put(&this->unk_18C);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_dai_DL_00C538);
|
||||
@@ -713,7 +713,7 @@ void func_80B3F920(EnDai* this, GlobalContext* globalCtx) {
|
||||
POLY_XLU_DISP = SubS_DrawTransformFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, EnDai_OverrideLimbDraw, EnDai_PostLimbDraw,
|
||||
EnDai_TransformLimbDraw, &this->actor, POLY_XLU_DISP);
|
||||
Matrix_SetCurrentState(&this->unk_18C);
|
||||
Matrix_Put(&this->unk_18C);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_dai_DL_00C538);
|
||||
|
||||
@@ -549,17 +549,17 @@ void func_80BE7718(EnDaiku2* this, GlobalContext* globalCtx) {
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->particles); i++, particle++) {
|
||||
if (particle->isEnabled) {
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertTranslation(particle->unk_04.x, particle->unk_04.y, particle->unk_04.z, MTXMODE_NEW);
|
||||
Matrix_InsertXRotation_s(particle->unk_28.x, MTXMODE_APPLY);
|
||||
Matrix_RotateY(particle->unk_28.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(particle->unk_28.z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
Matrix_Translate(particle->unk_04.x, particle->unk_04.y, particle->unk_04.z, MTXMODE_NEW);
|
||||
Matrix_RotateXS(particle->unk_28.x, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(particle->unk_28.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(particle->unk_28.z, MTXMODE_APPLY);
|
||||
Matrix_Scale(particle->unk_30, particle->unk_30, particle->unk_30, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_bombiwa_DL_0009E0);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -710,20 +710,20 @@ void EnDekunuts_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
|
||||
|
||||
if (value != -1) {
|
||||
if (value < 3) {
|
||||
Matrix_GetStateTranslationAndScaledX(1000.0f, &this->limbPos[value]);
|
||||
Matrix_MultVecX(1000.0f, &this->limbPos[value]);
|
||||
} else {
|
||||
Matrix_GetStateTranslation(&this->limbPos[value]);
|
||||
Matrix_MultZero(&this->limbPos[value]);
|
||||
ptr1 = &D_808BEFA4[0];
|
||||
ptr2 = &this->limbPos[value + 1];
|
||||
for (i = value + 1; i < ARRAY_COUNT(this->limbPos); i++) {
|
||||
Matrix_MultiplyVector3fByState(ptr1, ptr2);
|
||||
Matrix_MultVec3f(ptr1, ptr2);
|
||||
ptr1++, ptr2++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (limbIndex == DEKU_SCRUB_LIMB_HEAD) {
|
||||
Matrix_GetStateTranslation(&this->actor.focus.pos);
|
||||
Matrix_MultZero(&this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -732,8 +732,8 @@ void EnDekunuts_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, EnDekunuts_OverrideLimbDraw,
|
||||
EnDekunuts_PostLimbDraw, &this->actor);
|
||||
Matrix_SetStateRotationAndTranslation(this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z,
|
||||
&this->actor.home.rot);
|
||||
Matrix_SetTranslateRotateYXZ(this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z,
|
||||
&this->actor.home.rot);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
if (this->actor.colorFilterTimer != 0) {
|
||||
func_800AE5A0(globalCtx);
|
||||
|
||||
@@ -202,8 +202,8 @@ void func_8098933C(EnDg* this, Vec3f* arg1) {
|
||||
sp20 = COLPOLY_GET_NORMAL(this->actor.floorPoly->normal.y);
|
||||
sp1C = COLPOLY_GET_NORMAL(this->actor.floorPoly->normal.z);
|
||||
|
||||
__sinf(0.0f);
|
||||
__cosf(0.0f);
|
||||
sinf(0.0f);
|
||||
cosf(0.0f);
|
||||
arg1->x = -Math_Acot2F(1.0f, -sp1C * sp20);
|
||||
arg1->z = Math_Acot2F(1.0f, -sp24 * sp20);
|
||||
}
|
||||
@@ -1190,9 +1190,9 @@ void EnDg_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
||||
if (limbIndex == DOG_LIMB_HEAD) {
|
||||
if (this->actionFunc == func_8098BBEC) {
|
||||
sp20.x = 5000.0f;
|
||||
Matrix_MultiplyVector3fByState(&sp20, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&sp20, &this->actor.focus.pos);
|
||||
} else if (this->actionFunc != func_8098BC54) {
|
||||
Matrix_MultiplyVector3fByState(&sp20, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&sp20, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1236,10 +1236,10 @@ void EnDg_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
break;
|
||||
}
|
||||
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateStateAroundXAxis(this->unk_294.x);
|
||||
Matrix_InsertZRotation_f(this->unk_294.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateXFApply(this->unk_294.x);
|
||||
Matrix_RotateZF(this->unk_294.z, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnDg_OverrideLimbDraw, EnDg_PostLimbDraw, &this->actor);
|
||||
|
||||
@@ -1429,15 +1429,15 @@ void func_8089DC84(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
|
||||
Collider_UpdateSpheres(limbIndex, &this->colliderJntSph);
|
||||
if (D_8089E3B0[limbIndex] != -1) {
|
||||
Matrix_GetStateTranslation(&this->limbPos[D_8089E3B0[limbIndex]]);
|
||||
Matrix_MultZero(&this->limbPos[D_8089E3B0[limbIndex]]);
|
||||
}
|
||||
|
||||
if ((limbIndex == 14) && (this->unk_292 != this->unk_290) &&
|
||||
((this->actionFunc == func_8089C56C) || (this->actionFunc == func_8089C2A8))) {
|
||||
Math_Vec3f_Copy(&sp74, &this->colliderQuad.dim.quad[0]);
|
||||
Math_Vec3f_Copy(&sp80, &this->colliderQuad.dim.quad[1]);
|
||||
Matrix_MultiplyVector3fByState(&D_8089E38C, &sp68);
|
||||
Matrix_MultiplyVector3fByState(&D_8089E398, &sp5C);
|
||||
Matrix_MultVec3f(&D_8089E38C, &sp68);
|
||||
Matrix_MultVec3f(&D_8089E398, &sp5C);
|
||||
Collider_SetQuadVertices(&this->colliderQuad, &sp5C, &sp68, &sp74, &sp80);
|
||||
if (this->colliderQuad.base.atFlags & AT_ON) {
|
||||
EffectBlure_AddVertex(Effect_GetByIndex(this->unk_2A0), &sp68, &sp5C);
|
||||
@@ -1446,18 +1446,18 @@ void func_8089DC84(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
}
|
||||
|
||||
if (limbIndex == 4) {
|
||||
Matrix_GetStateTranslationAndScaledX(300.0f, &this->actor.shape.feetPos[0]);
|
||||
Matrix_MultVecX(300.0f, &this->actor.shape.feetPos[0]);
|
||||
} else if (limbIndex == 7) {
|
||||
Matrix_GetStateTranslationAndScaledX(300.0f, &this->actor.shape.feetPos[1]);
|
||||
Matrix_MultVecX(300.0f, &this->actor.shape.feetPos[1]);
|
||||
}
|
||||
|
||||
if ((limbIndex == 16) && (this->actionFunc == func_8089B580)) {
|
||||
if ((this->skelAnime.curFrame > 38.0f) && (this->skelAnime.curFrame <= 55.0f) &&
|
||||
(this->unk_292 != this->unk_290)) {
|
||||
sp48 = Matrix_GetCurrentState();
|
||||
sp48 = Matrix_GetCurrent();
|
||||
sp58 = 48 - (s32)this->skelAnime.curFrame;
|
||||
sp58 = CLAMP_MIN(sp58, 0);
|
||||
Matrix_MultiplyVector3fByState(&D_8089E3A4, &sp4C);
|
||||
Matrix_MultVec3f(&D_8089E3A4, &sp4C);
|
||||
sp4C.x -= sp48->mf[3][0];
|
||||
sp4C.y -= sp48->mf[3][1];
|
||||
sp4C.z -= sp48->mf[3][2];
|
||||
|
||||
@@ -159,17 +159,17 @@ void func_80A50510(EnDnb* this, GlobalContext* globalCtx) {
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->particles); i++) {
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertTranslation(this->particles[i].unk_0C.x, this->particles[i].unk_0C.y, this->particles[i].unk_0C.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_InsertXRotation_s(this->particles[i].unk_18.x, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->particles[i].unk_18.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->particles[i].unk_18.z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
Matrix_Translate(this->particles[i].unk_0C.x, this->particles[i].unk_0C.y, this->particles[i].unk_0C.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateXS(this->particles[i].unk_18.x, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->particles[i].unk_18.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->particles[i].unk_18.z, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gfx[i]);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
@@ -184,17 +184,17 @@ void func_80A5063C(EnDnb* this, GlobalContext* globalCtx) {
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->particles); i++) {
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertTranslation(this->particles[i].unk_0C.x, this->particles[i].unk_0C.y, this->particles[i].unk_0C.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_InsertXRotation_s(this->particles[i].unk_18.x, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->particles[i].unk_18.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->particles[i].unk_18.z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
Matrix_Translate(this->particles[i].unk_0C.x, this->particles[i].unk_0C.y, this->particles[i].unk_0C.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateXS(this->particles[i].unk_18.x, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->particles[i].unk_18.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->particles[i].unk_18.z, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gfx[i]);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
@@ -275,16 +275,16 @@ s32 func_80A50950(EnDnbUnkStruct* arg0, GlobalContext* globalCtx2) {
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 0);
|
||||
isGfxSetup = true;
|
||||
}
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
if (1) {};
|
||||
arg0->unk_24 = (arg0->unk_01 / (f32)arg0->unk_02) * 255.0f;
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (u8)arg0->unk_24);
|
||||
|
||||
Matrix_InsertTranslation(arg0->unk_0C.x, arg0->unk_0C.y, arg0->unk_0C.z, MTXMODE_NEW);
|
||||
Matrix_Translate(arg0->unk_0C.x, arg0->unk_0C.y, arg0->unk_0C.z, MTXMODE_NEW);
|
||||
Matrix_Scale(arg0->unk_04, arg0->unk_04, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -292,7 +292,7 @@ s32 func_80A50950(EnDnbUnkStruct* arg0, GlobalContext* globalCtx2) {
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(D_80A50CBC[idx]));
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_hanareyama_obj_DL_000020);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
sp5C += 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,10 +285,10 @@ void func_80A51AA4(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
Vec3s sp3C;
|
||||
|
||||
if (limbIndex == 2) {
|
||||
Matrix_MultiplyVector3fByState(&sp50, &sp44);
|
||||
Matrix_CopyCurrentState(&sp5C);
|
||||
func_8018219C(&sp5C, &sp3C, 0);
|
||||
Matrix_InsertTranslation(sp44.x, sp44.y, sp44.z, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp50, &sp44);
|
||||
Matrix_Get(&sp5C);
|
||||
Matrix_MtxFToYXZRot(&sp5C, &sp3C, false);
|
||||
Matrix_Translate(sp44.x, sp44.y, sp44.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
if (this->unk_28C & 0x10) {
|
||||
if (this->unk_28C & 0x20) {
|
||||
@@ -311,9 +311,9 @@ void func_80A51AA4(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
this->unk_294 = sp3C.z;
|
||||
}
|
||||
|
||||
Matrix_RotateY(this->unk_292, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_290, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_294, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->unk_292, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_290, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_294, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
@@ -361,10 +361,10 @@ void func_80A51DA4(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
Vec3s sp3C;
|
||||
|
||||
if (limbIndex == 2) {
|
||||
Matrix_MultiplyVector3fByState(&sp50, &sp44);
|
||||
Matrix_CopyCurrentState(&sp5C);
|
||||
func_8018219C(&sp5C, &sp3C, 0);
|
||||
Matrix_InsertTranslation(sp44.x, sp44.y, sp44.z, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp50, &sp44);
|
||||
Matrix_Get(&sp5C);
|
||||
Matrix_MtxFToYXZRot(&sp5C, &sp3C, false);
|
||||
Matrix_Translate(sp44.x, sp44.y, sp44.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
|
||||
if (this->unk_28C & 0x10) {
|
||||
@@ -388,9 +388,9 @@ void func_80A51DA4(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
this->unk_294 = sp3C.z;
|
||||
}
|
||||
|
||||
Matrix_RotateY(this->unk_292, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_290, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_294, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->unk_292, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_290, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_294, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
@@ -152,8 +152,8 @@ void func_80A715DC(EnDno* this, GlobalContext* globalCtx) {
|
||||
if (SubS_LineSegVsPlane(&crace->actor.home.pos, &crace->actor.home.rot, &D_80A73B2C,
|
||||
&this->actor.prevPos, &this->actor.world.pos, &sp88)) {
|
||||
Math_Vec3f_Diff(&this->actor.world.pos, &crace->actor.home.pos, &sp7C);
|
||||
Matrix_RotateY(-crace->actor.home.rot.y, MTXMODE_NEW);
|
||||
Matrix_MultiplyVector3fByState(&sp7C, &sp70);
|
||||
Matrix_RotateYS(-crace->actor.home.rot.y, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp7C, &sp70);
|
||||
if ((fabsf(sp70.x) < 100.0f) && (sp70.y >= -10.0f) && (sp70.y <= 180.0f) && (sp70.z < 0.0f)) {
|
||||
crace->unk_170 |= 1;
|
||||
}
|
||||
@@ -970,7 +970,7 @@ void EnDno_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
if (limbIndex == 13) {
|
||||
Matrix_Scale(this->unk_454, this->unk_454, this->unk_454, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_45C, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_45C, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
gfxOpa = POLY_OPA_DISP;
|
||||
@@ -986,13 +986,13 @@ void EnDno_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
frames = globalCtx->gameplayFrames;
|
||||
Matrix_MultiplyVector3fByState(&D_80A73B40, &sp84);
|
||||
Matrix_MultVec3f(&D_80A73B40, &sp84);
|
||||
func_80A711D0(this, globalCtx, &sp84);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(0.15f, 0.15f, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, -3200.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -3200.0f, 0.0f, MTXMODE_APPLY);
|
||||
gfxXlu = func_8012C2B4(POLY_XLU_DISP);
|
||||
|
||||
gSPMatrix(gfxXlu, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -1004,7 +1004,7 @@ void EnDno_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
|
||||
|
||||
POLY_XLU_DISP = gfxXlu + 5;
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -425,9 +425,9 @@ s32 func_80B3D974(s16 arg0, s16 arg1, Vec3f* arg2, Vec3s* arg3, s32 arg4, s32 ar
|
||||
Vec3s sp6C;
|
||||
MtxF sp2C;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&gZeroVec3f, &sp74);
|
||||
Matrix_CopyCurrentState(&sp2C);
|
||||
func_8018219C(&sp2C, &sp6C, 0);
|
||||
Matrix_MultVec3f(&gZeroVec3f, &sp74);
|
||||
Matrix_Get(&sp2C);
|
||||
Matrix_MtxFToYXZRot(&sp2C, &sp6C, false);
|
||||
*arg2 = sp74;
|
||||
if (arg4 == 0) {
|
||||
if (arg5 != 0) {
|
||||
@@ -468,13 +468,13 @@ void EnDnp_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thi
|
||||
if (limbIndex == 12) {
|
||||
func_80B3D974(this->unk_330 + 0x4000, this->unk_332 + this->actor.shape.rot.y + 0x4000, &this->unk_1D8,
|
||||
&this->unk_1E4, phi_v1, phi_v0);
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertTranslation(this->unk_1D8.x, this->unk_1D8.y, this->unk_1D8.z, MTXMODE_NEW);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(this->unk_1D8.x, this->unk_1D8.y, this->unk_1D8.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_1E4.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_1E4.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_1E4.z, MTXMODE_APPLY);
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateYS(this->unk_1E4.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_1E4.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_1E4.z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -380,8 +380,8 @@ void func_8092D108(EnDns* this, GlobalContext* globalCtx) {
|
||||
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_SetStateRotationAndTranslation(this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z,
|
||||
&this->actor.home.rot);
|
||||
Matrix_SetTranslateRotateYXZ(this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z,
|
||||
&this->actor.home.rot);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -566,9 +566,9 @@ s32 func_8092D954(s16 arg0, s16 arg1, Vec3f* arg2, Vec3s* arg3, s32 arg4, s32 ar
|
||||
Vec3s sp6C;
|
||||
MtxF sp2C;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&gZeroVec3f, &sp74);
|
||||
Matrix_CopyCurrentState(&sp2C);
|
||||
func_8018219C(&sp2C, &sp6C, 0);
|
||||
Matrix_MultVec3f(&gZeroVec3f, &sp74);
|
||||
Matrix_Get(&sp2C);
|
||||
Matrix_MtxFToYXZRot(&sp2C, &sp6C, false);
|
||||
*arg2 = sp74;
|
||||
|
||||
if (arg4 == 0) {
|
||||
@@ -617,11 +617,11 @@ void EnDns_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
|
||||
if (limbIndex == KINGS_CHAMBER_DEKU_GUARD_LIMB_HEAD) {
|
||||
func_8092D954(this->unk_2CC, this->unk_2CE + this->actor.shape.rot.y, &this->unk_218, &this->unk_224, phi_v1,
|
||||
phi_v0);
|
||||
Matrix_InsertTranslation(this->unk_218.x, this->unk_218.y, this->unk_218.z, MTXMODE_NEW);
|
||||
Matrix_Translate(this->unk_218.x, this->unk_218.y, this->unk_218.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_224.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_224.z, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_224.x, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->unk_224.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_224.z, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_224.x, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
@@ -1081,16 +1081,16 @@ void EnDodongo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
|
||||
Collider_UpdateSpheres(limbIndex, &this->collider1);
|
||||
Collider_UpdateSpheres(limbIndex, &this->collider2);
|
||||
if (D_80879388[limbIndex] != -1) {
|
||||
Matrix_GetStateTranslation(&this->limbPos[D_80879388[limbIndex]]);
|
||||
Matrix_MultZero(&this->limbPos[D_80879388[limbIndex]]);
|
||||
}
|
||||
|
||||
if (limbIndex == 7) {
|
||||
Matrix_MultiplyVector3fByState(&D_80879370, &this->unk_308);
|
||||
Matrix_MultiplyVector3fByState(&D_8087937C, &this->limbPos[0]);
|
||||
Matrix_GetStateTranslation(&this->actor.focus.pos);
|
||||
Matrix_GetStateTranslationAndScaledY(-200.0f, &this->limbPos[1]);
|
||||
Matrix_MultVec3f(&D_80879370, &this->unk_308);
|
||||
Matrix_MultVec3f(&D_8087937C, &this->limbPos[0]);
|
||||
Matrix_MultZero(&this->actor.focus.pos);
|
||||
Matrix_MultVecY(-200.0f, &this->limbPos[1]);
|
||||
} else if (limbIndex == 13) {
|
||||
Matrix_GetStateTranslationAndScaledX(1600.0f, &this->unk_320);
|
||||
Matrix_MultVecX(1600.0f, &this->unk_320);
|
||||
}
|
||||
|
||||
if ((limbIndex == 30) && (this->actionFunc == func_80878424) && (this->timer != this->unk_304)) {
|
||||
|
||||
@@ -725,7 +725,7 @@ void EnDragon_UpdateDamage(EnDragon* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
u32 sp30;
|
||||
|
||||
if ((this->action == DEEP_PYTHON_ACTION_EXTEND)) {
|
||||
if (this->action == DEEP_PYTHON_ACTION_EXTEND) {
|
||||
if ((this->collider.elements[2].info.bumperFlags & BUMP_HIT) ||
|
||||
(this->collider.elements[3].info.bumperFlags & BUMP_HIT) ||
|
||||
(this->collider.elements[4].info.bumperFlags & BUMP_HIT) ||
|
||||
@@ -816,15 +816,15 @@ void EnDragon_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
Vec3f playerGrabOffsetFromJawPos = { 350.0f, -120.0f, -60.0f };
|
||||
|
||||
if (limbIndex == DEEP_PYTHON_LIMB_JAW) {
|
||||
Matrix_MultiplyVector3fByState(&gZeroVec3f, &this->jawPos);
|
||||
Matrix_MultVec3f(&gZeroVec3f, &this->jawPos);
|
||||
playerGrabOffsetFromJawPos.x = 350.0f;
|
||||
playerGrabOffsetFromJawPos.y = -120.0f;
|
||||
playerGrabOffsetFromJawPos.z = -60.0f;
|
||||
Matrix_MultiplyVector3fByState(&playerGrabOffsetFromJawPos, &this->playerGrabPosition);
|
||||
Matrix_MultVec3f(&playerGrabOffsetFromJawPos, &this->playerGrabPosition);
|
||||
}
|
||||
|
||||
if (limbIndex == DEEP_PYTHON_LIMB_HEAD_AND_COLLAR_ROOT) {
|
||||
Matrix_MultiplyVector3fByState(&gZeroVec3f, &this->focusPos);
|
||||
Matrix_MultVec3f(&gZeroVec3f, &this->focusPos);
|
||||
}
|
||||
|
||||
Collider_UpdateSpheres(limbIndex, &this->collider);
|
||||
|
||||
@@ -1558,8 +1558,8 @@ s32 EnElf_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
}
|
||||
scale *= this->actor.scale.x * 124.99999f;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&zeroVec, &sp34);
|
||||
Matrix_InsertTranslation(sp34.x, sp34.y, sp34.z, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&zeroVec, &sp34);
|
||||
Matrix_Translate(sp34.x, sp34.y, sp34.z, MTXMODE_NEW);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
|
||||
@@ -153,12 +153,12 @@ void EnElfbub_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(0.0f, 0.0f, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(this->xyScale + 1.0f, this->xyScale + 1.0f, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->zRot, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->zRot, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->xScale + 1.0f, 1.0f, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->zRot * -1, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->zRot * -1, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_bubble_DL_001000);
|
||||
|
||||
@@ -611,7 +611,7 @@ void EnElforg_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(gStrayFairyClockTownTexAnim));
|
||||
break;
|
||||
}
|
||||
Matrix_InsertMatrix(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
|
||||
POLY_XLU_DISP =
|
||||
SkelAnime_DrawFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
|
||||
@@ -274,7 +274,7 @@ void EnEncount2_DrawParticles(EnEncount2* this, GlobalContext* globalCtx) {
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
for (i = 0; i < ARRAY_COUNT(this->particles); i++, sPtr++) {
|
||||
if (sPtr->enabled) {
|
||||
Matrix_InsertTranslation(sPtr->pos.x, sPtr->pos.y, sPtr->pos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(sPtr->pos.x, sPtr->pos.y, sPtr->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(sPtr->scale, sPtr->scale, sPtr->scale, MTXMODE_APPLY);
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 20);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(gSun1Tex));
|
||||
@@ -282,8 +282,8 @@ void EnEncount2_DrawParticles(EnEncount2* this, GlobalContext* globalCtx) {
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 250, 180, 255, sPtr->alpha);
|
||||
Matrix_InsertMatrix(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_f(DEGTORAD(globalCtx->state.frames * 20.0f), MTXMODE_APPLY);
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_RotateZF(DEGTORAD(globalCtx->state.frames * 20.0f), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_07AB58);
|
||||
|
||||
@@ -737,7 +737,7 @@ void EnFall_Moon_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
Matrix_MultiplyVector3fByState(sFocusOffset, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(sFocusOffset, &this->actor.focus.pos);
|
||||
|
||||
primColor = (this->eyeGlowIntensity * 200.0f) + 40.0f;
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0x80, primColor, primColor, primColor, 255);
|
||||
@@ -807,11 +807,11 @@ void EnFall_LodMoon_DrawWithLerp(Actor* thisx, GlobalContext* globalCtx) {
|
||||
translation.x = (-(globalCtx->view.eye.x - thisx->world.pos.x) * scale) + globalCtx->view.eye.x;
|
||||
translation.y = (-(globalCtx->view.eye.y - thisx->world.pos.y) * scale) + globalCtx->view.eye.y;
|
||||
translation.z = (-(globalCtx->view.eye.z - thisx->world.pos.z) * scale) + globalCtx->view.eye.z;
|
||||
Matrix_InsertTranslation(translation.x, translation.y, translation.z, MTXMODE_NEW);
|
||||
Matrix_Translate(translation.x, translation.y, translation.z, MTXMODE_NEW);
|
||||
Matrix_Scale(thisx->scale.x, thisx->scale.y, thisx->scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(thisx->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(thisx->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(thisx->shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(thisx->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(thisx->shape.rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(thisx->shape.rot.z, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
EnFall_LodMoon_Draw(thisx, globalCtx);
|
||||
@@ -870,11 +870,10 @@ void EnFall_RisingDebris_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(debrisParticles); i++) {
|
||||
if (debrisParticles[i].modelIndex < 3) {
|
||||
Matrix_InsertTranslation(debrisParticles[i].pos.x, debrisParticles[i].pos.y, debrisParticles[i].pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_Translate(debrisParticles[i].pos.x, debrisParticles[i].pos.y, debrisParticles[i].pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
Matrix_InsertRotation(debrisParticles[i].rot.x, debrisParticles[i].rot.y, debrisParticles[i].rot.z,
|
||||
MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(debrisParticles[i].rot.x, debrisParticles[i].rot.y, debrisParticles[i].rot.z,
|
||||
MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDebrisModelDLists[debrisParticles[i].modelIndex]);
|
||||
|
||||
@@ -799,9 +799,9 @@ s32 EnFamos_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
|
||||
EnFamos* this = THIS;
|
||||
|
||||
if (limbIndex == FAMOS_LIMB_BODY) {
|
||||
Matrix_InsertTranslation(0.0f, 4000.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->flipRot, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, -4000.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 4000.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->flipRot, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -4000.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
||||
} else if (this->flippedTimer < 0) { // if set to -1, famos is dying
|
||||
if ((limbIndex == FAMOS_LIMB_SWORD) || (limbIndex == FAMOS_LIMB_SHIELD) || (limbIndex == FAMOS_LIMB_HEAD)) {
|
||||
@@ -816,7 +816,7 @@ void EnFamos_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
EnFamos* this = THIS;
|
||||
|
||||
if (limbIndex == FAMOS_LIMB_EMBLEM) {
|
||||
Matrix_GetStateTranslation(&this->actor.focus.pos);
|
||||
Matrix_MultZero(&this->actor.focus.pos);
|
||||
Collider_UpdateSpheres(limbIndex, &this->emblemCollider);
|
||||
}
|
||||
}
|
||||
@@ -840,7 +840,7 @@ void EnFamos_DrawDebris(EnFamos* this, GlobalContext* globalCtx) {
|
||||
rock = &this->rocks[0];
|
||||
for (i = 0; i < ARRAY_COUNT(this->rocks); i++, rock++) {
|
||||
|
||||
Matrix_SetStateRotationAndTranslation(rock->pos.x, rock->pos.y, rock->pos.z, &rock->rotation);
|
||||
Matrix_SetTranslateRotateYXZ(rock->pos.x, rock->pos.y, rock->pos.z, &rock->rotation);
|
||||
Matrix_Scale(rock->scale, rock->scale, rock->scale, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(&dispOpa[3 + i * 2], Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
|
||||
@@ -377,16 +377,16 @@ void EnFg_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
||||
|
||||
if ((limbIndex == 7) || (limbIndex == 8)) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
Matrix_StatePush();
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Push();
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, *dList);
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
if (limbIndex == 4) {
|
||||
Matrix_MultiplyVector3fByState(&vec1, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&vec1, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -398,9 +398,9 @@ void EnFg_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
{ 120, 130, 230, 255 }, { 190, 190, 190, 255 }, { 0, 0, 0, 255 },
|
||||
};
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
EnFg_DrawDust(globalCtx, &this->dustEffect[0]);
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
@@ -471,8 +471,8 @@ void EnFg_DrawDust(GlobalContext* globalCtx, EnFgEffectDust* dustEffect) {
|
||||
alpha = (255.0f / 16.0f) * dustEffect->timer;
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, alpha);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
Matrix_InsertTranslation(dustEffect->pos.x, dustEffect->pos.y, dustEffect->pos.z, MTXMODE_NEW);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(dustEffect->pos.x, dustEffect->pos.y, dustEffect->pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(dustEffect->xyScale, dustEffect->xyScale, 1.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -760,7 +760,7 @@ void EnFirefly_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
|
||||
((this->auraType == KEESE_AURA_FIRE) || (this->auraType == KEESE_AURA_ICE)) &&
|
||||
((limbIndex == 15) || (limbIndex == 21))) {
|
||||
if (this->actionFunc != EnFirefly_Die) {
|
||||
Matrix_GetStateTranslation(&auraPos);
|
||||
Matrix_MultZero(&auraPos);
|
||||
auraPos.x += Rand_ZeroFloat(5.0f);
|
||||
auraPos.y += Rand_ZeroFloat(5.0f);
|
||||
auraPos.z += Rand_ZeroFloat(5.0f);
|
||||
@@ -793,11 +793,11 @@ void EnFirefly_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
|
||||
}
|
||||
|
||||
if (limbIndex == 15) {
|
||||
Matrix_GetStateTranslation(&this->limbPos[0]);
|
||||
Matrix_MultZero(&this->limbPos[0]);
|
||||
} else if (limbIndex == 21) {
|
||||
Matrix_GetStateTranslation(&this->limbPos[1]);
|
||||
Matrix_MultZero(&this->limbPos[1]);
|
||||
} else if (limbIndex == 10) {
|
||||
Matrix_GetStateTranslation(&this->limbPos[2]);
|
||||
Matrix_MultZero(&this->limbPos[2]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1053,23 +1053,23 @@ void EnFish2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
if ((limbIndex == 20) || (limbIndex == 21)) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Push();
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, *dList);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
if (limbIndex == 14) {
|
||||
Matrix_MultiplyVector3fByState(&gZeroVec3f, &this->unk_318);
|
||||
Matrix_MultVec3f(&gZeroVec3f, &this->unk_318);
|
||||
}
|
||||
|
||||
if (limbIndex == 17) {
|
||||
Matrix_MultiplyVector3fByState(&gZeroVec3f, &this->unk_300);
|
||||
Matrix_MultVec3f(&gZeroVec3f, &this->unk_300);
|
||||
}
|
||||
|
||||
Collider_UpdateSpheres(limbIndex, &this->collider);
|
||||
@@ -1161,7 +1161,7 @@ void func_80B2B180(EnFish2* this, GlobalContext* globalCtx) {
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_3F8); i++, ptr++) {
|
||||
if (ptr->unk_00) {
|
||||
Matrix_InsertTranslation(ptr->unk_04.x, ptr->unk_04.y, ptr->unk_04.z, MTXMODE_NEW);
|
||||
Matrix_Translate(ptr->unk_04.x, ptr->unk_04.y, ptr->unk_04.z, MTXMODE_NEW);
|
||||
Matrix_Scale(ptr->unk_14, ptr->unk_14, ptr->unk_14, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -570,9 +570,9 @@ void EnFishing_SpawnRainDrop(FishingEffect* effect, Vec3f* pos, Vec3f* rot) {
|
||||
effect->unk_34 = rot->x;
|
||||
effect->unk_38 = rot->y;
|
||||
effect->unk_3C = rot->z;
|
||||
Matrix_InsertYRotation_f(rot->y, MTXMODE_NEW);
|
||||
Matrix_RotateStateAroundXAxis(rot->x);
|
||||
Matrix_MultiplyVector3fByState(&velSrc, &effect->vel);
|
||||
Matrix_RotateYF(rot->y, MTXMODE_NEW);
|
||||
Matrix_RotateXFApply(rot->x);
|
||||
Matrix_MultVec3f(&velSrc, &effect->vel);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -896,14 +896,14 @@ void EnFishing_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
fish->type = FS_GROUP_FISH_NORMAL;
|
||||
|
||||
if (i <= 20) {
|
||||
fish->unk_10.x = fish->pos.x = __sinf(sFishGroupAngle1) * 720.0f;
|
||||
fish->unk_10.z = fish->pos.z = __cosf(sFishGroupAngle1) * 720.0f;
|
||||
fish->unk_10.x = fish->pos.x = sinf(sFishGroupAngle1) * 720.0f;
|
||||
fish->unk_10.z = fish->pos.z = cosf(sFishGroupAngle1) * 720.0f;
|
||||
} else if (i <= 40) {
|
||||
fish->unk_10.x = fish->pos.x = __sinf(sFishGroupAngle2) * 720.0f;
|
||||
fish->unk_10.z = fish->pos.z = __cosf(sFishGroupAngle2) * 720.0f;
|
||||
fish->unk_10.x = fish->pos.x = sinf(sFishGroupAngle2) * 720.0f;
|
||||
fish->unk_10.z = fish->pos.z = cosf(sFishGroupAngle2) * 720.0f;
|
||||
} else {
|
||||
fish->unk_10.x = fish->pos.x = __sinf(sFishGroupAngle3) * 720.0f;
|
||||
fish->unk_10.z = fish->pos.z = __cosf(sFishGroupAngle3) * 720.0f;
|
||||
fish->unk_10.x = fish->pos.x = sinf(sFishGroupAngle3) * 720.0f;
|
||||
fish->unk_10.z = fish->pos.z = cosf(sFishGroupAngle3) * 720.0f;
|
||||
}
|
||||
|
||||
fish->unk_10.y = fish->pos.y = -35.0f;
|
||||
@@ -1150,7 +1150,7 @@ void EnFishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) {
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
|
||||
@@ -1164,7 +1164,7 @@ void EnFishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) {
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, effect->alpha);
|
||||
|
||||
Matrix_InsertTranslation(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(effect->unk_30, 1.0f, effect->unk_30, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
@@ -1187,8 +1187,8 @@ void EnFishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) {
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 180, 180, 180, effect->alpha);
|
||||
|
||||
Matrix_InsertTranslation(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(effect->unk_30, effect->unk_30, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
@@ -1215,8 +1215,8 @@ void EnFishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) {
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, effect->timer + (i * 3),
|
||||
(effect->timer + (i * 3)) * 5, 32, 64, 1, 0, 0, 32, 32));
|
||||
|
||||
Matrix_InsertTranslation(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(effect->unk_30, effect->unk_30, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
@@ -1238,8 +1238,8 @@ void EnFishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) {
|
||||
flag++;
|
||||
}
|
||||
|
||||
Matrix_InsertTranslation(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(effect->unk_30, effect->unk_30, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
@@ -1261,10 +1261,10 @@ void EnFishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) {
|
||||
flag++;
|
||||
}
|
||||
|
||||
Matrix_InsertTranslation(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_InsertYRotation_f(effect->unk_38, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(effect->unk_34);
|
||||
Matrix_InsertZRotation_f(effect->unk_3C, MTXMODE_APPLY);
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYF(effect->unk_38, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(effect->unk_34);
|
||||
Matrix_RotateZF(effect->unk_3C, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.002f, 1.0f, 0.1f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
@@ -1288,7 +1288,7 @@ void EnFishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) {
|
||||
flag++;
|
||||
}
|
||||
|
||||
Matrix_InsertTranslation(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(effect->unk_30, 1.0f, effect->unk_30, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
@@ -1315,9 +1315,9 @@ void EnFishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) {
|
||||
rotY = M_PI;
|
||||
}
|
||||
|
||||
Matrix_InsertTranslation(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_InsertYRotation_f(rotY, MTXMODE_APPLY);
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_RotateYF(rotY, MTXMODE_APPLY);
|
||||
Matrix_Scale(effect->unk_30, effect->unk_30, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
@@ -1330,19 +1330,19 @@ void EnFishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) {
|
||||
|
||||
effect = firstEffect;
|
||||
if (effect->type == FS_EFF_OWNER_HAT) {
|
||||
Matrix_InsertTranslation(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_InsertYRotation_f((sEffOwnerHatRot.y * M_PI) / 32768, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis((sEffOwnerHatRot.x * M_PI) / 32768);
|
||||
Matrix_InsertZRotation_f((sEffOwnerHatRot.z * M_PI) / 32768, MTXMODE_APPLY);
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYF((sEffOwnerHatRot.y * M_PI) / 32768, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply((sEffOwnerHatRot.x * M_PI) / 32768);
|
||||
Matrix_RotateZF((sEffOwnerHatRot.z * M_PI) / 32768, MTXMODE_APPLY);
|
||||
Matrix_Scale(effect->unk_30, effect->unk_30, effect->unk_30, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(-1250.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(M_PI / 2);
|
||||
Matrix_Translate(-1250.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(M_PI / 2);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, gFishingOwnerHatDL);
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
@@ -1358,7 +1358,7 @@ void EnFishing_DrawStreamSplash(GlobalContext* globalCtx) {
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, 50);
|
||||
|
||||
Matrix_InsertTranslation(670.0f, -24.0f, -600.0f, MTXMODE_NEW);
|
||||
Matrix_Translate(670.0f, -24.0f, -600.0f, MTXMODE_NEW);
|
||||
Matrix_Scale(0.02f, 1.0f, 0.02f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -1494,9 +1494,9 @@ void EnFishing_UpdateLine(GlobalContext* globalCtx, Vec3f* basePos, Vec3f* pos,
|
||||
(rot + i - 1)->y = ry;
|
||||
(rot + i - 1)->x = rx;
|
||||
|
||||
Matrix_InsertYRotation_f(ry, MTXMODE_NEW);
|
||||
Matrix_RotateStateAroundXAxis(rx);
|
||||
Matrix_MultiplyVector3fByState(&posSrc, &posStep);
|
||||
Matrix_RotateYF(ry, MTXMODE_NEW);
|
||||
Matrix_RotateXFApply(rx);
|
||||
Matrix_MultVec3f(&posSrc, &posStep);
|
||||
|
||||
(pos + i)->x = (pos + i - 1)->x + posStep.x;
|
||||
(pos + i)->y = (pos + i - 1)->y + posStep.y;
|
||||
@@ -1527,9 +1527,9 @@ void EnFishing_UpdateLinePos(Vec3f* pos) {
|
||||
dist = sqrtf(SQ(dx) + SQ(dz));
|
||||
rx = -Math_Acot2F(dist, dy);
|
||||
|
||||
Matrix_InsertYRotation_f(ry, MTXMODE_NEW);
|
||||
Matrix_RotateStateAroundXAxis(rx);
|
||||
Matrix_MultiplyVector3fByState(&posSrc, &posStep);
|
||||
Matrix_RotateYF(ry, MTXMODE_NEW);
|
||||
Matrix_RotateXFApply(rx);
|
||||
Matrix_MultVec3f(&posSrc, &posStep);
|
||||
|
||||
(pos + i)->x = (pos + i + 1)->x + posStep.x;
|
||||
(pos + i)->y = (pos + i + 1)->y + posStep.y;
|
||||
@@ -1551,7 +1551,7 @@ void EnFishing_DrawLureHook(GlobalContext* globalCtx, Vec3f* pos, Vec3f* refPos,
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
if ((D_8090CD14 == 3) && ((pos->y > WATER_SURFACE_Y(globalCtx)) || ((D_8090CD0C != 0) && hookIndex))) {
|
||||
offsetY = 0.0f;
|
||||
@@ -1569,15 +1569,15 @@ void EnFishing_DrawLureHook(GlobalContext* globalCtx, Vec3f* pos, Vec3f* refPos,
|
||||
dist = sqrtf(SQ(dx) + SQ(dz));
|
||||
rx = -Math_Acot2F(dist, dy);
|
||||
|
||||
Matrix_InsertYRotation_f(ry, MTXMODE_NEW);
|
||||
Matrix_RotateStateAroundXAxis(rx);
|
||||
Matrix_MultiplyVector3fByState(&posSrc, &posStep);
|
||||
Matrix_RotateYF(ry, MTXMODE_NEW);
|
||||
Matrix_RotateXFApply(rx);
|
||||
Matrix_MultVec3f(&posSrc, &posStep);
|
||||
|
||||
refPos->x = pos->x + posStep.x;
|
||||
refPos->y = pos->y + posStep.y;
|
||||
refPos->z = pos->z + posStep.z;
|
||||
|
||||
Matrix_InsertTranslation(pos->x, pos->y, pos->z, MTXMODE_NEW);
|
||||
Matrix_Translate(pos->x, pos->y, pos->z, MTXMODE_NEW);
|
||||
|
||||
if ((player->actor.speedXZ == 0.0f) && (D_809101B4 == 0.0f)) {
|
||||
Math_ApproachF(&sLureHookRotY[hookIndex], ry, 0.1f, 0.3f);
|
||||
@@ -1585,31 +1585,31 @@ void EnFishing_DrawLureHook(GlobalContext* globalCtx, Vec3f* pos, Vec3f* refPos,
|
||||
sLureHookRotY[hookIndex] = ry;
|
||||
}
|
||||
|
||||
Matrix_InsertYRotation_f(sLureHookRotY[hookIndex], MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(rx);
|
||||
Matrix_RotateYF(sLureHookRotY[hookIndex], MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(rx);
|
||||
Matrix_Scale(0.0039999997f, 0.0039999997f, 0.005f, MTXMODE_APPLY);
|
||||
Matrix_InsertYRotation_f(M_PI, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(M_PI, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gFishingLureHookDL);
|
||||
|
||||
Matrix_InsertZRotation_f(M_PI / 2, MTXMODE_APPLY);
|
||||
Matrix_RotateZF(M_PI / 2, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gFishingLureHookDL);
|
||||
|
||||
if ((hookIndex == 1) && (D_8090CD0C != 0)) {
|
||||
Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(250.0f, 0.0f, -1400.0f, MTXMODE_APPLY);
|
||||
Matrix_StatePush();
|
||||
Matrix_Translate(250.0f, 0.0f, -1400.0f, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
|
||||
if (D_8090CD10 != 0) {
|
||||
FishingEffect* effect = globalCtx->specialEffects;
|
||||
MtxF mf;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sZeroVec, &effect->pos);
|
||||
Matrix_CopyCurrentState(&mf);
|
||||
func_8018219C(&mf, &sEffOwnerHatRot, 0);
|
||||
Matrix_MultVec3f(&sZeroVec, &effect->pos);
|
||||
Matrix_Get(&mf);
|
||||
Matrix_MtxFToYXZRot(&mf, &sEffOwnerHatRot, false);
|
||||
|
||||
D_8090CD10 = 0;
|
||||
D_8090CD0C = 0;
|
||||
@@ -1620,15 +1620,15 @@ void EnFishing_DrawLureHook(GlobalContext* globalCtx, Vec3f* pos, Vec3f* refPos,
|
||||
effect->accel = sZeroVec;
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertTranslation(-1250.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(M_PI / 2);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(-1250.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(M_PI / 2);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gFishingOwnerHatDL);
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
@@ -1665,11 +1665,11 @@ void EnFishing_UpdateSinkingLure(GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (D_8090CD14 == 5) {
|
||||
Matrix_InsertYRotation_f(player->actor.shape.rot.y * (M_PI / 32768), MTXMODE_NEW);
|
||||
Matrix_RotateYF(player->actor.shape.rot.y * (M_PI / 32768), MTXMODE_NEW);
|
||||
sp94.x = 5.0f;
|
||||
sp94.y = 0.0f;
|
||||
sp94.z = 3.0f;
|
||||
Matrix_MultiplyVector3fByState(&sp94, &sp88);
|
||||
Matrix_MultVec3f(&sp94, &sp88);
|
||||
}
|
||||
|
||||
for (i = 1; i < SINKING_LURE_SEG_COUNT; i++) {
|
||||
@@ -1690,9 +1690,9 @@ void EnFishing_UpdateSinkingLure(GlobalContext* globalCtx) {
|
||||
dist = sqrtf(SQ(dx) + SQ(dz));
|
||||
rx = -Math_Acot2F(dist, dy);
|
||||
|
||||
Matrix_InsertYRotation_f(ry, MTXMODE_NEW);
|
||||
Matrix_RotateStateAroundXAxis(rx);
|
||||
Matrix_MultiplyVector3fByState(&posSrc, &posStep);
|
||||
Matrix_RotateYF(ry, MTXMODE_NEW);
|
||||
Matrix_RotateXFApply(rx);
|
||||
Matrix_MultVec3f(&posSrc, &posStep);
|
||||
|
||||
(pos + i)->x = (pos + i - 1)->x + posStep.x;
|
||||
(pos + i)->y = (pos + i - 1)->y + posStep.y;
|
||||
@@ -1720,10 +1720,10 @@ void EnFishing_DrawSinkingLure(GlobalContext* globalCtx) {
|
||||
|
||||
for (i = SINKING_LURE_SEG_COUNT - 1; i >= 0; i--) {
|
||||
if ((i + D_80911F20) < SINKING_LURE_SEG_COUNT) {
|
||||
Matrix_InsertTranslation(sSinkingLurePos[i].x, sSinkingLurePos[i].y, sSinkingLurePos[i].z, MTXMODE_NEW);
|
||||
Matrix_Translate(sSinkingLurePos[i].x, sSinkingLurePos[i].y, sSinkingLurePos[i].z, MTXMODE_NEW);
|
||||
scale = sSinkingLureSizes[i + D_80911F20] * 0.04f;
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -1737,10 +1737,10 @@ void EnFishing_DrawSinkingLure(GlobalContext* globalCtx) {
|
||||
|
||||
for (i = SINKING_LURE_SEG_COUNT - 1; i >= 0; i--) {
|
||||
if ((i + D_80911F20) < SINKING_LURE_SEG_COUNT) {
|
||||
Matrix_InsertTranslation(sSinkingLurePos[i].x, sSinkingLurePos[i].y, sSinkingLurePos[i].z, MTXMODE_NEW);
|
||||
Matrix_Translate(sSinkingLurePos[i].x, sSinkingLurePos[i].y, sSinkingLurePos[i].z, MTXMODE_NEW);
|
||||
scale = sSinkingLureSizes[i + D_80911F20] * 0.04f;
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -1764,7 +1764,7 @@ void EnFishing_DrawLureAndLine(GlobalContext* globalCtx, Vec3f* linePos, Vec3f*
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
if (D_8090CD54 != 0) {
|
||||
Vec3f posTemp = sLurePos;
|
||||
@@ -1778,11 +1778,11 @@ void EnFishing_DrawLureAndLine(GlobalContext* globalCtx, Vec3f* linePos, Vec3f*
|
||||
sLurePos = sFishingHookedFish->fishMouthPos;
|
||||
|
||||
if ((D_8090CD14 == 5) && (D_80917206 == 2)) {
|
||||
Matrix_InsertYRotation_f(player->actor.shape.rot.y * (M_PI / 32768), MTXMODE_NEW);
|
||||
Matrix_RotateYF(player->actor.shape.rot.y * (M_PI / 32768), MTXMODE_NEW);
|
||||
posSrc.x = 2.0f;
|
||||
posSrc.y = 0.0f;
|
||||
posSrc.z = 0.0f;
|
||||
Matrix_MultiplyVector3fByState(&posSrc, &posStep);
|
||||
Matrix_MultVec3f(&posSrc, &posStep);
|
||||
sLurePos.x += posStep.x;
|
||||
sLurePos.z += posStep.z;
|
||||
}
|
||||
@@ -1798,13 +1798,13 @@ void EnFishing_DrawLureAndLine(GlobalContext* globalCtx, Vec3f* linePos, Vec3f*
|
||||
}
|
||||
|
||||
if (D_80917206 != 2) {
|
||||
Matrix_InsertTranslation(sLurePos.x, sLurePos.y, sLurePos.z, MTXMODE_NEW);
|
||||
Matrix_InsertYRotation_f(sLureRot.y + D_80917254, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(sLureRot.x);
|
||||
Matrix_Translate(sLurePos.x, sLurePos.y, sLurePos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYF(sLureRot.y + D_80917254, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(sLureRot.x);
|
||||
Matrix_Scale(0.0039999997f, 0.0039999997f, 0.0039999997f, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, D_80917258, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_f(M_PI / 2, MTXMODE_APPLY);
|
||||
Matrix_InsertYRotation_f(M_PI / 2, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, D_80917258, MTXMODE_APPLY);
|
||||
Matrix_RotateZF(M_PI / 2, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(M_PI / 2, MTXMODE_APPLY);
|
||||
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
|
||||
@@ -1814,16 +1814,16 @@ void EnFishing_DrawLureAndLine(GlobalContext* globalCtx, Vec3f* linePos, Vec3f*
|
||||
posSrc.x = -850.0f;
|
||||
posSrc.y = 0.0f;
|
||||
posSrc.z = 0.0f;
|
||||
Matrix_MultiplyVector3fByState(&posSrc, &D_80917218);
|
||||
Matrix_MultVec3f(&posSrc, &D_80917218);
|
||||
|
||||
posSrc.x = 500.0f;
|
||||
posSrc.z = -300.0f;
|
||||
Matrix_MultiplyVector3fByState(&posSrc, &hookPos[0]);
|
||||
Matrix_MultVec3f(&posSrc, &hookPos[0]);
|
||||
EnFishing_DrawLureHook(globalCtx, &hookPos[0], &sLureHookRefPos[0], 0);
|
||||
|
||||
posSrc.x = 2100.0f;
|
||||
posSrc.z = -50.0f;
|
||||
Matrix_MultiplyVector3fByState(&posSrc, &hookPos[1]);
|
||||
Matrix_MultVec3f(&posSrc, &hookPos[1]);
|
||||
EnFishing_DrawLureHook(globalCtx, &hookPos[1], &sLureHookRefPos[1], 1);
|
||||
}
|
||||
|
||||
@@ -1850,9 +1850,9 @@ void EnFishing_DrawLureAndLine(GlobalContext* globalCtx, Vec3f* linePos, Vec3f*
|
||||
|
||||
dist = sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) * 0.001f;
|
||||
|
||||
Matrix_InsertTranslation(sRodTipPos.x, sRodTipPos.y, sRodTipPos.z, MTXMODE_NEW);
|
||||
Matrix_InsertYRotation_f(ry, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(rx);
|
||||
Matrix_Translate(sRodTipPos.x, sRodTipPos.y, sRodTipPos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYF(ry, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(rx);
|
||||
Matrix_Scale(D_809101C8, 1.0f, dist, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -1877,9 +1877,9 @@ void EnFishing_DrawLureAndLine(GlobalContext* globalCtx, Vec3f* linePos, Vec3f*
|
||||
|
||||
dist = sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) * 0.001f;
|
||||
|
||||
Matrix_InsertTranslation((linePos + i)->x, (linePos + i)->y, (linePos + i)->z, MTXMODE_NEW);
|
||||
Matrix_InsertYRotation_f(ry, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(rx);
|
||||
Matrix_Translate((linePos + i)->x, (linePos + i)->y, (linePos + i)->z, MTXMODE_NEW);
|
||||
Matrix_RotateYF(ry, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(rx);
|
||||
Matrix_Scale(D_809101C8, 1.0f, dist, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
@@ -1888,9 +1888,9 @@ void EnFishing_DrawLureAndLine(GlobalContext* globalCtx, Vec3f* linePos, Vec3f*
|
||||
break;
|
||||
}
|
||||
|
||||
Matrix_InsertTranslation((linePos + i)->x, (linePos + i)->y, (linePos + i)->z, MTXMODE_NEW);
|
||||
Matrix_InsertYRotation_f((lineRot + i)->y, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis((lineRot + i)->x);
|
||||
Matrix_Translate((linePos + i)->x, (linePos + i)->y, (linePos + i)->z, MTXMODE_NEW);
|
||||
Matrix_RotateYF((lineRot + i)->y, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply((lineRot + i)->x);
|
||||
Matrix_Scale(D_809101C8, 1.0f, 0.005f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
@@ -1899,7 +1899,7 @@ void EnFishing_DrawLureAndLine(GlobalContext* globalCtx, Vec3f* linePos, Vec3f*
|
||||
}
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
@@ -2001,34 +2001,34 @@ void EnFishing_DrawRod(GlobalContext* globalCtx) {
|
||||
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 155, 0, 255);
|
||||
|
||||
Matrix_InsertMatrix(&player->mf_CC4, MTXMODE_NEW);
|
||||
Matrix_Mult(&player->mf_CC4, MTXMODE_NEW);
|
||||
|
||||
if (sLinkAge != 1) {
|
||||
Matrix_InsertTranslation(0.0f, 400.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 400.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_InsertTranslation(0.0f, 230.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 230.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (D_8090CD14 == 5) {
|
||||
Matrix_InsertYRotation_f(1.7592919f, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(1.7592919f, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_InsertYRotation_f(1.288053f, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(1.288053f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
Matrix_RotateStateAroundXAxis(-0.6283185f);
|
||||
Matrix_InsertZRotation_f((player->unk_B08[0] * 0.5f) + 0.4712389f, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis((D_8090CD40 + 20.0f) * 0.01f * M_PI);
|
||||
Matrix_RotateXFApply(-0.6283185f);
|
||||
Matrix_RotateZF((player->unk_B08[0] * 0.5f) + 0.4712389f, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply((D_8090CD40 + 20.0f) * 0.01f * M_PI);
|
||||
Matrix_Scale(0.70000005f, 0.70000005f, 0.70000005f, MTXMODE_APPLY);
|
||||
|
||||
spC0 = (D_8090CD3C * (((player->unk_B08[1] - 1.0f) * -0.25f) + 0.5f)) + (D_8090CD2C + D_8090CD38);
|
||||
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, -1300.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, -1300.0f, MTXMODE_APPLY);
|
||||
|
||||
for (i = 0; i < 22; i++) {
|
||||
Matrix_InsertYRotation_f(sRodBendRatios[i] * D_8090CD28 * 0.5f, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(sRodBendRatios[i] * spC0 * 0.5f);
|
||||
Matrix_RotateYF(sRodBendRatios[i] * D_8090CD28 * 0.5f, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(sRodBendRatios[i] * spC0 * 0.5f);
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
Matrix_Scale(sRodScales[i], sRodScales[i], 0.52f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -2046,11 +2046,11 @@ void EnFishing_DrawRod(GlobalContext* globalCtx) {
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, gFishingRodSegmentDL);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, 500.0f, MTXMODE_APPLY);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(0.0f, 0.0f, 500.0f, MTXMODE_APPLY);
|
||||
|
||||
if (i == 21) {
|
||||
Matrix_MultiplyVector3fByState(&sRodTipOffset, &sRodTipPos);
|
||||
Matrix_MultVec3f(&sRodTipOffset, &sRodTipPos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2175,11 +2175,11 @@ void EnFishing_UpdateLure(EnFishing* this, GlobalContext* globalCtx) {
|
||||
if (D_80917204 == 18) {
|
||||
D_8090CD14 = 1;
|
||||
sLurePos = sRodTipPos;
|
||||
Matrix_InsertYRotation_f(BINANG_TO_RAD(player->actor.shape.rot.y), MTXMODE_NEW);
|
||||
Matrix_RotateYF(BINANG_TO_RAD(player->actor.shape.rot.y), MTXMODE_NEW);
|
||||
sp90.x = 0.0f;
|
||||
sp90.y = 0.0f;
|
||||
sp90.z = 25.0f;
|
||||
Matrix_MultiplyVector3fByState(&sp90, &D_80917238);
|
||||
Matrix_MultVec3f(&sp90, &D_80917238);
|
||||
D_80917238.y = 15.0f;
|
||||
D_80917248.x = D_80917248.z = 0.0f;
|
||||
D_80917248.y = -1.0f;
|
||||
@@ -2292,8 +2292,8 @@ void EnFishing_UpdateLure(EnFishing* this, GlobalContext* globalCtx) {
|
||||
sp7C = Rand_ZeroFloat(1.5f) + 0.5f;
|
||||
sp78 = Rand_ZeroFloat(6.28f);
|
||||
|
||||
sp9C.x = __sinf(sp78) * sp7C;
|
||||
sp9C.z = __cosf(sp78) * sp7C;
|
||||
sp9C.x = sinf(sp78) * sp7C;
|
||||
sp9C.z = cosf(sp78) * sp7C;
|
||||
sp9C.y = Rand_ZeroFloat(3.0f) + 3.0f;
|
||||
|
||||
spA8 = sLurePos;
|
||||
@@ -2471,17 +2471,17 @@ void EnFishing_UpdateLure(EnFishing* this, GlobalContext* globalCtx) {
|
||||
sp90.y = 0.0f;
|
||||
sp90.z = D_809101B4;
|
||||
|
||||
Matrix_InsertYRotation_f(sLureRot.y, MTXMODE_NEW);
|
||||
Matrix_RotateYF(sLureRot.y, MTXMODE_NEW);
|
||||
|
||||
if (D_80917206 == 2) {
|
||||
s8 requiredScopeTemp;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp90, &sp64);
|
||||
Matrix_MultVec3f(&sp90, &sp64);
|
||||
D_80917278.x = sp64.x;
|
||||
D_80917278.z = sp64.z;
|
||||
phi_f0 = 10.0f;
|
||||
} else {
|
||||
Matrix_MultiplyVector3fByState(&sp90, &D_80917278);
|
||||
Matrix_MultVec3f(&sp90, &D_80917278);
|
||||
phi_f0 = 0.0f;
|
||||
}
|
||||
|
||||
@@ -2648,8 +2648,8 @@ s32 func_809033F0(EnFishing* this, GlobalContext* globalCtx, u8 ignorePosCheck)
|
||||
speedXZ = (Rand_ZeroFloat(1.5f) + 0.5f) * scale;
|
||||
angle = Rand_ZeroFloat(6.28f);
|
||||
|
||||
vel.x = __sinf(angle) * speedXZ;
|
||||
vel.z = __cosf(angle) * speedXZ;
|
||||
vel.x = sinf(angle) * speedXZ;
|
||||
vel.z = cosf(angle) * speedXZ;
|
||||
vel.y = (Rand_ZeroFloat(3.0f) + 3.0f) * scale;
|
||||
|
||||
pos = this->actor.world.pos;
|
||||
@@ -2695,8 +2695,8 @@ void func_809036BC(EnFishing* this, GlobalContext* globalCtx) {
|
||||
speedXZ = (Rand_ZeroFloat(1.5f) + 0.5f) * scale;
|
||||
angle = Rand_ZeroFloat(6.28f);
|
||||
|
||||
vel.x = __sinf(angle) * speedXZ;
|
||||
vel.z = __cosf(angle) * speedXZ;
|
||||
vel.x = sinf(angle) * speedXZ;
|
||||
vel.z = cosf(angle) * speedXZ;
|
||||
vel.y = Rand_ZeroFloat(2.0f) + 2.0f;
|
||||
|
||||
pos = this->actor.world.pos;
|
||||
@@ -2721,8 +2721,8 @@ void func_809038A4(EnFishing* this, Input* input) {
|
||||
sp24 = SQ(sp34.x) + SQ(sp34.y) + SQ(sp34.z);
|
||||
|
||||
if ((D_8090CD14 == 3) && (this->unk_19A == 0) && (D_8090CD0C == 0)) {
|
||||
Matrix_InsertYRotation_f((-this->actor.shape.rot.y / 32768.0f) * M_PI, MTXMODE_NEW);
|
||||
Matrix_MultiplyVector3fByState(&sp34, &sp28);
|
||||
Matrix_RotateYF((-this->actor.shape.rot.y / 32768.0f) * M_PI, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp34, &sp28);
|
||||
|
||||
if ((sp28.z > 0.0f) || (this->unk_1A4 < 40.0f)) {
|
||||
if ((this->unk_150 == 7) && (sp24 < SQ(200.0f))) {
|
||||
@@ -2945,10 +2945,10 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
this->unk_184 += this->unk_190;
|
||||
|
||||
temp = __cosf(this->unk_184);
|
||||
temp = cosf(this->unk_184);
|
||||
this->unk_164 = this->unk_166 + (temp * this->unk_194);
|
||||
|
||||
temp = __cosf(this->unk_184 + -1.2f);
|
||||
temp = cosf(this->unk_184 + -1.2f);
|
||||
this->unk_16E = this->unk_166 + (temp * this->unk_194 * 1.6f);
|
||||
} else {
|
||||
Actor_SetScale(&this->actor, this->unk_1A4 * 65.0f * 0.000001f);
|
||||
@@ -2959,11 +2959,11 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
this->unk_184 += this->unk_190 * 0.8f;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
temp = __cosf(this->unk_184 + (i * 2.1f));
|
||||
temp = cosf(this->unk_184 + (i * 2.1f));
|
||||
this->unk_1C4[i] = this->unk_166 + (temp * this->unk_194 * 2.0f);
|
||||
}
|
||||
|
||||
temp = __cosf(this->unk_184 + 0.4f);
|
||||
temp = cosf(this->unk_184 + 0.4f);
|
||||
this->unk_164 = (this->unk_194 * temp * 2.0f) * 0.6f;
|
||||
}
|
||||
|
||||
@@ -3246,8 +3246,8 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
}
|
||||
sp10C.y = 0.0f;
|
||||
sp10C.z = 0.0f;
|
||||
Matrix_InsertYRotation_f(sLureRot.y, MTXMODE_NEW);
|
||||
Matrix_MultiplyVector3fByState(&sp10C, &sp100);
|
||||
Matrix_RotateYF(sLureRot.y, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp10C, &sp100);
|
||||
|
||||
this->unk_1AC.x = sLurePos.x + sp100.x;
|
||||
this->unk_1AC.z = sLurePos.z + sp100.z;
|
||||
@@ -3378,8 +3378,8 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
sp10C.y = 0.0f;
|
||||
sp10C.z = 30.0f;
|
||||
|
||||
Matrix_InsertYRotation_f(sLureRot.y, MTXMODE_NEW);
|
||||
Matrix_MultiplyVector3fByState(&sp10C, &sp100);
|
||||
Matrix_RotateYF(sLureRot.y, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp10C, &sp100);
|
||||
|
||||
this->unk_1AC.x = sLurePos.x + sp100.x;
|
||||
this->unk_1AC.z = sLurePos.z + sp100.z;
|
||||
@@ -3607,10 +3607,10 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
for (spA2 = 0; spA2 < 100; spA2++) {
|
||||
|
||||
Matrix_InsertYRotation_f(randPlusMinusPoint5Scaled(2.3561945f) +
|
||||
(((this->actor.yawTowardsPlayer + 0x8000) / 32768.0f) * M_PI),
|
||||
MTXMODE_NEW);
|
||||
Matrix_MultiplyVector3fByState(&sp10C, &sp100);
|
||||
Matrix_RotateYF(randPlusMinusPoint5Scaled(2.3561945f) +
|
||||
(((this->actor.yawTowardsPlayer + 0x8000) / 32768.0f) * M_PI),
|
||||
MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp10C, &sp100);
|
||||
|
||||
this->unk_1AC.x = this->actor.world.pos.x + sp100.x;
|
||||
this->unk_1AC.z = this->actor.world.pos.z + sp100.z;
|
||||
@@ -3812,8 +3812,8 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
sp10C.y = 10.0f;
|
||||
sp10C.z = 50.0f;
|
||||
}
|
||||
Matrix_InsertYRotation_f((player->actor.shape.rot.y / 32768.0f) * M_PI, MTXMODE_NEW);
|
||||
Matrix_MultiplyVector3fByState(&sp10C, &sCameraEye);
|
||||
Matrix_RotateYF((player->actor.shape.rot.y / 32768.0f) * M_PI, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp10C, &sCameraEye);
|
||||
|
||||
sCameraEye.x += player->actor.world.pos.x;
|
||||
sCameraEye.y += player->actor.world.pos.y;
|
||||
@@ -3855,7 +3855,7 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
sp10C.x = 4.0f;
|
||||
sp10C.y = -10.0f;
|
||||
sp10C.z = 5.0f;
|
||||
Matrix_MultiplyVector3fByState(&sp10C, &sp100);
|
||||
Matrix_MultVec3f(&sp10C, &sp100);
|
||||
Math_ApproachF(&this->actor.world.pos.x, player->bodyPartsPos[15].x + sp100.x, 1.0f, 6.0f);
|
||||
Math_ApproachF(&this->actor.world.pos.y, player->bodyPartsPos[15].y + sp100.y, 1.0f, 6.0f);
|
||||
Math_ApproachF(&this->actor.world.pos.z, player->bodyPartsPos[15].z + sp100.z, 1.0f, 6.0f);
|
||||
@@ -4199,7 +4199,7 @@ void EnFishing_FishPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d
|
||||
EnFishing* this = THIS;
|
||||
|
||||
if (limbIndex == 13) {
|
||||
Matrix_MultiplyVector3fByState(&sFishMouthOffset, &this->fishMouthPos);
|
||||
Matrix_MultVec3f(&sFishMouthOffset, &this->fishMouthPos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4223,7 +4223,7 @@ void EnFishing_LoachPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx**
|
||||
EnFishing* this = THIS;
|
||||
|
||||
if (limbIndex == 11) {
|
||||
Matrix_MultiplyVector3fByState(&sLoachMouthOffset, &this->fishMouthPos);
|
||||
Matrix_MultVec3f(&sLoachMouthOffset, &this->fishMouthPos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4232,24 +4232,24 @@ void EnFishing_DrawFish(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_InsertYRotation_f(((this->unk_15A + this->actor.shape.rot.y) / 32768.0f) * M_PI, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(((this->unk_158 + this->actor.shape.rot.x) / 32768.0f) * M_PI);
|
||||
Matrix_InsertZRotation_f(((this->unk_15C + this->actor.shape.rot.z) / 32768.0f) * M_PI, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYF(((this->unk_15A + this->actor.shape.rot.y) / 32768.0f) * M_PI, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(((this->unk_158 + this->actor.shape.rot.x) / 32768.0f) * M_PI);
|
||||
Matrix_RotateZF(((this->unk_15C + this->actor.shape.rot.z) / 32768.0f) * M_PI, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
|
||||
if (this->unk_148 == 0) {
|
||||
Matrix_InsertYRotation_f((this->unk_164 * (M_PI / 32768)) - (M_PI / 2), MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, this->unk_164 * 10.0f * 0.01f, MTXMODE_APPLY);
|
||||
Matrix_RotateYF((this->unk_164 * (M_PI / 32768)) - (M_PI / 2), MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, this->unk_164 * 10.0f * 0.01f, MTXMODE_APPLY);
|
||||
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, EnFishing_FishOverrideLimbDraw, EnFishing_FishPostLimbDraw,
|
||||
&this->actor);
|
||||
} else {
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, 3000.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertYRotation_f(this->unk_164 * (M_PI / 32768), MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, -3000.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertYRotation_f(-(M_PI / 2), MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, 3000.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(this->unk_164 * (M_PI / 32768), MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, -3000.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(-(M_PI / 2), MTXMODE_APPLY);
|
||||
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, EnFishing_LoachOverrideLimbDraw, EnFishing_LoachPostLimbDraw,
|
||||
@@ -4359,7 +4359,7 @@ void EnFishing_DrawPondProps(GlobalContext* globalCtx) {
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
for (i = 0; i < POND_PROP_COUNT; i++) {
|
||||
if (prop->type == FS_PROP_REED) {
|
||||
@@ -4369,11 +4369,11 @@ void EnFishing_DrawPondProps(GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (prop->shouldDraw) {
|
||||
Matrix_InsertTranslation(prop->pos.x, prop->pos.y, prop->pos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(prop->pos.x, prop->pos.y, prop->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(prop->scale, prop->scale, prop->scale, MTXMODE_APPLY);
|
||||
Matrix_InsertYRotation_f(prop->rotY, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis(prop->rotX);
|
||||
Matrix_InsertYRotation_f(prop->reedAngle, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(prop->rotY, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply(prop->rotX);
|
||||
Matrix_RotateYF(prop->reedAngle, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -4394,7 +4394,7 @@ void EnFishing_DrawPondProps(GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (prop->shouldDraw) {
|
||||
Matrix_InsertTranslation(prop->pos.x, prop->pos.y, prop->pos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(prop->pos.x, prop->pos.y, prop->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(prop->scale, prop->scale, prop->scale, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
@@ -4416,11 +4416,11 @@ void EnFishing_DrawPondProps(GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (prop->shouldDraw) {
|
||||
Matrix_InsertTranslation(prop->pos.x, prop->pos.y, prop->pos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(prop->pos.x, prop->pos.y, prop->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(prop->scale, 1.0f, prop->scale, MTXMODE_APPLY);
|
||||
Matrix_InsertYRotation_f(prop->lilyPadAngle * (M_PI / 32768), MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, 0.0f, 20.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertYRotation_f(prop->rotY, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(prop->lilyPadAngle * (M_PI / 32768), MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, 20.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(prop->rotY, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -4441,9 +4441,9 @@ void EnFishing_DrawPondProps(GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (prop->shouldDraw) {
|
||||
Matrix_InsertTranslation(prop->pos.x, prop->pos.y, prop->pos.z, MTXMODE_NEW);
|
||||
Matrix_Translate(prop->pos.x, prop->pos.y, prop->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(prop->scale, prop->scale, prop->scale, MTXMODE_APPLY);
|
||||
Matrix_InsertYRotation_f(prop->rotY, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(prop->rotY, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -4454,7 +4454,7 @@ void EnFishing_DrawPondProps(GlobalContext* globalCtx) {
|
||||
prop++;
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
@@ -4487,9 +4487,9 @@ void EnFishing_UpdateGroupFishes(GlobalContext* globalCtx) {
|
||||
refPos = &player->actor.world.pos;
|
||||
}
|
||||
|
||||
basePos[0].x = __sinf(sFishGroupAngle1) * 720.0f;
|
||||
basePos[0].x = sinf(sFishGroupAngle1) * 720.0f;
|
||||
basePos[0].y = -35.0f;
|
||||
basePos[0].z = __cosf(sFishGroupAngle1) * 720.0f;
|
||||
basePos[0].z = cosf(sFishGroupAngle1) * 720.0f;
|
||||
|
||||
temp1 = refPos->x - basePos[0].x;
|
||||
temp2 = refPos->z - basePos[0].z;
|
||||
@@ -4504,9 +4504,9 @@ void EnFishing_UpdateGroupFishes(GlobalContext* globalCtx) {
|
||||
Math_ApproachF(&sFishGroupAngle1, 0.7f, 1.0f, 0.001f);
|
||||
}
|
||||
|
||||
basePos[1].x = __sinf(sFishGroupAngle2) * 720.0f;
|
||||
basePos[1].x = sinf(sFishGroupAngle2) * 720.0f;
|
||||
basePos[1].y = -35.0f;
|
||||
basePos[1].z = __cosf(sFishGroupAngle2) * 720.0f;
|
||||
basePos[1].z = cosf(sFishGroupAngle2) * 720.0f;
|
||||
|
||||
temp1 = refPos->x - basePos[1].x;
|
||||
temp2 = refPos->z - basePos[1].z;
|
||||
@@ -4521,9 +4521,9 @@ void EnFishing_UpdateGroupFishes(GlobalContext* globalCtx) {
|
||||
Math_ApproachF(&sFishGroupAngle2, 2.3f, 1.0f, 0.001f);
|
||||
}
|
||||
|
||||
basePos[2].x = __sinf(sFishGroupAngle3) * 720.0f;
|
||||
basePos[2].x = sinf(sFishGroupAngle3) * 720.0f;
|
||||
basePos[2].y = -35.0f;
|
||||
basePos[2].z = __cosf(sFishGroupAngle3) * 720.0f;
|
||||
basePos[2].z = cosf(sFishGroupAngle3) * 720.0f;
|
||||
|
||||
temp1 = refPos->x - basePos[2].x;
|
||||
temp2 = refPos->z - basePos[2].z;
|
||||
@@ -4635,7 +4635,7 @@ void EnFishing_UpdateGroupFishes(GlobalContext* globalCtx) {
|
||||
Math_ApproachF(&fish->unk_34, 1.0f, 1.0f, 0.1f);
|
||||
Math_ApproachF(&fish->unk_38, 0.4f, 1.0f, 0.04f);
|
||||
fish->unk_30 += fish->unk_34;
|
||||
fish->unk_2C = (__cosf(fish->unk_30) * fish->unk_38) + offset;
|
||||
fish->unk_2C = (cosf(fish->unk_30) * fish->unk_38) + offset;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4669,9 +4669,9 @@ void EnFishing_DrawGroupFishes(GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (fish->shouldDraw) {
|
||||
Matrix_InsertTranslation(fish->pos.x, fish->pos.y, fish->pos.z, MTXMODE_NEW);
|
||||
Matrix_InsertYRotation_f(((f32)fish->unk_3E * M_PI) / 32768.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateStateAroundXAxis((-(f32)fish->unk_3C * M_PI) / 32768.0f);
|
||||
Matrix_Translate(fish->pos.x, fish->pos.y, fish->pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYF(((f32)fish->unk_3E * M_PI) / 32768.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply((-(f32)fish->unk_3C * M_PI) / 32768.0f);
|
||||
Matrix_Scale(fish->unk_2C * scale, scale, scale, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
@@ -5189,12 +5189,12 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
spFC.x = sLurePos.x - player->actor.world.pos.x;
|
||||
spFC.z = sLurePos.z - player->actor.world.pos.z;
|
||||
lureDistXZ = sqrtf(SQXZ(spFC));
|
||||
Matrix_InsertYRotation_f(Math_Acot2F(spFC.z, spFC.x), MTXMODE_NEW);
|
||||
Matrix_RotateYF(Math_Acot2F(spFC.z, spFC.x), MTXMODE_NEW);
|
||||
|
||||
sp114.x = 0.0f;
|
||||
sp114.y = 0.0f;
|
||||
sp114.z = 100.0f;
|
||||
Matrix_MultiplyVector3fByState(&sp114, &spFC);
|
||||
Matrix_MultVec3f(&sp114, &spFC);
|
||||
|
||||
if (D_8090CD14 == 1) {
|
||||
camAtFraction = 0.2f;
|
||||
@@ -5214,7 +5214,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
}
|
||||
sp114.z = -80.0f;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp114, &sp108);
|
||||
Matrix_MultVec3f(&sp114, &sp108);
|
||||
sp108.x += player->actor.world.pos.x;
|
||||
sp108.y += player->actor.world.pos.y;
|
||||
sp108.z += player->actor.world.pos.z;
|
||||
@@ -5270,7 +5270,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
sp114.x = 0.0f;
|
||||
sp114.y = 0.0f;
|
||||
sp114.z = 100.0f;
|
||||
Matrix_MultiplyVector3fByState(&sp114, &spFC);
|
||||
Matrix_MultVec3f(&sp114, &spFC);
|
||||
|
||||
Math_ApproachF(&sCameraEye.x, sp108.x, 0.3f, fabsf(spFC.x) * D_80911F4C);
|
||||
Math_ApproachF(&sCameraEye.y, sp108.y, 0.3f, 20.0f * D_80911F4C);
|
||||
@@ -5369,7 +5369,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
D_8090CD54 = 1;
|
||||
|
||||
Math_ApproachF(&D_80911F64, 71.0f, 0.5f, 3.0f);
|
||||
Matrix_InsertYRotation_f(BINANG_TO_RAD(player->actor.shape.rot.y), MTXMODE_NEW);
|
||||
Matrix_RotateYF(BINANG_TO_RAD(player->actor.shape.rot.y), MTXMODE_NEW);
|
||||
|
||||
sp114.x = Math_SinS(globalCtx->gameplayFrames * 0x1000);
|
||||
sp114.y = D_80911F64;
|
||||
@@ -5378,7 +5378,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
sp114.y -= 20.0f;
|
||||
}
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp114, &sp108);
|
||||
Matrix_MultVec3f(&sp114, &sp108);
|
||||
|
||||
sSinkingLureBasePos.x = player->actor.world.pos.x + sp108.x;
|
||||
sSinkingLureBasePos.y = player->actor.world.pos.y + sp108.y;
|
||||
@@ -5396,7 +5396,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
sp114.z = -35.0f;
|
||||
}
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp114, &sCameraEye);
|
||||
Matrix_MultVec3f(&sp114, &sCameraEye);
|
||||
sCameraEye.x += player->actor.world.pos.x;
|
||||
sCameraEye.y += player->actor.world.pos.y;
|
||||
sCameraEye.z += player->actor.world.pos.z;
|
||||
@@ -5484,8 +5484,8 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
speedXZ = Rand_ZeroFloat(1.5f) + 1.5f;
|
||||
angle = Rand_ZeroFloat(6.28f);
|
||||
|
||||
vel.x = __sinf(angle) * speedXZ;
|
||||
vel.z = __cosf(angle) * speedXZ;
|
||||
vel.x = sinf(angle) * speedXZ;
|
||||
vel.z = cosf(angle) * speedXZ;
|
||||
vel.y = Rand_ZeroFloat(3.0f) + 2.0f;
|
||||
|
||||
pos = player->actor.world.pos;
|
||||
@@ -5600,7 +5600,7 @@ void EnFishing_OwnerPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx**
|
||||
if (limbIndex == 8) { // Head
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sZeroVec, &sOwnerHeadPos);
|
||||
Matrix_MultVec3f(&sZeroVec, &sOwnerHeadPos);
|
||||
|
||||
if (D_8090CD08 == 1) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, gFishingOwnerHatDL);
|
||||
@@ -5672,7 +5672,7 @@ void EnFishing_DrawOwner(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
D_8090CCF4 = true;
|
||||
|
||||
Matrix_InsertTranslation(130.0f, 40.0f, 1300.0f, MTXMODE_NEW);
|
||||
Matrix_Translate(130.0f, 40.0f, 1300.0f, MTXMODE_NEW);
|
||||
Matrix_Scale(0.08f, 0.12f, 0.14f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -1160,23 +1160,23 @@ void EnFloormas_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
|
||||
EnFloormas* this = THIS;
|
||||
|
||||
if (D_808D393C[limbIndex] != -1) {
|
||||
Matrix_GetStateTranslation(&this->limbPos[D_808D393C[limbIndex]]);
|
||||
Matrix_MultZero(&this->limbPos[D_808D393C[limbIndex]]);
|
||||
}
|
||||
|
||||
if (limbIndex == WALLMASTER_LIMB_WRIST) {
|
||||
Matrix_GetStateTranslationAndScaledX(1000.0f, &this->limbPos[9]);
|
||||
Matrix_GetStateTranslationAndScaledX(-1000.0f, &this->limbPos[10]);
|
||||
Matrix_MultVecX(1000.0f, &this->limbPos[9]);
|
||||
Matrix_MultVecX(-1000.0f, &this->limbPos[10]);
|
||||
} else if (limbIndex == WALLMASTER_LIMB_HAND) {
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertTranslation(1600.0f, -700.0f, -1700.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertYRotation_f(M_PI / 3, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_f(M_PI / 12, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
Matrix_Translate(1600.0f, -700.0f, -1700.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateYF(M_PI / 3, MTXMODE_APPLY);
|
||||
Matrix_RotateZF(M_PI / 12, MTXMODE_APPLY);
|
||||
Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix((*gfx)++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList((*gfx)++, gWallmasterLittleFingerDL);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1566,7 +1566,7 @@ s32 EnFsn_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
s32 limbRotTableIdx;
|
||||
|
||||
if (limbIndex == FSN_LIMB_HEAD) {
|
||||
Matrix_InsertXRotation_s(this->headRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->headRot.y, MTXMODE_APPLY);
|
||||
}
|
||||
if (ENFSN_IS_BACKROOM(&this->actor)) {
|
||||
switch (limbIndex) {
|
||||
|
||||
@@ -361,10 +361,10 @@ void func_8096209C(EnFu* this, GlobalContext* globalCtx) {
|
||||
sp34 = D_80964B24;
|
||||
}
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_MultiplyVector3fByState(&sp34, &this->actor.focus.pos);
|
||||
Matrix_StatePop();
|
||||
Matrix_Push();
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp34, &this->actor.focus.pos);
|
||||
Matrix_Pop();
|
||||
this->actor.focus.pos.x += this->actor.world.pos.x;
|
||||
this->actor.focus.pos.y += this->actor.world.pos.y;
|
||||
this->actor.focus.pos.z += this->actor.world.pos.z;
|
||||
@@ -1347,17 +1347,17 @@ s32 EnFu_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
EnFu* this = THIS;
|
||||
|
||||
if (limbIndex == 9) {
|
||||
Matrix_InsertTranslation(1600.0f, 300.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_524[1], MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_524[0], MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_524[2], MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(-1600.0f, -300.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(1600.0f, 300.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_524[1], MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_524[0], MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->unk_524[2], MTXMODE_APPLY);
|
||||
Matrix_Translate(-1600.0f, -300.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else if (limbIndex == 20) {
|
||||
Matrix_InsertTranslation(1800.0f, 200.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_52A[1], MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_52A[0], MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_52A[2], MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(-1800.0f, -200.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(1800.0f, 200.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_52A[1], MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_52A[0], MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->unk_52A[2], MTXMODE_APPLY);
|
||||
Matrix_Translate(-1800.0f, -200.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -1368,9 +1368,9 @@ void EnFu_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
||||
EnFu* this = THIS;
|
||||
|
||||
if (limbIndex == 9) {
|
||||
Matrix_MultiplyVector3fByState(&D_80964C28, &this->unk_508);
|
||||
Matrix_MultVec3f(&D_80964C28, &this->unk_508);
|
||||
} else if (limbIndex == 20) {
|
||||
Matrix_MultiplyVector3fByState(&D_80964C34, &this->unk_514);
|
||||
Matrix_MultVec3f(&D_80964C34, &this->unk_514);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1378,9 +1378,9 @@ void EnFu_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
EnFu* this = THIS;
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
func_80964950(globalCtx, this->unk_2D8, ARRAY_COUNT(this->unk_2D8));
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
@@ -1431,11 +1431,11 @@ void func_809647EC(GlobalContext* globalCtx, EnFuUnkStruct* ptr, s32 len) {
|
||||
ptr->unk_08.y += ptr->unk_20.y;
|
||||
ptr->unk_08.x += 2.0f * Math_SinS(ptr->unk_2C);
|
||||
ptr->unk_08.z += 2.0f * Math_CosS(ptr->unk_2C);
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertTranslation(ptr->unk_08.x, ptr->unk_08.y, ptr->unk_08.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(yaw, MTXMODE_APPLY);
|
||||
Matrix_MultiplyVector3fByState(&sp44, &ptr->unk_08);
|
||||
Matrix_StatePop();
|
||||
Matrix_Push();
|
||||
Matrix_Translate(ptr->unk_08.x, ptr->unk_08.y, ptr->unk_08.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(yaw, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&sp44, &ptr->unk_08);
|
||||
Matrix_Pop();
|
||||
ptr->unk_2C += 6000;
|
||||
}
|
||||
}
|
||||
@@ -1456,8 +1456,8 @@ void func_80964950(GlobalContext* globalCtx, EnFuUnkStruct* ptr, s32 len) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_mu_DL_00B0A0);
|
||||
flag = true;
|
||||
}
|
||||
Matrix_InsertTranslation(ptr->unk_08.x, ptr->unk_08.y, ptr->unk_08.z, MTXMODE_NEW);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(ptr->unk_08.x, ptr->unk_08.y, ptr->unk_08.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(ptr->unk_00, ptr->unk_00, ptr->unk_00, MTXMODE_APPLY);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gameplay_keep_Tex_05E6F0));
|
||||
|
||||
@@ -366,17 +366,17 @@ void func_80AD0340(EnFuKago* this, GlobalContext* globalCtx) {
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_80AD061C); i++, ptr++) {
|
||||
Matrix_StatePush();
|
||||
Matrix_SetStateRotationAndTranslation(ptr->unk_00.x, ptr->unk_00.y, ptr->unk_00.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_InsertTranslation(ptr->unk_24.x, ptr->unk_24.y, ptr->unk_24.z, MTXMODE_APPLY);
|
||||
Matrix_InsertRotation(ptr->unk_30.x, ptr->unk_30.y, ptr->unk_30.z, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(-ptr->unk_24.x, -ptr->unk_24.y, -ptr->unk_24.z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
Matrix_SetTranslateRotateYXZ(ptr->unk_00.x, ptr->unk_00.y, ptr->unk_00.z, &this->dyna.actor.shape.rot);
|
||||
Matrix_Translate(ptr->unk_24.x, ptr->unk_24.y, ptr->unk_24.z, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(ptr->unk_30.x, ptr->unk_30.y, ptr->unk_30.z, MTXMODE_APPLY);
|
||||
Matrix_Translate(-ptr->unk_24.x, -ptr->unk_24.y, -ptr->unk_24.z, MTXMODE_APPLY);
|
||||
Matrix_Scale(scale->x, scale->y, scale->z, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_80AD061C[i]);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
@@ -406,8 +406,8 @@ void func_80ACF1F4(EnFuMato* this, GlobalContext* globalCtx) {
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
Matrix_StatePush();
|
||||
Matrix_SetStateRotationAndTranslation(ptr->unk_00.x, ptr->unk_00.y, ptr->unk_00.z, &ptr->unk_24);
|
||||
Matrix_Push();
|
||||
Matrix_SetTranslateRotateYXZ(ptr->unk_00.x, ptr->unk_00.y, ptr->unk_00.z, &ptr->unk_24);
|
||||
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -430,7 +430,7 @@ void func_80ACF1F4(EnFuMato* this, GlobalContext* globalCtx) {
|
||||
break;
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
temp_s4 = (temp_s4 + 3) % ARRAY_COUNT(this->unk_1B8);
|
||||
ptr++;
|
||||
@@ -449,14 +449,14 @@ void func_80ACF3F4(EnFuMato* this, GlobalContext* globalCtx) {
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_80ACF63C); i++, ptr++) {
|
||||
Matrix_StatePush();
|
||||
Matrix_SetStateRotationAndTranslation(ptr->unk_00.x, ptr->unk_00.y, ptr->unk_00.z, &ptr->unk_24);
|
||||
Matrix_Push();
|
||||
Matrix_SetTranslateRotateYXZ(ptr->unk_00.x, ptr->unk_00.y, ptr->unk_00.z, &ptr->unk_24);
|
||||
Matrix_Scale(scale->x, scale->y, scale->z, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_80ACF63C[i]);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
@@ -259,13 +259,13 @@ void func_80932784(EnFz* this, GlobalContext* globalCtx) {
|
||||
sp5C.y = this->actor.world.pos.y + 20.0f;
|
||||
sp5C.z = this->actor.world.pos.z;
|
||||
|
||||
Matrix_InsertTranslation(sp5C.x, sp5C.y, sp5C.z, MTXMODE_NEW);
|
||||
Matrix_InsertRotation(this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Translate(sp5C.x, sp5C.y, sp5C.z, MTXMODE_NEW);
|
||||
Matrix_RotateZYX(this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
|
||||
sp44.x = sp44.y = 0.0f;
|
||||
sp44.z = 440.0f;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp44, &this->unk_22C);
|
||||
Matrix_MultVec3f(&sp44, &this->unk_22C);
|
||||
if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp5C, &this->unk_22C, &sp50, &sp3C, true, false, false, true,
|
||||
&sp40)) {
|
||||
Math_Vec3f_Copy(&this->unk_22C, &sp50);
|
||||
@@ -620,7 +620,7 @@ void func_809334B8(EnFz* this, GlobalContext* globalCtx) {
|
||||
sp58.y = this->actor.world.pos.y + 20.0f;
|
||||
sp58.z = this->actor.world.pos.z;
|
||||
|
||||
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
|
||||
sp64.x = 0.0f;
|
||||
sp64.y = -2.0f;
|
||||
@@ -629,7 +629,7 @@ void func_809334B8(EnFz* this, GlobalContext* globalCtx) {
|
||||
: 0.0f) +
|
||||
20;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp64, &sp4C);
|
||||
Matrix_MultVec3f(&sp64, &sp4C);
|
||||
|
||||
if ((this->unk_BCA & 7) == 0) {
|
||||
sp3F = 1;
|
||||
@@ -737,7 +737,7 @@ void func_809338E0(EnFz* this, GlobalContext* globalCtx) {
|
||||
sp58.y = this->actor.world.pos.y + 20.0f;
|
||||
sp58.z = this->actor.world.pos.z;
|
||||
|
||||
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
|
||||
sp64.x = 0.0f;
|
||||
sp64.y = -2.0f;
|
||||
@@ -746,7 +746,7 @@ void func_809338E0(EnFz* this, GlobalContext* globalCtx) {
|
||||
: 0.0f) +
|
||||
20;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp64, &sp4C);
|
||||
Matrix_MultVec3f(&sp64, &sp4C);
|
||||
|
||||
if (!(this->unk_BC6 & 7)) {
|
||||
sp3F = 1;
|
||||
@@ -1013,8 +1013,8 @@ void func_80934464(EnFz* this, GlobalContext* globalCtx) {
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (ptr->unk_01 + (i * 3)) * 3,
|
||||
(ptr->unk_01 + (i * 3)) * 15, 0x20, 0x40, 1, 0, 0, 0x20, 0x20));
|
||||
|
||||
Matrix_InsertTranslation(ptr->unk_04.x, ptr->unk_04.y, ptr->unk_04.z, MTXMODE_NEW);
|
||||
Matrix_NormalizeXYZ(&globalCtx->billboardMtxF);
|
||||
Matrix_Translate(ptr->unk_04.x, ptr->unk_04.y, ptr->unk_04.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_Scale(ptr->unk_30, ptr->unk_30, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -265,9 +265,8 @@ void EnGakufu_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gSPSegment(POLY_XLU_DISP++, 0x02, globalCtx->interfaceCtx.parameterSegment);
|
||||
|
||||
for (i = 0; (i < ARRAY_COUNT(this->buttonIndex)) && (this->buttonIndex[i] != OCARINA_BTN_INVALID); i++) {
|
||||
Matrix_StatePush();
|
||||
Matrix_InsertTranslation(30 * i - 105, sOcarinaBtnWallYOffsets[this->buttonIndex[i]] * 7.5f, 1.0f,
|
||||
MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
Matrix_Translate(30 * i - 105, sOcarinaBtnWallYOffsets[this->buttonIndex[i]] * 7.5f, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.6f, 0.6f, 0.6f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -284,7 +283,7 @@ void EnGakufu_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGakufuButtonIndexDL);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
gSPSegment(POLY_XLU_DISP++, 0x02, globalCtx->sceneSegment);
|
||||
|
||||
@@ -982,7 +982,7 @@ s32 EnGb2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
EnGb2* this = THIS;
|
||||
|
||||
if (limbIndex == 7) {
|
||||
Matrix_RotateY(this->unk_270.y, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->unk_270.y, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == 1) {
|
||||
@@ -997,7 +997,7 @@ void EnGb2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
|
||||
Vec3f sp18 = { 2400.0f, 0.0f, 0.0f };
|
||||
|
||||
if (limbIndex == 7) {
|
||||
Matrix_MultiplyVector3fByState(&sp18, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&sp18, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -915,9 +915,9 @@ s32 func_80BB3728(s16 arg0, s16 arg1, Vec3f* arg2, Vec3s* arg3, s32 arg4, s32 ar
|
||||
Vec3s sp68;
|
||||
MtxF sp28;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp70, &sp7C);
|
||||
Matrix_CopyCurrentState(&sp28);
|
||||
func_8018219C(&sp28, &sp68, 0);
|
||||
Matrix_MultVec3f(&sp70, &sp7C);
|
||||
Matrix_Get(&sp28);
|
||||
Matrix_MtxFToYXZRot(&sp28, &sp68, false);
|
||||
*arg2 = sp7C;
|
||||
|
||||
if (!arg4 && !arg5) {
|
||||
@@ -967,12 +967,12 @@ void EnGeg_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
|
||||
sp2C.y += 2.0f * Rand_Centered();
|
||||
sp2C.z += Rand_Centered();
|
||||
|
||||
Matrix_MultiplyVector3fByState(&D_80BB407C, &this->unk_4B4);
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_MultiplyVector3fByState(&sp38, &this->unk_4C0[0]);
|
||||
Matrix_MultiplyVector3fByState(&sp2C, &this->unk_4C0[1]);
|
||||
Matrix_StatePop();
|
||||
Matrix_MultVec3f(&D_80BB407C, &this->unk_4B4);
|
||||
Matrix_Push();
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp38, &this->unk_4C0[0]);
|
||||
Matrix_MultVec3f(&sp2C, &this->unk_4C0[1]);
|
||||
Matrix_Pop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -998,13 +998,13 @@ void EnGeg_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thi
|
||||
func_80BB3728(this->unk_468 + this->unk_46C + 0x4000,
|
||||
this->unk_46A + this->unk_46E + this->actor.shape.rot.y + 0x4000, &this->unk_470,
|
||||
&this->unk_47C, phi_v0, phi_v1);
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertTranslation(this->unk_470.x, this->unk_470.y, this->unk_470.z, MTXMODE_NEW);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(this->unk_470.x, this->unk_470.y, this->unk_470.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_47C.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_47C.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_47C.z, MTXMODE_APPLY);
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateYS(this->unk_47C.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_47C.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_47C.z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
break;
|
||||
|
||||
case 10:
|
||||
@@ -1022,13 +1022,13 @@ void EnGeg_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thi
|
||||
|
||||
func_80BB3728(this->unk_46C + 0x4000, this->unk_46E + this->actor.shape.rot.y + 0x4000, &this->unk_484,
|
||||
&this->unk_490, phi_v0, phi_v1);
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertTranslation(this->unk_484.x, this->unk_484.y, this->unk_484.z, MTXMODE_NEW);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(this->unk_484.x, this->unk_484.y, this->unk_484.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_490.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_490.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_490.z, MTXMODE_APPLY);
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateYS(this->unk_490.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_490.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_490.z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1062,14 +1062,14 @@ void func_80BB3CB4(EnGeg* this, GlobalContext* globalCtx) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
Matrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y + this->actor.shape.yOffset,
|
||||
this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, -this->actor.shape.yOffset, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(0.0f, this->actor.shape.yOffset, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y + this->actor.shape.yOffset,
|
||||
this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -this->actor.shape.yOffset, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, this->actor.shape.yOffset, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(sp24, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(sp24, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_oF1d_map_DL_0091A8);
|
||||
|
||||
@@ -509,7 +509,7 @@ void func_80B35C84(EnGgStruct* ptr, GlobalContext* globalCtx) {
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
for (i = sp74; i < phi_s7; i += temp) {
|
||||
temp_f20 = i * 0.14f;
|
||||
@@ -520,22 +520,22 @@ void func_80B35C84(EnGgStruct* ptr, GlobalContext* globalCtx) {
|
||||
|
||||
if (1) {}
|
||||
|
||||
Matrix_InsertTranslation(temp_f22, temp_f24, temp_f26, MTXMODE_NEW);
|
||||
Matrix_Translate(temp_f22, temp_f24, temp_f26, MTXMODE_NEW);
|
||||
Matrix_Scale(temp_f20, temp_f20, temp_f20, MTXMODE_APPLY);
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 150, 0, 255);
|
||||
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
Matrix_InsertMatrix(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gOwlStatueWhiteFlashDL);
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
for (i = sp74; i < phi_s7; i += temp) {
|
||||
temp_f20 = i * 0.14f;
|
||||
@@ -544,20 +544,20 @@ void func_80B35C84(EnGgStruct* ptr, GlobalContext* globalCtx) {
|
||||
temp_f26 = ptr->unk_0C.z + (ptr->unk_18.z * temp_f20) + (0.5f * ptr->unk_24.z * temp_f20 * temp_f20);
|
||||
temp_f20 = Rand_ZeroOne() * 0.003f;
|
||||
|
||||
Matrix_InsertTranslation(temp_f22, temp_f24, temp_f26, MTXMODE_NEW);
|
||||
Matrix_Translate(temp_f22, temp_f24, temp_f26, MTXMODE_NEW);
|
||||
Matrix_Scale(temp_f20, temp_f20, temp_f20, MTXMODE_APPLY);
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 150, 0, 255);
|
||||
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
Matrix_InsertMatrix(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gOwlStatueWhiteFlashDL);
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -583,7 +583,7 @@ void func_80B3610C(EnGgStruct* ptr, GlobalContext* globalCtx) {
|
||||
if (phi_s4 > 0) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
for (i = 0; i < phi_s4; i++) {
|
||||
if (ptr->unk_48 != 0) {
|
||||
@@ -596,22 +596,22 @@ void func_80B3610C(EnGgStruct* ptr, GlobalContext* globalCtx) {
|
||||
temp_f28 = ptr->unk_0C.z + (ptr->unk_18.z * i) + (0.5f * ptr->unk_24.z * i * i);
|
||||
temp_f20 = Rand_ZeroOne() * 0.003f;
|
||||
|
||||
Matrix_InsertTranslation((Rand_Centered() * (100.0f * phi_f22)) + temp_f24, temp_f26,
|
||||
((30.0f * phi_f22) * Rand_Centered()) + temp_f28, MTXMODE_NEW);
|
||||
Matrix_Translate((Rand_Centered() * (100.0f * phi_f22)) + temp_f24, temp_f26,
|
||||
((30.0f * phi_f22) * Rand_Centered()) + temp_f28, MTXMODE_NEW);
|
||||
Matrix_Scale(temp_f20, temp_f20, temp_f20, MTXMODE_APPLY);
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 150, 0, 255);
|
||||
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
Matrix_InsertMatrix(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gOwlStatueWhiteFlashDL);
|
||||
}
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -739,7 +739,7 @@ s32 EnGg_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
EnGg* this = THIS;
|
||||
|
||||
if (limbIndex == 2) {
|
||||
Matrix_InsertZRotation_s(this->unk_2E8, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_2E8, MTXMODE_APPLY);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -764,12 +764,12 @@ void EnGg_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
||||
}
|
||||
|
||||
if (limbIndex == 4) {
|
||||
Matrix_MultiplyVector3fByState(&D_80B36DF0, &this->unk_320);
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_MultiplyVector3fByState(&sp30, &this->unk_32C);
|
||||
Matrix_MultiplyVector3fByState(&sp24, &this->unk_338);
|
||||
Matrix_StatePop();
|
||||
Matrix_MultVec3f(&D_80B36DF0, &this->unk_320);
|
||||
Matrix_Push();
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp30, &this->unk_32C);
|
||||
Matrix_MultVec3f(&sp24, &this->unk_338);
|
||||
Matrix_Pop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -457,11 +457,11 @@ s32 func_80B3BD44(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||
|
||||
if ((this->unk_2EE != 5) && (this->unk_2EE != 7)) {
|
||||
if (limbIndex == 1) {
|
||||
Matrix_RotateY(this->unk_2F6, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->unk_2F6, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == 2) {
|
||||
Matrix_InsertZRotation_s(this->unk_2F4, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_2F4, MTXMODE_APPLY);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -471,7 +471,7 @@ void func_80B3BDC0(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
EnGg2* this = THIS;
|
||||
|
||||
if (limbIndex == 4) {
|
||||
Matrix_MultiplyVector3fByState(&D_80B3C0A0, &this->unk_304);
|
||||
Matrix_MultVec3f(&D_80B3C0A0, &this->unk_304);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -485,7 +485,7 @@ void EnGiant_PostLimbDrawXlu(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
|
||||
EnGiant* this = THIS;
|
||||
|
||||
if (limbIndex == GIANT_LIMB_HEAD) {
|
||||
Matrix_CopyCurrentState(&this->headDrawMtxF);
|
||||
Matrix_Get(&this->headDrawMtxF);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -517,7 +517,7 @@ void EnGiant_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
POLY_XLU_DISP =
|
||||
SkelAnime_DrawFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, NULL, EnGiant_PostLimbDrawXlu, thisx, POLY_XLU_DISP);
|
||||
Matrix_InsertMatrix(&this->headDrawMtxF, MTXMODE_NEW);
|
||||
Matrix_Mult(&this->headDrawMtxF, MTXMODE_NEW);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGiantBeardDL);
|
||||
|
||||
@@ -636,13 +636,13 @@ s32 EnGinkoMan_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d
|
||||
}
|
||||
|
||||
if (limbIndex == 15) {
|
||||
Matrix_InsertTranslation(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->limb15Rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->limb15Rot.x, MTXMODE_APPLY);
|
||||
Matrix_InsertTranslation(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->limb15Rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->limb15Rot.x, MTXMODE_APPLY);
|
||||
Matrix_Translate(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else if (limbIndex == 8) {
|
||||
Matrix_InsertXRotation_s(-this->limb8Rot.y, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(-this->limb8Rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(-this->limb8Rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-this->limb8Rot.x, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -597,7 +597,7 @@ void EnGirlA_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EnGirlA_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnGirlA* this = THIS;
|
||||
|
||||
Matrix_RotateY(this->rotY, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->rotY, MTXMODE_APPLY);
|
||||
if (this->drawFunc != NULL) {
|
||||
this->drawFunc(&this->actor, globalCtx, 0);
|
||||
}
|
||||
|
||||
@@ -403,9 +403,9 @@ s32 func_80B50ED4(s16 arg0, s16 arg1, Vec3f* arg2, Vec3s* arg3, s32 arg4, s32 ar
|
||||
Vec3s sp68;
|
||||
MtxF sp28;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp70, &sp7C);
|
||||
Matrix_CopyCurrentState(&sp28);
|
||||
func_8018219C(&sp28, &sp68, 0);
|
||||
Matrix_MultVec3f(&sp70, &sp7C);
|
||||
Matrix_Get(&sp28);
|
||||
Matrix_MtxFToYXZRot(&sp28, &sp68, false);
|
||||
|
||||
*arg2 = sp7C;
|
||||
|
||||
@@ -1146,17 +1146,17 @@ void EnGk_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
||||
this->actor.focus.pos.y = this->actor.world.pos.y + phi_f0;
|
||||
this->actor.focus.pos.z = this->actor.world.pos.z;
|
||||
|
||||
Matrix_MultiplyVector3fByState(&sp58, &this->actor.focus.pos);
|
||||
Matrix_MultiplyVector3fByState(&sp34, &this->unk_2E8);
|
||||
Matrix_MultiplyVector3fByState(&sp28, &this->unk_2F4);
|
||||
Matrix_MultVec3f(&sp58, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&sp34, &this->unk_2E8);
|
||||
Matrix_MultVec3f(&sp28, &this->unk_2F4);
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
|
||||
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_MultiplyVector3fByState(&sp4C, &this->unk_30C);
|
||||
Matrix_MultiplyVector3fByState(&sp40, &this->unk_300);
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp4C, &this->unk_30C);
|
||||
Matrix_MultVec3f(&sp40, &this->unk_300);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1182,15 +1182,15 @@ void EnGk_TransformDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
|
||||
this->unk_320 + this->unk_324 + this->actor.shape.rot.y + 0x4000, &this->unk_328,
|
||||
&this->unk_334, phi_v0, phi_v1);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
Matrix_InsertTranslation(this->unk_328.x, this->unk_328.y, this->unk_328.z, MTXMODE_NEW);
|
||||
Matrix_Translate(this->unk_328.x, this->unk_328.y, this->unk_328.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_334.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_334.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_334.z, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->unk_334.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_334.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_334.z, MTXMODE_APPLY);
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
break;
|
||||
|
||||
case 9:
|
||||
@@ -1208,15 +1208,15 @@ void EnGk_TransformDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
|
||||
func_80B50ED4(this->unk_322 + 0x4000, this->unk_324 + this->actor.shape.rot.y + 0x4000, &this->unk_33C,
|
||||
&this->unk_348, phi_v0, phi_v1);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_Pop();
|
||||
|
||||
Matrix_InsertTranslation(this->unk_33C.x, this->unk_33C.y, this->unk_33C.z, MTXMODE_NEW);
|
||||
Matrix_Translate(this->unk_33C.x, this->unk_33C.y, this->unk_33C.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_348.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_348.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_348.z, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->unk_348.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_348.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_348.z, MTXMODE_APPLY);
|
||||
|
||||
Matrix_StatePush();
|
||||
Matrix_Push();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1239,7 +1239,7 @@ void EnGk_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
|
||||
if ((ENGK_GET_F(&this->actor) == ENGK_F_0) && (gSaveContext.save.weekEventReg[22] & 4)) {
|
||||
Matrix_InsertXRotation_s(-0x4000, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(-0x4000, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_gk_DL_006688);
|
||||
|
||||
@@ -874,7 +874,7 @@ void func_8094F3D0(EnGm* this, GlobalContext* globalCtx) {
|
||||
this->unk_3AC = 0.0f;
|
||||
}
|
||||
Math_SmoothStepToF(&this->unk_3B0, this->unk_3AC, 0.8f, 40.0f, 10.0f);
|
||||
Matrix_InsertTranslation(this->unk_3B0, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(this->unk_3B0, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
this->unk_3F0 = sp28;
|
||||
}
|
||||
|
||||
@@ -1759,7 +1759,7 @@ void EnGm_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
||||
s32 pad2;
|
||||
|
||||
if ((ActorCutscene_GetCurrentIndex() == -1) && (limbIndex == 16)) {
|
||||
Matrix_MultiplyVector3fByState(&D_80951E24, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&D_80951E24, &this->actor.focus.pos);
|
||||
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.world.rot);
|
||||
}
|
||||
|
||||
@@ -1772,7 +1772,7 @@ void EnGm_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
if (limbIndex == 9) {
|
||||
Matrix_MultiplyVector3fByState(&gZeroVec3f, &sp30);
|
||||
Matrix_MultVec3f(&gZeroVec3f, &sp30);
|
||||
Math_Vec3f_ToVec3s(&this->colliderSphere.dim.worldSphere.center, &sp30);
|
||||
}
|
||||
}
|
||||
@@ -1798,23 +1798,23 @@ void EnGm_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* this
|
||||
SubS_UpdateLimb(BINANG_ADD(this->unk_3BC + this->unk_3C0, 0x4000),
|
||||
BINANG_ADD(this->unk_3BE + this->unk_3C2 + this->actor.shape.rot.y, 0x4000), &this->unk_290,
|
||||
&this->unk_2A8, stepRot, overrideRot);
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertTranslation(this->unk_290.x, this->unk_290.y, this->unk_290.z, MTXMODE_NEW);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(this->unk_290.x, this->unk_290.y, this->unk_290.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_2A8.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_2A8.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_2A8.z, MTXMODE_APPLY);
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateYS(this->unk_2A8.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_2A8.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_2A8.z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
} else if (limbIndex == 9) {
|
||||
SubS_UpdateLimb(BINANG_ADD(this->unk_3C0, 0x4000), BINANG_ADD(this->unk_3C2 + this->actor.shape.rot.y, 0x4000),
|
||||
&this->unk_29C, &this->unk_2AE, stepRot, overrideRot);
|
||||
Matrix_StatePop();
|
||||
Matrix_InsertTranslation(this->unk_29C.x, this->unk_29C.y, this->unk_29C.z, MTXMODE_NEW);
|
||||
Matrix_Pop();
|
||||
Matrix_Translate(this->unk_29C.x, this->unk_29C.y, this->unk_29C.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_2AE.y, MTXMODE_APPLY);
|
||||
Matrix_InsertXRotation_s(this->unk_2AE.x, MTXMODE_APPLY);
|
||||
Matrix_InsertZRotation_s(this->unk_2AE.z, MTXMODE_APPLY);
|
||||
Matrix_StatePush();
|
||||
Matrix_RotateYS(this->unk_2AE.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->unk_2AE.x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_2AE.z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user