Name the coordinate transformation matrices (#1042)

This commit is contained in:
engineer124 2021-12-01 10:52:16 +11:00 committed by GitHub
parent 669732abbe
commit eabc918817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
78 changed files with 165 additions and 157 deletions

View File

@ -1167,9 +1167,9 @@ typedef struct GlobalContext {
/* 0x11D54 */ void (*func_11D54)(Player* player, struct GlobalContext* globalCtx);
/* 0x11D58 */ s32 (*damagePlayer)(struct GlobalContext* globalCtx, s32 damage);
/* 0x11D5C */ void (*talkWithPlayer)(struct GlobalContext* globalCtx, Actor* actor);
/* 0x11D60 */ MtxF mf_11D60;
/* 0x11DA0 */ MtxF mf_11DA0;
/* 0x11DE0 */ Mtx* unk_11DE0;
/* 0x11D60 */ MtxF viewProjectionMtxF;
/* 0x11DA0 */ MtxF billboardMtxF;
/* 0x11DE0 */ Mtx* billboardMtx;
/* 0x11DE4 */ u32 gameplayFrames;
/* 0x11DE8 */ u8 linkAgeOnLoad;
/* 0x11DE9 */ u8 unk_11DE9;

View File

@ -18,7 +18,7 @@ void func_8006BA30(GlobalContext* globalCtx) {
if (DECR(source->countdown) == 0) {
Audio_StopSfxByPos(&source->relativePos);
} else {
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->mf_11D60, &source->originPos, &source->relativePos);
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &source->originPos, &source->relativePos);
}
}
@ -55,6 +55,6 @@ void Audio_PlaySoundAtPosition(GlobalContext* globalCtx, Vec3f* pos, s32 duratio
source->originPos = *pos;
source->countdown = duration;
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->mf_11D60, &source->originPos, &source->relativePos);
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &source->originPos, &source->relativePos);
Audio_PlaySoundGeneral(sfxId, &source->relativePos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}

View File

@ -212,7 +212,7 @@ void Actor_SetFeetPos(Actor* actor, s32 limbIndex, s32 leftFootIndex, Vec3f* lef
}
void func_8002BE04(GlobalContext* globalCtx, Vec3f* arg1, Vec3f* arg2, f32* arg3) {
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, arg1, arg2, arg3);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, arg1, arg2, arg3);
*arg3 = (*arg3 < 1.0f) ? 1.0f : (1.0f / *arg3);
}
@ -1905,7 +1905,7 @@ void Actor_DrawFaroresWindPointer(GlobalContext* globalCtx) {
((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y) + yOffset,
((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.z), MTXMODE_NEW);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
Matrix_Push();
gDPPipeSync(POLY_XLU_DISP++);
@ -1955,8 +1955,8 @@ void func_800304DC(GlobalContext* globalCtx, ActorContext* actorCtx, ActorEntry*
bzero(actorCtx, sizeof(*actorCtx));
ActorOverlayTable_Init();
Matrix_MtxFCopy(&globalCtx->mf_11DA0, &gMtxFClear);
Matrix_MtxFCopy(&globalCtx->mf_11D60, &gMtxFClear);
Matrix_MtxFCopy(&globalCtx->billboardMtxF, &gMtxFClear);
Matrix_MtxFCopy(&globalCtx->viewProjectionMtxF, &gMtxFClear);
overlayEntry = &gActorOverlayTable[0];
for (i = 0; i < ARRAY_COUNT(gActorOverlayTable); i++) {
@ -2358,7 +2358,7 @@ void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) {
HREG(66) = i;
if ((HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(68) == 0)) {
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &actor->world.pos, &actor->projectedPos,
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &actor->world.pos, &actor->projectedPos,
&actor->projectedW);
}

View File

@ -75,7 +75,7 @@ void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, void* texture, GlobalCo
Matrix_Translate(dispObj->pos.x, dispObj->pos.y, dispObj->pos.z, MTXMODE_NEW);
Matrix_Scale(dispObj->scale.x, dispObj->scale.y, dispObj->scale.z, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
Matrix_RotateZYX(dispObj->rot.x, dispObj->rot.y, dispObj->rot.z, MTXMODE_APPLY);
gDPLoadTextureBlock(POLY_XLU_DISP++, texture, G_IM_FMT_I, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP,

View File

@ -421,7 +421,7 @@ void GetItem_DrawBlueFire(GlobalContext* globalCtx, s16 drawId) {
1 * -(globalCtx->state.frames * 8), 16, 32));
Matrix_Push();
Matrix_Translate(-8.0f, -2.0f, 0.0f, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 615),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
@ -449,7 +449,7 @@ void GetItem_DrawPoes(GlobalContext* globalCtx, s16 drawId) {
0 * (globalCtx->state.frames * 0), 16, 32, 1, 1 * (globalCtx->state.frames * 1),
1 * -(globalCtx->state.frames * 6), 16, 32));
Matrix_Push();
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 656),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]);
@ -478,7 +478,7 @@ void GetItem_DrawFairy(GlobalContext* globalCtx, s16 drawId) {
0 * (globalCtx->state.frames * 0), 32, 32, 1, 1 * (globalCtx->state.frames * 1),
1 * -(globalCtx->state.frames * 6), 32, 32));
Matrix_Push();
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_draw.c", 698),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);

View File

@ -210,7 +210,7 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) {
SkinMatrix_SetTranslate(&spEC, elem->position.x, elem->position.y, elem->position.z);
temp = ((Rand_ZeroOne() * 2.5f) + 1.5f) / 64.0f;
SkinMatrix_SetScale(&spAC, temp, temp, 1.0f);
SkinMatrix_MtxFMtxFMult(&spEC, &globalCtx->mf_11DA0, &sp6C);
SkinMatrix_MtxFMtxFMult(&spEC, &globalCtx->billboardMtxF, &sp6C);
SkinMatrix_MtxFMtxFMult(&sp6C, &spAC, &sp12C);
vertices[j].v.ob[0] = -32;

View File

@ -56,7 +56,7 @@ void EffectSs_DrawGEffect(GlobalContext* globalCtx, EffectSs* this, void* textur
scale = this->rgScale * 0.0025f;
SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z);
SkinMatrix_SetScale(&mfScale, scale, scale, scale);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->billboardMtxF, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfScale, &mfResult);
gSegments[6] = VIRTUAL_TO_PHYSICAL(object);
gSPSegment(POLY_XLU_DISP++, 0x06, object);

View File

@ -1089,18 +1089,22 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
func_800AA460(&globalCtx->view, globalCtx->view.fovy, globalCtx->view.zNear, globalCtx->lightCtx.fogFar);
func_800AAA50(&globalCtx->view, 15);
Matrix_MtxToMtxF(&globalCtx->view.viewing, &globalCtx->mf_11DA0);
Matrix_MtxToMtxF(&globalCtx->view.projection, &globalCtx->mf_11D60);
Matrix_Mult(&globalCtx->mf_11D60, MTXMODE_NEW);
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Get(&globalCtx->mf_11D60);
globalCtx->mf_11DA0.mf[0][3] = globalCtx->mf_11DA0.mf[1][3] = globalCtx->mf_11DA0.mf[2][3] =
globalCtx->mf_11DA0.mf[3][0] = globalCtx->mf_11DA0.mf[3][1] = globalCtx->mf_11DA0.mf[3][2] = 0.0f;
Matrix_Transpose(&globalCtx->mf_11DA0);
globalCtx->unk_11DE0 = Matrix_MtxFToMtx(Matrix_CheckFloats(&globalCtx->mf_11DA0, "../z_play.c", 4005),
Graph_Alloc(gfxCtx, sizeof(Mtx)));
// The billboard matrix temporarily stores the viewing matrix
Matrix_MtxToMtxF(&globalCtx->view.viewing, &globalCtx->billboardMtxF);
Matrix_MtxToMtxF(&globalCtx->view.projection, &globalCtx->viewProjectionMtxF);
Matrix_Mult(&globalCtx->viewProjectionMtxF, MTXMODE_NEW);
// The billboard is still a viewing matrix at this stage
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
Matrix_Get(&globalCtx->viewProjectionMtxF);
globalCtx->billboardMtxF.mf[0][3] = globalCtx->billboardMtxF.mf[1][3] = globalCtx->billboardMtxF.mf[2][3] =
globalCtx->billboardMtxF.mf[3][0] = globalCtx->billboardMtxF.mf[3][1] = globalCtx->billboardMtxF.mf[3][2] =
0.0f;
// This transpose is where the viewing matrix is properly converted into a billboard matrix
Matrix_Transpose(&globalCtx->billboardMtxF);
globalCtx->billboardMtx = Matrix_MtxFToMtx(Matrix_CheckFloats(&globalCtx->billboardMtxF, "../z_play.c", 4005),
Graph_Alloc(gfxCtx, sizeof(Mtx)));
gSPSegment(POLY_OPA_DISP++, 0x01, globalCtx->unk_11DE0);
gSPSegment(POLY_OPA_DISP++, 0x01, globalCtx->billboardMtx);
if ((HREG(80) != 10) || (HREG(92) != 0)) {
Gfx* gfxP;
@ -1487,11 +1491,12 @@ void Gameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s32 spawn) {
void func_800C016C(GlobalContext* globalCtx, Vec3f* src, Vec3f* dest) {
f32 temp;
Matrix_Mult(&globalCtx->mf_11D60, MTXMODE_NEW);
Matrix_Mult(&globalCtx->viewProjectionMtxF, MTXMODE_NEW);
Matrix_MultVec3f(src, dest);
temp = globalCtx->mf_11D60.ww +
(globalCtx->mf_11D60.wx * src->x + globalCtx->mf_11D60.wy * src->y + globalCtx->mf_11D60.wz * src->z);
temp = globalCtx->viewProjectionMtxF.ww +
(globalCtx->viewProjectionMtxF.wx * src->x + globalCtx->viewProjectionMtxF.wy * src->y +
globalCtx->viewProjectionMtxF.wz * src->z);
dest->x = 160.0f + ((dest->x / temp) * 160.0f);
dest->y = 120.0f - ((dest->y / temp) * 120.0f);

View File

@ -1116,7 +1116,7 @@ void func_80090AFC(GlobalContext* globalCtx, Player* this, f32 arg2) {
OVERLAY_DISP = Gfx_CallSetupDL(OVERLAY_DISP, 0x07);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &sp74, &sp68, &sp64);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &sp74, &sp68, &sp64);
sp60 = (sp64 < 200.0f) ? 0.08f : (sp64 / 200.0f) * 0.08f;

View File

@ -125,7 +125,7 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) {
sp90.x = polygonDlist->pos.x;
sp90.y = polygonDlist->pos.y;
sp90.z = polygonDlist->pos.z;
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &sp90, &sp84, &sp80);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &sp90, &sp84, &sp80);
if (-(f32)polygonDlist->unk_06 < sp84.z) {
temp_f2 = sp84.z - polygonDlist->unk_06;
if (temp_f2 < globalCtx->lightCtx.fogFar) {

View File

@ -1028,7 +1028,7 @@ void BgDyYoseizo_ParticleDraw(BgDyYoseizo* this, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, particle->envColor.r, particle->envColor.g, particle->envColor.b, 0);
Matrix_Translate(particle->pos.x, particle->pos.y, particle->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(particle->scale, particle->scale, 1.0f, MTXMODE_APPLY);
Matrix_RotateZ(particle->roll, MTXMODE_APPLY);

View File

@ -230,7 +230,7 @@ void BgHakaShip_Draw(Actor* thisx, GlobalContext* globalCtx) {
sp2C.y = this->dyna.actor.world.pos.y + 62.0f;
sp2C.z = this->dyna.actor.world.pos.z;
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->mf_11D60, &sp2C, &this->bellSoundPos);
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &sp2C, &this->bellSoundPos);
func_80078914(&this->bellSoundPos, NA_SE_EV_SHIP_BELL - SFX_FLAG);
}
}

View File

@ -544,7 +544,7 @@ void BgHakaTrap_Draw(Actor* thisx, GlobalContext* globalCtx) {
sp2C.z = this->dyna.actor.world.pos.z;
sp2C.y = this->dyna.actor.world.pos.y + 110.0f;
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->mf_11D60, &sp2C, &this->unk_16C);
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &sp2C, &this->unk_16C);
func_80078914(&this->unk_16C, NA_SE_EV_BRIDGE_CLOSE - SFX_FLAG);
}
}

View File

@ -390,9 +390,9 @@ void BgHidanRock_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_16C > 0.0f) {
if (this->type == 0) {
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->mf_11D60, &D_8088BF60, &this->unk_170);
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &D_8088BF60, &this->unk_170);
} else {
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->mf_11D60, &this->dyna.actor.home.pos, &this->unk_170);
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &this->dyna.actor.home.pos, &this->unk_170);
}
func_80078914(&this->unk_170, NA_SE_EV_FIRE_PILLAR - SFX_FLAG);

View File

@ -1683,7 +1683,7 @@ void BossDodongo_DrawEffects(GlobalContext* globalCtx) {
OPEN_DISPS(gfxCtx, "../z_boss_dodongo.c", 5228);
func_80093D84(globalCtx->state.gfxCtx);
unkMtx = &globalCtx->mf_11DA0;
unkMtx = &globalCtx->billboardMtxF;
for (i = 0; i < 80; i++, eff++) {
if (eff->unk_24 == 1) {

View File

@ -1531,7 +1531,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, effect->color.r, effect->color.g, effect->color.b, effect->alpha);
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_fd.c", 4046),
@ -1575,7 +1575,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) {
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
Matrix_Scale(effect->scale, effect->scale, effect->scale, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_fd.c", 4104),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -1598,7 +1598,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 0, effect->alpha);
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
Matrix_Scale(effect->scale, effect->scale, effect->scale, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_fd.c", 4154),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -2486,7 +2486,7 @@ void func_8090464C(BossGanon2* this, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 170, (s16)this->unk_1B4);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 200, 0, 128);
Matrix_Translate(this->unk_1B8.x, this->unk_1B8.y, this->unk_1B8.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_RotateZ(-0.2f, MTXMODE_APPLY);
Matrix_Scale(0.6f, 0.6f, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_boss_ganon2.c", 5290),
@ -2616,7 +2616,7 @@ void func_80904D88(BossGanon2* this, GlobalContext* globalCtx) {
for (i = 0; i < 15; i++) {
Matrix_Translate(this->unk_234[i].x, this->unk_234[i].y, this->unk_234[i].z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(this->unk_30C, this->unk_30C, this->unk_30C, MTXMODE_APPLY);
Matrix_RotateZ(Rand_CenteredFloat(M_PI), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_boss_ganon2.c", 5618),
@ -2640,7 +2640,7 @@ void func_80904FC8(BossGanon2* this, GlobalContext* globalCtx) {
gSPDisplayList(POLY_XLU_DISP++, ovl_Boss_Ganon2_DL_00B308);
Matrix_Translate(sZelda->actor.world.pos.x, sZelda->actor.world.pos.y + 80.0f, sZelda->actor.world.pos.z,
MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(this->unk_384, this->unk_384, this->unk_384, MTXMODE_APPLY);
Matrix_RotateZ(this->unk_388, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_boss_ganon2.c", 5661),
@ -2680,7 +2680,7 @@ void func_8090523C(BossGanon2* this, GlobalContext* globalCtx) {
phi_f20 = 1.0f - ((i - 7) * 0.2333333f); // 7 / 30
}
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(200.0f * phi_f20, 200.0f * phi_f20, 1.0f, MTXMODE_APPLY);
Matrix_RotateZ(Rand_ZeroFloat(2.0f * M_PI), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_boss_ganon2.c", 5721),

View File

@ -2267,7 +2267,8 @@ void BossMo_UpdateTent(Actor* thisx, GlobalContext* globalCtx) {
return;
}
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &this->tentPos[40], &this->tentTipPos, &this->actor.projectedW);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &this->tentPos[40], &this->tentTipPos,
&this->actor.projectedW);
osSyncPrintf("MO : Move mode = <%d>\n", this->work[MO_TENT_ACTION_STATE]);
Math_ApproachS(&player->actor.shape.rot.x, 0, 5, 0x3E8);
Math_ApproachS(&player->actor.shape.rot.z, 0, 5, 0x3E8);
@ -2515,7 +2516,7 @@ void BossMo_DrawTentacle(BossMo* this, GlobalContext* globalCtx) {
Matrix_Translate(((BossMo_RandZeroOne() - 0.5f) * 10.0f) * this->tentScale[i - 2].x,
((BossMo_RandZeroOne() - 0.5f) * 3.0f) + phi_f20,
((BossMo_RandZeroOne() - 0.5f) * 10.0f) * this->tentScale[i - 2].z, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(phi_f22, phi_f22, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_boss_mo.c", 6511),
@ -2968,7 +2969,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, GlobalContext* globalCtx) {
255, effect->alpha);
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(effect->scale / effect->fwork[MO_FX_STRETCH], effect->fwork[MO_FX_STRETCH] * effect->scale,
1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_mo.c", 7373),
@ -3019,7 +3020,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, effect->alpha);
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_mo.c", 7476),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -2912,7 +2912,7 @@ void BossSst_DrawHead(Actor* thisx, GlobalContext* globalCtx) {
vanishMaskPos.y = 450.0f;
}
Matrix_MultVec3fExt(&vanishMaskPos, &vanishMaskOffset, &globalCtx->mf_11DA0);
Matrix_MultVec3fExt(&vanishMaskPos, &vanishMaskOffset, &globalCtx->billboardMtxF);
Matrix_Translate(this->actor.world.pos.x + vanishMaskOffset.x, this->actor.world.pos.y + vanishMaskOffset.y,
this->actor.world.pos.z + vanishMaskOffset.z, MTXMODE_NEW);
Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY);
@ -2924,7 +2924,7 @@ void BossSst_DrawHead(Actor* thisx, GlobalContext* globalCtx) {
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_boss_sst.c", 6941);
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->mf_11D60, &this->actor.focus.pos, &this->center);
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &this->actor.focus.pos, &this->center);
BossSst_DrawEffect(&this->actor, globalCtx);
}
@ -3128,7 +3128,7 @@ void BossSst_UpdateEffect(Actor* thisx, GlobalContext* globalCtx) {
effect = &this->effects[0];
if (this->actor.params == BONGO_HEAD) {
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->mf_11D60, &this->actor.focus.pos, &this->center);
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &this->actor.focus.pos, &this->center);
BossSst_HeadSfx(this, NA_SE_EN_SHADEST_LAST - SFX_FLAG);
}
while (effect->status != -1) {

View File

@ -1130,8 +1130,8 @@ void BossTw_ShootBeam(BossTw* this, GlobalContext* globalCtx) {
}
}
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &this->beamReflectionOrigin, &this->unk_54C,
&this->actor.projectedW);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &this->beamReflectionOrigin,
&this->unk_54C, &this->actor.projectedW);
if (this->actor.params == 1) {
Audio_PlaySoundGeneral(NA_SE_EN_TWINROBA_SHOOT_FIRE - SFX_FLAG, &this->unk_54C, 4, &D_801333E0,
@ -1160,7 +1160,7 @@ void BossTw_ShootBeam(BossTw* this, GlobalContext* globalCtx) {
this->beamReflectionDist = 0.0f;
}
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &this->unk_530, &this->unk_558,
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &this->unk_530, &this->unk_558,
&this->actor.projectedW);
if (this->actor.params == 1) {
@ -3326,7 +3326,7 @@ void func_80942180(BossTw* this, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, 255, 245, 255, 128);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_019D40));
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_boss_tw.c", 6514),
G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH);
gSPSegment(POLY_XLU_DISP++, 8,
@ -3398,7 +3398,7 @@ void func_809426F0(BossTw* this, GlobalContext* globalCtx) {
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, ((this->work[CS_TIMER_2] * 3) + (i * 10)) & 0x7F,
(u8)((-this->work[CS_TIMER_2] * 15) + (i * 50)), 0x20, 0x40, 1, 0, 0, 0x20, 0x20));
Matrix_Scale(0.4f, 0.4f, 0.4f, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_boss_tw.c", 6751),
G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A430));
@ -4463,7 +4463,7 @@ void BossTw_BlastDraw(Actor* thisx, GlobalContext* globalCtx2) {
scaleFactor = 1.0f - (i * 0.09f);
Matrix_Scale(this->actor.scale.x * scaleFactor, this->actor.scale.y * scaleFactor,
this->actor.scale.z * scaleFactor, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_boss_tw.c", 8865),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A430));
@ -4487,7 +4487,7 @@ void BossTw_BlastDraw(Actor* thisx, GlobalContext* globalCtx2) {
scaleFactor = 1.0f - (i * 0.09f);
Matrix_Scale(this->actor.scale.x * scaleFactor, this->actor.scale.y * scaleFactor,
this->actor.scale.z * scaleFactor, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_boss_tw.c", 9004),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01AB00));
@ -4527,7 +4527,7 @@ void BossTw_DrawDeathBall(Actor* thisx, GlobalContext* globalCtx2) {
scaleFactor = (1.0f - (i * 0.09f));
Matrix_Scale(this->actor.scale.x * scaleFactor, this->actor.scale.y * scaleFactor,
this->actor.scale.z * scaleFactor, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_boss_tw.c", 9071),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A430));
@ -4547,7 +4547,7 @@ void BossTw_DrawDeathBall(Actor* thisx, GlobalContext* globalCtx2) {
scaleFactor = (1.0f - (i * 0.09f));
Matrix_Scale(this->actor.scale.x * scaleFactor, this->actor.scale.y * scaleFactor,
this->actor.scale.z * scaleFactor, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_boss_tw.c", 9107),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01AB00));
@ -4924,7 +4924,7 @@ void BossTw_DrawEffects(GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, currentEffect->color.r, currentEffect->color.g,
currentEffect->color.b, currentEffect->alpha);
Matrix_Translate(currentEffect->pos.x, currentEffect->pos.y, currentEffect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(currentEffect->workf[EFF_SCALE], currentEffect->workf[EFF_SCALE], 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_tw.c", 9617),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -4949,7 +4949,7 @@ void BossTw_DrawEffects(GlobalContext* globalCtx) {
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (currentEffect->frame * 3) & 0x7F,
(currentEffect->frame * 15) & 0xFF, 0x20, 0x40, 1, 0, 0, 0x20, 0x20));
Matrix_Translate(currentEffect->pos.x, currentEffect->pos.y, currentEffect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(currentEffect->workf[EFF_SCALE], currentEffect->workf[EFF_SCALE], 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_tw.c", 9660),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -4974,7 +4974,7 @@ void BossTw_DrawEffects(GlobalContext* globalCtx) {
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (currentEffect->frame * 3) & 0x7F,
(currentEffect->frame * 15) & 0xFF, 0x20, 0x40, 1, 0, 0, 0x20, 0x20));
Matrix_Translate(currentEffect->pos.x, currentEffect->pos.y, currentEffect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(currentEffect->workf[EFF_SCALE], currentEffect->workf[EFF_SCALE], 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_tw.c", 9709),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -5008,7 +5008,7 @@ void BossTw_DrawEffects(GlobalContext* globalCtx) {
}
Matrix_Translate(currentEffect->pos.x, currentEffect->pos.y, currentEffect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
if (currentEffect->work[EFF_UNKS1] == 0) {
Matrix_Translate(0.0f, 0.0f, 60.0f, MTXMODE_APPLY);
@ -5093,7 +5093,7 @@ void BossTw_DrawEffects(GlobalContext* globalCtx) {
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (currentEffect->frame * 3) & 0x7F,
(-currentEffect->frame * 15) & 0xFF, 0x20, 0x40, 1, 0, 0, 0x20, 0x20));
Matrix_Translate(currentEffect->pos.x, currentEffect->pos.y, currentEffect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(currentEffect->workf[EFF_SCALE], currentEffect->workf[EFF_SCALE], 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_tw.c", 9911),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -3525,7 +3525,7 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 230, 230, 230, effect->primColor[3]);
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_RotateZ((effect->rot.z / (f32)0x8000) * 3.1416f, MTXMODE_APPLY);
Matrix_Scale(effect->scale * 0.0185f, effect->scale * 0.0185f, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_va.c", 4976),
@ -3543,7 +3543,7 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) {
flag++;
}
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(effect->scale, effect->scale, effect->scale, MTXMODE_APPLY);
Matrix_RotateZ((effect->rot.z / (f32)0x8000) * 3.1416f, MTXMODE_APPLY);
@ -3578,7 +3578,7 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) {
if (effect->mode == BLOOD_SPOT) {
Matrix_RotateX(M_PI / 2, MTXMODE_APPLY);
} else {
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
}
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
@ -3680,7 +3680,7 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 230, 230, 230, effect->primColor[3]);
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_RotateZ((effect->rot.z / (f32)0x8000) * 3.1416f, MTXMODE_APPLY);
Matrix_Scale(effect->scale * 0.02f, effect->scale * 0.02f, 1.0f, MTXMODE_APPLY);

View File

@ -667,7 +667,7 @@ void func_8096865C(Actor* thisx, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 255, 255);
gDPSetEnvColor(POLY_XLU_DISP++, sEnvColors[this->unk_293].r, sEnvColors[this->unk_293].g,
sEnvColors[this->unk_293].b, 255);
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
Matrix_Push();
Matrix_RotateZ((f32)(this->timer2 * 6) * (M_PI / 180.0f), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_6k.c", 1230),
@ -706,7 +706,7 @@ void func_809688C4(Actor* thisx, GlobalContext* globalCtx2) {
Matrix_Scale(this->unk_234[i] * D_8096931C[(frames + i) & 3],
this->unk_234[i] * D_8096931C[(frames + i) & 3],
this->unk_234[i] * D_8096931C[(frames + i) & 3], MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_6k.c", 1297),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gEffFlash1DL);
@ -731,7 +731,7 @@ void func_80968B70(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_6k.c", 1316);
func_80093D84(globalCtx->state.gfxCtx);
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
Matrix_RotateX(M_PI / 2, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_6k.c", 1322),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -1785,7 +1785,7 @@ void DemoEffect_DrawFireBall(Actor* thisx, GlobalContext* globalCtx) {
func_80093D84(globalCtx->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_effect.c", 2709),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPMatrix(POLY_XLU_DISP++, globalCtx->unk_11DE0, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPMatrix(POLY_XLU_DISP++, globalCtx->billboardMtx, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPSegment(
POLY_XLU_DISP++, 8,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 128 - ((frames * 20) % 128) - 1, 32, 32));
@ -1877,14 +1877,14 @@ void DemoEffect_DrawLightEffect(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Scale(((this->light.scaleFlag & 1) * 0.05f) + 1.0f, ((this->light.scaleFlag & 1) * 0.05f) + 1.0f,
((this->light.scaleFlag & 1) * 0.05f) + 1.0f, MTXMODE_APPLY);
Matrix_Push();
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
Matrix_RotateZ(this->light.rotation * (M_PI / 180.0f), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_effect.c", 2866),
G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
if (disp) {};
gSPDisplayList(POLY_XLU_DISP++, disp);
Matrix_Pop();
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
Matrix_RotateZ(-(f32)this->light.rotation * (M_PI / 180.0f), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_effect.c", 2874),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -1906,7 +1906,7 @@ void DemoEffect_DrawBlueOrb(Actor* thisx, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, 188, 255, 255, this->blueOrb.alpha);
gDPSetEnvColor(POLY_XLU_DISP++, 0, 100, 255, 255);
func_80093D84(globalCtx->state.gfxCtx);
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
Matrix_RotateZ(this->blueOrb.rotation * (M_PI / 0x8000), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_effect.c", 2901),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -76,7 +76,7 @@ void func_8097C8A8(DemoGo* this, GlobalContext* globalCtx) {
f32 sp1C;
if ((thisx->params == 0) || (thisx->params == 1)) {
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &thisx->world.pos, &sp20, &sp1C);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &thisx->world.pos, &sp20, &sp1C);
Audio_PlaySoundAtPosition(globalCtx, &sp20, 20, NA_SE_EV_OBJECT_FALL);
}
}

View File

@ -878,7 +878,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, GlobalContext* globalCtx) {
sWarpSparkleEnvColors[respawnData].g, sWarpSparkleEnvColors[respawnData].b, 255);
}
func_80093D84(globalCtx->state.gfxCtx);
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
Matrix_RotateZ(DEG_TO_RAD(this->unk_150[i].unk_24), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_kankyo.c", 2011),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -980,7 +980,7 @@ void DemoKankyo_DrawSparkles(Actor* thisx, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, sSparkleEnvColors[3].r, sSparkleEnvColors[3].g, sSparkleEnvColors[3].b,
255);
func_80093D84(globalCtx->state.gfxCtx);
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
Matrix_RotateZ(DEG_TO_RAD(this->unk_150[i].unk_24), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_kankyo.c", 2572),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -176,7 +176,7 @@ void EfcErupc_DrawParticles(EfcErupcParticles* particles, GlobalContext* globalC
gDPSetEnvColor(POLY_XLU_DISP++, 150, 0, 0, 0);
gDPPipeSync(POLY_XLU_DISP++);
Matrix_Translate(particles->pos.x, particles->pos.y, particles->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(particles->scale, particles->scale, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_efc_erupc.c", 393),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -292,7 +292,7 @@ void EffDust_DrawFunc_8099E4F4(Actor* thisx, GlobalContext* globalCtx2) {
MTXMODE_NEW);
Matrix_Scale(this->scalingFactor, this->scalingFactor, this->scalingFactor, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_dust.c", 449),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -353,7 +353,7 @@ void EffDust_DrawFunc_8099E784(Actor* thisx, GlobalContext* globalCtx2) {
Matrix_Scale(*distanceTraveled * this->scalingFactor, *distanceTraveled * this->scalingFactor,
*distanceTraveled * this->scalingFactor, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_dust.c", 506),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -242,7 +242,7 @@ void EnAnubiceFire_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (scale >= 0.1f) {
Matrix_Translate(this->unk_160[i].x, this->unk_160[i].y, this->unk_160[i].z, MTXMODE_NEW);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_RotateZ(this->actor.world.rot.z + i * 1000.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_anubice_fire.c", 546),

View File

@ -478,7 +478,7 @@ void EnArrow_Draw(Actor* thisx, GlobalContext* globalCtx) {
}
Matrix_Push();
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
// redundant check because this is contained in an if block for non-zero speed
Matrix_RotateZ((this->actor.speedXZ == 0.0f) ? 0.0f
: ((globalCtx->gameplayFrames & 0xFF) * 4000) * (M_PI / 0x8000),

View File

@ -205,7 +205,7 @@ void EnBdfire_DrawFire(EnBdfire* this, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_bdfire.c", 612);
temp = this->unk_156 & 7;
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
func_80094BC4(globalCtx->state.gfxCtx);
POLY_XLU_DISP = func_80094968(POLY_XLU_DISP);
gDPSetCombineLERP(POLY_XLU_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, ENVIRONMENT, TEXEL0,

View File

@ -367,7 +367,7 @@ void EnBom_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (thisx->params == BOMB_BODY) {
func_80093D18(globalCtx->state.gfxCtx);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
func_8002EBCC(thisx, globalCtx, 0);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bom.c", 928),

View File

@ -472,7 +472,7 @@ Gfx* EnBombf_NewMtxDList(GraphicsContext* gfxCtx, GlobalContext* globalCtx) {
displayList = Graph_Alloc(gfxCtx, 5 * sizeof(Gfx));
displayListHead = displayList;
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(displayListHead++, Matrix_NewMtx(gfxCtx, "../z_en_bombf.c", 1021),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPEndDisplayList(displayListHead);

View File

@ -416,7 +416,7 @@ void EnBubble_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80093D84(globalCtx->state.gfxCtx);
Math_SmoothStepToF(&this->graphicRotSpeed, 16.0f, 0.2f, 1000.0f, 0.0f);
Math_SmoothStepToF(&this->graphicEccentricity, 0.08f, 0.2f, 1000.0f, 0.0f);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(this->expansionWidth + 1.0f, this->expansionHeight + 1.0f, 1.0f, MTXMODE_APPLY);
Matrix_RotateZ(((f32)globalCtx->state.frames * (M_PI / 180.0f)) * this->graphicRotSpeed, MTXMODE_APPLY);

View File

@ -885,7 +885,7 @@ void EnBw_Draw(Actor* thisx, GlobalContext* globalCtx2) {
(globalCtx->gameplayFrames * -20) % 0x200, 0x20, 0x80));
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, 255);
Matrix_Scale(this->unk_248 * 0.01f, this->unk_248 * 0.01f, this->unk_248 * 0.01f, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bw.c", 1500),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gEffFire1DL);

View File

@ -721,7 +721,7 @@ void EnClearTag_Draw(Actor* thisx, GlobalContext* globalCtx) {
// Draw the Arwing Backfire
Matrix_Translate(0.0f, 0.0f, -60.0f, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(2.5f, 1.3f, 0.0f, MTXMODE_APPLY);
if ((this->frameCounter % 2) != 0) {
Matrix_Scale(1.15f, 1.15f, 1.15f, MTXMODE_APPLY);
@ -961,7 +961,7 @@ void EnClearTag_DrawEffects(GlobalContext* globalCtx) {
gSPSegment(POLY_XLU_DISP++, 8,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, effect->random * -5, 32, 64, 1, 0, 0, 32, 32));
Matrix_Translate(effect->position.x, effect->position.y, effect->position.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
Matrix_Translate(0.0f, 20.0f, 0.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_en_clear_tag.c", 1392),
@ -988,7 +988,7 @@ void EnClearTag_DrawEffects(GlobalContext* globalCtx) {
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (effect->random * -15) & 0xFF, 32, 64, 1, 0, 0,
32, 32));
Matrix_Translate(effect->position.x, effect->position.y, effect->position.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_en_clear_tag.c", 1439),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -1011,7 +1011,7 @@ void EnClearTag_DrawEffects(GlobalContext* globalCtx) {
// Draw the flash billboard effect.
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 200, (s8)effect->primColor.a);
Matrix_Translate(effect->position.x, effect->position.y, effect->position.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_en_clear_tag.c", 1470),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -890,7 +890,7 @@ void EnFd_DrawFlames(EnFd* this, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 0, (u8)((this->fadeAlpha / 255.0f) * 255));
gDPPipeSync(POLY_XLU_DISP++);
Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(eff->scale, eff->scale, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fd.c", 2006),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -924,7 +924,7 @@ void EnFd_DrawDots(EnFd* this, GlobalContext* globalCtx) {
gDPPipeSync(POLY_XLU_DISP++);
if (1) {}
Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(eff->scale, eff->scale, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fd.c", 2064),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -715,7 +715,7 @@ void EnFhgFire_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gPhantomLightningBlastDL));
} else if ((this->actor.params == FHGFIRE_SPEAR_LIGHT) || (this->actor.params == FHGFIRE_ENERGY_BALL)) {
osSyncPrintf("yari hikari draw 1\n");
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
func_80093D84(globalCtx->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s8)this->fwork[FHGFIRE_ALPHA]);

View File

@ -1049,7 +1049,7 @@ void EnFr_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
if ((limbIndex == 7) || (limbIndex == 8)) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_fr.c", 1735);
Matrix_Push();
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fr.c", 1738),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, *dList);

View File

@ -472,7 +472,7 @@ void EnFw_DrawDust(EnFw* this, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 170, 130, 90, alpha);
gDPPipeSync(POLY_XLU_DISP++);
Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(eff->scale, eff->scale, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fw.c", 1229),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -880,7 +880,7 @@ void EnFz_DrawIceSmoke(EnFz* this, GlobalContext* globalCtx) {
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 3 * (iceSmoke->timer + (3 * i)),
15 * (iceSmoke->timer + (3 * i)), 32, 64, 1, 0, 0, 32, 32));
Matrix_Translate(iceSmoke->pos.x, iceSmoke->pos.y, iceSmoke->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(iceSmoke->xyScale, iceSmoke->xyScale, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_en_fz.c", 1424),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -537,7 +537,7 @@ void EnGb_DrawCagedSouls(EnGb* this, GlobalContext* globalCtx) {
Matrix_Push();
Matrix_Translate(this->cagedSouls[i].translation.x, this->cagedSouls[i].translation.y,
this->cagedSouls[i].translation.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
if (this->cagedSouls[i].rotate180) {
Matrix_RotateZYX(0, -0x8000, 0, MTXMODE_APPLY);

View File

@ -1224,7 +1224,7 @@ void EnGo_DrawDust(EnGo* this, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 170, 130, 90, alpha);
gDPPipeSync(POLY_XLU_DISP++);
Matrix_Translate(dustEffect->pos.x, dustEffect->pos.y, dustEffect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(dustEffect->scale, dustEffect->scale, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_go.c", 2664),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -227,7 +227,7 @@ void EnGo2_DrawDust(EnGo2* this, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 170, 130, 90, alpha);
gDPPipeSync(POLY_XLU_DISP++);
Matrix_Translate(dustEffect->pos.x, dustEffect->pos.y, dustEffect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(dustEffect->scale, dustEffect->scale, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_go2_eff.c", 137),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -599,7 +599,7 @@ void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Pop();
if (this->unk_19E & 2) {
func_80093D84(globalCtx->state.gfxCtx);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(0.05f, -0.05f, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1087),

View File

@ -637,7 +637,7 @@ f32 EnHorse_SlopeSpeedMultiplier(EnHorse* this, GlobalContext* globalCtx) {
}
void func_80A5BB90(GlobalContext* globalCtx, Vec3f* vec, Vec3f* arg2, f32* arg3) {
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, vec, arg2, arg3);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, vec, arg2, arg3);
}
s32 func_80A5BBBC(GlobalContext* globalCtx, EnHorse* this, Vec3f* pos) {
@ -702,7 +702,7 @@ s32 EnHorse_Spawn(EnHorse* this, GlobalContext* globalCtx) {
this->actor.world.rot.y = sHorseSpawns[i].angle;
this->actor.shape.rot.y = Actor_WorldYawTowardActor(&this->actor, &GET_PLAYER(globalCtx)->actor);
spawn = true;
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &this->actor.world.pos,
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &this->actor.world.pos,
&this->actor.projectedPos, &this->actor.projectedW);
}
}
@ -3680,7 +3680,7 @@ void EnHorse_SkinCallback1(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* ski
}
func_800A6408(skin, 13, &sp94, &sp2C);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &sp2C, &this->unk_228, &sp28);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &sp2C, &this->unk_228, &sp28);
if ((this->animationIdx == ENHORSE_ANIM_IDLE && this->action != ENHORSE_ACT_FROZEN) &&
((frame > 40.0f && frame < 45.0f && this->type == HORSE_EPONA) ||
(frame > 28.0f && frame < 33.0f && this->type == HORSE_HNI))) {

View File

@ -615,7 +615,7 @@ void func_80A6CC88(GlobalContext* globalCtx, EnHorseNormal* this, Vec3f* arg2) {
f32 curFrame = this->skin.skelAnime.curFrame;
f32 wDest;
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, arg2, &this->unk_1E8, &wDest);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, arg2, &this->unk_1E8, &wDest);
this->unk_1F4 = this->unk_1E8;
this->unk_1F4.y += 120.0f;

View File

@ -1103,7 +1103,7 @@ void func_80A772EC(EnIk* this, GlobalContext* globalCtx) {
s32 pad[2];
f32 wDest;
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &this->actor.world.pos, &D_80A78FA0, &wDest);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &this->actor.world.pos, &D_80A78FA0, &wDest);
Audio_PlaySoundGeneral(NA_SE_EN_IRONNACK_DEAD, &D_80A78FA0, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}

View File

@ -1215,7 +1215,7 @@ void EnNiw_FeatherDraw(EnNiw* this, GlobalContext* globalCtx) {
flag++;
}
Matrix_Translate(feather->pos.x, feather->pos.y, feather->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(feather->scale, feather->scale, 1.0f, MTXMODE_APPLY);
Matrix_RotateZ(feather->unk_30, MTXMODE_APPLY);
Matrix_Translate(0.0f, -1000.0f, 0.0f, MTXMODE_APPLY);

View File

@ -163,7 +163,7 @@ void EnNutsball_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_nutsball.c", 327);
func_80093D18(globalCtx->state.gfxCtx);
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
Matrix_RotateZ(thisx->home.rot.z * 9.58738e-05f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_nutsball.c", 333),
G_MTX_MODELVIEW | G_MTX_LOAD);

View File

@ -714,7 +714,7 @@ void EnOkuta_Draw(Actor* thisx, GlobalContext* globalCtx) {
} else {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_okuta.c", 1653);
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
Matrix_RotateZ(this->actor.home.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_okuta.c", 1657),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -779,7 +779,7 @@ void func_80B13464(EnSyatekiNiw* this, GlobalContext* globalCtx) {
}
Matrix_Translate(ptr->unk_04.x, ptr->unk_04.y, ptr->unk_04.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(ptr->unk_2C, ptr->unk_2C, 1.0f, MTXMODE_APPLY);
Matrix_RotateZ(ptr->unk_30, MTXMODE_APPLY);
Matrix_Translate(0.0f, -1000.0f, 0.0f, MTXMODE_APPLY);

View File

@ -111,7 +111,7 @@ void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) {
gDPPipeSync(POLY_XLU_DISP++);
Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(eff->size, eff->size, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tk_eff.c", 140),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -744,7 +744,7 @@ void EnTp_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Translate(0.0f, 0.0f, 8.0f, MTXMODE_APPLY);
} else {
func_80093D84(globalCtx->state.gfxCtx);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->red, 0, 255, this->alpha);
gDPPipeSync(POLY_XLU_DISP++);

View File

@ -102,7 +102,8 @@ static f32 sSpawnSin;
s32 EnWood02_SpawnZoneCheck(EnWood02* this, GlobalContext* globalCtx, Vec3f* pos) {
f32 phi_f12;
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, pos, &this->actor.projectedPos, &this->actor.projectedW);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, pos, &this->actor.projectedPos,
&this->actor.projectedW);
phi_f12 = ((this->actor.projectedW == 0.0f) ? 1000.0f : fabsf(1.0f / this->actor.projectedW));

View File

@ -425,13 +425,13 @@ void EnXc_SetColossusAppearSFX(EnXc* this, GlobalContext* globalCtx) {
if (frameCount == 119) {
Vec3f pos = { -611.0f, 728.0f, -2.0f };
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &pos, &sXyzDist, wDest);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &pos, &sXyzDist, wDest);
func_80078914(&sXyzDist, NA_SE_EV_JUMP_CONC);
} else if (frameCount == 164) {
Vec3f pos = { -1069.0f, 38.0f, 0.0f };
s32 pad;
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &pos, &sXyzDist, wDest);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &pos, &sXyzDist, wDest);
func_80078914(&sXyzDist, NA_SE_PL_WALK_CONCRETE);
}
}
@ -1371,7 +1371,7 @@ void func_80B3F3D8() {
void EnXc_PlayDiveSFX(Vec3f* src, GlobalContext* globalCtx) {
f32 wDest[2];
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, src, &D_80B42DA0, wDest);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, src, &D_80B42DA0, wDest);
func_80078914(&D_80B42DA0, NA_SE_EV_DIVE_INTO_WATER);
}
@ -1541,7 +1541,7 @@ void EnXc_PlayTriforceSFX(Actor* thisx, GlobalContext* globalCtx) {
f32 wDest;
Matrix_MultVec3f(&sp1C, &src);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &src, &pos, &wDest);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &src, &pos, &wDest);
Audio_PlaySoundAtPosition(globalCtx, &pos, 80, NA_SE_EV_TRIFORCE_MARK);
this->unk_2A8 = 0;
}

View File

@ -223,7 +223,7 @@ void EnZo_DrawBubbles(EnZo* this, GlobalContext* globalCtx) {
}
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_zo_eff.c", 281),
@ -256,7 +256,7 @@ void EnZo_DrawSplashes(EnZo* this, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 180, 180, 180, effect->color.a);
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_zo_eff.c", 325),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -1215,7 +1215,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 180, 180, 180, effect->alpha);
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(effect->unk_30, effect->unk_30, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_fishing.c", 2346),
@ -1243,7 +1243,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) {
(effect->timer + (i * 3)) * 5, 32, 64, 1, 0, 0, 32, 32));
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(effect->unk_30, effect->unk_30, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_fishing.c", 2394),
@ -1266,7 +1266,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) {
}
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Scale(effect->unk_30, effect->unk_30, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_fishing.c", 2423),
@ -1343,7 +1343,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) {
}
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_RotateY(rotY, MTXMODE_APPLY);
Matrix_Scale(effect->unk_30, effect->unk_30, 1.0f, MTXMODE_APPLY);
@ -1751,7 +1751,7 @@ void Fishing_DrawSinkingLure(GlobalContext* globalCtx) {
Matrix_Translate(sSinkingLurePos[i].x, sSinkingLurePos[i].y, sSinkingLurePos[i].z, MTXMODE_NEW);
scale = sSinkingLureSizes[i + D_80B7FEA0] * 0.04f;
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_fishing.c", 3239),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -1768,7 +1768,7 @@ void Fishing_DrawSinkingLure(GlobalContext* globalCtx) {
Matrix_Translate(sSinkingLurePos[i].x, sSinkingLurePos[i].y, sSinkingLurePos[i].z, MTXMODE_NEW);
scale = sSinkingLureSizes[i + D_80B7FEA0] * 0.04f;
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_fishing.c", 3265),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -2176,7 +2176,7 @@ void Fishing_UpdateLure(Fishing* this, GlobalContext* globalCtx) {
}
}
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &sLurePos, &D_80B7AF94, &sProjectedW);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &sLurePos, &D_80B7AF94, &sProjectedW);
if (D_80B7A694 == 0) {
Math_ApproachF(&D_80B7E108, -800.0f, 1.0f, 20.0f);
@ -4330,7 +4330,7 @@ void Fishing_UpdatePondProps(GlobalContext* globalCtx) {
prop->shouldDraw = false;
prop->timer++;
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &prop->pos, &prop->projectedPos, &sProjectedW);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &prop->pos, &prop->projectedPos, &sProjectedW);
if ((prop->projectedPos.z < prop->drawDistance) &&
(fabsf(prop->projectedPos.x) < (100.0f + prop->projectedPos.z))) {
@ -4578,7 +4578,7 @@ void Fishing_UpdateGroupFishes(GlobalContext* globalCtx) {
if (fish->type != FS_GROUP_FISH_NONE) {
fish->timer++;
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &fish->pos, &fish->projectedPos, &sProjectedW);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &fish->pos, &fish->projectedPos, &sProjectedW);
if ((fish->projectedPos.z < 400.0f) && (fabsf(fish->projectedPos.x) < (100.0f + fish->projectedPos.z))) {
fish->shouldDraw = true;
@ -5659,7 +5659,7 @@ void Fishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
pos.z = Rand_CenteredFloat(700.0f) + globalCtx->view.eye.z;
if (pos.z < 1160.0f) {
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &pos, &projectedPos, &sProjectedW);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &pos, &projectedPos, &sProjectedW);
if (projectedPos.z < 0.0f) {
i--;
@ -5670,7 +5670,8 @@ void Fishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
}
}
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &sStreamSoundPos, &sStreamSoundProjectedPos, &sProjectedW);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &sStreamSoundPos, &sStreamSoundProjectedPos,
&sProjectedW);
func_80078914(&sStreamSoundProjectedPos, NA_SE_EV_WATER_WALL - SFX_FLAG);

View File

@ -269,7 +269,7 @@ void MagicDark_OrbDraw(Actor* thisx, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, 0, 150, 255, 255);
Matrix_Translate(pos.x, pos.y, pos.z, MTXMODE_NEW);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
Matrix_Push();
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_magic_dark.c", 632),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -559,7 +559,7 @@ void ObjectKankyo_DrawFairies(ObjectKankyo* this2, GlobalContext* globalCtx2) {
break;
}
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
Matrix_RotateZ(DEG_TO_RAD(globalCtx->state.frames * 20.0f), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_object_kankyo.c", 913), G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, gKokiriDustMoteDL);
@ -846,7 +846,7 @@ void ObjectKankyo_DrawSunGraveSpark(ObjectKankyo* this2, GlobalContext* globalCt
(u8)(255 * this->effects[0].amplitude), 255 - (u8)(255 * this->effects[0].amplitude),
this->effects[0].alpha);
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_object_kankyo.c", 1416),
G_MTX_LOAD);

View File

@ -107,7 +107,7 @@ void OceffWipe_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Translate(eye.x + vec.x, eye.y + vec.y, eye.z + vec.z, MTXMODE_NEW);
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe.c", 375),

View File

@ -95,7 +95,7 @@ void OceffWipe2_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Translate(eye.x + vec.x, eye.y + vec.y, eye.z + vec.z, MTXMODE_NEW);
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 400),

View File

@ -96,7 +96,7 @@ void OceffWipe3_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Translate(eye.x + vec.x, eye.y + vec.y, eye.z + vec.z, MTXMODE_NEW);
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe3.c", 353),

View File

@ -91,7 +91,7 @@ void OceffWipe4_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Translate(eye.x + vec.x, eye.y + vec.y, eye.z + vec.z, MTXMODE_NEW);
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe4.c", 324),

View File

@ -10425,7 +10425,7 @@ void Player_Draw(Actor* thisx, GlobalContext* globalCtx2) {
if (this->unk_6AD != 0) {
Vec3f sp7C;
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->mf_11D60, &this->actor.focus.pos, &sp7C);
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &this->actor.focus.pos, &sp7C);
if (sp7C.z < -4.0f) {
overrideLimbDraw = func_800902F0;
}

View File

@ -60,7 +60,7 @@ void EffectSsBomb_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z);
SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->billboardMtxF, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfScale, &mfResult);
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -78,7 +78,7 @@ void EffectSsBomb2_DrawFade(GlobalContext* globalCtx, u32 index, EffectSs* this)
scale = this->rScale * 0.01f;
SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z);
SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->billboardMtxF, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfScale, &mfResult);
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);
@ -124,7 +124,7 @@ void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* th
scale = this->rScale * 0.01f;
SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z);
SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->billboardMtxF, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfScale, &mfResult);
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);

View File

@ -79,7 +79,7 @@ void EffectSsDFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
scale = this->rScale / 100.0f;
SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z);
SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->billboardMtxF, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfScale, &mfResult);
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);

View File

@ -131,7 +131,7 @@ void EffectSsDeadDb_Update(GlobalContext* globalCtx, u32 index, EffectSs* this)
}
if (this->rPlaySound && (this->rTextIdx == 1)) {
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &this->pos, &this->vec, &w);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &this->pos, &this->vec, &w);
Audio_PlaySoundGeneral(NA_SE_EN_EXTINCT, &this->vec, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
}

View File

@ -94,7 +94,7 @@ void EffectSsDust_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
scale = this->rScale * 0.0025f;
SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z);
SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->billboardMtxF, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfScale, &mfResult);
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -66,7 +66,7 @@ void EffectSsExtra_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
func_80093D84(globalCtx->state.gfxCtx);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_ss_extra.c", 186),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rScoreIdx]));

View File

@ -103,7 +103,7 @@ void EffectSsFhgFlash_DrawLightBall(GlobalContext* globalCtx, u32 index, EffectS
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, this->rAlpha);
gDPSetEnvColor(POLY_XLU_DISP++, sColors[this->rParam].r, sColors[this->rParam].g, sColors[this->rParam].b, 0);
gDPPipeSync(POLY_XLU_DISP++);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_RotateZ((this->rXZRot / 32768.0f) * 3.1416f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_fhg_flash.c", 326),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -130,7 +130,7 @@ void EffectSsFhgFlash_DrawShock(GlobalContext* globalCtx, u32 index, EffectSs* t
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_AA_ZB_XLU_DECAL2);
} else {
func_80093D84(globalCtx->state.gfxCtx);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_AA_ZB_XLU_SURF2);
}

View File

@ -86,7 +86,7 @@ void EffectSsGSpk_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
scale = this->rScale * 0.0025f;
SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z);
SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->billboardMtxF, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfScale, &mfResult);
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);

View File

@ -84,7 +84,7 @@ void EffectSsHitMark_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z);
scale = this->rScale / 100.0f;
SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->billboardMtxF, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfScale, &mfResult);
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -75,7 +75,7 @@ void EffectSsIceSmoke_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this)
POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, this->life * 3, this->life * 15, 32, 64, 1, 0, 0, 32, 32));
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
scale = this->rScale * 0.0001f;
Matrix_Scale(scale, scale, 1.0f, MTXMODE_APPLY);

View File

@ -69,7 +69,7 @@ void EffectSsKFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
if (1) {}
gDPPipeSync(POLY_XLU_DISP++);
func_800D1FD4(&globalCtx->mf_11DA0);
func_800D1FD4(&globalCtx->billboardMtxF);
if ((index & 1) != 0) {
Matrix_RotateY(M_PI, MTXMODE_APPLY);

View File

@ -94,7 +94,7 @@ void EffectSsKiraKira_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this)
SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z);
SkinMatrix_SetRotateZYX(&mfRotY, 0, 0, this->rYaw);
SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->billboardMtxF, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfRotY, &mfTrans11DA0RotY);
SkinMatrix_MtxFMtxFMult(&mfTrans11DA0RotY, &mfScale, &mfResult);
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -96,7 +96,7 @@ void EffectSsLightning_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this)
xzScale = yScale * 0.6f;
SkinMatrix_SetScale(&mfScale, xzScale, yScale, xzScale);
SkinMatrix_SetRotateZYX(&mfRotate, this->vec.x, this->vec.y, this->rYaw);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->billboardMtxF, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfRotate, &mfTrans11DA0Rotate);
SkinMatrix_MtxFMtxFMult(&mfTrans11DA0Rotate, &mfScale, &mfResult);

View File

@ -58,7 +58,7 @@ void EffectSsStone1_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
OPEN_DISPS(gfxCtx, "../z_eff_ss_stone1.c", 154);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &this->pos, &mfVec, &mfW);
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &this->pos, &mfVec, &mfW);
scale = (mfW < 1500.0f) ? 3.0f : (mfW / 1500.0f) * 3.0f;
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);