From de01bd3dd55d9ce856a23e007d647fc8b7fb3c02 Mon Sep 17 00:00:00 2001 From: Cuyler36 Date: Fri, 20 Jun 2025 12:40:29 -0400 Subject: [PATCH] sys_matrix: Update func calls to use mtx mode defines, hope that's all of them --- src/actor/ac_gyoei_draw.c_inc | 4 ++-- src/actor/ac_insect_draw.c_inc | 6 +++--- src/actor/ac_mural.c | 2 +- src/actor/ac_museum_fish_aroana.c_inc | 2 +- src/actor/ac_museum_fish_big_fish.c_inc | 2 +- src/actor/ac_museum_fish_gupi.c_inc | 2 +- src/actor/ac_museum_fish_ito.c_inc | 2 +- src/actor/ac_museum_fish_kaseki.c_inc | 4 ++-- src/actor/ac_museum_fish_kingyo.c_inc | 2 +- src/actor/ac_museum_fish_kurage.c_inc | 6 +++--- src/actor/ac_museum_fish_namazu.c_inc | 2 +- src/actor/ac_museum_fish_seafish.c_inc | 4 ++-- src/actor/ac_museum_fish_zarigani.c_inc | 2 +- src/actor/ac_museum_insect_chou.c_inc | 2 +- src/actor/ac_museum_insect_dango.c_inc | 4 ++-- src/actor/ac_museum_insect_genji.c_inc | 2 +- src/actor/ac_museum_insect_hachi.c_inc | 2 +- src/actor/ac_museum_insect_okera.c_inc | 2 +- src/actor/ac_museum_insect_semi.c_inc | 2 +- src/actor/ac_museum_insect_tonbo.c_inc | 2 +- src/actor/ac_my_house_draw.c_inc | 2 +- src/actor/ac_my_room_draw.c_inc | 2 +- src/actor/ac_needlework_indoor.c | 4 ++-- src/actor/ac_psnowman.c | 2 +- src/actor/ac_shrine_move.c_inc | 2 +- src/actor/npc/ac_npc_sendo_move.c_inc | 2 +- src/actor/tool/ac_t_cracker.c | 2 +- src/actor/tool/ac_t_flag.c | 2 +- src/actor/tool/ac_t_hanabi.c | 4 ++-- src/actor/tool/ac_t_pistol.c | 2 +- src/actor/tool/ac_t_utiwa.c | 2 +- src/effect/ef_break_axe.c | 2 +- src/effect/ef_effect_lib.c | 2 +- src/effect/ef_goki.c | 2 +- src/effect/ef_ha.c | 4 ++-- src/effect/ef_hanabi_botan1.c | 4 ++-- src/effect/ef_hanabi_botan2.c | 4 ++-- src/effect/ef_hanabi_hoshi.c | 4 ++-- src/effect/ef_hanabi_yanagi.c | 4 ++-- src/effect/ef_kagu_happa.c | 2 +- src/effect/ef_kamifubuki.c | 2 +- src/effect/ef_kangaeru.c | 4 ++-- src/effect/ef_otikomi.c | 4 ++-- src/effect/ef_room_sunshine.c | 2 +- src/effect/ef_room_sunshine_minsect.c | 4 ++-- src/effect/ef_room_sunshine_museum.c | 2 +- src/effect/ef_room_sunshine_police.c | 2 +- src/effect/ef_room_sunshine_posthouse.c | 2 +- src/game/m_catalog_ovl.c | 2 +- src/game/m_map_ovl.c | 2 +- src/game/m_mscore_ovl.c | 2 +- src/game/m_watch_my_step.c | 4 ++-- 52 files changed, 71 insertions(+), 71 deletions(-) diff --git a/src/actor/ac_gyoei_draw.c_inc b/src/actor/ac_gyoei_draw.c_inc index adf3ffba..bc6606fb 100644 --- a/src/actor/ac_gyoei_draw.c_inc +++ b/src/actor/ac_gyoei_draw.c_inc @@ -71,7 +71,7 @@ static void aGYO_actor_draw_fish(GRAPH* graph, aGYO_CTRL_ACTOR* ctrl, GAME* game int frame; Matrix_translate(((ACTOR*)ctrl)->world.position.x, ((ACTOR*)ctrl)->world.position.y - aGYO_hosei_y[ctrl->gyo_type], - ((ACTOR*)ctrl)->world.position.z, 0); + ((ACTOR*)ctrl)->world.position.z, MTX_LOAD); Matrix_mult(&play->billboard_matrix, MTX_MULT); if (ctrl->gyo_type < (aGYO_TYPE_WHALE + 1) && (ctrl->gyo_flags & 0x200) != 0) { @@ -178,7 +178,7 @@ static void aGYO_actor_draw_gyoei(GRAPH* graph, aGYO_CTRL_ACTOR* ctrl, GAME* gam } Matrix_translate(((ACTOR*)ctrl)->world.position.x, ((ACTOR*)ctrl)->world.position.y, - ((ACTOR*)ctrl)->world.position.z, 0); + ((ACTOR*)ctrl)->world.position.z, MTX_LOAD); Matrix_RotateX(angleX, MTX_MULT); Matrix_RotateY(angleY, MTX_MULT); Matrix_scale(((ACTOR*)ctrl)->scale.x * 0.4f, ((ACTOR*)ctrl)->scale.y, ((ACTOR*)ctrl)->scale.z, MTX_MULT); diff --git a/src/actor/ac_insect_draw.c_inc b/src/actor/ac_insect_draw.c_inc index e73fa3b3..14090d9c 100644 --- a/src/actor/ac_insect_draw.c_inc +++ b/src/actor/ac_insect_draw.c_inc @@ -30,13 +30,13 @@ static void aINS_actor_draw_sub(GRAPH* graph, aINS_INSECT_ACTOR* insect, GAME* g Matrix_translate(insect->tools_actor.actor_class.world.position.x, insect->tools_actor.actor_class.world.position.y + 2.0f, - insect->tools_actor.actor_class.world.position.z, 0); + insect->tools_actor.actor_class.world.position.z, MTX_LOAD); Matrix_RotateX(angleX, MTX_MULT); Matrix_RotateY(angleY, MTX_MULT); } else { Matrix_translate(insect->tools_actor.actor_class.world.position.x, insect->tools_actor.actor_class.world.position.y + 2.0f, - insect->tools_actor.actor_class.world.position.z, 0); + insect->tools_actor.actor_class.world.position.z, MTX_LOAD); switch (insect->type) { case aINS_INSECT_TYPE_MOLE_CRICKET: @@ -66,7 +66,7 @@ static void aINS_actor_draw_sub(GRAPH* graph, aINS_INSECT_ACTOR* insect, GAME* g } Matrix_scale(insect->tools_actor.actor_class.scale.x, insect->tools_actor.actor_class.scale.y, - insect->tools_actor.actor_class.scale.z, 1); + insect->tools_actor.actor_class.scale.z, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_XLU_DISP; diff --git a/src/actor/ac_mural.c b/src/actor/ac_mural.c index b103889a..bfaba6d5 100644 --- a/src/actor/ac_mural.c +++ b/src/actor/ac_mural.c @@ -73,7 +73,7 @@ static void Mural_Actor_draw(ACTOR* actorx, GAME* game) { OPEN_DISP(game->graph); Matrix_translate(actorx->world.position.x + x * 24.0f, actorx->world.position.y - y * 24.0f, - actorx->world.position.z, 0); + actorx->world.position.z, MTX_LOAD); Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); /* Segment 8 holds the palette */ diff --git a/src/actor/ac_museum_fish_aroana.c_inc b/src/actor/ac_museum_fish_aroana.c_inc index 26b29bf7..982d6935 100644 --- a/src/actor/ac_museum_fish_aroana.c_inc +++ b/src/actor/ac_museum_fish_aroana.c_inc @@ -264,7 +264,7 @@ BOOL mfish_aroana_before_disp(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int jo joint_rot->x = MIN(MAX(v, DEG2SHORT_ANGLE(-20)), DEG2SHORT_ANGLE(20)); Matrix_scale(1.0f, sin_s(actor->_63A + DEG2SHORT_ANGLE(270)) * 0.05f + 1.0f, - sin_s(actor->_63A + DEG2SHORT_ANGLE(90)) * 0.05f + 1.0f, 1); + sin_s(actor->_63A + DEG2SHORT_ANGLE(90)) * 0.05f + 1.0f, MTX_MULT); } return 1; } diff --git a/src/actor/ac_museum_fish_big_fish.c_inc b/src/actor/ac_museum_fish_big_fish.c_inc index 574aae90..44dc7dda 100644 --- a/src/actor/ac_museum_fish_big_fish.c_inc +++ b/src/actor/ac_museum_fish_big_fish.c_inc @@ -179,7 +179,7 @@ BOOL mfish_bfish_before_disp(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int joi i = joint_rot->x - (actor->_618.z >> 1); joint_rot->x = MY_CLAMP(i, DEG2SHORT_ANGLE(-20), DEG2SHORT_ANGLE(20)); Matrix_scale(1.0f, 1.0f + v * sin_s(actor->_63A + DEG2SHORT_ANGLE(270)), - 1.0f + v * sin_s(actor->_63A + DEG2SHORT_ANGLE(90)), 1); + 1.0f + v * sin_s(actor->_63A + DEG2SHORT_ANGLE(90)), MTX_MULT); } else if (joint_idx == 3 && actor->fish_idx == aGYO_TYPE_ARAPAIMA) { int i = joint_rot->y - actor->_618.z + (int)(actor->_644 * (1.0f + 0.01f * GETREG(TAKREG, 0x16)) * diff --git a/src/actor/ac_museum_fish_gupi.c_inc b/src/actor/ac_museum_fish_gupi.c_inc index a8a36343..08270a15 100644 --- a/src/actor/ac_museum_fish_gupi.c_inc +++ b/src/actor/ac_museum_fish_gupi.c_inc @@ -187,7 +187,7 @@ BOOL mfish_gupi_before_disp(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int join joint_rot->x = MY_CLAMP(s, -DEG2SHORT_ANGLE(30), DEG2SHORT_ANGLE(30)); joint_rot->z += (s16)(actor->_618.x * (-1.3f + GETREG(TAKREG, 0x4e) * 0.1f)); Matrix_scale((GETREG(TAKREG, 0x4b) * 0.01f) * cos_s(actor->_63A) + 0.05f + 1.0f, - (GETREG(TAKREG, 0x4c) * 0.01f) * sin_s(actor->_63A) + 0.1f + 1.0f, 1.0f, 1); + (GETREG(TAKREG, 0x4c) * 0.01f) * sin_s(actor->_63A) + 0.1f + 1.0f, 1.0f, MTX_MULT); } return TRUE; } diff --git a/src/actor/ac_museum_fish_ito.c_inc b/src/actor/ac_museum_fish_ito.c_inc index 09ae251f..e1a86d31 100644 --- a/src/actor/ac_museum_fish_ito.c_inc +++ b/src/actor/ac_museum_fish_ito.c_inc @@ -103,7 +103,7 @@ BOOL mfish_ito_before_disp(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int joint i = joint_rot->x - (actor->_618.z >> 1); joint_rot->x = MY_CLAMP(i, DEG2SHORT_ANGLE(-20), DEG2SHORT_ANGLE(20)); Matrix_scale(1.0f, sin_s(actor->_63A + DEG2SHORT_ANGLE(270)) * 0.05f + 1.0f, - sin_s(actor->_63A + DEG2SHORT_ANGLE(90)) * 0.05f + 1.0f, 1); + sin_s(actor->_63A + DEG2SHORT_ANGLE(90)) * 0.05f + 1.0f, MTX_MULT); } return TRUE; } diff --git a/src/actor/ac_museum_fish_kaseki.c_inc b/src/actor/ac_museum_fish_kaseki.c_inc index 58d8dab5..cf6298e1 100644 --- a/src/actor/ac_museum_fish_kaseki.c_inc +++ b/src/actor/ac_museum_fish_kaseki.c_inc @@ -156,14 +156,14 @@ BOOL mfish_kaseki_before_disp(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int jo i = joint_rot->x + (int)(actor->_618.z * (GETREG(TAKREG, 0x47) * 0.01f + 0.5f)); joint_rot->x = MIN(MAX(i, DEG2SHORT_ANGLE(-10)), DEG2SHORT_ANGLE(10)); Matrix_scale(1.0f, (GETREG(TAKREG, 0x36) * 0.001f + 0.02f) * sin_s(actor->_63A + actor->_63C) + 1.0f, - (GETREG(TAKREG, 0x36) * 0.001f + 0.02f) * sin_s(actor->_63A) + 1.0f, 1); + (GETREG(TAKREG, 0x36) * 0.001f + 0.02f) * sin_s(actor->_63A) + 1.0f, MTX_MULT); } else if (joint_idx == 2) { i = joint_rot->y - (int)(actor->_618.z * (GETREG(TAKREG, 0x46) * 0.01f + 1.25f)); joint_rot->y = MIN(MAX(i, DEG2SHORT_ANGLE(-50)), DEG2SHORT_ANGLE(50)); i = joint_rot->x - (int)(actor->_618.z * (GETREG(TAKREG, 0x48) * 0.01f + 0.25f)); joint_rot->x = MIN(MAX(i, DEG2SHORT_ANGLE(-10)), DEG2SHORT_ANGLE(10)); Matrix_scale(1.0f, (GETREG(TAKREG, 0x37) * 0.001f + 0.045f) * sin_s(actor->_63A + DEG2SHORT_ANGLE(270)) + 1.0f, - (GETREG(TAKREG, 0x37) * 0.001f + 0.045f) * sin_s(actor->_63A + DEG2SHORT_ANGLE(90)) + 1.0f, 1); + (GETREG(TAKREG, 0x37) * 0.001f + 0.045f) * sin_s(actor->_63A + DEG2SHORT_ANGLE(90)) + 1.0f, MTX_MULT); } else if (joint_idx == 3) { i = joint_rot->y - (int)(actor->_618.z * (GETREG(TAKREG, 0x47) * 0.01f + 1.25f)); joint_rot->y = MIN(MAX(i, DEG2SHORT_ANGLE(-50)), DEG2SHORT_ANGLE(50)); diff --git a/src/actor/ac_museum_fish_kingyo.c_inc b/src/actor/ac_museum_fish_kingyo.c_inc index c8724109..e81bd6b7 100644 --- a/src/actor/ac_museum_fish_kingyo.c_inc +++ b/src/actor/ac_museum_fish_kingyo.c_inc @@ -236,7 +236,7 @@ BOOL mfish_kingyo_before_disp(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int jo joint_rot->z += (int)(actor->_618.x * (-1.3f + 0.1f * GETREG(TAKREG, 0x4e))); Matrix_scale(GETREG(TAKREG, 0x4b) * 0.01f * cos_s(actor->_63A) + 0.05f + 1.0f, GETREG(TAKREG, 0x4c) * 0.01f * sin_s(actor->_63A) + 0.1f + 1.0f, - GETREG(TAKREG, 0x4d) * 0.01f * cos_s(actor->_63A) + 0.1f + 1.0f, 1); + GETREG(TAKREG, 0x4d) * 0.01f * cos_s(actor->_63A) + 0.1f + 1.0f, MTX_MULT); } return TRUE; } diff --git a/src/actor/ac_museum_fish_kurage.c_inc b/src/actor/ac_museum_fish_kurage.c_inc index b07dd08d..532f4b4f 100644 --- a/src/actor/ac_museum_fish_kurage.c_inc +++ b/src/actor/ac_museum_fish_kurage.c_inc @@ -199,12 +199,12 @@ void mfish_kurage_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { Matrix_translate(actor->position.x, actor->position.y, actor->position.z, MTX_LOAD); Matrix_rotateXYZ(actor->_60C.x, actor->_60C.y, actor->_60C.z, MTX_MULT); Matrix_scale(actor->init_data.renderScale * a, actor->init_data.renderScale * (1.0f / SQ(a)), - actor->init_data.renderScale * a, 1); + actor->init_data.renderScale * a, MTX_MULT); Matrix_push(); Matrix_RotateY(actor->_63C, MTX_MULT); Matrix_scale((GETREG(TAKREG, 0x4b) * 0.01f + 0.1f) * sin_s(actor->_63C) + 1.0f, 1.0f, - (GETREG(TAKREG, 0x4b) * 0.01f + 0.1f) * cos_s(actor->_63C) + 1.0f, 1); + (GETREG(TAKREG, 0x4b) * 0.01f + 0.1f) * cos_s(actor->_63C) + 1.0f, MTX_MULT); Matrix_RotateY(-actor->_63C, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(NEXT_POLY_XLU_DISP, act_mus_kurage_sakana_body_model); @@ -213,7 +213,7 @@ void mfish_kurage_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { Matrix_RotateY(actor->_63C, MTX_MULT); Matrix_scale((GETREG(TAKREG, 0x4b) * 0.01f + 0.1f) * sin_s(actor->_63C) + 1.0f, 1.0f, - (GETREG(TAKREG, 0x4b) * 0.01f + 0.1f) * cos_s(actor->_63C) + 1.0f, 1); + (GETREG(TAKREG, 0x4b) * 0.01f + 0.1f) * cos_s(actor->_63C) + 1.0f, MTX_MULT); Matrix_RotateY(-actor->_63C, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(NEXT_POLY_XLU_DISP, act_mus_kurage_sakana_foot_model); diff --git a/src/actor/ac_museum_fish_namazu.c_inc b/src/actor/ac_museum_fish_namazu.c_inc index 669d9dfc..4e179c1f 100644 --- a/src/actor/ac_museum_fish_namazu.c_inc +++ b/src/actor/ac_museum_fish_namazu.c_inc @@ -302,7 +302,7 @@ BOOL mfish_namazu_before_disp(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int jo s = joint_rot->z - (s16)(actor->_640 * (0.6f + GETREG(TAKREG, 0x4E) * 0.01f)); joint_rot->z = MY_CLAMP(s, DEG2SHORT_ANGLE(-30), DEG2SHORT_ANGLE(30)); Matrix_scale(1.0f, 1.0f + 0.005f * sin_s(actor->_63A + DEG2SHORT_ANGLE(270)), - 1.0f + 0.005f * sin_s(actor->_63A + DEG2SHORT_ANGLE(90)), 1); + 1.0f + 0.005f * sin_s(actor->_63A + DEG2SHORT_ANGLE(90)), MTX_MULT); } return TRUE; } diff --git a/src/actor/ac_museum_fish_seafish.c_inc b/src/actor/ac_museum_fish_seafish.c_inc index 5b88cb87..8e78da75 100644 --- a/src/actor/ac_museum_fish_seafish.c_inc +++ b/src/actor/ac_museum_fish_seafish.c_inc @@ -220,12 +220,12 @@ BOOL mfish_seafish_before_disp(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int j int s = joint_rot->x + (int)(actor->_618.z * (GETREG(TAKREG, 0x37) * 0.01f + 0.5f)); joint_rot->x = MIN(MAX(s, DEG2SHORT_ANGLE(-15)), DEG2SHORT_ANGLE(15)); Matrix_scale(1.0f, (GETREG(TAKREG, 0x36) * 0.001f + 0.035f) * sin_s(actor->_63A + actor->_63C) + 1.0f, - (GETREG(TAKREG, 0x36) * 0.001f + 0.035f) * sin_s(actor->_63A) + 1.0f, 1); + (GETREG(TAKREG, 0x36) * 0.001f + 0.035f) * sin_s(actor->_63A) + 1.0f, MTX_MULT); } else if (joint_idx == 2) { int v = joint_rot->y - (actor->_618.z << 1); joint_rot->y = MIN(MAX(v, DEG2SHORT_ANGLE(-80)), DEG2SHORT_ANGLE(80)); Matrix_scale(1.0f, sin_s(actor->_63A + DEG2SHORT_ANGLE(270)) * 0.07f + 1.0f, - sin_s(actor->_63A + DEG2SHORT_ANGLE(90)) * 0.07f + 1.0f, 1); + sin_s(actor->_63A + DEG2SHORT_ANGLE(90)) * 0.07f + 1.0f, MTX_MULT); } return TRUE; } diff --git a/src/actor/ac_museum_fish_zarigani.c_inc b/src/actor/ac_museum_fish_zarigani.c_inc index 17489c86..6726620f 100644 --- a/src/actor/ac_museum_fish_zarigani.c_inc +++ b/src/actor/ac_museum_fish_zarigani.c_inc @@ -219,7 +219,7 @@ void mfish_zarigani_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { } OPEN_DISP(gamex->graph); Matrix_translate(actor->position.x + actor->_5AC.x, actor->position.y + actor->_5AC.y, - actor->position.z + actor->_5AC.z, 0); + actor->position.z + actor->_5AC.z, MTX_LOAD); Matrix_rotateXYZ(actor->_60C.x, actor->_60C.y, actor->_60C.z, MTX_MULT); Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z, MTX_MULT); Matrix_rotateXYZ(DEG2SHORT_ANGLE(-90), DEG2SHORT_ANGLE(-180), DEG2SHORT_ANGLE(0), MTX_MULT); diff --git a/src/actor/ac_museum_insect_chou.c_inc b/src/actor/ac_museum_insect_chou.c_inc index b3dba931..fbe94c38 100644 --- a/src/actor/ac_museum_insect_chou.c_inc +++ b/src/actor/ac_museum_insect_chou.c_inc @@ -241,7 +241,7 @@ void minsect_chou_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { Matrix_scale(actor->_14, actor->_14, actor->_14, MTX_MULT); Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, MTX_MULT); Matrix_scale(GETREG(NMREG, 0) * 0.01f + 1.0f, GETREG(NMREG, MTX_MULT) * 0.01f + 1.0f, GETREG(NMREG, 2) * 0.01f + 1.0f, - TRUE); + MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetEnvColor(NEXT_POLY_OPA_DISP, 0, 0xff, 0x9b, 0xff); gSPDisplayList(NEXT_POLY_OPA_DISP, minsect_mdl[actor->_00][(int)actor->_0C]); diff --git a/src/actor/ac_museum_insect_dango.c_inc b/src/actor/ac_museum_insect_dango.c_inc index 9c54755d..f3291615 100644 --- a/src/actor/ac_museum_insect_dango.c_inc +++ b/src/actor/ac_museum_insect_dango.c_inc @@ -184,12 +184,12 @@ void minsect_dango_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, MTX_LOAD); if (actor->_7C) { Matrix_rotateXYZ(DEG2SHORT_ANGLE2(GETREG(NMREG, 5) + 20.f), DEG2SHORT_ANGLE2(GETREG(NMREG, 6)), - DEG2SHORT_ANGLE2(GETREG(NMREG, 7)), TRUE); + DEG2SHORT_ANGLE2(GETREG(NMREG, 7)), MTX_MULT); } Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, MTX_MULT); if (actor->_7C) { Matrix_scale(GETREG(NMREG, 2) * 0.01f + 1.2f, GETREG(NMREG, 3) * 0.01f + 1.2f, GETREG(NMREG, 4) * 0.01f + 1.2f, - TRUE); + MTX_MULT); } Matrix_scale(1.f, 1.f, actor->_58, MTX_MULT); Matrix_scale(actor->_14, actor->_14, actor->_14, MTX_MULT); diff --git a/src/actor/ac_museum_insect_genji.c_inc b/src/actor/ac_museum_insect_genji.c_inc index 9b8bf786..267f6999 100644 --- a/src/actor/ac_museum_insect_genji.c_inc +++ b/src/actor/ac_museum_insect_genji.c_inc @@ -282,7 +282,7 @@ void minsect_genji_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); Matrix_translate(actor->_1C.x + GETREG(NMREG, 0x10) * 0.01f, actor->_1C.y + GETREG(NMREG, 0x11) * 0.01f, - actor->_1C.z + GETREG(NMREG, 0x12) * 0.01f, FALSE); + actor->_1C.z + GETREG(NMREG, 0x12) * 0.01f, MTX_LOAD); Matrix_rotateXYZ(0, 0, actor->_68.z, MTX_MULT); Matrix_rotateXYZ(actor->_7E, 0, 0, MTX_MULT); Matrix_rotateXYZ(DEG2SHORT_ANGLE(110), 0, DEG2SHORT_ANGLE2(180), MTX_MULT); diff --git a/src/actor/ac_museum_insect_hachi.c_inc b/src/actor/ac_museum_insect_hachi.c_inc index 3acbde8c..8e831893 100644 --- a/src/actor/ac_museum_insect_hachi.c_inc +++ b/src/actor/ac_museum_insect_hachi.c_inc @@ -176,7 +176,7 @@ void minsect_hachi_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { Matrix_rotateXYZ(DEG2SHORT_ANGLE(-20), 0, 0, MTX_MULT); Matrix_translate(0.0f, actor->_1C.y, 0.0f, MTX_MULT); Matrix_translate(-GETREG(NMREG, 0x10) * 0.01f, -GETREG(NMREG, 0x11) * 0.01f, -15.f - GETREG(NMREG, 0xe) * 0.01f, - TRUE); + MTX_MULT); Matrix_rotateXYZ(0, actor->_68.y, 0, MTX_MULT); Matrix_translate(GETREG(NMREG, 0x10) * 0.01f, GETREG(NMREG, 0x11) * 0.01f, 15.f + GETREG(NMREG, 0xe) * 0.01f, MTX_MULT); Matrix_rotateXYZ(0, 0, actor->_68.z, MTX_MULT); diff --git a/src/actor/ac_museum_insect_okera.c_inc b/src/actor/ac_museum_insect_okera.c_inc index f59fa126..0e549d0d 100644 --- a/src/actor/ac_museum_insect_okera.c_inc +++ b/src/actor/ac_museum_insect_okera.c_inc @@ -204,7 +204,7 @@ void minsect_okera_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { OPEN_DISP(game->graph); Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, MTX_LOAD); Matrix_rotateXYZ(actor->_68.x, actor->_68.y + (s16)(DEG2SHORT_ANGLE2(GETREG(TAKREG, 4) + 5.f) * sin_s(actor->_76)), - actor->_68.z, TRUE); + actor->_68.z, MTX_MULT); Matrix_rotateXYZ(actor->_78, 0, 0, MTX_MULT); Matrix_scale(actor->_14, actor->_14, actor->_14, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/actor/ac_museum_insect_semi.c_inc b/src/actor/ac_museum_insect_semi.c_inc index 6d86b878..6b5a3dd9 100644 --- a/src/actor/ac_museum_insect_semi.c_inc +++ b/src/actor/ac_museum_insect_semi.c_inc @@ -110,7 +110,7 @@ void minsect_semi_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { OPEN_POLY_XLU_DISP(game->graph); gDPSetEnvColor(POLY_XLU_DISP++, 0xff, 0xff, 0xff, 0xff); Matrix_scale(actor->_58 + (GETREG(NMREG, 1) * 0.01f), GETREG(NMREG, 2) * 0.01f + 1.0f, - GETREG(NMREG, 3) * 0.01f + 1.0f, TRUE); + GETREG(NMREG, 3) * 0.01f + 1.0f, MTX_MULT); gSPMatrix(POLY_XLU_DISP++, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, minsect_mdl[actor->_00][1]); CLOSE_POLY_XLU_DISP(game->graph); diff --git a/src/actor/ac_museum_insect_tonbo.c_inc b/src/actor/ac_museum_insect_tonbo.c_inc index d5ee5c8d..51d65ffc 100644 --- a/src/actor/ac_museum_insect_tonbo.c_inc +++ b/src/actor/ac_museum_insect_tonbo.c_inc @@ -574,7 +574,7 @@ void minsect_tonbo_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { arr[gender].x += g_f[gender] * sin_s(player->actor_class.shape_info.rotation.y); arr[gender].z += g_f[gender] * cos_s(player->actor_class.shape_info.rotation.y); Matrix_translate(actor->_1C.x - arr[gender].x, actor->_58 + (actor->_1C.y - arr[gender].y), - actor->_1C.z - arr[gender].z, FALSE); + actor->_1C.z - arr[gender].z, MTX_LOAD); Matrix_rotateXYZ(actor->_7E, 0, actor->_80, MTX_MULT); Matrix_translate(arr[gender].x, arr[gender].y, arr[gender].z, MTX_MULT); } else { diff --git a/src/actor/ac_my_house_draw.c_inc b/src/actor/ac_my_house_draw.c_inc index 661420d5..51bb7733 100644 --- a/src/actor/ac_my_house_draw.c_inc +++ b/src/actor/ac_my_house_draw.c_inc @@ -252,7 +252,7 @@ static void aMHS_actor_draw(ACTOR* actorx, GAME* game) { cKF_Si3_draw_R_SV((GAME*)play, keyframe, mtx, &aMHS_actor_draw_before, &aMHS_actor_draw_after, my_house); shadow_data_pp = shadow_data[my_house->arg0]; Matrix_translate(my_house->actor_class.world.position.x, my_house->actor_class.world.position.y, - my_house->actor_class.world.position.z, 0); + my_house->actor_class.world.position.z, MTX_LOAD); Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); (*Common_Get(clip).bg_item_clip->draw_shadow_proc)((GAME*)play, shadow_data_pp[my_house->action & 1], 0); aMHS_actor_draw_ta_clr(my_house, (GAME*)play); diff --git a/src/actor/ac_my_room_draw.c_inc b/src/actor/ac_my_room_draw.c_inc index 8e8bbdd4..0aab3226 100644 --- a/src/actor/ac_my_room_draw.c_inc +++ b/src/actor/ac_my_room_draw.c_inc @@ -249,7 +249,7 @@ static void aMR_DrawOneFurniture(FTR_ACTOR* ftr_actor, ACTOR* actorx, GAME* game aFTR_CHECK_INTERACTION(profile->interaction_type, aFTR_INTERACTION_TYPE_FOSSIL) && profile->shape <= aFTR_SHAPE_TYPEB_0) { Matrix_translate(ftr_actor->base_position.x + 2.5f, ftr_actor->base_position.y, - ftr_actor->base_position.z, 1); + ftr_actor->base_position.z, MTX_MULT); } else { Matrix_translate(ftr_actor->base_position.x, ftr_actor->base_position.y, ftr_actor->base_position.z, MTX_MULT); } diff --git a/src/actor/ac_needlework_indoor.c b/src/actor/ac_needlework_indoor.c index 8549933e..936e7480 100644 --- a/src/actor/ac_needlework_indoor.c +++ b/src/actor/ac_needlework_indoor.c @@ -172,7 +172,7 @@ static void aNI_DrawManekin(ACTOR* actorx, GAME* game) { _texture_z_light_fog_prim(game->graph); Matrix_translate(actor->cloth_move_bg[i].pos.x, actor->cloth_move_bg[i].pos.y, - actor->cloth_move_bg[i].pos.z, 0); + actor->cloth_move_bg[i].pos.z, MTX_LOAD); Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); gSPSegment(NEXT_POLY_OPA_DISP, ANIME_1_TXT_SEG, texture); @@ -199,7 +199,7 @@ static void aNI_DrawUmbrella(ACTOR* actorx, GAME* game) { _texture_z_light_fog_prim(game->graph); Matrix_translate(actor->umbrella_move_bg[i].pos.x, actor->umbrella_move_bg[i].pos.y, - actor->umbrella_move_bg[i].pos.z, 0); + actor->umbrella_move_bg[i].pos.z, MTX_LOAD); Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); gSPSegment(NEXT_POLY_OPA_DISP, ANIME_2_TXT_SEG, texture); diff --git a/src/actor/ac_psnowman.c b/src/actor/ac_psnowman.c index 6b348403..5b17bd67 100644 --- a/src/actor/ac_psnowman.c +++ b/src/actor/ac_psnowman.c @@ -138,7 +138,7 @@ static void aPSM_actor_draw(ACTOR* actor, GAME* game) { gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfx++, act_darumaB_model); Matrix_translate(actor->world.position.x, actor->world.position.y + snowman->eye_heigth, actor->world.position.z, - FALSE); + MTX_LOAD); Matrix_RotateX(0xF380, MTX_MULT); Matrix_scale(snowman->head_scale, snowman->head_scale, snowman->head_scale, MTX_MULT); diff --git a/src/actor/ac_shrine_move.c_inc b/src/actor/ac_shrine_move.c_inc index 007af87c..8af9ff05 100644 --- a/src/actor/ac_shrine_move.c_inc +++ b/src/actor/ac_shrine_move.c_inc @@ -106,7 +106,7 @@ static void aSHR_Present_move(aSHR_Present_c* present, SHRINE_ACTOR* shrine, GAM Matrix_push(); Matrix_translate(shrine->structure_class.actor_class.world.position.x + present->trans.x, shrine->structure_class.actor_class.world.position.y + present->trans.y, - shrine->structure_class.actor_class.world.position.z + present->trans.z, 0); + shrine->structure_class.actor_class.world.position.z + present->trans.z, MTX_LOAD); Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); Matrix_get(&handOverItem->tools_class.matrix_work); Matrix_pull(); diff --git a/src/actor/npc/ac_npc_sendo_move.c_inc b/src/actor/npc/ac_npc_sendo_move.c_inc index 7d5e69d7..721a6a2d 100644 --- a/src/actor/npc/ac_npc_sendo_move.c_inc +++ b/src/actor/npc/ac_npc_sendo_move.c_inc @@ -1263,7 +1263,7 @@ static void aSEN_set_matrix(NPC_SENDO_ACTOR* sendo) { if (boat != NULL) { Matrix_translate(boat->actor_class.world.position.x, boat->actor_class.world.position.y, - boat->actor_class.world.position.z, 0); + boat->actor_class.world.position.z, MTX_LOAD); Matrix_RotateY(boat->actor_class.shape_info.rotation.y, MTX_MULT); Matrix_RotateZ(boat->actor_class.shape_info.rotation.z, MTX_MULT); Matrix_translate(-8.0f, 20.0f, -34.0f, MTX_MULT); diff --git a/src/actor/tool/ac_t_cracker.c b/src/actor/tool/ac_t_cracker.c index e1ace214..f850d314 100644 --- a/src/actor/tool/ac_t_cracker.c +++ b/src/actor/tool/ac_t_cracker.c @@ -103,7 +103,7 @@ static void aTCR_actor_draw(ACTOR* actor, GAME* game){ } else{ Matrix_translate(cracker->tools_class.actor_class.world.position.x, cracker->tools_class.actor_class.world.position.y, - cracker->tools_class.actor_class.world.position.z, FALSE); + cracker->tools_class.actor_class.world.position.z, MTX_LOAD); Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); } diff --git a/src/actor/tool/ac_t_flag.c b/src/actor/tool/ac_t_flag.c index 138d8d67..7ba14ddf 100644 --- a/src/actor/tool/ac_t_flag.c +++ b/src/actor/tool/ac_t_flag.c @@ -121,7 +121,7 @@ static void aTFL_actor_draw(ACTOR* actor, GAME* game){ } else{ Matrix_translate(actor->world.position.x, actor->world.position.y, - actor->world.position.z, FALSE); + actor->world.position.z, MTX_LOAD); Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); } diff --git a/src/actor/tool/ac_t_hanabi.c b/src/actor/tool/ac_t_hanabi.c index 6794792b..205b9fe6 100644 --- a/src/actor/tool/ac_t_hanabi.c +++ b/src/actor/tool/ac_t_hanabi.c @@ -102,12 +102,12 @@ static void aTHB_actor_draw(ACTOR* actor, GAME* game) { } else { Matrix_translate(hanabi->tools_class.actor_class.world.position.x, hanabi->tools_class.actor_class.world.position.y, - hanabi->tools_class.actor_class.world.position.z, FALSE); + hanabi->tools_class.actor_class.world.position.z, MTX_LOAD); Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); } Matrix_scale(hanabi->tools_class.actor_class.scale.x, hanabi->tools_class.actor_class.scale.y, - hanabi->tools_class.actor_class.scale.z, TRUE); + hanabi->tools_class.actor_class.scale.z, MTX_MULT); _texture_z_light_fog_prim_npc(graph); gfxp = NOW_POLY_OPA_DISP; diff --git a/src/actor/tool/ac_t_pistol.c b/src/actor/tool/ac_t_pistol.c index ab7912df..1c2824e7 100644 --- a/src/actor/tool/ac_t_pistol.c +++ b/src/actor/tool/ac_t_pistol.c @@ -103,7 +103,7 @@ static void aTPT_actor_draw(ACTOR* actor, GAME* game){ } else{ Matrix_translate(pistol->tools_class.actor_class.world.position.x, pistol->tools_class.actor_class.world.position.y, - pistol->tools_class.actor_class.world.position.z, FALSE); + pistol->tools_class.actor_class.world.position.z, MTX_LOAD); Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); } diff --git a/src/actor/tool/ac_t_utiwa.c b/src/actor/tool/ac_t_utiwa.c index 4e3b1684..20d5877a 100644 --- a/src/actor/tool/ac_t_utiwa.c +++ b/src/actor/tool/ac_t_utiwa.c @@ -99,7 +99,7 @@ static void aTUT_actor_draw(ACTOR* actor, GAME* game) { } else{ Matrix_translate(utiwa->tools_class.actor_class.world.position.x, utiwa->tools_class.actor_class.world.position.y, - utiwa->tools_class.actor_class.world.position.z, FALSE); + utiwa->tools_class.actor_class.world.position.z, MTX_LOAD); Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); } diff --git a/src/effect/ef_break_axe.c b/src/effect/ef_break_axe.c index 09a6bdc1..7626ce75 100644 --- a/src/effect/ef_break_axe.c +++ b/src/effect/ef_break_axe.c @@ -185,7 +185,7 @@ static void eBreak_Axe_dw(eEC_Effect_c* effect, GAME* game) { Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); Matrix_RotateY(effect->effect_specific[4] + (int)(GETREG(TAKREG, 21) * 182.04445f), MTX_MULT); Matrix_rotateXYZ(effect->effect_specific[0] + (int)(GETREG(TAKREG, 20) * 182.04445f), 0, - effect->effect_specific[2] + (int)(GETREG(TAKREG, 22) * 182.04445f), 1); + effect->effect_specific[2] + (int)(GETREG(TAKREG, 22) * 182.04445f), MTX_MULT); Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, 128, 255, 255, 255, a); diff --git a/src/effect/ef_effect_lib.c b/src/effect/ef_effect_lib.c index 42b5b6de..61d47d5f 100644 --- a/src/effect/ef_effect_lib.c +++ b/src/effect/ef_effect_lib.c @@ -98,7 +98,7 @@ static void eEL_AutoMatrixXlu_Offset(GAME* game, xyz_t* pos, xyz_t* scale, xyz_t Matrix_translate(pos->x, pos->y, pos->z, MTX_LOAD); Matrix_mult(&play->billboard_matrix, MTX_MULT); Matrix_translate(offset->x + (f32)(int)GETREG(MYKREG, 24), offset->y + (f32)(int)GETREG(MYKREG, 25), - offset->z + (f32)(int)GETREG(MYKREG, 26), 1); + offset->z + (f32)(int)GETREG(MYKREG, 26), MTX_MULT); adj_scale = 1.0f + ((f32)(int)GETREG(MYKREG, 27)) * 0.01f; Matrix_scale(scale->x * adj_scale, scale->y * adj_scale, scale->z * adj_scale, MTX_MULT); diff --git a/src/effect/ef_goki.c b/src/effect/ef_goki.c index c0c46a03..e4d700f9 100644 --- a/src/effect/ef_goki.c +++ b/src/effect/ef_goki.c @@ -78,7 +78,7 @@ static void eGoki_dw(eEC_Effect_c* effect, GAME* game) { Matrix_translate(effect->position.x + effect->offset.x, effect->position.y, effect->position.z, MTX_LOAD); Matrix_scale(effect->scale.x * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), effect->scale.y * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), - effect->scale.z * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), TRUE); + effect->scale.z * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), MTX_MULT); Matrix_mult(&play->billboard_matrix, MTX_MULT); Matrix_RotateZ(effect->effect_specific[0], MTX_MULT); Evw_Anime_Set(play, ef_goki01_01_evw_anime); diff --git a/src/effect/ef_ha.c b/src/effect/ef_ha.c index b165be1e..1fac96a3 100644 --- a/src/effect/ef_ha.c +++ b/src/effect/ef_ha.c @@ -63,11 +63,11 @@ static void eHA_dw(eEC_Effect_c* effect, GAME* game) { Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); Matrix_mult(&play->billboard_matrix, MTX_MULT); Matrix_translate(effect->offset.x + GETREG(MYKREG, 0x18), effect->offset.y + GETREG(MYKREG, 0x19), - effect->offset.z + GETREG(MYKREG, 0x1a), TRUE); + effect->offset.z + GETREG(MYKREG, 0x1a), MTX_MULT); Matrix_RotateZ(eHA_angle_z_data[v], MTX_MULT); Matrix_scale(effect->scale.x * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), effect->scale.y * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), - effect->scale.z * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), TRUE); + effect->scale.z * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, 128, 255, 255, 255, opacity); gDPSetEnvColor(NEXT_POLY_XLU_DISP, 0, 0, 255, 255); diff --git a/src/effect/ef_hanabi_botan1.c b/src/effect/ef_hanabi_botan1.c index b12b24fa..3c704683 100644 --- a/src/effect/ef_hanabi_botan1.c +++ b/src/effect/ef_hanabi_botan1.c @@ -100,13 +100,13 @@ static void eHanabiBotan1_dw(eEC_Effect_c* effect, GAME* game) { OPEN_DISP(game->graph); _texture_z_light_fog_prim_xlu(game->graph); Matrix_translate(effect->position.x + effect->offset.x, effect->position.y + effect->offset.y, - effect->position.z + effect->offset.z, FALSE); + effect->position.z + effect->offset.z, MTX_LOAD); Matrix_RotateX(DEG2SHORT_ANGLE2(270), MTX_MULT); Matrix_RotateZ(-effect->effect_specific[1], MTX_MULT); Matrix_scale(v, 1.f, 1.f, MTX_MULT); Matrix_RotateZ(effect->effect_specific[1], MTX_MULT); Matrix_scale(v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), - v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), TRUE); + v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, result[4], result[0], result[1], result[2], result[3]); gDPSetEnvColor(NEXT_POLY_XLU_DISP, result[5], result[6], result[7], 255); diff --git a/src/effect/ef_hanabi_botan2.c b/src/effect/ef_hanabi_botan2.c index 1627b150..15b7e51c 100644 --- a/src/effect/ef_hanabi_botan2.c +++ b/src/effect/ef_hanabi_botan2.c @@ -95,14 +95,14 @@ static void eHanabiBotan2_dw(eEC_Effect_c* effect, GAME* game) { OPEN_DISP(game->graph); _texture_z_light_fog_prim_xlu(game->graph); Matrix_translate(effect->position.x + effect->offset.x, effect->position.y + effect->offset.y, - effect->position.z + effect->offset.z, FALSE); + effect->position.z + effect->offset.z, MTX_LOAD); Matrix_RotateX(DEG2SHORT_ANGLE2(270), MTX_MULT); Matrix_RotateZ(-effect->effect_specific[1], MTX_MULT); Matrix_scale(v, 1.f, 1.f, MTX_MULT); Matrix_RotateZ(effect->effect_specific[1], MTX_MULT); Matrix_push(); Matrix_scale(v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), - v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), TRUE); + v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, res1[4], res1[0], res1[1], res1[2], res1[3]); gDPSetEnvColor(NEXT_POLY_XLU_DISP, res1[5], res1[6], res1[7], res1[8]); diff --git a/src/effect/ef_hanabi_hoshi.c b/src/effect/ef_hanabi_hoshi.c index c8a38789..d77e3e19 100644 --- a/src/effect/ef_hanabi_hoshi.c +++ b/src/effect/ef_hanabi_hoshi.c @@ -100,13 +100,13 @@ static void eHanabiHoshi_dw(eEC_Effect_c* effect, GAME* game) { OPEN_DISP(game->graph); _texture_z_light_fog_prim_xlu(game->graph); Matrix_translate(effect->position.x + effect->offset.x, effect->position.y + effect->offset.y, - effect->position.z + effect->offset.z, FALSE); + effect->position.z + effect->offset.z, MTX_LOAD); Matrix_RotateX(DEG2SHORT_ANGLE2(270), MTX_MULT); Matrix_RotateZ(-effect->effect_specific[1], MTX_MULT); Matrix_scale(v, 1.f, 1.f, MTX_MULT); Matrix_RotateZ(effect->effect_specific[1], MTX_MULT); Matrix_scale(v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), - v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), TRUE); + v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, result[4], result[0], result[1], result[2], result[3]); gDPSetEnvColor(NEXT_POLY_XLU_DISP, result[5], result[6], result[7], 255); diff --git a/src/effect/ef_hanabi_yanagi.c b/src/effect/ef_hanabi_yanagi.c index 4e7c4820..952fe7ee 100644 --- a/src/effect/ef_hanabi_yanagi.c +++ b/src/effect/ef_hanabi_yanagi.c @@ -91,14 +91,14 @@ static void eHanabiYanagi_dw(eEC_Effect_c* effect, GAME* game) { OPEN_DISP(game->graph); _texture_z_light_fog_prim_xlu(game->graph); Matrix_translate(effect->position.x + effect->offset.x, effect->position.y + effect->offset.y, - effect->position.z + effect->offset.z, FALSE); + effect->position.z + effect->offset.z, MTX_LOAD); Matrix_RotateX(DEG2SHORT_ANGLE2(270), MTX_MULT); Matrix_RotateZ(-effect->effect_specific[1], MTX_MULT); Matrix_scale(v, 1.f, 1.f, MTX_MULT); Matrix_RotateZ(effect->effect_specific[1], MTX_MULT); Matrix_push(); Matrix_scale(v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), - v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), TRUE); + v2 * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, res1[4], res1[0], res1[1], res1[2], res1[3]); gDPSetEnvColor(NEXT_POLY_XLU_DISP, res1[5], res1[6], res1[7], res1[8]); diff --git a/src/effect/ef_kagu_happa.c b/src/effect/ef_kagu_happa.c index e447b978..c7a7e7cd 100644 --- a/src/effect/ef_kagu_happa.c +++ b/src/effect/ef_kagu_happa.c @@ -72,7 +72,7 @@ static void eKagu_Happa_dw(eEC_Effect_c* effect, GAME* game) { } Matrix_scale(effect->scale.x * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), effect->scale.y * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), - effect->scale.z * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), TRUE); + effect->scale.z * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(NEXT_POLY_OPA_DISP, aMR_IconNo2Gfx1(effect->arg0)); gSPDisplayList(NEXT_POLY_OPA_DISP, aMR_IconNo2Gfx2(effect->arg0)); diff --git a/src/effect/ef_kamifubuki.c b/src/effect/ef_kamifubuki.c index fed0c3d4..5ec2262b 100644 --- a/src/effect/ef_kamifubuki.c +++ b/src/effect/ef_kamifubuki.c @@ -77,7 +77,7 @@ static void eKamifubuki_one_draw(eEC_Effect_c* effect, xyz_t* pos, GAME* game) { Matrix_translate(pos->x, pos->y, pos->z, MTX_LOAD); Matrix_RotateVector(effect->effect_specific[0], &effect->offset, MTX_MULT); Matrix_scale((GETREG(MYKREG, 0x1b) * 0.01f + 1.f) * 0.003f, (GETREG(MYKREG, 0x1b) * 0.01f + 1.f) * 0.003f, - (GETREG(MYKREG, 0x1b) * 0.01f + 1.f) * 0.003f, TRUE); + (GETREG(MYKREG, 0x1b) * 0.01f + 1.f) * 0.003f, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(NEXT_POLY_XLU_DISP, ef_kamihubuki01_00_model); CLOSE_DISP(game->graph); diff --git a/src/effect/ef_kangaeru.c b/src/effect/ef_kangaeru.c index c5162057..fd4d9d4c 100644 --- a/src/effect/ef_kangaeru.c +++ b/src/effect/ef_kangaeru.c @@ -103,7 +103,7 @@ static void eKG_dw(eEC_Effect_c* effect, GAME* game) { Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); Matrix_mult(&play->billboard_matrix, MTX_MULT); Matrix_translate(effect->offset.x + GETREG(MYKREG, 0x18), effect->offset.y - 6.0f + GETREG(MYKREG, 0x19), - effect->offset.z + 30.0f + GETREG(MYKREG, 0x1a), TRUE); + effect->offset.z + 30.0f + GETREG(MYKREG, 0x1a), MTX_MULT); Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); Matrix_translate(-475.0f, 950.0f, 0.0f, MTX_MULT); Matrix_RotateZ(effect->effect_specific[1], MTX_MULT); @@ -115,7 +115,7 @@ static void eKG_dw(eEC_Effect_c* effect, GAME* game) { Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); Matrix_mult(&play->billboard_matrix, MTX_MULT); Matrix_translate(effect->offset.x + GETREG(MYKREG, 0x18), effect->offset.y - 6.0f + GETREG(MYKREG, 0x19), - effect->offset.z + 30.0f + GETREG(MYKREG, 0x1a), TRUE); + effect->offset.z + 30.0f + GETREG(MYKREG, 0x1a), MTX_MULT); Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); Matrix_translate(475.0f, 0.0f, 0.0f, MTX_MULT); Matrix_RotateZ(effect->effect_specific[2], MTX_MULT); diff --git a/src/effect/ef_otikomi.c b/src/effect/ef_otikomi.c index 0188ec01..d80939e5 100644 --- a/src/effect/ef_otikomi.c +++ b/src/effect/ef_otikomi.c @@ -105,7 +105,7 @@ static void eOMN_dw(eEC_Effect_c* effect, GAME* game) { Matrix_translate(effect->position.x, effect->position.y + 4.0f, effect->position.z, MTX_LOAD); Matrix_mult(&play->billboard_matrix, MTX_MULT); Matrix_translate(effect->offset.x + GETREG(MYKREG, 0x18), effect->offset.y + GETREG(MYKREG, 0x19), - effect->offset.z + 2.0f + GETREG(MYKREG, 0x1a), TRUE); + effect->offset.z + 2.0f + GETREG(MYKREG, 0x1a), MTX_MULT); if (GETREG(MYKREG, 0)) { Matrix_RotateZ(-effect->effect_specific[0], MTX_MULT); Matrix_scale(scale_m * 1.025f, scale_m, scale_m, MTX_MULT); @@ -123,7 +123,7 @@ static void eOMN_dw(eEC_Effect_c* effect, GAME* game) { Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); Matrix_mult(&play->billboard_matrix, MTX_MULT); Matrix_translate(effect->offset.x + GETREG(MYKREG, 0x18), effect->offset.y + GETREG(MYKREG, 0x19), - effect->offset.z + GETREG(MYKREG, 0x1a), TRUE); + effect->offset.z + GETREG(MYKREG, 0x1a), MTX_MULT); Matrix_scale(0.015f, scale_y, 0.01f, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/effect/ef_room_sunshine.c b/src/effect/ef_room_sunshine.c index ad04d292..31290341 100644 --- a/src/effect/ef_room_sunshine.c +++ b/src/effect/ef_room_sunshine.c @@ -141,7 +141,7 @@ static void setup_mode_Ef_Room_Sunshine(ACTOR* actor, GAME_PLAY* play) { OPEN_DISP(graph); Matrix_translate(sunshine->actor_class.world.position.x, 0.1f + sunshine->actor_class.world.position.y, - sunshine->actor_class.world.position.z, 0); + sunshine->actor_class.world.position.z, MTX_LOAD); Matrix_scale(sunshine->actor_class.scale.x, sunshine->actor_class.scale.y, sunshine->actor_class.scale.z, MTX_MULT); gDPPipeSync(NEXT_POLY_XLU_DISP); diff --git a/src/effect/ef_room_sunshine_minsect.c b/src/effect/ef_room_sunshine_minsect.c index 56ca34f9..40619d26 100644 --- a/src/effect/ef_room_sunshine_minsect.c +++ b/src/effect/ef_room_sunshine_minsect.c @@ -148,7 +148,7 @@ static void setup_mode_Ef_Room_Sunshine_Minsect(ACTOR* actor, GAME_PLAY* play) { OPEN_DISP(graph); Matrix_translate(sunshine->actor_class.world.position.x, sunshine->actor_class.world.position.y, - sunshine->actor_class.world.position.z, 0); + sunshine->actor_class.world.position.z, MTX_LOAD); Matrix_scale(sunshine->actor_class.scale.x, sunshine->actor_class.scale.y, sunshine->actor_class.scale.z, MTX_MULT); gDPPipeSync(NEXT_POLY_XLU_DISP); @@ -177,7 +177,7 @@ static void setup_mode_Ef_Room_Sunshine_Minsect_decal(ACTOR* actor, GAME_PLAY* p OPEN_DISP(graph); Matrix_translate(sunshine->actor_class.world.position.x, sunshine->actor_class.world.position.y, - sunshine->actor_class.world.position.z, 0); + sunshine->actor_class.world.position.z, MTX_LOAD); Matrix_scale(sunshine->actor_class.scale.x, sunshine->actor_class.scale.y, sunshine->actor_class.scale.z, MTX_MULT); gDPPipeSync(NEXT_POLY_OPA_DISP); diff --git a/src/effect/ef_room_sunshine_museum.c b/src/effect/ef_room_sunshine_museum.c index 73f96c1c..c5e49787 100644 --- a/src/effect/ef_room_sunshine_museum.c +++ b/src/effect/ef_room_sunshine_museum.c @@ -145,7 +145,7 @@ void setup_mode_Ef_Room_Sunshine_Museum(ACTOR* actor, GAME_PLAY* play){ OPEN_DISP(graph); Matrix_translate(sunshine->actor_class.world.position.x + GETREG(TAKREG,20), sunshine->actor_class.world.position.y + GETREG(TAKREG,21), - sunshine->actor_class.world.position.z + GETREG(TAKREG,22), 0); + sunshine->actor_class.world.position.z + GETREG(TAKREG,22), MTX_LOAD); Matrix_scale(sunshine->actor_class.scale.x, sunshine->actor_class.scale.y, sunshine->actor_class.scale.z, MTX_MULT); gDPPipeSync(NEXT_POLY_XLU_DISP); diff --git a/src/effect/ef_room_sunshine_police.c b/src/effect/ef_room_sunshine_police.c index 846d4ca4..619988b7 100644 --- a/src/effect/ef_room_sunshine_police.c +++ b/src/effect/ef_room_sunshine_police.c @@ -151,7 +151,7 @@ static void setup_mode_Ef_Room_Sunshine_Police(ACTOR* actor, GAME_PLAY* play) { OPEN_DISP(graph); Matrix_translate(sunshine->actor_class.world.position.x, sunshine->actor_class.world.position.y, - sunshine->actor_class.world.position.z, 0); + sunshine->actor_class.world.position.z, MTX_LOAD); Matrix_scale(sunshine->actor_class.scale.x, sunshine->actor_class.scale.y, sunshine->actor_class.scale.z, MTX_MULT); gDPPipeSync(NEXT_POLY_XLU_DISP); diff --git a/src/effect/ef_room_sunshine_posthouse.c b/src/effect/ef_room_sunshine_posthouse.c index 37c7b7d3..2773dabe 100644 --- a/src/effect/ef_room_sunshine_posthouse.c +++ b/src/effect/ef_room_sunshine_posthouse.c @@ -143,7 +143,7 @@ static void setup_mode_Ef_Room_Sunshine_Posthouse(ACTOR* actor, GAME_PLAY* play) OPEN_DISP(graph); Matrix_translate(sunshine->actor_class.world.position.x, sunshine->actor_class.world.position.y, - sunshine->actor_class.world.position.z, 0); + sunshine->actor_class.world.position.z, MTX_LOAD); Matrix_scale(sunshine->actor_class.scale.x, sunshine->actor_class.scale.y, sunshine->actor_class.scale.z, MTX_MULT); gDPPipeSync(NEXT_POLY_XLU_DISP); diff --git a/src/game/m_catalog_ovl.c b/src/game/m_catalog_ovl.c index 919509ba..38c01945 100644 --- a/src/game/m_catalog_ovl.c +++ b/src/game/m_catalog_ovl.c @@ -886,7 +886,7 @@ static void mCL_item_draw(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* gam Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); Matrix_translate((-143.0f + pos_x) + 58.0f + item->ftr_actor.position.x, (97.0f + pos_y) + item->pos_y, 0.0f, - 1); + MTX_MULT); Matrix_scale(item->scale, item->scale, 1.0f, MTX_MULT); OPEN_DISP(graph); diff --git a/src/game/m_map_ovl.c b/src/game/m_map_ovl.c index dd3d3b2c..78338712 100644 --- a/src/game/m_map_ovl.c +++ b/src/game/m_map_ovl.c @@ -747,7 +747,7 @@ static void mMP_set_house_dl(GRAPH* graph, mMP_Ovl_c* map_ovl, f32 pos_x, f32 po for (i = 0; i < label_info->label_cnt; i++) { Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); Matrix_translate(temp_x + offset_x[(*resident_p)->house_idx % 3], - base_y + offset_y[(*resident_p)->house_idx / 3], 140.0f, 1); + base_y + offset_y[(*resident_p)->house_idx / 3], 140.0f, MTX_MULT); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfx++, kan_win_npc2T_table[(*resident_p)->house_layer]); diff --git a/src/game/m_mscore_ovl.c b/src/game/m_mscore_ovl.c index 01fa060f..ac70de5a 100644 --- a/src/game/m_mscore_ovl.c +++ b/src/game/m_mscore_ovl.c @@ -480,7 +480,7 @@ static void mMS_set_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* game) note_moji_p = ¬e_moji[mscore_ovl->melody[i]]; Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); Matrix_translate(base_x + note_moji_p->frame->offset[0], - base_y + note_moji_p->frame->offset[1] + note_moji_p->ofs_y, 0.0f, 1); + base_y + note_moji_p->frame->offset[1] + note_moji_p->ofs_y, 0.0f, MTX_MULT); if (i == cursor_idx) { Matrix_scale(scale, scale, 1.0f, MTX_MULT); diff --git a/src/game/m_watch_my_step.c b/src/game/m_watch_my_step.c index 3045e85e..66414ac0 100644 --- a/src/game/m_watch_my_step.c +++ b/src/game/m_watch_my_step.c @@ -222,7 +222,7 @@ extern void watch_my_step_draw(GAME_PLAY* play) { Matrix_push(); Matrix_scale(S_watch_my_step.opacity * (S_watch_my_step.scale * 0.75f + 0.25f), S_watch_my_step.opacity * (S_watch_my_step.scale * 0.23333335f + 0.76666665f), - S_watch_my_step.opacity, 1); + S_watch_my_step.opacity, MTX_MULT); gSPMatrix(font_gfx++, _Matrix_to_Mtx_new(g), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Matrix_pull(); @@ -254,7 +254,7 @@ extern void watch_my_step_draw(GAME_PLAY* play) { Matrix_push(); Matrix_scale(S_watch_my_step.scale * 0.75f + 0.25f, S_watch_my_step.scale * 0.23333335f + 0.76666665f, - 1.0f, 1); + 1.0f, MTX_MULT); gSPMatrix(font_gfx++, _Matrix_to_Mtx_new(g), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Matrix_pull();