1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-03 18:14:26 +00:00

Use MTXMODE_ more

This commit is contained in:
Dragorn421 2021-09-21 10:20:53 +02:00
parent b50e99525d
commit 92aef6b7f4
No known key found for this signature in database
GPG key ID: C182A3A3996E8201
19 changed files with 40 additions and 40 deletions

View file

@ -193,8 +193,8 @@ void func_8087D720(BgHakaHuta* this, GlobalContext* globalCtx) {
if (D_8087D958.x > 30.0f) {
D_8087D958.x = 30.0f;
}
Matrix_RotateY(this->dyna.actor.world.rot.y * (M_PI / 0x8000), 0);
Matrix_RotateAxis(this->counter * (191 * M_PI / 3750), &D_8087D964, 1);
Matrix_RotateY(this->dyna.actor.world.rot.y * (M_PI / 0x8000), MTXMODE_NEW);
Matrix_RotateAxis(this->counter * (191 * M_PI / 3750), &D_8087D964, MTXMODE_APPLY);
Matrix_MultVec3f(&D_8087D958, &vec);
this->dyna.actor.world.pos.x = this->dyna.actor.home.pos.x + vec.x;
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + vec.y;

View file

@ -132,9 +132,9 @@ void BgMenkuriEye_Draw(Actor* thisx, GlobalContext* globalCtx) {
} else {
gDPSetEnvColor(POLY_XLU_DISP++, 200, 0, 0, 255);
}
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0);
Matrix_RotateRPY(this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, 1);
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
Matrix_RotateRPY(this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, MTXMODE_APPLY);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_menkuri_eye.c", 331),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View file

@ -65,9 +65,9 @@ void BgMizuShutter_Init(BgMizuShutter* thisx, GlobalContext* globalCtx) {
this->closedPos = this->dyna.actor.world.pos;
this->timer = 0;
this->timerMax = TIMER_PARAM * 20;
Matrix_RotateY(this->dyna.actor.world.rot.y * (M_PI / 0x8000), 0);
Matrix_RotateX(this->dyna.actor.world.rot.x * (M_PI / 0x8000), 1);
Matrix_RotateZ(this->dyna.actor.world.rot.z * (M_PI / 0x8000), 1);
Matrix_RotateY(this->dyna.actor.world.rot.y * (M_PI / 0x8000), MTXMODE_NEW);
Matrix_RotateX(this->dyna.actor.world.rot.x * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_RotateZ(this->dyna.actor.world.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_MultVec3f(&sDisplacements[SIZE_PARAM], &this->openPos);
this->openPos.x += this->dyna.actor.world.pos.x;
this->openPos.y += this->dyna.actor.world.pos.y;

View file

@ -1757,7 +1757,7 @@ void BossFd_DrawMane(GlobalContext* globalCtx, BossFd* this, Vec3f* manePos, Vec
Matrix_RotateY((maneRot + maneIndex)->y + phi_f20, MTXMODE_APPLY);
Matrix_RotateX(-((maneRot + maneIndex)->x + phi_f22), MTXMODE_APPLY);
Matrix_Scale(maneScale[maneIndex] * (0.01f - (i * 0.0008f)), maneScale[maneIndex] * (0.01f - (i * 0.0008f)),
0.01f, 1);
0.01f, MTXMODE_APPLY);
Matrix_RotateX(-M_PI / 2.0f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_boss_fd.c", 4480),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -1869,7 +1869,7 @@ void BossFd_DrawBody(GlobalContext* globalCtx, BossFd* this) {
MTXMODE_NEW);
Matrix_RotateY(this->bodySegsRot[segIndex].y, MTXMODE_APPLY);
Matrix_RotateX(-this->bodySegsRot[segIndex].x, MTXMODE_APPLY);
Matrix_Translate(0.0f, 0.0f, 35.0f, 1);
Matrix_Translate(0.0f, 0.0f, 35.0f, MTXMODE_APPLY);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
if (i < this->skinSegments) {
Matrix_Scale(1.0f + (Math_SinS((this->work[BFD_LEAD_BODY_SEG] * 5000.0f) + (i * 7000.0f)) *
@ -1897,7 +1897,7 @@ void BossFd_DrawBody(GlobalContext* globalCtx, BossFd* this) {
if (i >= 14) {
f32 sp84 = 1.0f - ((i - 14) * 0.2f);
Matrix_Scale(sp84, sp84, 1.0f, 1);
Matrix_Scale(sp84, sp84, 1.0f, MTXMODE_APPLY);
spD4 = 0.1f * sp84;
temp_float = 0.1f * sp84;
}

View file

@ -903,7 +903,7 @@ void func_808FF898(BossGanon2* this, GlobalContext* globalCtx) {
s32 pad;
Vec3f sp28;
Matrix_RotateY(((this->actor.shape.rot.y / (f32)0x8000) * M_PI) + 0.5f, 0);
Matrix_RotateY(((this->actor.shape.rot.y / (f32)0x8000) * M_PI) + 0.5f, MTXMODE_NEW);
sp28.x = 0.0f;
sp28.y = 0.0f;
sp28.z = 1.0f;
@ -3035,7 +3035,7 @@ void BossGanon2_DrawShadowTexture(void* shadowTexture, BossGanon2* this, GlobalC
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, alpha);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
Matrix_Translate(this->actor.world.pos.x, this->actor.floorHeight, this->actor.world.pos.z - 20.0f, 0);
Matrix_Translate(this->actor.world.pos.x, this->actor.floorHeight, this->actor.world.pos.z - 20.0f, MTXMODE_NEW);
Matrix_Scale(1.65f, 1.0f, 1.65f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_boss_ganon2.c", 6457),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View file

@ -1493,7 +1493,7 @@ void BossGanondrof_Draw(Actor* thisx, GlobalContext* globalCtx) {
osSyncPrintf("STOP TIMER = %d ==============\n", this->actor.freezeTimer);
horse = (EnfHG*)this->actor.child;
if (this->flyMode == GND_FLY_PAINTING) {
Matrix_RotateY((horse->turnRot * 3.1416f) / (f32)0x8000, 1);
Matrix_RotateY((horse->turnRot * 3.1416f) / (f32)0x8000, MTXMODE_APPLY);
}
osSyncPrintf("YP %f\n", this->actor.world.pos.y);

View file

@ -663,7 +663,7 @@ void DemoGt_Draw1(DemoGt* this, GlobalContext* globalCtx) {
Matrix_Push();
Matrix_RotateAxis(spC0, &spA8, 1);
Matrix_RotateAxis(spC0, &spA8, MTXMODE_APPLY);
Matrix_Translate(sp9C.x, sp9C.y, sp9C.z, MTXMODE_APPLY);
Matrix_ToMtx(spB4, "../z_demo_gt_part1.c", 474);
unk198 = this->unk_198;
@ -1285,7 +1285,7 @@ void DemoGt_Draw4(DemoGt* this, GlobalContext* globalCtx2) {
Matrix_Push();
Matrix_RotateAxis(sp70, &sp54, 1);
Matrix_RotateAxis(sp70, &sp54, MTXMODE_APPLY);
Matrix_Translate(sp48.x, sp48.y, sp48.z, MTXMODE_APPLY);
Matrix_ToMtx(sp60, "../z_demo_gt_part4_1.c", 232);
@ -1404,7 +1404,7 @@ void DemoGt_Draw5(DemoGt* this, GlobalContext* globalCtx) {
Matrix_Push();
Matrix_RotateAxis(sp70, &sp54, 1);
Matrix_RotateAxis(sp70, &sp54, MTXMODE_APPLY);
Matrix_Translate(sp48.x, sp48.y, sp48.z, MTXMODE_APPLY);
Matrix_ToMtx(sp60, "../z_demo_gt_part4_2.c", 227);
@ -1500,7 +1500,7 @@ void DemoGt_Draw6(DemoGt* this, GlobalContext* globalCtx) {
Matrix_Push();
Matrix_RotateAxis(sp74, &sp58, 1);
Matrix_RotateAxis(sp74, &sp58, MTXMODE_APPLY);
Matrix_Translate(sp4C.x, sp4C.y, sp4C.z, MTXMODE_APPLY);
Matrix_ToMtx(sp64, "../z_demo_gt_part4_3.c", 291);
@ -1683,7 +1683,7 @@ void DemoGt_Draw8(DemoGt* this, GlobalContext* globalCtx) {
Matrix_Push();
Matrix_RotateAxis(sp68, &sp50, 1);
Matrix_RotateAxis(sp68, &sp50, MTXMODE_APPLY);
Matrix_Translate(sp44.x, sp44.y, sp44.z, MTXMODE_APPLY);
Matrix_ToMtx(sp5C, "../z_demo_gt_part6.c", 153);

View file

@ -150,7 +150,7 @@ void func_809C5BA8(EnBomChu* this, CollisionPoly* floorPoly, GlobalContext* glob
if (!(sp74 < 0.001f)) {
EnBomChu_CrossProduct(&this->unk_160, &sp84, &sp78);
Matrix_RotateAxis(sp74, &sp78, 0);
Matrix_RotateAxis(sp74, &sp78, MTXMODE_NEW);
Matrix_MultVec3f(&this->unk_16C, &sp78);
this->unk_16C = sp78;
EnBomChu_CrossProduct(&this->unk_16C, &sp84, &this->unk_154);

View file

@ -626,7 +626,7 @@ s32 func_809F7D50(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
Vec3f D_809F7F64 = { 480.0f, 620.0f, 0.0f };
if (limbIndex == 1) {
Matrix_Scale((this->rootScale * 0.5f) + 1.0f, this->rootScale + 1.0f, (this->rootScale * 0.5f) + 1.0f, 1);
Matrix_Scale((this->rootScale * 0.5f) + 1.0f, this->rootScale + 1.0f, (this->rootScale * 0.5f) + 1.0f, MTXMODE_APPLY);
}
if (limbIndex == 4) {

View file

@ -725,7 +725,7 @@ void EnFhgFire_Draw(Actor* thisx, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, 165, 255, 75, 0);
}
gDPPipeSync(POLY_XLU_DISP++);
Matrix_RotateZ((this->actor.shape.rot.z / (f32)0x8000) * 3.1416f, 1);
Matrix_RotateZ((this->actor.shape.rot.z / (f32)0x8000) * 3.1416f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1801),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gPhantomEnergyBallDL);
@ -745,7 +745,7 @@ void EnFhgFire_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPDisplayList(POLY_XLU_DISP++, gPhantomWarpDL);
} else {
osSyncPrintf("FF DRAW 1\n");
Matrix_Translate(0.0f, -100.0f, 0.0f, 1);
Matrix_Translate(0.0f, -100.0f, 0.0f, MTXMODE_APPLY);
func_80093D84(globalCtx->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s8)this->fwork[FHGFIRE_ALPHA]);
gDPSetEnvColor(POLY_XLU_DISP++, 0, 255, 30, 0);

View file

@ -1093,8 +1093,8 @@ void EnFloormas_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
if (limbIndex == 2) {
Matrix_Push();
Matrix_Translate(1600.0f, -700.0f, -1700.0f, MTXMODE_APPLY);
Matrix_RotateY(DEGTORAD(60.0f), 1);
Matrix_RotateZ(DEGTORAD(15.0f), 1);
Matrix_RotateY(DEGTORAD(60.0f), MTXMODE_APPLY);
Matrix_RotateZ(DEGTORAD(15.0f), MTXMODE_APPLY);
Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY);
gSPMatrix((*gfx)++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_floormas.c", 2299), G_MTX_LOAD);
gSPDisplayList((*gfx)++, gWallmasterFingerDL);

View file

@ -426,7 +426,7 @@ void EnHeishi1_Update(Actor* thisx, GlobalContext* globalCtx) {
searchBallPos.z = this->actor.world.pos.z;
Matrix_Push();
Matrix_RotateY(((this->actor.shape.rot.y + this->headAngle) / 32768.0f) * M_PI, 0);
Matrix_RotateY(((this->actor.shape.rot.y + this->headAngle) / 32768.0f) * M_PI, MTXMODE_NEW);
searchBallMult.z = 30.0f;
Matrix_MultVec3f(&searchBallMult, &searchBallVel);
Matrix_Pop();

View file

@ -891,7 +891,7 @@ s32 EnPoField_OverrideLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** d
}
}
if (this->actionFunc == EnPoField_Disappear && limbIndex == 7) {
Matrix_Scale(this->actionTimer / 16.0f, this->actionTimer / 16.0f, this->actionTimer / 16.0f, 1);
Matrix_Scale(this->actionTimer / 16.0f, this->actionTimer / 16.0f, this->actionTimer / 16.0f, MTXMODE_APPLY);
}
return false;
}

View file

@ -291,7 +291,7 @@ void func_80AF95C4(EnSda* this, u8* shadowTexture, Player* player, GlobalContext
*shadowTextureTemp32 = 0;
}
}
Matrix_RotateX((BREG(50) + 70) / 100.0f, 0);
Matrix_RotateX((BREG(50) + 70) / 100.0f, MTXMODE_NEW);
for (i = 0; i < 18; i++) {
if (D_80AFA16C[i] >= 0) {
D_80AFA660[D_80AFA16C[i]] = player->bodyPartsPos[i];
@ -321,7 +321,7 @@ void func_80AF95C4(EnSda* this, u8* shadowTexture, Player* player, GlobalContext
sp64[i].y = (((KREG(82) / 100.0f) + 4.0f) * sp188.y) + sp16C.y;
sp64[i].z = (((KREG(82) / 100.0f) + 4.0f) * sp188.z) + sp16C.z;
}
Matrix_RotateX((BREG(50) + 70) / 100.0f, 0);
Matrix_RotateX((BREG(50) + 70) / 100.0f, MTXMODE_NEW);
for (i = 0; i < 22; i++) {
sp194.x = sp64[i].x - player->actor.world.pos.x;
sp194.y = sp64[i].y - player->actor.world.pos.y + KREG(80) + 16.0f;

View file

@ -549,7 +549,7 @@ void EnVm_Draw(Actor* thisx, GlobalContext* globalCtx2) {
gSPSegment(POLY_OPA_DISP++, 0x08, func_80094E78(globalCtx->state.gfxCtx, 0, this->beamTexScroll));
Matrix_Translate(this->beamPos1.x, this->beamPos1.y, this->beamPos1.z, MTXMODE_NEW);
Matrix_RotateRPY(this->beamRot.x, this->beamRot.y, this->beamRot.z, MTXMODE_APPLY);
Matrix_Scale(this->beamScale.x * 0.1f, this->beamScale.x * 0.1f, this->beamScale.z * 0.0015f, 1);
Matrix_Scale(this->beamScale.x * 0.1f, this->beamScale.x * 0.1f, this->beamScale.z * 0.0015f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_vm.c", 1063),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gBeamosLaserDL);

View file

@ -1256,10 +1256,10 @@ s32 EnZl4_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
if (limbIndex == 17) {
sp1C = this->unk_1E0.unk_08;
Matrix_Translate(900.0f, 0.0f, 0.0f, 1);
Matrix_Translate(900.0f, 0.0f, 0.0f, MTXMODE_APPLY);
Matrix_RotateX((sp1C.y / (f32)0x8000) * M_PI, MTXMODE_APPLY);
Matrix_RotateZ((sp1C.x / (f32)0x8000) * M_PI, MTXMODE_APPLY);
Matrix_Translate(-900.0f, 0.0f, 0.0f, 1);
Matrix_Translate(-900.0f, 0.0f, 0.0f, MTXMODE_APPLY);
}
if (limbIndex == 10) {
sp1C = this->unk_1E0.unk_0E;

View file

@ -211,12 +211,12 @@ void ObjComb_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80093D18(globalCtx->state.gfxCtx);
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y + (118.0f * this->actor.scale.y),
this->actor.world.pos.z, 0);
Matrix_RotateY(this->actor.shape.rot.y * (M_PI / 0x8000), 1);
Matrix_RotateX(this->actor.shape.rot.x * (M_PI / 0x8000), 1);
Matrix_RotateZ(this->actor.shape.rot.z * (M_PI / 0x8000), 1);
Matrix_Translate(0, -(this->actor.scale.y * 118.0f), 0, 1);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, 1);
this->actor.world.pos.z, MTXMODE_NEW);
Matrix_RotateY(this->actor.shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_RotateX(this->actor.shape.rot.x * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_RotateZ(this->actor.shape.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Translate(0, -(this->actor.scale.y * 118.0f), 0, MTXMODE_APPLY);
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, "../z_obj_comb.c", 394),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View file

@ -657,7 +657,7 @@ void ObjOshihiki_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_obj_oshihiki.c", 1289);
if (ObjOshihiki_MoveWithBlockUnder(this, globalCtx)) {
Matrix_Translate(this->underDistX * 10.0f, 0.0f, this->underDistZ * 10.0f, 1);
Matrix_Translate(this->underDistX * 10.0f, 0.0f, this->underDistZ * 10.0f, MTXMODE_APPLY);
}
this->stateFlags &= ~PUSHBLOCK_MOVE_UNDER;
func_80093D18(globalCtx->state.gfxCtx);

View file

@ -95,7 +95,7 @@ void EffectSsFhgFlash_DrawLightBall(GlobalContext* globalCtx, u32 index, EffectS
OPEN_DISPS(gfxCtx, "../z_eff_fhg_flash.c", 268);
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, 0);
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
gSegments[6] = VIRTUAL_TO_PHYSICAL(object);
gSPSegment(POLY_XLU_DISP++, 0x06, object);