mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-10 02:54:24 +00:00
Angle cleanup - BINANG_TO_RAD
, BINANG_TO_RAD_ALT
(#1158)
* Run formatter * Touch up angle macros (parentheses and hex constants) * Add `BINANG_TO_RAD_ALT` * Swap `BINANG_TO_RAD` and `BINANG_TO_RAD_ALT` * Run formatter
This commit is contained in:
parent
4f6967b027
commit
0e5ecdcd73
65 changed files with 170 additions and 170 deletions
|
@ -102,7 +102,8 @@ typedef struct {
|
|||
#define BINANG_SUB(a, b) ((s16)((a) - (b)))
|
||||
#define DEG_TO_RAD(degrees) ((degrees) * (M_PI / 180.0f))
|
||||
#define BINANG_TO_DEGF(binang) ((f32)(binang) * (360.0001525f / 65535.0f))
|
||||
#define BINANG_TO_RAD(binang) (((f32)(binang) / (f32)0x8000) * M_PI)
|
||||
#define BINANG_TO_RAD(binang) ((f32)(binang) * (M_PI / 0x8000))
|
||||
#define BINANG_TO_RAD_ALT(binang) (((f32)(binang) / (f32)0x8000) * M_PI)
|
||||
|
||||
// Vector macros
|
||||
#define SQXZ(vec) ((vec.x) * (vec.x) + (vec.z) * (vec.z))
|
||||
|
|
|
@ -131,5 +131,5 @@ s16 Math_Atan2S(f32 x, f32 y) {
|
|||
}
|
||||
|
||||
f32 Math_Atan2F(f32 x, f32 y) {
|
||||
return Math_Atan2S(x, y) * (M_PI / 32768.0f);
|
||||
return BINANG_TO_RAD(Math_Atan2S(x, y));
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ void ActorShadow_Draw(Actor* actor, Lights* lights, GlobalContext* globalCtx, Gf
|
|||
Matrix_Put(&sp60);
|
||||
|
||||
if (dlist != gCircleShadowDL) {
|
||||
Matrix_RotateY(actor->shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(actor->shape.rot.y), MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
temp2 = (1.0f - (temp1 * (1.0f / 350))) * actor->shape.shadowScale;
|
||||
|
@ -398,7 +398,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) {
|
|||
|
||||
Matrix_Translate(actor->focus.pos.x, actor->focus.pos.y + (actor->targetArrowOffset * actor->scale.y) + 17.0f,
|
||||
actor->focus.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY((f32)((u16)(globalCtx->gameplayFrames * 3000)) * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD((u16)(globalCtx->gameplayFrames * 3000)), MTXMODE_APPLY);
|
||||
Matrix_Scale((iREG(27) + 35) / 1000.0f, (iREG(28) + 60) / 1000.0f, (iREG(29) + 50) / 1000.0f, MTXMODE_APPLY);
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255);
|
||||
|
|
|
@ -906,7 +906,7 @@ s32 Player_OverrideLimbDrawGameplayCommon(GlobalContext* globalCtx, s32 limbInde
|
|||
|
||||
if (this->unk_6C2 != 0) {
|
||||
Matrix_Translate(pos->x, ((Math_CosS(this->unk_6C2) - 1.0f) * 200.0f) + pos->y, pos->z, MTXMODE_APPLY);
|
||||
Matrix_RotateX(this->unk_6C2 * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(this->unk_6C2), MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(rot->x, rot->y, rot->z, MTXMODE_APPLY);
|
||||
pos->x = pos->y = pos->z = 0.0f;
|
||||
rot->x = rot->y = rot->z = 0;
|
||||
|
@ -922,17 +922,17 @@ s32 Player_OverrideLimbDrawGameplayCommon(GlobalContext* globalCtx, s32 limbInde
|
|||
rot->z += this->unk_6B6;
|
||||
} else if (limbIndex == PLAYER_LIMB_UPPER) {
|
||||
if (this->unk_6B0 != 0) {
|
||||
Matrix_RotateZ(0x44C * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_6B0 * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(0x44C), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->unk_6B0), MTXMODE_APPLY);
|
||||
}
|
||||
if (this->unk_6BE != 0) {
|
||||
Matrix_RotateY(this->unk_6BE * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->unk_6BE), MTXMODE_APPLY);
|
||||
}
|
||||
if (this->unk_6BC != 0) {
|
||||
Matrix_RotateX(this->unk_6BC * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(this->unk_6BC), MTXMODE_APPLY);
|
||||
}
|
||||
if (this->unk_6C0 != 0) {
|
||||
Matrix_RotateZ(this->unk_6C0 * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(this->unk_6C0), MTXMODE_APPLY);
|
||||
}
|
||||
} else if (limbIndex == PLAYER_LIMB_L_THIGH) {
|
||||
func_8008F87C(globalCtx, this, &this->skelAnime, pos, rot, PLAYER_LIMB_L_THIGH, PLAYER_LIMB_L_SHIN,
|
||||
|
|
|
@ -206,9 +206,9 @@ void ArrowFire_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arrow_fire.c", 618);
|
||||
|
||||
Matrix_Translate(tranform->world.pos.x, tranform->world.pos.y, tranform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(tranform->shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(tranform->shape.rot.x * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(tranform->shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(tranform->shape.rot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(tranform->shape.rot.z), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
|
||||
// Draw red effect over the screen when arrow hits
|
||||
|
|
|
@ -205,9 +205,9 @@ void ArrowIce_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arrow_ice.c", 610);
|
||||
|
||||
Matrix_Translate(tranform->world.pos.x, tranform->world.pos.y, tranform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(tranform->shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(tranform->shape.rot.x * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(tranform->shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(tranform->shape.rot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(tranform->shape.rot.z), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
|
||||
// Draw blue effect over the screen when arrow hits
|
||||
|
|
|
@ -203,9 +203,9 @@ void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arrow_light.c", 598);
|
||||
|
||||
Matrix_Translate(tranform->world.pos.x, tranform->world.pos.y, tranform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(tranform->shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(tranform->shape.rot.x * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(tranform->shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(tranform->shape.rot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(tranform->shape.rot.z), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
|
||||
// Draw yellow effect over the screen when arrow hits
|
||||
|
|
|
@ -972,8 +972,8 @@ void BgDyYoseizo_ParticleUpdate(BgDyYoseizo* this, GlobalContext* globalCtx) {
|
|||
Math_ApproachF(&particle->pitch, goalPitch, 0.9f, 5000.0f);
|
||||
Math_ApproachF(&particle->yaw, goalYaw, 0.9f, 5000.0f);
|
||||
Matrix_Push();
|
||||
Matrix_RotateY(BINANG_TO_RAD(particle->yaw), MTXMODE_NEW);
|
||||
Matrix_RotateX(BINANG_TO_RAD(particle->pitch), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(particle->yaw), MTXMODE_NEW);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(particle->pitch), MTXMODE_APPLY);
|
||||
|
||||
sp94.x = sp94.y = sp94.z = 3.0f;
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ void BgHakaGate_DrawFlame(BgHakaGate* this, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
|
||||
|
||||
Matrix_Translate(thisx->world.pos.x, thisx->world.pos.y + 15.0f, thisx->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx))), MTXMODE_APPLY);
|
||||
scale = this->vFlameScale * 0.00001f;
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka_gate.c", 744),
|
||||
|
@ -353,14 +353,14 @@ void BgHakaGate_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_haka_gate.c", 781);
|
||||
Matrix_Get(¤tMtxF);
|
||||
Matrix_Translate(0.0f, 0.0f, -2000.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateX(this->vOpenAngle * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(this->vOpenAngle), MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, 2000.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka_gate.c", 788),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_haka_objects_DL_010A10);
|
||||
Matrix_Put(¤tMtxF);
|
||||
Matrix_Translate(0.0f, 0.0f, 2000.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateX(-this->vOpenAngle * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(-this->vOpenAngle), MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, -2000.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka_gate.c", 796),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
|
|
@ -191,7 +191,7 @@ 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), MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->dyna.actor.world.rot.y), 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;
|
||||
|
|
|
@ -203,7 +203,7 @@ void BgHakaShip_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka_ship.c", 534),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_haka_objects_DL_00D330);
|
||||
angleTemp = this->yOffset * (M_PI / 0x8000);
|
||||
angleTemp = BINANG_TO_RAD(this->yOffset);
|
||||
Matrix_Translate(-3670.0f, 620.0f, 1150.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(angleTemp, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka_ship.c", 547),
|
||||
|
|
|
@ -226,7 +226,7 @@ void BgHakaTubo_DrawFlameCircle(BgHakaTubo* this, GlobalContext* globalCtx) {
|
|||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y + 235.0f, this->dyna.actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->dyna.actor.shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.07f, 0.04f, 0.07f, MTXMODE_APPLY);
|
||||
if (1) {}
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 0, 170, 255, 255);
|
||||
|
|
|
@ -178,8 +178,8 @@ void func_80895A70(BgJyaCobra* this) {
|
|||
|
||||
mirRay->unLit = 0;
|
||||
Math_Vec3f_Copy(&mirRay->sourcePt, &this->unk_180);
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y * (M_PI / 0x8000), MTXMODE_NEW);
|
||||
Matrix_RotateX(D_80897308[this->dyna.actor.params & 3] * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->dyna.actor.shape.rot.y), MTXMODE_NEW);
|
||||
Matrix_RotateX(BINANG_TO_RAD(D_80897308[this->dyna.actor.params & 3]), MTXMODE_APPLY);
|
||||
sp28.x = 0.0f;
|
||||
sp28.y = 0.0;
|
||||
sp28.z = this->unk_190 * 2800.0f;
|
||||
|
@ -281,7 +281,7 @@ void BgJyaCobra_UpdateShadowFromSide(BgJyaCobra* this) {
|
|||
Matrix_RotateX((M_PI / 4), MTXMODE_NEW);
|
||||
rotY = !(this->dyna.actor.params & 3) ? (this->dyna.actor.shape.rot.y + 0x4000)
|
||||
: (this->dyna.actor.shape.rot.y - 0x4000);
|
||||
Matrix_RotateY(rotY * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(rotY), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.9f, 0.9f, 0.9f, MTXMODE_APPLY);
|
||||
|
||||
for (i = 0; i < 25; i++) {
|
||||
|
|
|
@ -333,8 +333,8 @@ void BgJyaMegami_DrawExplode(BgJyaMegami* this, GlobalContext* globalCtx) {
|
|||
piece = &this->pieces[i];
|
||||
Matrix_Translate(piece->pos.x + sPiecesInit[i].unk_00.x, piece->pos.y + sPiecesInit[i].unk_00.y,
|
||||
piece->pos.z + sPiecesInit[i].unk_00.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(piece->rotVelY * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(piece->rotVelX * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(piece->rotVelY), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(piece->rotVelX), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
|
||||
Matrix_Translate(sPiecesInit[i].unk_00.x * -10.0f, sPiecesInit[i].unk_00.y * -10.0f,
|
||||
sPiecesInit[i].unk_00.z * -10.0f, MTXMODE_APPLY);
|
||||
|
|
|
@ -154,7 +154,7 @@ void BgMizuMovebg_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
Matrix_RotateY(thisx->world.rot.y * (M_PI / 32768), MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD(thisx->world.rot.y), MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&D_8089EBA0, &sp48);
|
||||
|
||||
if (Actor_SpawnAsChild(&globalCtx->actorCtx, thisx, globalCtx, ACTOR_OBJ_HSBLOCK,
|
||||
|
@ -305,7 +305,7 @@ void func_8089E318(BgMizuMovebg* this, GlobalContext* globalCtx) {
|
|||
case 5:
|
||||
case 6:
|
||||
if (globalCtx->roomCtx.curRoom.num == this->dyna.actor.room) {
|
||||
Matrix_RotateY(this->dyna.actor.world.rot.y * (M_PI / 32768), MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->dyna.actor.world.rot.y), MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&D_8089EBAC, &sp28);
|
||||
this->dyna.actor.child->world.pos.x = this->dyna.actor.world.pos.x + sp28.x;
|
||||
this->dyna.actor.child->world.pos.y = this->dyna.actor.world.pos.y + sp28.y;
|
||||
|
|
|
@ -63,9 +63,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), 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_RotateY(BINANG_TO_RAD(this->dyna.actor.world.rot.y), MTXMODE_NEW);
|
||||
Matrix_RotateX(BINANG_TO_RAD(this->dyna.actor.world.rot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(this->dyna.actor.world.rot.z), 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;
|
||||
|
|
|
@ -267,7 +267,7 @@ void BgMoriHineri_DrawHallAndRoom(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Matrix_Put(&mtx);
|
||||
Matrix_Translate(167.0f, -218.0f, -453.0f, MTXMODE_APPLY);
|
||||
if (Flags_GetTreasure(globalCtx, 0xE)) {
|
||||
Matrix_RotateZ(0x3500 * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(0x3500), MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_RotateZ(M_PI, MTXMODE_APPLY);
|
||||
}
|
||||
|
|
|
@ -177,9 +177,9 @@ void BgPoSyokudai_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(POLY_XLU_DISP++, envColor->r, envColor->g, envColor->b, 255);
|
||||
|
||||
Matrix_Translate(0.0f, 52.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->actor.shape.rot.y + 0x8000) *
|
||||
(M_PI / 0x8000),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_RotateY(
|
||||
BINANG_TO_RAD((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->actor.shape.rot.y + 0x8000)),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_Scale(0.0027f, 0.0027f, 0.0027f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_po_syokudai.c", 368),
|
||||
|
|
|
@ -269,7 +269,7 @@ void BgSpot00Hanebasi_DrawTorches(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
sTorchFlameScale = ((thisx->shape.rot.x * -1) - 0x2000) * (1.0f / 1024000.0f);
|
||||
}
|
||||
|
||||
angle = (s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x8000) * (M_PI / 32768.0f);
|
||||
angle = BINANG_TO_RAD((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x8000));
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, 255, 255, 0, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
|
||||
|
||||
|
|
|
@ -247,9 +247,9 @@ void func_808ACCB8(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
Matrix_Translate(globalCtx->csCtx.npcActions[0]->startPos.x, globalCtx->csCtx.npcActions[0]->startPos.y,
|
||||
globalCtx->csCtx.npcActions[0]->startPos.z, MTXMODE_NEW);
|
||||
Matrix_RotateX(globalCtx->csCtx.npcActions[0]->urot.x * (M_PI / (f32)0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(globalCtx->csCtx.npcActions[0]->urot.y * (M_PI / (f32)0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(globalCtx->csCtx.npcActions[0]->urot.z * (M_PI / (f32)0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(globalCtx->csCtx.npcActions[0]->urot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(globalCtx->csCtx.npcActions[0]->urot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(globalCtx->csCtx.npcActions[0]->urot.z), MTXMODE_APPLY);
|
||||
Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY);
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
|
||||
|
@ -309,8 +309,8 @@ void func_808AD450(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if ((globalCtx->csCtx.npcActions[2]->action & 0xFFFF) == 2) {
|
||||
Matrix_Translate(globalCtx->csCtx.npcActions[2]->startPos.x, globalCtx->csCtx.npcActions[2]->startPos.y,
|
||||
globalCtx->csCtx.npcActions[2]->startPos.z, MTXMODE_NEW);
|
||||
Matrix_RotateX(globalCtx->csCtx.npcActions[2]->urot.x * (M_PI / (f32)0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(globalCtx->csCtx.npcActions[2]->urot.y * (M_PI / (f32)0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(globalCtx->csCtx.npcActions[2]->urot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(globalCtx->csCtx.npcActions[2]->urot.y), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.9f, 0.9f, (((this->unk_170 - this->unk_172) * lerp) + this->unk_172) * 0.1f, MTXMODE_APPLY);
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ void BgSpot08Iceblock_Roll(BgSpot08Iceblock* this, GlobalContext* globalCtx) {
|
|||
// Rotation by the angle between surfaceNormal and the vertical about rotationAxis
|
||||
Matrix_RotateAxis(Math_FAcosF(Math3D_Cos(&sVerticalVector, &this->surfaceNormal)), &this->rotationAxis,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateY(this->dyna.actor.shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->dyna.actor.shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_Get(&mtx);
|
||||
Matrix_MtxFToYXZRotS(&mtx, &this->dyna.actor.shape.rot, 0);
|
||||
}
|
||||
|
|
|
@ -1387,7 +1387,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
sp198.x = Math_SinS(this->unk_19E * 1000) * sp178;
|
||||
sp198.y = sp198.z = 0.0f;
|
||||
|
||||
Matrix_RotateY(this->actor.shape.rot.y * (M_PI / 0x8000), MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->actor.shape.rot.y), MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&sp198, &sp184);
|
||||
|
||||
Math_SmoothStepToF(&this->actor.world.pos.x, cornerPos->x + sp184.x, 1.0f, this->unk_1E4, 0.0f);
|
||||
|
|
|
@ -2098,7 +2098,7 @@ void BossGanon_ChargeBigMagic(BossGanon* this, GlobalContext* globalCtx) {
|
|||
sp74.y = Rand_ZeroFloat(10.0f) + 150.0f;
|
||||
sp74.z = 0.0f;
|
||||
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->actor.yawTowardsPlayer), MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(this->actor.yawTowardsPlayer), MTXMODE_NEW);
|
||||
Matrix_RotateZ(Rand_ZeroFloat(65536.0f), MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&sp74, &sp68);
|
||||
|
||||
|
@ -3496,7 +3496,7 @@ void BossGanon_DrawBigMagicCharge(BossGanon* this, GlobalContext* globalCtx) {
|
|||
Matrix_RotateY((this->unk_1A2 * 10.0f) / 1000.0f, MTXMODE_APPLY);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 200, 255, 0, 0);
|
||||
|
||||
yRot = BINANG_TO_RAD(this->actor.yawTowardsPlayer);
|
||||
yRot = BINANG_TO_RAD_ALT(this->actor.yawTowardsPlayer);
|
||||
|
||||
for (i = 0; i < this->unk_1AC; i++) {
|
||||
f32 xzRot = (BossGanon_RandZeroOne() - 0.5f) * M_PI * 1.5f;
|
||||
|
@ -4287,7 +4287,7 @@ void func_808E229C(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Matrix_Scale(this->actor.scale.x * (1.0f - (i * 0.07000001f)), this->actor.scale.y * (1.0f - (i * 0.07000001f)),
|
||||
this->actor.scale.z * (1.0f - (i * 0.07000001f)), MTXMODE_APPLY);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
Matrix_RotateZ(((2.0f * (i * M_PI)) / 10.0f) + BINANG_TO_RAD(this->actor.shape.rot.z), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(((2.0f * (i * M_PI)) / 10.0f) + BINANG_TO_RAD_ALT(this->actor.shape.rot.z), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_boss_ganon.c", 10109),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gDorfSquareDL);
|
||||
|
@ -4333,8 +4333,8 @@ void func_808E2544(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
this->unk_2EC[this->unk_1A6] = this->actor.world.pos;
|
||||
this->unk_3C4[this->unk_1A6].x = BINANG_TO_RAD(this->actor.world.rot.x);
|
||||
this->unk_3C4[this->unk_1A6].y = BINANG_TO_RAD(this->actor.world.rot.y);
|
||||
this->unk_3C4[this->unk_1A6].x = BINANG_TO_RAD_ALT(this->actor.world.rot.x);
|
||||
this->unk_3C4[this->unk_1A6].y = BINANG_TO_RAD_ALT(this->actor.world.rot.y);
|
||||
|
||||
switch (this->unk_1C2) {
|
||||
if (1) {}
|
||||
|
@ -4704,7 +4704,7 @@ void BossGanon_UpdateEffects(GlobalContext* globalCtx) {
|
|||
}
|
||||
} else if (eff->type == GDF_EFF_LIGHTNING) {
|
||||
if (eff->unk_3C == 0.0f) {
|
||||
eff->unk_44 = BINANG_TO_RAD(Camera_GetInputDirYaw(Gameplay_GetCamera(globalCtx, MAIN_CAM)));
|
||||
eff->unk_44 = BINANG_TO_RAD_ALT(Camera_GetInputDirYaw(Gameplay_GetCamera(globalCtx, MAIN_CAM)));
|
||||
} else {
|
||||
eff->unk_44 = M_PI / 2;
|
||||
}
|
||||
|
|
|
@ -3034,11 +3034,11 @@ s32 BossVa_ZapperOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx**
|
|||
Matrix_Translate(pos->x, pos->y, pos->z, MTXMODE_APPLY);
|
||||
Matrix_Get(&zapperMtx);
|
||||
Matrix_MtxFToZYXRotS(&zapperMtx, &sZapperRot, false);
|
||||
Matrix_RotateX(-sZapperRot.x * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(-sZapperRot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(-sZapperRot.z * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_1F2 * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(this->unk_1F0 * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(-sZapperRot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(-sZapperRot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(-sZapperRot.z), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->unk_1F2), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(this->unk_1F0), MTXMODE_APPLY);
|
||||
pos->x = pos->y = pos->z = 0.0f;
|
||||
rot->x = rot->y = rot->z = 0;
|
||||
break;
|
||||
|
|
|
@ -693,7 +693,7 @@ void func_809688C4(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 255, 255);
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x8000) * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x8000)), MTXMODE_APPLY);
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
|
|
|
@ -1414,16 +1414,16 @@ void DemoEffect_MoveJewelSpherical(f32 degrees, f32 frameDivisor, Vec3f startPos
|
|||
this->actor.world.pos.z = radius * sinf(degrees * (M_PI / 180.0f));
|
||||
|
||||
xPos = this->actor.world.pos.x;
|
||||
ySpherical = (this->actor.world.pos.y * cosf(rotation.x * (M_PI / 0x8000))) -
|
||||
(sinf(rotation.x * (M_PI / 0x8000)) * this->actor.world.pos.z);
|
||||
xzSpherical = (this->actor.world.pos.z * cosf(rotation.x * (M_PI / 0x8000))) +
|
||||
(sinf(rotation.x * (M_PI / 0x8000)) * this->actor.world.pos.y);
|
||||
ySpherical = (this->actor.world.pos.y * cosf(BINANG_TO_RAD(rotation.x))) -
|
||||
(sinf(BINANG_TO_RAD(rotation.x)) * this->actor.world.pos.z);
|
||||
xzSpherical = (this->actor.world.pos.z * cosf(BINANG_TO_RAD(rotation.x))) +
|
||||
(sinf(BINANG_TO_RAD(rotation.x)) * this->actor.world.pos.y);
|
||||
|
||||
this->actor.world.pos.x =
|
||||
(xPos * cosf(rotation.y * (M_PI / 0x8000))) - (sinf(rotation.y * (M_PI / 0x8000)) * xzSpherical);
|
||||
(xPos * cosf(BINANG_TO_RAD(rotation.y))) - (sinf(BINANG_TO_RAD(rotation.y)) * xzSpherical);
|
||||
this->actor.world.pos.y = ySpherical;
|
||||
this->actor.world.pos.z =
|
||||
(xzSpherical * cosf(rotation.y * (M_PI / 0x8000))) + (sinf(rotation.y * (M_PI / 0x8000)) * xPos);
|
||||
(xzSpherical * cosf(BINANG_TO_RAD(rotation.y))) + (sinf(BINANG_TO_RAD(rotation.y)) * xPos);
|
||||
|
||||
this->actor.world.pos.x += startPos.x;
|
||||
this->actor.world.pos.y += startPos.y;
|
||||
|
@ -1905,7 +1905,7 @@ void DemoEffect_DrawBlueOrb(Actor* thisx, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 100, 255, 255);
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(this->blueOrb.rotation * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(this->blueOrb.rotation), 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);
|
||||
this->blueOrb.rotation += 0x01F4;
|
||||
|
@ -1996,7 +1996,7 @@ void DemoEffect_DrawTriforceSpot(Actor* thisx, GlobalContext* globalCtx) {
|
|||
func_8002ED80(&this->actor, globalCtx, 0);
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_AA_ZB_XLU_SURF2);
|
||||
Matrix_RotateY(this->triforceSpot.rotation * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->triforceSpot.rotation), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_effect.c", 3053),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_XLU_DISP++, 8,
|
||||
|
@ -2008,7 +2008,7 @@ void DemoEffect_DrawTriforceSpot(Actor* thisx, GlobalContext* globalCtx) {
|
|||
func_8002EBCC(&this->actor, globalCtx, 0);
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_PASS, G_RM_AA_ZB_OPA_SURF2);
|
||||
Matrix_RotateY(this->triforceSpot.rotation * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->triforceSpot.rotation), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_effect.c", 3085),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_OPA_DISP++, 8,
|
||||
|
|
|
@ -643,7 +643,7 @@ void DemoGt_Draw1(DemoGt* this, GlobalContext* globalCtx) {
|
|||
s32* unk178;
|
||||
|
||||
spC6 = this->unk_172;
|
||||
spC0 = fabsf(spC6 * (M_PI / 0x8000));
|
||||
spC0 = fabsf(BINANG_TO_RAD(spC6));
|
||||
spBC = kREG(71);
|
||||
spB8 = (s16)((s32)kREG(70)) + 0x4000;
|
||||
spBA = kREG(70);
|
||||
|
@ -1263,7 +1263,7 @@ void DemoGt_Draw4(DemoGt* this, GlobalContext* globalCtx2) {
|
|||
if (frames < 301) {
|
||||
|
||||
sp76 = this->unk_172;
|
||||
sp70 = fabsf(sp76 * (M_PI / 0x8000));
|
||||
sp70 = fabsf(BINANG_TO_RAD(sp76));
|
||||
sp6C = kREG(61);
|
||||
sp68 = (s16)((s32)kREG(58)) + 0x4000;
|
||||
sp6A = kREG(58);
|
||||
|
@ -1382,7 +1382,7 @@ void DemoGt_Draw5(DemoGt* this, GlobalContext* globalCtx) {
|
|||
f32 sp44;
|
||||
|
||||
sp76 = this->unk_172;
|
||||
sp70 = fabsf(sp76 * (M_PI / 0x8000));
|
||||
sp70 = fabsf(BINANG_TO_RAD(sp76));
|
||||
sp6C = kREG(62);
|
||||
sp6A = kREG(59) - 0x4000;
|
||||
sp68 = (s16)(kREG(59) - 0x4000) + 0x4000;
|
||||
|
@ -1477,7 +1477,7 @@ void DemoGt_Draw6(DemoGt* this, GlobalContext* globalCtx) {
|
|||
Vec3f sp4C;
|
||||
f32 sp48;
|
||||
|
||||
sp74 = fabsf(sp78 * (M_PI / 0x8000));
|
||||
sp74 = fabsf(BINANG_TO_RAD(sp78));
|
||||
sp70 = kREG(63);
|
||||
sp6E = kREG(60) + 0x4000;
|
||||
sp6C = kREG(60) + 0x4000;
|
||||
|
@ -1570,7 +1570,7 @@ void DemoGt_Draw7(DemoGt* this, GlobalContext* globalCtx) {
|
|||
f32 sp40;
|
||||
|
||||
sp6E = this2->unk_172;
|
||||
sp68 = fabsf(sp6E * (M_PI / 0x8000));
|
||||
sp68 = fabsf(BINANG_TO_RAD(sp6E));
|
||||
sp64 = kREG(75);
|
||||
sp62 = kREG(74) + 0x7FEC;
|
||||
sp60 = kREG(74) + 0x7FEC;
|
||||
|
@ -1661,7 +1661,7 @@ void DemoGt_Draw8(DemoGt* this, GlobalContext* globalCtx) {
|
|||
f32 sp40;
|
||||
|
||||
sp6E = this2->unk_172;
|
||||
sp68 = fabsf(sp6E * (M_PI / 0x8000));
|
||||
sp68 = fabsf(BINANG_TO_RAD(sp6E));
|
||||
sp64 = kREG(78);
|
||||
sp62 = kREG(77) + 0xBE80;
|
||||
sp60 = kREG(77) + 0xBE80;
|
||||
|
|
|
@ -337,8 +337,8 @@ void EnAnubice_Die(EnAnubice* this, GlobalContext* globalCtx) {
|
|||
rotX = curFrame * -3000.0f;
|
||||
rotX = CLAMP_MIN(rotX, -11000.0f);
|
||||
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->actor.shape.rot.y), MTXMODE_NEW);
|
||||
Matrix_RotateX(BINANG_TO_RAD(rotX), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(this->actor.shape.rot.y), MTXMODE_NEW);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(rotX), MTXMODE_APPLY);
|
||||
baseFireEffectPos.y = Rand_CenteredFloat(10.0f) + 30.0f;
|
||||
Matrix_MultVec3f(&baseFireEffectPos, &rotatedFireEffectPos);
|
||||
rotatedFireEffectPos.x += this->actor.world.pos.x + Rand_CenteredFloat(40.0f);
|
||||
|
@ -404,7 +404,7 @@ void EnAnubice_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
rotatedKnockbackVelocity.y = 0.0f;
|
||||
rotatedKnockbackVelocity.z = 0.0f;
|
||||
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->actor.shape.rot.y), MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(this->actor.shape.rot.y), MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&baseKnockbackVelocity, &rotatedKnockbackVelocity);
|
||||
|
||||
this->actor.velocity.x = rotatedKnockbackVelocity.x;
|
||||
|
|
|
@ -80,8 +80,8 @@ void func_809B26EC(EnAnubiceFire* this, GlobalContext* globalCtx) {
|
|||
Vec3f velocity = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
Matrix_Push();
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->actor.world.rot.y), MTXMODE_NEW);
|
||||
Matrix_RotateX(BINANG_TO_RAD(this->actor.world.rot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(this->actor.world.rot.y), MTXMODE_NEW);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(this->actor.world.rot.x), MTXMODE_APPLY);
|
||||
velocity.z = 15.0f;
|
||||
Matrix_MultVec3f(&velocity, &this->actor.velocity);
|
||||
Matrix_Pop();
|
||||
|
|
|
@ -478,15 +478,14 @@ void EnArrow_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Matrix_Push();
|
||||
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),
|
||||
Matrix_RotateZ((this->actor.speedXZ == 0.0f) ? 0.0f : BINANG_TO_RAD((globalCtx->gameplayFrames & 0xFF) * 4000),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_arrow.c", 1374),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffSparklesDL);
|
||||
Matrix_Pop();
|
||||
Matrix_RotateY(this->actor.world.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->actor.world.rot.y), MTXMODE_APPLY);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_arrow.c", 1381);
|
||||
}
|
||||
|
|
|
@ -1330,9 +1330,9 @@ void EnBb_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
0x20, 0x80));
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, this->flamePrimBlue, this->flamePrimAlpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, this->flameEnvColor.r, this->flameEnvColor.g, this->flameEnvColor.b, 0);
|
||||
Matrix_RotateY(((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->actor.shape.rot.y + 0x8000)) *
|
||||
(M_PI / 0x8000),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_RotateY(
|
||||
BINANG_TO_RAD((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->actor.shape.rot.y + 0x8000)),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_Scale(this->flameScaleX * 0.01f, this->flameScaleY * 0.01f, 1.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bb.c", 2106),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
|
|
@ -256,9 +256,9 @@ void EnBoom_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_boom.c", 567);
|
||||
|
||||
Matrix_RotateY(this->actor.world.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(0x1F40 * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(this->actor.world.rot.x * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->actor.world.rot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(0x1F40), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(this->actor.world.rot.x), MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&sMultVec1, &vec1);
|
||||
Matrix_MultVec3f(&sMultVec2, &vec2);
|
||||
|
||||
|
@ -267,7 +267,7 @@ void EnBoom_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
Matrix_RotateY((this->activeTimer * 12000) * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->activeTimer * 12000), MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_boom.c", 601),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
|
|
@ -122,9 +122,9 @@ void EnButte_DrawTransformationEffect(EnButte* this, GlobalContext* globalCtx) {
|
|||
alpha = CLAMP(alpha, 0, 255);
|
||||
|
||||
Camera_GetCamDir(&camDir, GET_ACTIVE_CAM(globalCtx));
|
||||
Matrix_RotateY(camDir.y * (M_PI / 0x8000), MTXMODE_NEW);
|
||||
Matrix_RotateX(camDir.x * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(camDir.z * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(camDir.y), MTXMODE_NEW);
|
||||
Matrix_RotateX(BINANG_TO_RAD(camDir.x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(camDir.z), MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809CE3C4, &sp5C);
|
||||
Matrix_SetTranslateRotateYXZ(this->actor.focus.pos.x + sp5C.x, this->actor.focus.pos.y + sp5C.y,
|
||||
this->actor.focus.pos.z + sp5C.z, &camDir);
|
||||
|
|
|
@ -448,7 +448,7 @@ void EnDaiku_InitSubCamera(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
eyePosDeltaLocal.x = sEscapeSubCamParams[this->actor.params & 3].eyePosDeltaLocal.x;
|
||||
eyePosDeltaLocal.y = sEscapeSubCamParams[this->actor.params & 3].eyePosDeltaLocal.y;
|
||||
eyePosDeltaLocal.z = sEscapeSubCamParams[this->actor.params & 3].eyePosDeltaLocal.z;
|
||||
Matrix_RotateY(this->actor.world.rot.y * (M_PI / 0x8000), MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->actor.world.rot.y), MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&eyePosDeltaLocal, &eyePosDeltaWorld);
|
||||
|
||||
this->subCamEyeInit.x = this->subCamEye.x = this->actor.world.pos.x + eyePosDeltaWorld.x;
|
||||
|
@ -495,7 +495,7 @@ void EnDaiku_EscapeSuccess(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
this->subCamActive = false;
|
||||
|
||||
if ((gSaveContext.eventChkInf[9] & 0xF) == 0xF) {
|
||||
Matrix_RotateY(this->initRot.y * (M_PI / 0x8000), MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->initRot.y), MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&D_809E4148, &vec);
|
||||
gerudoGuard =
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_GE3, this->initPos.x + vec.x, this->initPos.y + vec.y,
|
||||
|
|
|
@ -500,8 +500,8 @@ s32 EnDaikuKakariko_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gf
|
|||
switch (limbIndex) {
|
||||
case 8:
|
||||
angle = this->npcInfo.unk_0E;
|
||||
Matrix_RotateX(-(angle.y * (M_PI / 32768.0f)), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(-(angle.x * (M_PI / 32768.0f)), MTXMODE_APPLY);
|
||||
Matrix_RotateX(-BINANG_TO_RAD(angle.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(-BINANG_TO_RAD(angle.x), MTXMODE_APPLY);
|
||||
break;
|
||||
case 15:
|
||||
Matrix_Translate(1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
@ -509,11 +509,11 @@ s32 EnDaikuKakariko_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gf
|
|||
|
||||
if (this->flags & 0x1000) {
|
||||
osSyncPrintf("<%d>\n", this->neckAngle.x);
|
||||
Matrix_RotateX((angle.y + this->neckAngle.y) * (M_PI / 32768.0f), MTXMODE_APPLY);
|
||||
Matrix_RotateZ((angle.x + this->neckAngle.x) * (M_PI / 32768.0f), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(angle.y + this->neckAngle.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(angle.x + this->neckAngle.x), MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_RotateX(angle.y * (M_PI / 32768.0f), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(angle.x * (M_PI / 32768.0f), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(angle.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(angle.x), MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
Matrix_Translate(-1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
|
|
@ -1294,7 +1294,7 @@ void EnDekubaba_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
scale = this->size * 0.01f;
|
||||
Matrix_Translate(this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(this->actor.home.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->actor.home.rot.y), MTXMODE_APPLY);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_dekubaba.c", 2780),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
|
|
@ -573,14 +573,14 @@ s32 EnDu_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
|||
if (limbIndex == 16) {
|
||||
Matrix_Translate(2400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
sp1C = this->unk_1F4.unk_08;
|
||||
Matrix_RotateX(BINANG_TO_RAD(sp1C.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(sp1C.x), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp1C.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(sp1C.x), MTXMODE_APPLY);
|
||||
Matrix_Translate(-2400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
if (limbIndex == 8) {
|
||||
sp1C = this->unk_1F4.unk_0E;
|
||||
Matrix_RotateY(BINANG_TO_RAD(sp1C.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(sp1C.x), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(sp1C.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp1C.x), MTXMODE_APPLY);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -256,7 +256,7 @@ void EnFdFire_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (1) {}
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x8000) * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x8000)), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(((sp88 * -10.0f) * sp80) * (M_PI / 180.0f), MTXMODE_APPLY);
|
||||
scale.x = scale.y = scale.z = this->scale * 0.001f;
|
||||
Matrix_Scale(scale.x, scale.y, scale.z, MTXMODE_APPLY);
|
||||
|
|
|
@ -174,7 +174,7 @@ void EnGanonMant_UpdateStrand(GlobalContext* globalCtx, EnGanonMant* this, Vec3f
|
|||
// Pushes all the strands away from the actor
|
||||
delta.x = 0.0f;
|
||||
delta.z = -30.0f;
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->actor.shape.rot.y), MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(this->actor.shape.rot.y), MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&delta, &posStep);
|
||||
for (i = 0; i < GANON_MANT_NUM_JOINTS; i++) {
|
||||
(pos + i)->x += posStep.x;
|
||||
|
|
|
@ -463,9 +463,9 @@ void EnGoroiwa_UpdateRotation(EnGoroiwa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
Matrix_RotateAxis(rollAngleDiff, &unitRollAxis, MTXMODE_NEW);
|
||||
Matrix_RotateY(this->actor.shape.rot.y * (2.0f * M_PI / 0x10000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(this->actor.shape.rot.x * (2.0f * M_PI / 0x10000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(this->actor.shape.rot.z * (2.0f * M_PI / 0x10000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->actor.shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(this->actor.shape.rot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(this->actor.shape.rot.z), MTXMODE_APPLY);
|
||||
Matrix_Get(&mtx);
|
||||
Matrix_MtxFToYXZRotS(&mtx, &this->actor.shape.rot, 0);
|
||||
}
|
||||
|
|
|
@ -572,13 +572,13 @@ void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
Matrix_Push();
|
||||
if (this->unk_19E & 1) {
|
||||
Matrix_RotateY(this->unk_1A0[0].y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(this->unk_1A0[0].x * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(this->unk_1A0[0].z * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->unk_1A0[0].y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(this->unk_1A0[0].x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(this->unk_1A0[0].z), MTXMODE_APPLY);
|
||||
Matrix_Scale(this->unk_1B4[0].x, this->unk_1B4[0].y, this->unk_1B4[0].z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_1A0[1].y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(this->unk_1A0[1].x * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(this->unk_1A0[1].z * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->unk_1A0[1].y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(this->unk_1A0[1].x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(this->unk_1A0[1].z), MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1064),
|
||||
|
|
|
@ -525,9 +525,9 @@ void EnHonotrap_DrawFlame(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, this->flameScroll, 0x20, 0x80));
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 200, 0, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->actor.shape.rot.y + 0x8000) *
|
||||
(M_PI / 0x8000),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_RotateY(
|
||||
BINANG_TO_RAD((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->actor.shape.rot.y + 0x8000)),
|
||||
MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_honotrap.c", 1024),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffFire1DL);
|
||||
|
|
|
@ -705,7 +705,7 @@ void EnHorseNormal_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Matrix_Translate(clonePos.x, clonePos.y, clonePos.z, MTXMODE_NEW);
|
||||
temp_f0_4 = (1.0f - (distFromGround * 0.01f)) * this->actor.shape.shadowScale;
|
||||
Matrix_Scale(this->actor.scale.x * temp_f0_4, 1.0f, this->actor.scale.z * temp_f0_4, MTXMODE_APPLY);
|
||||
Matrix_RotateY(cloneRotY * (2.0f * M_PI / 0x10000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(cloneRotY), MTXMODE_APPLY);
|
||||
mtx2 = Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_horse_normal.c", 2329);
|
||||
if (mtx2 != NULL) {
|
||||
gSPMatrix(POLY_XLU_DISP++, mtx2, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
|
|
@ -386,9 +386,9 @@ void EnIceHono_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 150, 255, 0);
|
||||
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->actor.shape.rot.y + 0x8000) *
|
||||
(M_PI / 0x8000),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_RotateY(
|
||||
BINANG_TO_RAD((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->actor.shape.rot.y + 0x8000)),
|
||||
MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ice_hono.c", 718),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
|
|
@ -951,14 +951,14 @@ s32 EnIn_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
|||
if (limbIndex == INGO_HEAD_LIMB) {
|
||||
Matrix_Translate(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
sp2C = this->unk_308.unk_08;
|
||||
Matrix_RotateZ(BINANG_TO_RAD(sp2C.x), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(sp2C.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(sp2C.x), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp2C.y), MTXMODE_APPLY);
|
||||
Matrix_Translate(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
if (limbIndex == INGO_CHEST_LIMB) {
|
||||
sp2C = this->unk_308.unk_0E;
|
||||
Matrix_RotateX(BINANG_TO_RAD(sp2C.x), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(sp2C.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp2C.x), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(sp2C.y), MTXMODE_APPLY);
|
||||
}
|
||||
if (limbIndex == INGO_CHEST_LIMB || limbIndex == INGO_LEFT_SHOULDER_LIMB || limbIndex == INGO_RIGHT_SHOULDER_LIMB) {
|
||||
rot->y += Math_SinS(this->unk_330[limbIndex].y) * 200.0f;
|
||||
|
|
|
@ -521,7 +521,7 @@ void EnKarebaba_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->actor.home.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->actor.home.rot.y), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_karebaba.c", 1144),
|
||||
G_MTX_LOAD | G_MTX_NOPUSH | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gDekuBabaBaseLeavesDL);
|
||||
|
|
|
@ -1290,14 +1290,14 @@ s32 EnKo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
|||
}
|
||||
if (limbIndex == 8) {
|
||||
sp40 = this->unk_1E8.unk_0E;
|
||||
Matrix_RotateX(BINANG_TO_RAD(-sp40.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(sp40.x), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(-sp40.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(sp40.x), MTXMODE_APPLY);
|
||||
}
|
||||
if (limbIndex == 15) {
|
||||
Matrix_Translate(1200.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
sp40 = this->unk_1E8.unk_08;
|
||||
Matrix_RotateX(BINANG_TO_RAD(sp40.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(sp40.x), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp40.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(sp40.x), MTXMODE_APPLY);
|
||||
Matrix_Translate(-1200.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
if (limbIndex == 8 || limbIndex == 9 || limbIndex == 12) {
|
||||
|
|
|
@ -182,9 +182,9 @@ void EnLight_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
|
||||
}
|
||||
|
||||
Matrix_RotateY((s16)((Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->actor.shape.rot.y) + 0x8000) *
|
||||
(M_PI / 32768.0f),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_RotateY(
|
||||
BINANG_TO_RAD((s16)((Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->actor.shape.rot.y) + 0x8000)),
|
||||
MTXMODE_APPLY);
|
||||
|
||||
if (this->actor.params & 1) {
|
||||
Matrix_RotateY(M_PI, MTXMODE_APPLY);
|
||||
|
|
|
@ -191,7 +191,7 @@ void EnNwc_DrawChicks(EnNwc* this, GlobalContext* globalCtx) {
|
|||
if ((chick->type != CHICK_NONE) && (chick->floorPoly != NULL)) {
|
||||
func_80038A28(chick->floorPoly, chick->pos.x, chick->floorY, chick->pos.z, &floorMat);
|
||||
Matrix_Put(&floorMat);
|
||||
Matrix_RotateY(chick->rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(chick->rot.y), MTXMODE_APPLY);
|
||||
Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_nwc.c", 388),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
|
|
@ -714,7 +714,7 @@ void EnOkuta_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_okuta.c", 1653);
|
||||
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(this->actor.home.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(this->actor.home.rot.z), 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);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gOctorokProjectileDL);
|
||||
|
|
|
@ -788,7 +788,7 @@ void EnPoField_DrawFlame(EnPoField* this, GlobalContext* globalCtx) {
|
|||
sp4C = this->flameScale * 85000.0f;
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, sp4C);
|
||||
Matrix_Translate(this->flamePosition.x, this->flamePosition.y, this->flamePosition.z, MTXMODE_NEW);
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x8000) * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x8000)), MTXMODE_APPLY);
|
||||
if (this->flameTimer >= 20) {
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
|
||||
Matrix_Scale(this->flameScale, this->flameScale, this->flameScale, MTXMODE_APPLY);
|
||||
|
|
|
@ -760,15 +760,15 @@ s32 EnSa_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
|||
if (limbIndex == 16) {
|
||||
Matrix_Translate(900.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
sp18 = this->unk_1E0.unk_08;
|
||||
Matrix_RotateX(BINANG_TO_RAD(sp18.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(sp18.x), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp18.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(sp18.x), MTXMODE_APPLY);
|
||||
Matrix_Translate(-900.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == 9) {
|
||||
sp18 = this->unk_1E0.unk_0E;
|
||||
Matrix_RotateY(BINANG_TO_RAD(sp18.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(sp18.x), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(sp18.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp18.x), MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (globalCtx->sceneNum == SCENE_SPOT05 && limbIndex == 15) {
|
||||
|
|
|
@ -420,7 +420,7 @@ void EnSsh_Sway(EnSsh* this) {
|
|||
swayVecBase.z = 0.0f;
|
||||
Matrix_Push();
|
||||
Matrix_Translate(this->ceilingPos.x, this->ceilingPos.y, this->ceilingPos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(this->actor.world.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->actor.world.rot.y), MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&swayVecBase, &swayVec);
|
||||
Matrix_Pop();
|
||||
this->actor.shape.rot.z = -(swayAngle * 2);
|
||||
|
|
|
@ -765,7 +765,7 @@ void EnSt_Sway(EnSt* this) {
|
|||
amtToTranslate.z = 0.0f;
|
||||
Matrix_Push();
|
||||
Matrix_Translate(this->ceilingPos.x, this->ceilingPos.y, this->ceilingPos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(this->actor.world.rot.y * (M_PI / 32768.0f), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->actor.world.rot.y), MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&amtToTranslate, &translatedPos);
|
||||
Matrix_Pop();
|
||||
this->actor.shape.rot.z = -(rotAngle * 2);
|
||||
|
|
|
@ -734,7 +734,7 @@ void EnVali_DrawBody(EnVali* this, GlobalContext* globalCtx) {
|
|||
gSPDisplayList(POLY_XLU_DISP++, gBariInnerHoodDL);
|
||||
|
||||
Matrix_Put(&mtx);
|
||||
Matrix_RotateY(-this->actor.shape.rot.y * (M_PI / 32768.0f), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(-this->actor.shape.rot.y), MTXMODE_APPLY);
|
||||
|
||||
cos = Math_CosS(this->actor.shape.rot.y);
|
||||
sin = Math_SinS(this->actor.shape.rot.y);
|
||||
|
|
|
@ -1691,7 +1691,7 @@ void Fishing_UpdateSinkingLure(GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (D_80B7A694 == 5) {
|
||||
Matrix_RotateY(player->actor.shape.rot.y * (M_PI / 32768), MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD(player->actor.shape.rot.y), MTXMODE_NEW);
|
||||
sp94.x = 5.0f;
|
||||
sp94.y = 0.0f;
|
||||
sp94.z = 3.0f;
|
||||
|
@ -1803,7 +1803,7 @@ void Fishing_DrawLureAndLine(GlobalContext* globalCtx, Vec3f* linePos, Vec3f* li
|
|||
sLurePos = sFishingHookedFish->fishMouthPos;
|
||||
|
||||
if ((D_80B7A694 == 5) && (D_80B7E0B6 == 2)) {
|
||||
Matrix_RotateY(player->actor.shape.rot.y * (M_PI / 32768), MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD(player->actor.shape.rot.y), MTXMODE_NEW);
|
||||
posSrc.x = 2.0f;
|
||||
posSrc.y = 0.0f;
|
||||
posSrc.z = 0.0f;
|
||||
|
@ -4274,14 +4274,14 @@ void Fishing_DrawFish(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
|
||||
if (this->unk_150 == 0) {
|
||||
Matrix_RotateY((this->unk_16C * (M_PI / 32768)) - (M_PI / 2), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->unk_16C) - (M_PI / 2), MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, this->unk_16C * 10.0f * 0.01f, MTXMODE_APPLY);
|
||||
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, Fishing_FishOverrideLimbDraw, Fishing_FishPostLimbDraw, this);
|
||||
} else {
|
||||
Matrix_Translate(0.0f, 0.0f, 3000.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_16C * (M_PI / 32768), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->unk_16C), MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, -3000.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateY(-(M_PI / 2), MTXMODE_APPLY);
|
||||
|
||||
|
@ -4452,7 +4452,7 @@ void Fishing_DrawPondProps(GlobalContext* globalCtx) {
|
|||
if (prop->shouldDraw) {
|
||||
Matrix_Translate(prop->pos.x, prop->pos.y, prop->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(prop->scale, 1.0f, prop->scale, MTXMODE_APPLY);
|
||||
Matrix_RotateY(prop->lilyPadAngle * (M_PI / 32768), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(prop->lilyPadAngle), MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, 0.0f, 20.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateY(prop->rotY, MTXMODE_APPLY);
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ void MagicDark_DiamondDraw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
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 * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->actor.shape.rot.y), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_magic_dark.c", 553),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 170, 255, 255, (s32)(this->primAlpha * 0.6f) & 0xFF);
|
||||
|
|
|
@ -913,7 +913,7 @@ void ObjBean_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void ObjBean_DrawSoftSoilSpot(ObjBean* this, GlobalContext* globalCtx) {
|
||||
Matrix_Translate(this->dyna.actor.home.pos.x, this->dyna.actor.home.pos.y, this->dyna.actor.home.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateY(this->dyna.actor.home.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->dyna.actor.home.rot.y), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
|
||||
Gfx_DrawDListOpa(globalCtx, gMagicBeanSoftSoilDL);
|
||||
}
|
||||
|
@ -921,7 +921,7 @@ void ObjBean_DrawSoftSoilSpot(ObjBean* this, GlobalContext* globalCtx) {
|
|||
void ObjBean_DrawBeanstalk(ObjBean* this, GlobalContext* globalCtx) {
|
||||
Matrix_Translate(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 * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->dyna.actor.shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.1f, this->stalkSizeMultiplier, 0.1f, MTXMODE_APPLY);
|
||||
Gfx_DrawDListOpa(globalCtx, gMagicBeanStemDL);
|
||||
}
|
||||
|
|
|
@ -210,9 +210,9 @@ void ObjComb_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y + (118.0f * this->actor.scale.y),
|
||||
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_RotateY(BINANG_TO_RAD(this->actor.shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(this->actor.shape.rot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(this->actor.shape.rot.z), 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);
|
||||
|
||||
|
|
|
@ -293,9 +293,9 @@ void ObjSyokudai_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
|
||||
|
||||
Matrix_Translate(0.0f, 52.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->actor.shape.rot.y + 0x8000) *
|
||||
(M_PI / 0x8000),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_RotateY(
|
||||
BINANG_TO_RAD((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->actor.shape.rot.y + 0x8000)),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_Scale(flameScale, flameScale, flameScale, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_syokudai.c", 745),
|
||||
|
|
|
@ -74,7 +74,7 @@ void EffectSsEnFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
|||
|
||||
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
|
||||
camYaw = (Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x8000);
|
||||
Matrix_RotateY(camYaw * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(camYaw), MTXMODE_APPLY);
|
||||
|
||||
scale = Math_SinS(this->life * 0x333) * (this->rScale * 0.00005f);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
|
@ -127,8 +127,8 @@ void EffectSsEnFire_Update(GlobalContext* globalCtx, u32 index, EffectSs* this)
|
|||
if (this->rBodyPart < 0) {
|
||||
Matrix_Translate(this->actor->world.pos.x, this->actor->world.pos.y, this->actor->world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateY((this->rYaw + this->actor->shape.rot.y) * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX((this->rPitch + this->actor->shape.rot.x) * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->rYaw + this->actor->shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(this->rPitch + this->actor->shape.rot.x), MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&this->vec, &this->pos);
|
||||
} else {
|
||||
if ((this->rFlags & 0x8000)) {
|
||||
|
|
|
@ -111,8 +111,8 @@ void EffectSsEnIce_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);
|
||||
Matrix_RotateY(this->rYaw * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(this->rPitch * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->rYaw), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(this->rPitch), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_en_ice.c", 261),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ void EffectSsFcircle_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
|||
|
||||
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(xzScale, yScale, xzScale, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->rYaw * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->rYaw), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_fcircle.c", 163),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
|
|
|
@ -105,7 +105,7 @@ void EffectSsFireTail_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this)
|
|||
temp1 = fabsf(Math_CosS(yaw));
|
||||
temp2 = Math_SinS(yaw);
|
||||
dist = Math_Vec3f_DistXZ(&scale, &this->vec) / (this->rReg10 * 0.1f);
|
||||
Matrix_RotateY((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x8000) * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) + 0x8000)), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(temp2 * this->rReg2 * dist * (M_PI / 180.0f), MTXMODE_APPLY);
|
||||
temp2 = 1.0f - ((f32)(this->life + 1) / this->rLifespan);
|
||||
temp2 = 1.0f - SQ(temp2);
|
||||
|
|
|
@ -63,8 +63,8 @@ void EffectSsIcePiece_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);
|
||||
Matrix_RotateY(this->rYaw * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateX(this->rPitch * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->rYaw), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(this->rPitch), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_ice_piece.c", 185),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
|
|
Loading…
Add table
Reference in a new issue