From c3581b4f3d9a33d0941cce386949a44ab9b9574a Mon Sep 17 00:00:00 2001 From: Cuyler36 Date: Fri, 20 Jun 2025 12:09:10 -0400 Subject: [PATCH] sys_matrix: Create defines for matrix load & mult --- include/sys_matrix.h | 3 + src/actor/ac_airplane.c | 6 +- src/actor/ac_animal_logo.c | 12 +-- src/actor/ac_arrange_room.c | 8 +- src/actor/ac_ball.c | 4 +- src/actor/ac_balloon.c | 12 +-- src/actor/ac_boat.c | 6 +- src/actor/ac_count02_draw.c_inc | 4 +- src/actor/ac_douzou_draw.c_inc | 4 +- src/actor/ac_douzou_move.c_inc | 2 +- src/actor/ac_dump.c | 4 +- src/actor/ac_effectbg.c | 4 +- src/actor/ac_fallSESW_draw.c_inc | 14 ++-- src/actor/ac_fallS_draw.c_inc | 8 +- src/actor/ac_field_draw.c | 4 +- src/actor/ac_fuusen.c | 10 +-- src/actor/ac_garagara.c | 4 +- src/actor/ac_gyo_kage.c | 8 +- src/actor/ac_gyo_release.c | 10 +-- src/actor/ac_gyoei_draw.c_inc | 12 +-- src/actor/ac_handOverItem_draw.c_inc | 10 +-- src/actor/ac_house_clock.c | 16 ++-- src/actor/ac_house_goki.c | 8 +- src/actor/ac_insect_draw.c_inc | 26 +++--- src/actor/ac_kamakura_indoor.c | 4 +- src/actor/ac_lighthouse_switch.c | 12 +-- src/actor/ac_mbg.c | 4 +- src/actor/ac_mikanbox_draw.c_inc | 4 +- src/actor/ac_misin.c | 22 +++--- src/actor/ac_mural.c | 2 +- src/actor/ac_museum_fish.c | 10 +-- src/actor/ac_museum_fish_aroana.c_inc | 10 +-- src/actor/ac_museum_fish_base.c_inc | 14 ++-- src/actor/ac_museum_fish_bass.c_inc | 14 ++-- src/actor/ac_museum_fish_big_fish.c_inc | 10 +-- src/actor/ac_museum_fish_dojou.c_inc | 12 +-- src/actor/ac_museum_fish_donko.c_inc | 12 +-- src/actor/ac_museum_fish_gupi.c_inc | 12 +-- src/actor/ac_museum_fish_hasu.c_inc | 20 ++--- src/actor/ac_museum_fish_ito.c_inc | 10 +-- src/actor/ac_museum_fish_kaseki.c_inc | 8 +- src/actor/ac_museum_fish_kingyo.c_inc | 12 +-- src/actor/ac_museum_fish_koi.c_inc | 14 ++-- src/actor/ac_museum_fish_kurage.c_inc | 12 +-- src/actor/ac_museum_fish_medaka.c_inc | 12 +-- src/actor/ac_museum_fish_namazu.c_inc | 10 +-- src/actor/ac_museum_fish_seafish.c_inc | 8 +- src/actor/ac_museum_fish_small_fish.c_inc | 12 +-- src/actor/ac_museum_fish_tai.c_inc | 8 +- src/actor/ac_museum_fish_unagi.c_inc | 8 +- src/actor/ac_museum_fish_zarigani.c_inc | 8 +- src/actor/ac_museum_indoor.c | 6 +- src/actor/ac_museum_insect.c | 4 +- src/actor/ac_museum_insect_base.c_inc | 16 ++-- src/actor/ac_museum_insect_batta.c_inc | 10 +-- src/actor/ac_museum_insect_chou.c_inc | 8 +- src/actor/ac_museum_insect_dango.c_inc | 8 +- src/actor/ac_museum_insect_genji.c_inc | 14 ++-- src/actor/ac_museum_insect_goki.c_inc | 8 +- src/actor/ac_museum_insect_hachi.c_inc | 20 ++--- src/actor/ac_museum_insect_ka.c_inc | 6 +- src/actor/ac_museum_insect_kabuto.c_inc | 10 +-- src/actor/ac_museum_insect_kumo.c_inc | 44 +++++------ src/actor/ac_museum_insect_kuwagata.c_inc | 14 ++-- src/actor/ac_museum_insect_mino.c_inc | 46 +++++------ src/actor/ac_museum_insect_okera.c_inc | 6 +- src/actor/ac_museum_insect_semi.c_inc | 8 +- src/actor/ac_museum_insect_tentou.c_inc | 10 +-- src/actor/ac_museum_insect_tonbo.c_inc | 10 +-- src/actor/ac_museum_picture.c | 4 +- src/actor/ac_my_house_draw.c_inc | 8 +- src/actor/ac_my_indoor.c | 20 ++--- src/actor/ac_my_room_draw.c_inc | 42 +++++----- src/actor/ac_my_room_move.c_inc | 6 +- src/actor/ac_needlework_indoor.c | 4 +- src/actor/ac_needlework_shop_draw.c_inc | 2 +- src/actor/ac_psnowman.c | 4 +- src/actor/ac_radio_move.c_inc | 2 +- src/actor/ac_shop_goods.c | 12 +-- src/actor/ac_shop_indoor.c | 24 +++--- src/actor/ac_shop_manekin.c | 4 +- src/actor/ac_shop_umbrella.c | 4 +- src/actor/ac_shrine_move.c_inc | 2 +- src/actor/ac_sign.c | 4 +- src/actor/ac_snowman.c | 4 +- src/actor/ac_station_draw.c_inc | 4 +- src/actor/ac_tama_draw.c_inc | 2 +- src/actor/ac_train0_draw.c_inc | 4 +- src/actor/ac_train_window.c | 4 +- src/actor/ac_uki_draw.c_inc | 22 +++--- src/actor/ac_weather_rain.c | 6 +- src/actor/npc/ac_npc_draw.c_inc | 16 ++-- src/actor/npc/ac_npc_sendo_move.c_inc | 8 +- src/actor/tool/ac_t_cracker.c | 6 +- src/actor/tool/ac_t_flag.c | 6 +- src/actor/tool/ac_t_hanabi.c | 2 +- src/actor/tool/ac_t_keitai.c | 6 +- src/actor/tool/ac_t_npc_sao.c | 8 +- src/actor/tool/ac_t_pistol.c | 6 +- src/actor/tool/ac_t_tama.c | 10 +-- src/actor/tool/ac_t_tumbler.c | 6 +- src/actor/tool/ac_t_umbrella.c | 8 +- src/actor/tool/ac_t_utiwa.c | 4 +- src/bg_item/bg_item_common.c_inc | 24 +++--- src/bg_item/bg_police_item_move.c_inc | 4 +- src/bg_item/bg_post_item.c | 4 +- src/c_keyframe.c | 4 +- src/effect/ef_ami_mizu.c | 4 +- src/effect/ef_anahikari.c | 4 +- src/effect/ef_break_axe.c | 6 +- src/effect/ef_car_blight.c | 4 +- src/effect/ef_coin.c | 20 ++--- src/effect/ef_dig_hole.c | 8 +- src/effect/ef_effect_lib.c | 6 +- src/effect/ef_flash.c | 6 +- src/effect/ef_footprint.c | 10 +-- src/effect/ef_goki.c | 6 +- src/effect/ef_ha.c | 6 +- src/effect/ef_hanabi_botan1.c | 8 +- src/effect/ef_hanabi_botan2.c | 10 +-- src/effect/ef_hanabi_hoshi.c | 8 +- src/effect/ef_hanabi_yanagi.c | 10 +-- src/effect/ef_impact_star.c | 8 +- src/effect/ef_kagu_happa.c | 6 +- src/effect/ef_kamifubuki.c | 10 +-- src/effect/ef_kangaeru.c | 20 ++--- src/effect/ef_kasamizu.c | 2 +- src/effect/ef_kasamizutama.c | 4 +- src/effect/ef_kaze.c | 12 +-- src/effect/ef_kaze_happa.c | 12 +-- src/effect/ef_kikuzu.c | 8 +- src/effect/ef_killer.c | 6 +- src/effect/ef_konpu.c | 8 +- src/effect/ef_kpun.c | 10 +-- src/effect/ef_make_hem.c | 14 ++-- src/effect/ef_motiyuge.c | 8 +- src/effect/ef_namida.c | 8 +- src/effect/ef_neboke_awa.c | 8 +- src/effect/ef_night13_moon.c | 16 ++-- src/effect/ef_night15_moon.c | 16 ++-- src/effect/ef_ongen.c | 6 +- src/effect/ef_otikomi.c | 20 ++--- src/effect/ef_pun_yuge.c | 10 +-- src/effect/ef_reset_hole.c | 4 +- src/effect/ef_room_sunshine.c | 2 +- src/effect/ef_room_sunshine_minsect.c | 8 +- src/effect/ef_room_sunshine_museum.c | 4 +- src/effect/ef_room_sunshine_police.c | 2 +- src/effect/ef_room_sunshine_posthouse.c | 2 +- src/effect/ef_sandsplash.c | 6 +- src/effect/ef_shooting.c | 12 +-- src/effect/ef_shooting_kira.c | 8 +- src/effect/ef_siawase_hana_ch.c | 8 +- src/effect/ef_situren.c | 8 +- src/effect/ef_slip_footprint.c | 10 +-- src/effect/ef_tamaire.c | 12 +-- src/effect/ef_tape.c | 14 ++-- src/effect/ef_tent_lamp.c | 4 +- src/effect/ef_tumble_bodyprint.c | 10 +-- src/effect/ef_turi_hamon.c | 4 +- src/effect/ef_turi_hane0.c | 4 +- src/effect/ef_turi_hane1.c | 4 +- src/effect/ef_turi_suiteki.c | 4 +- src/effect/ef_turn_footprint.c | 10 +-- src/effect/ef_young_tree.c | 18 ++--- src/effect/ef_yukidaruma.c | 8 +- src/effect/ef_yukihane.c | 6 +- src/furniture/ac_ike_tent_fire01.c | 8 +- src/furniture/ac_ike_tent_fire02.c | 8 +- src/furniture/ac_nog_pawnB.c | 8 +- src/furniture/ac_nog_pawnW.c | 8 +- src/furniture/ac_radio_test.c | 2 +- src/furniture/ac_sugi_torch.c | 8 +- src/furniture/ac_sum_blue_clk.c | 28 +++---- src/furniture/ac_sum_hal_clk01.c | 20 ++--- src/furniture/ac_sum_log_hatoclk.c | 20 ++--- src/furniture/ac_sum_x_clk.c | 28 +++---- src/game/m_actor.c | 2 +- src/game/m_actor_shadow.c | 20 ++--- src/game/m_address_ovl.c | 8 +- src/game/m_bank_ovl.c | 4 +- src/game/m_banti.c | 8 +- src/game/m_birthday_ovl.c | 4 +- src/game/m_board_ovl.c | 8 +- src/game/m_calendar_ovl_draw.c_inc | 26 +++--- src/game/m_catalog_ovl.c | 34 ++++---- src/game/m_choice_draw.c_inc | 6 +- src/game/m_collision_bg_line.c_inc | 6 +- src/game/m_cpmail_ovl.c | 6 +- src/game/m_cporiginal_ovl.c | 20 ++--- src/game/m_cpwarning_ovl.c | 8 +- src/game/m_debug_display.c | 10 +-- src/game/m_design_ovl.c | 96 +++++++++++------------ src/game/m_diary_ovl.c | 14 ++-- src/game/m_editEndChk_ovl.c | 14 ++-- src/game/m_editor_ovl.c | 24 +++--- src/game/m_gba_ovl.c | 14 ++-- src/game/m_hand_ovl.c | 12 +-- src/game/m_haniwaPortrait_ovl.c | 2 +- src/game/m_haniwa_ovl.c | 4 +- src/game/m_hboard_ovl.c | 4 +- src/game/m_inventory_ovl.c | 28 +++---- src/game/m_ledit_ovl.c | 8 +- src/game/m_lib.c | 2 +- src/game/m_lights.c | 4 +- src/game/m_mailbox_ovl.c | 6 +- src/game/m_map_ovl.c | 24 +++--- src/game/m_mscore_ovl.c | 28 +++---- src/game/m_msg_draw_window.c_inc | 4 +- src/game/m_music_ovl.c | 20 ++--- src/game/m_needlework_ovl.c | 22 +++--- src/game/m_notice_ovl.c | 14 ++-- src/game/m_passwordChk_ovl.c | 4 +- src/game/m_passwordMake_ovl.c | 4 +- src/game/m_player_common.c_inc | 8 +- src/game/m_player_draw.c_inc | 12 +-- src/game/m_player_item.c_inc | 2 +- src/game/m_player_item_balloon.c_inc | 12 +-- src/game/m_player_item_common.c_inc | 2 +- src/game/m_player_item_net.c_inc | 4 +- src/game/m_player_item_rod.c_inc | 2 +- src/game/m_player_item_windmill.c_inc | 4 +- src/game/m_repay_ovl.c | 4 +- src/game/m_roll_lib.c | 14 ++-- src/game/m_submenu_ovl.c | 6 +- src/game/m_tag_ovl.c | 18 ++--- src/game/m_timeIn_ovl.c | 12 +-- src/game/m_view.c | 14 ++-- src/game/m_warning_ovl.c | 8 +- src/game/m_watch_my_step.c | 16 ++-- src/system/sys_matrix.c | 16 ++-- 231 files changed, 1177 insertions(+), 1178 deletions(-) diff --git a/include/sys_matrix.h b/include/sys_matrix.h index 7e7f004e..fd9b7eb7 100644 --- a/include/sys_matrix.h +++ b/include/sys_matrix.h @@ -10,6 +10,9 @@ extern "C" { #endif +#define MTX_LOAD 0 // load into new matrix +#define MTX_MULT 1 // multiply into existing matrix + extern MtxF MtxF_clear; extern Mtx Mtx_clear; diff --git a/src/actor/ac_airplane.c b/src/actor/ac_airplane.c index c58a37d9..2c866640 100644 --- a/src/actor/ac_airplane.c +++ b/src/actor/ac_airplane.c @@ -71,9 +71,9 @@ static void Airplane_Actor_draw(ACTOR* actor, GAME* game) { GRAPH* g = game->graph; _texture_z_light_fog_prim(g); - Matrix_RotateX(RAD2SHORTANGLE(DEG2RAD(airplane->rotX)), 1); - Matrix_RotateZ(RAD2SHORTANGLE(DEG2RAD(airplane->rotZ)), 1); - Matrix_scale(50.0f, 50.0f, 50.0f, 1); + Matrix_RotateX(RAD2SHORTANGLE(DEG2RAD(airplane->rotX)), MTX_MULT); + Matrix_RotateZ(RAD2SHORTANGLE(DEG2RAD(airplane->rotZ)), MTX_MULT); + Matrix_scale(50.0f, 50.0f, 50.0f, MTX_MULT); OPEN_DISP(g); gSPMatrix(NOW_POLY_OPA_DISP++, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/actor/ac_animal_logo.c b/src/actor/ac_animal_logo.c index ec5ef18d..8fdb09f8 100644 --- a/src/actor/ac_animal_logo.c +++ b/src/actor/ac_animal_logo.c @@ -431,8 +431,8 @@ static void aAL_tm_draw(GRAPH* graph) { Gfx* gfx; Matrix_push(); - Matrix_translate(1530.0f, 690.0f, 0.0f, 1); - Matrix_scale(0.162082675f, 0.162082675f, 0.162082675f, 1); + Matrix_translate(1530.0f, 690.0f, 0.0f, MTX_MULT); + Matrix_scale(0.162082675f, 0.162082675f, 0.162082675f, MTX_MULT); OPEN_DISP(graph); @@ -459,8 +459,8 @@ static void aAL_back_draw(GRAPH* graph, ANIMAL_LOGO_ACTOR* actor) { Gfx* gfx; Matrix_push(); - Matrix_translate(0.0f, 730.0f, 0.0f, 1); - Matrix_scale(0.135f, 0.135f, 0.135f, 1); + Matrix_translate(0.0f, 730.0f, 0.0f, MTX_MULT); + Matrix_scale(0.135f, 0.135f, 0.135f, MTX_MULT); OPEN_DISP(graph); @@ -577,8 +577,8 @@ static void aAL_title_draw(GAME* game, ANIMAL_LOGO_ACTOR* actor) { GRAPH* graph = game->graph; Matrix_push(); - Matrix_translate(0.0f, 730.0f, 0.0f, 1); - Matrix_scale(0.135f, 0.135f, 0.135f, 1); + Matrix_translate(0.0f, 730.0f, 0.0f, MTX_MULT); + Matrix_scale(0.135f, 0.135f, 0.135f, MTX_MULT); OPEN_DISP(graph); diff --git a/src/actor/ac_arrange_room.c b/src/actor/ac_arrange_room.c index 3e779a67..c6b325ae 100644 --- a/src/actor/ac_arrange_room.c +++ b/src/actor/ac_arrange_room.c @@ -120,8 +120,8 @@ static void aAR_DrawFloor(ACTOR* actor, GAME* game) { graph = game->graph; - Matrix_translate(0.0f, 0.0f, 0.0f, 0); - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, MTX_MULT); OPEN_DISP(graph); @@ -147,8 +147,8 @@ static void aAR_DrawWall(ACTOR* actor, GAME* game) { graph = game->graph; - Matrix_translate(0.0f, 0.0f, 0.0f, 0); - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, MTX_MULT); OPEN_DISP(graph); diff --git a/src/actor/ac_ball.c b/src/actor/ac_ball.c index 65456eb3..28bf30d2 100644 --- a/src/actor/ac_ball.c +++ b/src/actor/ac_ball.c @@ -768,8 +768,8 @@ static void aBALL_actor_draw(ACTOR* actor, GAME* game) { OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; - Matrix_translate(0.0f, ball->ball_y, 0.0f, 1); - Matrix_rotateXYZ(ball->angle.x, ball->angle.y, ball->angle.z, 1); + Matrix_translate(0.0f, ball->ball_y, 0.0f, MTX_MULT); + Matrix_rotateXYZ(ball->angle.x, ball->angle.y, ball->angle.z, MTX_MULT); gDPPipeSync(gfx++); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfx++, ball_model_tbl[ball->type]); diff --git a/src/actor/ac_balloon.c b/src/actor/ac_balloon.c index f65d3e2f..a23df174 100644 --- a/src/actor/ac_balloon.c +++ b/src/actor/ac_balloon.c @@ -195,12 +195,12 @@ static void Ac_Balloon_draw_normal(ACTOR* actorx, GAME* game) { Matrix_push(); angle_x = actorx->shape_info.rotation.x - DEG2SHORT_ANGLE2(90.0f); angle_y = actorx->shape_info.rotation.y; - Matrix_translate(pos->x, pos->y, pos->z, 0); - Matrix_RotateY(angle_y, 1); - Matrix_RotateX(angle_x, 1); - Matrix_RotateZ(DEG2SHORT_ANGLE2(90.0f), 1); - Matrix_RotateX(balloon->lean, 1); - Matrix_scale(actorx->scale.x, actorx->scale.y, actorx->scale.z, 1); + Matrix_translate(pos->x, pos->y, pos->z, MTX_LOAD); + Matrix_RotateY(angle_y, MTX_MULT); + Matrix_RotateX(angle_x, MTX_MULT); + Matrix_RotateZ(DEG2SHORT_ANGLE2(90.0f), MTX_MULT); + Matrix_RotateX(balloon->lean, MTX_MULT); + Matrix_scale(actorx->scale.x, actorx->scale.y, actorx->scale.z, MTX_MULT); OPEN_POLY_OPA_DISP(graph); diff --git a/src/actor/ac_boat.c b/src/actor/ac_boat.c index 32380625..96c909a3 100644 --- a/src/actor/ac_boat.c +++ b/src/actor/ac_boat.c @@ -150,9 +150,9 @@ static int aBT_actor_draw_before(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int switch (joint_idx) { case 3: { - Matrix_translate(boat_actor->actor_class.world.position.x, boat_actor->actor_class.world.position.y, boat_actor->actor_class.world.position.z, 0); - Matrix_RotateY(boat_actor->actor_class.shape_info.rotation.y, 1); - Matrix_scale(boat_actor->actor_class.scale.x, boat_actor->actor_class.scale.y, boat_actor->actor_class.scale.z, 1); + Matrix_translate(boat_actor->actor_class.world.position.x, boat_actor->actor_class.world.position.y, boat_actor->actor_class.world.position.z, MTX_LOAD); + Matrix_RotateY(boat_actor->actor_class.shape_info.rotation.y, MTX_MULT); + Matrix_scale(boat_actor->actor_class.scale.x, boat_actor->actor_class.scale.y, boat_actor->actor_class.scale.z, MTX_MULT); break; } diff --git a/src/actor/ac_count02_draw.c_inc b/src/actor/ac_count02_draw.c_inc index e8d41021..f1cf3212 100644 --- a/src/actor/ac_count02_draw.c_inc +++ b/src/actor/ac_count02_draw.c_inc @@ -3,7 +3,7 @@ static int aCOU_actor_draw_before(GAME* game, cKF_SkeletonInfo_R_c* keyframe, in STRUCTURE_ACTOR* actor = (STRUCTURE_ACTOR*)arg; if (joint_idx == 2 && (int)actor->arg0_f != 0) { - Matrix_RotateZ((s16)actor->arg1_f << 12, TRUE); + Matrix_RotateZ((s16)actor->arg1_f << 12, MTX_MULT); } return TRUE; @@ -67,7 +67,7 @@ static void aCOU_actor_draw(ACTOR* actorx, GAME* game) { gSPSegment(POLY_OPA_DISP++, ANIME_1_TXT_SEG, textbl[digit0]); gSPSegment(POLY_OPA_DISP++, ANIME_2_TXT_SEG, textbl[digit1]); - Matrix_translate(100.0f * xpos_tbl[i], 0.0f, 0.0f, 1); + Matrix_translate(100.0f * xpos_tbl[i], 0.0f, 0.0f, MTX_MULT); CLOSE_POLY_OPA_DISP(graph); diff --git a/src/actor/ac_douzou_draw.c_inc b/src/actor/ac_douzou_draw.c_inc index fd4f81b9..6d9c1836 100644 --- a/src/actor/ac_douzou_draw.c_inc +++ b/src/actor/ac_douzou_draw.c_inc @@ -34,7 +34,7 @@ static int aDOU_actor_draw_before(GAME* game, cKF_SkeletonInfo_R_c* keyframe, in if (joint_idx == 2) { f32 scale = scltbl[color]; - Matrix_scale(scale, scale, scale, 1); + Matrix_scale(scale, scale, scale, MTX_MULT); } /* Decide which sex of model to draw (keyframes [2, 4] are male, [5, 7] are female) */ @@ -122,7 +122,7 @@ static void aDOU_actor_draw(ACTOR* actor, GAME* game) { gSPSegment(gfx++, G_MWO_SEGMENT_8, eye_tbl[eye_type]); gSPSegment(gfx++, G_MWO_SEGMENT_9, mouth_tbl[mouth_type]); - Matrix_translate(xpostbl[i] * 100.0f, 0.0f, zpostbl[i] * 100.0f, 1); + Matrix_translate(xpostbl[i] * 100.0f, 0.0f, zpostbl[i] * 100.0f, MTX_MULT); SET_POLY_OPA_DISP(gfx); CLOSE_DISP(graph); diff --git a/src/actor/ac_douzou_move.c_inc b/src/actor/ac_douzou_move.c_inc index 0631f4c4..f06dad11 100644 --- a/src/actor/ac_douzou_move.c_inc +++ b/src/actor/ac_douzou_move.c_inc @@ -91,7 +91,7 @@ static int aDOU_setEffect_sub(ACTOR* actor, GAME* game, int house_no, int color) xyz_t_move(&wpos, &actor->world.position); wpos.x += xpostbl[house_no]; wpos.z += zpostbl[house_no]; - Matrix_translate(wpos.x, wpos.y, wpos.z, 0); + Matrix_translate(wpos.x, wpos.y, wpos.z, MTX_LOAD); /* Initialize effect offset */ xyz_t_move(&ofs, &offset_tbl[color]); diff --git a/src/actor/ac_dump.c b/src/actor/ac_dump.c index e1e1fc23..d6317bb8 100644 --- a/src/actor/ac_dump.c +++ b/src/actor/ac_dump.c @@ -199,7 +199,7 @@ static void aDUM_actor_draw(ACTOR* actor, GAME* game){ gSPSegment(gfx++, 0x8, pal); - Matrix_translate(-6000.0f, 0.0f,-10000.0f, 1); + Matrix_translate(-6000.0f, 0.0f,-10000.0f, MTX_MULT); cur =_Matrix_to_Mtx_new(graph); @@ -214,4 +214,4 @@ static void aDUM_actor_draw(ACTOR* actor, GAME* game){ CLOSE_DISP(graph); -} \ No newline at end of file +} diff --git a/src/actor/ac_effectbg.c b/src/actor/ac_effectbg.c index cfb198f7..f3342c87 100644 --- a/src/actor/ac_effectbg.c +++ b/src/actor/ac_effectbg.c @@ -1025,8 +1025,8 @@ static void EffectBG_object_draw(EffectBg_c* efbg, GAME* game) { OPEN_DISP(game->graph); - Matrix_translate(efbg->base_pos.x, efbg->base_pos.y, efbg->base_pos.z, 0); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(efbg->base_pos.x, efbg->base_pos.y, efbg->base_pos.z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); if (efbg->timer < 70) { gDPSetRenderMode(NEXT_POLY_OPA_DISP, G_RM_FOG_SHADE_A, G_RM_AA_ZB_TEX_EDGE2); diff --git a/src/actor/ac_fallSESW_draw.c_inc b/src/actor/ac_fallSESW_draw.c_inc index 2ce0f3b0..6fcd46fe 100644 --- a/src/actor/ac_fallSESW_draw.c_inc +++ b/src/actor/ac_fallSESW_draw.c_inc @@ -23,7 +23,7 @@ void aFLEW_actor_draw(ACTOR* actor, GAME* game) { _texture_z_light_fog_prim_xlu(graph); if (isWest != FALSE) { - Matrix_mult(&flip_mtx, TRUE); + Matrix_mult(&flip_mtx, MTX_MULT); } OPEN_DISP(graph); @@ -63,13 +63,13 @@ void aFLEW_actor_draw(ACTOR* actor, GAME* game) { angle = RAD2SHORTANGLE(facos(base_vec_z.z * bboard.z + ((base_vec_z.x * bboard.x) + base_vec_z.y * bboard.y))); - Matrix_translate(actor->world.position.x, actor->world.position.y, actor->world.position.z, FALSE); + Matrix_translate(actor->world.position.x, actor->world.position.y, actor->world.position.z, MTX_LOAD); if (actor->npc_id == WATERFALL_WEST) { - Matrix_mult(&flip_mtx, TRUE); + Matrix_mult(&flip_mtx, MTX_MULT); } - Matrix_RotateVector(angle, &l, TRUE); - Matrix_RotateY(-0x2000, TRUE); - Matrix_scale(actor->scale.x, actor->scale.y, actor->scale.z, TRUE); + Matrix_RotateVector(angle, &l, MTX_MULT); + Matrix_RotateY(-0x2000, MTX_MULT); + Matrix_scale(actor->scale.x, actor->scale.y, actor->scale.z, MTX_MULT); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetRenderMode(gfx++, G_RM_FOG_SHADE_A, G_RM_XLU_SURF2); @@ -81,4 +81,4 @@ void aFLEW_actor_draw(ACTOR* actor, GAME* game) { NOW_POLY_XLU_DISP = gfx; CLOSE_DISP(graph); -} \ No newline at end of file +} diff --git a/src/actor/ac_fallS_draw.c_inc b/src/actor/ac_fallS_draw.c_inc index 51a7e8ae..59811a3e 100644 --- a/src/actor/ac_fallS_draw.c_inc +++ b/src/actor/ac_fallS_draw.c_inc @@ -44,9 +44,9 @@ void aFLS_actor_draw(ACTOR* actor, GAME* game) { xyz_t_mult_v(&l, 1.0f / vecLen); angle = facos(shape_norm_vec.z * bboard.z + ((shape_norm_vec.x * bboard.x) + shape_norm_vec.y * bboard.y)); - Matrix_translate(actor->world.position.x, actor->world.position.y, actor->world.position.z, FALSE); - Matrix_RotateVector(RAD2SHORTANGLE(angle), &l, TRUE); - Matrix_scale(actor->scale.x, actor->scale.y, actor->scale.z, TRUE); + Matrix_translate(actor->world.position.x, actor->world.position.y, actor->world.position.z, MTX_LOAD); + Matrix_RotateVector(RAD2SHORTANGLE(angle), &l, MTX_MULT); + Matrix_scale(actor->scale.x, actor->scale.y, actor->scale.z, MTX_MULT); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetRenderMode(gfx++, G_RM_FOG_SHADE_A, G_RM_XLU_SURF2); @@ -58,4 +58,4 @@ void aFLS_actor_draw(ACTOR* actor, GAME* game) { NOW_POLY_XLU_DISP = gfx; CLOSE_DISP(graph); -} \ No newline at end of file +} diff --git a/src/actor/ac_field_draw.c b/src/actor/ac_field_draw.c index 40f89cc3..00bb5214 100644 --- a/src/actor/ac_field_draw.c +++ b/src/actor/ac_field_draw.c @@ -448,8 +448,8 @@ static void aFD_DrawBlock(aFD_block_c* block, ACTOR* actorx, GAME* game) { xlu_gfx = mFI_GetBGDisplayListRom_XLU(block->bx, block->bz); anime_data = mFI_GetBGTexAnimInfo(&anime_frame_count, block->bx, block->bz); - Matrix_translate(block->wpos.x, block->wpos.y, block->wpos.z, 0); - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 1); + Matrix_translate(block->wpos.x, block->wpos.y, block->wpos.z, MTX_LOAD); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, MTX_MULT); _texture_z_light_fog_prim_xlu(game->graph); _texture_z_light_fog_prim_bg(game->graph); diff --git a/src/actor/ac_fuusen.c b/src/actor/ac_fuusen.c index b1ad9eb6..e46212df 100644 --- a/src/actor/ac_fuusen.c +++ b/src/actor/ac_fuusen.c @@ -560,11 +560,11 @@ static void aFSN_actor_draw(ACTOR* actorx, GAME* game) { if (fuusen->action != aFSN_ACTION_ESCAPE || fuusen->escape_timer == aFSN_ESCAPE_TIMER || (fuusen->action == aFSN_ACTION_ESCAPE && fuusen->count == 0)) { /* Draw present */ - Matrix_translate(actorx->world.position.x, actorx->world.position.y, actorx->world.position.z, 0); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); - Matrix_RotateX(actorx->shape_info.rotation.x, 1); - Matrix_RotateZ(actorx->shape_info.rotation.z, 1); - Matrix_RotateY(actorx->shape_info.rotation.y, 1); + Matrix_translate(actorx->world.position.x, actorx->world.position.y, actorx->world.position.z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); + Matrix_RotateX(actorx->shape_info.rotation.x, MTX_MULT); + Matrix_RotateZ(actorx->shape_info.rotation.z, MTX_MULT); + Matrix_RotateY(actorx->shape_info.rotation.y, MTX_MULT); _texture_z_light_fog_prim(graph); OPEN_DISP(graph); diff --git a/src/actor/ac_garagara.c b/src/actor/ac_garagara.c index 3ddcbc44..efd80339 100644 --- a/src/actor/ac_garagara.c +++ b/src/actor/ac_garagara.c @@ -172,8 +172,8 @@ static void Garagara_Actor_draw(ACTOR* actorx, GAME* game) { xyz_t* pos = &actorx->world.position; _texture_z_light_fog_prim(game->graph); - Matrix_translate(pos->x, pos->y, pos->z, 0); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(pos->x, pos->y, pos->z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); OPEN_DISP(game->graph); diff --git a/src/actor/ac_gyo_kage.c b/src/actor/ac_gyo_kage.c index 19a0264e..b79e4bbc 100644 --- a/src/actor/ac_gyo_kage.c +++ b/src/actor/ac_gyo_kage.c @@ -221,10 +221,10 @@ static void aGYO_KAGE_actor_draw(ACTOR* actorx, GAME* game) { } gyo_kage->alpha = alpha; - Matrix_translate(actorx->world.position.x, actorx->world.position.y, actorx->world.position.z, 0); - Matrix_RotateX(angle_x, 1); - Matrix_RotateY(angle_y, 1); - Matrix_scale(actorx->scale.x * 0.4f, actorx->scale.y, actorx->scale.z, 1); + Matrix_translate(actorx->world.position.x, actorx->world.position.y, actorx->world.position.z, MTX_LOAD); + Matrix_RotateX(angle_x, MTX_MULT); + Matrix_RotateY(angle_y, MTX_MULT); + Matrix_scale(actorx->scale.x * 0.4f, actorx->scale.y, actorx->scale.z, MTX_MULT); OPEN_DISP(graph); diff --git a/src/actor/ac_gyo_release.c b/src/actor/ac_gyo_release.c index b4f0665f..86ef3997 100644 --- a/src/actor/ac_gyo_release.c +++ b/src/actor/ac_gyo_release.c @@ -324,11 +324,11 @@ static void aGYR_actor_draw(ACTOR* actorx, GAME* game) { Matrix_push(); _texture_z_light_fog_prim(graph); - Matrix_translate(actorx->world.position.x, actorx->world.position.y, actorx->world.position.z, 0); - Matrix_RotateX(-gyo_release->angle_xz, 1); - Matrix_RotateY(gyo_release->angle_y, 1); - Matrix_RotateZ(gyo_release->angle_xz, 1); - Matrix_scale(actorx->scale.x * 1.2f, actorx->scale.y, actorx->scale.z, 1); + Matrix_translate(actorx->world.position.x, actorx->world.position.y, actorx->world.position.z, MTX_LOAD); + Matrix_RotateX(-gyo_release->angle_xz, MTX_MULT); + Matrix_RotateY(gyo_release->angle_y, MTX_MULT); + Matrix_RotateZ(gyo_release->angle_xz, MTX_MULT); + Matrix_scale(actorx->scale.x * 1.2f, actorx->scale.y, actorx->scale.z, MTX_MULT); OPEN_DISP(graph); diff --git a/src/actor/ac_gyoei_draw.c_inc b/src/actor/ac_gyoei_draw.c_inc index 8eb635bd..adf3ffba 100644 --- a/src/actor/ac_gyoei_draw.c_inc +++ b/src/actor/ac_gyoei_draw.c_inc @@ -72,7 +72,7 @@ static void aGYO_actor_draw_fish(GRAPH* graph, aGYO_CTRL_ACTOR* ctrl, GAME* game Matrix_translate(((ACTOR*)ctrl)->world.position.x, ((ACTOR*)ctrl)->world.position.y - aGYO_hosei_y[ctrl->gyo_type], ((ACTOR*)ctrl)->world.position.z, 0); - Matrix_mult(&play->billboard_matrix, 1); + Matrix_mult(&play->billboard_matrix, MTX_MULT); if (ctrl->gyo_type < (aGYO_TYPE_WHALE + 1) && (ctrl->gyo_flags & 0x200) != 0) { int cnt; @@ -114,10 +114,10 @@ static void aGYO_actor_draw_fish(GRAPH* graph, aGYO_CTRL_ACTOR* ctrl, GAME* game } ctrl->move_angle = DEG2SHORT_ANGLE2(13 * sin_s(ctrl->move_counter)); - Matrix_RotateY(ctrl->move_angle, 1); + Matrix_RotateY(ctrl->move_angle, MTX_MULT); } - Matrix_scale(((ACTOR*)ctrl)->scale.x, ((ACTOR*)ctrl)->scale.y, ((ACTOR*)ctrl)->scale.z, 1); + Matrix_scale(((ACTOR*)ctrl)->scale.x, ((ACTOR*)ctrl)->scale.y, ((ACTOR*)ctrl)->scale.z, MTX_MULT); if ((ctrl->gyo_flags & 0x200) != 0 && ctrl->swork2 <= 0) { int cnt; @@ -179,9 +179,9 @@ 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); - Matrix_RotateX(angleX, 1); - Matrix_RotateY(angleY, 1); - Matrix_scale(((ACTOR*)ctrl)->scale.x * 0.4f, ((ACTOR*)ctrl)->scale.y, ((ACTOR*)ctrl)->scale.z, 1); + 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); OPEN_DISP(graph); diff --git a/src/actor/ac_handOverItem_draw.c_inc b/src/actor/ac_handOverItem_draw.c_inc index 59193827..cf79b1e7 100644 --- a/src/actor/ac_handOverItem_draw.c_inc +++ b/src/actor/ac_handOverItem_draw.c_inc @@ -61,8 +61,8 @@ static void aHOI_actor_draw(ACTOR* actorx, GAME* game) { handOverItem->gyo_flag = FALSE; } else { - Matrix_RotateY(master->shape_info.rotation.y + DEG2SHORT_ANGLE(-90.0f), 0); - Matrix_translate(handOverItem->trans.x, handOverItem->trans.y, handOverItem->trans.z, 1); + Matrix_RotateY(master->shape_info.rotation.y + DEG2SHORT_ANGLE(-90.0f), MTX_LOAD); + Matrix_translate(handOverItem->trans.x, handOverItem->trans.y, handOverItem->trans.z, MTX_MULT); Matrix_Position_Zero(&why_is_this_here); Matrix_put(&handOverItem->tools_class.matrix_work); Matrix_Position_Zero(&chase_pos); @@ -78,7 +78,7 @@ static void aHOI_actor_draw(ACTOR* actorx, GAME* game) { aHOI_chase_pos(actorx, &chase_pos); } - Matrix_translate(chase_pos.x, chase_pos.y, chase_pos.z, 0); + Matrix_translate(chase_pos.x, chase_pos.y, chase_pos.z, MTX_LOAD); _texture_z_light_fog_prim(graph); if (handOverItem->item_type == aHOI_ITEM_TYPE_FISH) { @@ -87,7 +87,7 @@ static void aHOI_actor_draw(ACTOR* actorx, GAME* game) { handOverItem->gyo_flag = TRUE; } - Matrix_scale(scale, scale, scale, 1); + Matrix_scale(scale, scale, scale, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; @@ -98,7 +98,7 @@ static void aHOI_actor_draw(ACTOR* actorx, GAME* game) { CLOSE_DISP(graph); } else { - Matrix_scale(scale, scale, scale, 1); + Matrix_scale(scale, scale, scale, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; diff --git a/src/actor/ac_house_clock.c b/src/actor/ac_house_clock.c index 31b666c7..fe5564e7 100644 --- a/src/actor/ac_house_clock.c +++ b/src/actor/ac_house_clock.c @@ -274,9 +274,9 @@ static int aHC_DrawClockAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int jo Matrix_Position(&ofs, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_RotateZ(DEG2SHORT_ANGLE2(90.0f) - Common_Get(time).rad_hour, 1); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_RotateZ(DEG2SHORT_ANGLE2(90.0f) - Common_Get(time).rad_hour, MTX_MULT); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Matrix_pull(); gSPDisplayList(NEXT_POLY_OPA_DISP, aHC_draw_data[clock_num].short_model); @@ -287,9 +287,9 @@ static int aHC_DrawClockAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int jo Matrix_Position(&ofs, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_RotateZ(DEG2SHORT_ANGLE2(90.0f) - Common_Get(time).rad_min, 1); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_RotateZ(DEG2SHORT_ANGLE2(90.0f) - Common_Get(time).rad_min, MTX_MULT); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Matrix_pull(); gSPDisplayList(NEXT_POLY_OPA_DISP, aHC_draw_data[clock_num].long_model); @@ -308,8 +308,8 @@ static void aHC_DrawClock(ACTOR* actorx, GAME* game) { _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); - Matrix_translate(house_clock->clock.pos.x, house_clock->clock.pos.y, house_clock->clock.pos.z, 0); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(house_clock->clock.pos.x, house_clock->clock.pos.y, house_clock->clock.pos.z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, 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_house_goki.c b/src/actor/ac_house_goki.c index e86c96f9..f2bd46cc 100644 --- a/src/actor/ac_house_goki.c +++ b/src/actor/ac_house_goki.c @@ -439,10 +439,10 @@ static void aHG_actor_draw(ACTOR* actorx, GAME* game) { HOUSE_GOKI_ACTOR* goki = (HOUSE_GOKI_ACTOR*)actorx; Matrix_push(); - Matrix_translate(actorx->world.position.x, actorx->world.position.y + 2.0f, actorx->world.position.z, 0); - Matrix_scale(actorx->scale.x, actorx->scale.y, actorx->scale.z, 1); - Matrix_RotateX(actorx->shape_info.rotation.x, 1); - Matrix_RotateY(actorx->shape_info.rotation.y, 1); + Matrix_translate(actorx->world.position.x, actorx->world.position.y + 2.0f, actorx->world.position.z, MTX_LOAD); + Matrix_scale(actorx->scale.x, actorx->scale.y, actorx->scale.z, MTX_MULT); + Matrix_RotateX(actorx->shape_info.rotation.x, MTX_MULT); + Matrix_RotateY(actorx->shape_info.rotation.y, MTX_MULT); _texture_z_light_fog_prim_xlu(graph); OPEN_POLY_XLU_DISP(graph); diff --git a/src/actor/ac_insect_draw.c_inc b/src/actor/ac_insect_draw.c_inc index 2db188f4..e73fa3b3 100644 --- a/src/actor/ac_insect_draw.c_inc +++ b/src/actor/ac_insect_draw.c_inc @@ -31,8 +31,8 @@ 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); - Matrix_RotateX(angleX, 1); - Matrix_RotateY(angleY, 1); + 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, @@ -40,27 +40,27 @@ static void aINS_actor_draw_sub(GRAPH* graph, aINS_INSECT_ACTOR* insect, GAME* g switch (insect->type) { case aINS_INSECT_TYPE_MOLE_CRICKET: - Matrix_RotateY(angleY, 1); - Matrix_RotateX(angleX, 1); - Matrix_RotateZ(insect->tools_actor.actor_class.shape_info.rotation.z, 1); + Matrix_RotateY(angleY, MTX_MULT); + Matrix_RotateX(angleX, MTX_MULT); + Matrix_RotateZ(insect->tools_actor.actor_class.shape_info.rotation.z, MTX_MULT); break; case aINS_INSECT_TYPE_SPIDER: switch (draw_type) { case 2: - Matrix_RotateX(angleX, 1); - Matrix_RotateZ(insect->tools_actor.actor_class.shape_info.rotation.z, 1); + Matrix_RotateX(angleX, MTX_MULT); + Matrix_RotateZ(insect->tools_actor.actor_class.shape_info.rotation.z, MTX_MULT); break; default: - Matrix_RotateX(angleX, 1); - Matrix_RotateY(angleY, 1); - Matrix_RotateZ(insect->tools_actor.actor_class.shape_info.rotation.z, 1); + Matrix_RotateX(angleX, MTX_MULT); + Matrix_RotateY(angleY, MTX_MULT); + Matrix_RotateZ(insect->tools_actor.actor_class.shape_info.rotation.z, MTX_MULT); break; } break; default: - Matrix_RotateX(angleX, 1); - Matrix_RotateY(angleY, 1); - Matrix_RotateZ(insect->tools_actor.actor_class.shape_info.rotation.z, 1); + Matrix_RotateX(angleX, MTX_MULT); + Matrix_RotateY(angleY, MTX_MULT); + Matrix_RotateZ(insect->tools_actor.actor_class.shape_info.rotation.z, MTX_MULT); break; } } diff --git a/src/actor/ac_kamakura_indoor.c b/src/actor/ac_kamakura_indoor.c index 09518d0d..97c6ac72 100644 --- a/src/actor/ac_kamakura_indoor.c +++ b/src/actor/ac_kamakura_indoor.c @@ -111,8 +111,8 @@ static void aKI_DrawKamakuraIndoorBG(KAMAKURA_INDOOR_ACTOR* k_indoor, GAME* game OPEN_DISP(game->graph); - Matrix_translate(0.0f, 0.0f, 0.0f, 0); - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); 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_lighthouse_switch.c b/src/actor/ac_lighthouse_switch.c index 312e3222..5c6bd45a 100644 --- a/src/actor/ac_lighthouse_switch.c +++ b/src/actor/ac_lighthouse_switch.c @@ -239,9 +239,9 @@ static void aLS_PoleDraw(aLS_pole_c* pole, GAME* game) { OPEN_DISP(game->graph); - Matrix_translate(pole->pos.x, pole->pos.y, pole->pos.z, 0); - Matrix_RotateY(0, 1); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(pole->pos.x, pole->pos.y, pole->pos.z, MTX_LOAD); + Matrix_RotateY(0, MTX_MULT); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(NEXT_POLY_OPA_DISP, ANIME_1_TXT_SEG, primcolor_gfx); @@ -263,9 +263,9 @@ static void aLS_SwitchDraw(aLS_switch_c* sw, GAME* game) { OPEN_DISP(game->graph); - Matrix_translate(sw->pos.x, sw->pos.y, sw->pos.z, 0); - Matrix_RotateY(0, 1); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(sw->pos.x, sw->pos.y, sw->pos.z, MTX_LOAD); + Matrix_RotateY(0, MTX_MULT); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(NEXT_POLY_OPA_DISP, ANIME_1_TXT_SEG, primcolor_gfx); diff --git a/src/actor/ac_mbg.c b/src/actor/ac_mbg.c index 68db3acc..1329088c 100644 --- a/src/actor/ac_mbg.c +++ b/src/actor/ac_mbg.c @@ -71,8 +71,8 @@ static void Mbg_Actor_draw(ACTOR* actorx, GAME* game) { OPEN_DISP(graph); _texture_z_light_fog_prim(graph); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_RotateY(angle_y, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_RotateY(angle_y, 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, mbg_model); diff --git a/src/actor/ac_mikanbox_draw.c_inc b/src/actor/ac_mikanbox_draw.c_inc index 49633ed3..18d46e61 100644 --- a/src/actor/ac_mikanbox_draw.c_inc +++ b/src/actor/ac_mikanbox_draw.c_inc @@ -31,8 +31,8 @@ static void aMIK_copyright_draw(GAME* game) { gSP2Triangles(NEXT_FONT_DISP, 0, 1, 2, 0, 0, 2, 3, 0); Matrix_push(); - Matrix_translate(0.0f, -900.0f, 0.0f, 1); - Matrix_scale(0.85f, 0.85f, 1.0f, 1); + Matrix_translate(0.0f, -900.0f, 0.0f, MTX_MULT); + Matrix_scale(0.85f, 0.85f, 1.0f, MTX_MULT); gSPMatrix(NEXT_FONT_DISP, _Matrix_to_Mtx_new(graph), G_MTX_LOAD | G_MTX_NOPUSH); gSPDisplayList(NEXT_FONT_DISP, obj_e_mikanbox_copyrightT_model2); Matrix_pull(); diff --git a/src/actor/ac_misin.c b/src/actor/ac_misin.c index 59f8b80f..0e2f727a 100644 --- a/src/actor/ac_misin.c +++ b/src/actor/ac_misin.c @@ -164,10 +164,10 @@ static void aMSN_DrawDustcloth(aMSN_DustCloth_c* dustcloth, GAME* game) { gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_9, mNW_PaletteIdx2Palette(dustcloth->original_p->palette)); } - Matrix_translate(dustcloth->pos.x, dustcloth->pos.y, dustcloth->pos.z, 0); - Matrix_RotateY(target_angle_y, 1); - Matrix_translate(-dustcloth->target_pos.x, -dustcloth->target_pos.y, -dustcloth->target_pos.z, 1); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(dustcloth->pos.x, dustcloth->pos.y, dustcloth->pos.z, MTX_LOAD); + Matrix_RotateY(target_angle_y, MTX_MULT); + Matrix_translate(-dustcloth->target_pos.x, -dustcloth->target_pos.y, -dustcloth->target_pos.z, MTX_MULT); + Matrix_scale(0.01f, 0.01f, 0.01f, 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, obj_misin_cloth_model); @@ -196,10 +196,10 @@ static int aMSN_DrawMisinAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int j if (joint_idx == 3) { OPEN_DISP(game->graph); - Matrix_translate(87.0f, 62.0f + misin->needle_offset.y, 141.0f, 0); - Matrix_RotateY(DEG2SHORT_ANGLE(0.0f), 1); - Matrix_RotateZ(DEG2SHORT_ANGLE(-90.0f), 1); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(87.0f, 62.0f + misin->needle_offset.y, 141.0f, MTX_LOAD); + Matrix_RotateY(DEG2SHORT_ANGLE(0.0f), MTX_MULT); + Matrix_RotateZ(DEG2SHORT_ANGLE(-90.0f), MTX_MULT); + Matrix_scale(0.01f, 0.01f, 0.01f, 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, obj_misin_hari_model); @@ -223,9 +223,9 @@ static void aMSN_DrawMisin(aMSN_Misin_c* misin, GAME* game) { if (belt_gfx != NULL) { OPEN_DISP(game->graph); - Matrix_translate(misin->pos.x, misin->pos.y, misin->pos.z, 0); - Matrix_RotateY(DEG2SHORT_ANGLE(0.0f), 1); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(misin->pos.x, misin->pos.y, misin->pos.z, MTX_LOAD); + Matrix_RotateY(DEG2SHORT_ANGLE(0.0f), MTX_MULT); + Matrix_scale(0.01f, 0.01f, 0.01f, 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_mural.c b/src/actor/ac_mural.c index 897d7ebb..b103889a 100644 --- a/src/actor/ac_mural.c +++ b/src/actor/ac_mural.c @@ -74,7 +74,7 @@ static void Mural_Actor_draw(ACTOR* actorx, GAME* game) { Matrix_translate(actorx->world.position.x + x * 24.0f, actorx->world.position.y - y * 24.0f, actorx->world.position.z, 0); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); /* Segment 8 holds the palette */ gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, mural->mural[i].pal_p); diff --git a/src/actor/ac_museum_fish.c b/src/actor/ac_museum_fish.c index 50ea2543..bffeab11 100644 --- a/src/actor/ac_museum_fish.c +++ b/src/actor/ac_museum_fish.c @@ -903,8 +903,8 @@ void Museum_Fish_Suisou_draw(ACTOR* actorx, GAME* game, int r5) { if (r5 < 4) { xyz_t* p = &suisou_pos[r5]; if (mfish_cull_check(game, &suisou_pos[r5], 350.0f, 20.0f, 650.0f)) { - Matrix_translate(suisou_pos[r5].x, 0, suisou_pos[r5].z, 0); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(suisou_pos[r5].x, 0, suisou_pos[r5].z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); OPEN_DISP(graph); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(play->game.graph), @@ -925,7 +925,7 @@ void Museum_Fish_Suisou_draw(ACTOR* actorx, GAME* game, int r5) { } } } else if (mfish_cull_check(game, &suisou_pos[4], 215.0f, 25.0f, 0.0f)) { - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 0); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, MTX_LOAD); OPEN_DISP(graph); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(play->game.graph), @@ -972,8 +972,8 @@ void Museum_Fish_Kusa_Draw(ACTOR* actorx, GAME* game, int r5) { mtx = actor->prvKusa[r5].mtx[1]; } OPEN_DISP(game->graph); - Matrix_translate(kusa_pos[r5].x, 0, kusa_pos[r5].z, 0); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(kusa_pos[r5].x, 0, kusa_pos[r5].z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); CLOSE_DISP(game->graph); cKF_Si3_draw_R_SV(game, &actor->prvKusa[r5].keyframe, mtx, kusa_before_disp, NULL, &actor->prvKusa[r5]); diff --git a/src/actor/ac_museum_fish_aroana.c_inc b/src/actor/ac_museum_fish_aroana.c_inc index 4c2a2512..26b29bf7 100644 --- a/src/actor/ac_museum_fish_aroana.c_inc +++ b/src/actor/ac_museum_fish_aroana.c_inc @@ -255,7 +255,7 @@ BOOL mfish_aroana_before_disp(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int jo MUSEUM_FISH_PRIVATE_DATA* actor = (MUSEUM_FISH_PRIVATE_DATA*)arg; int v; if (joint_idx == 1) { - Matrix_scale(1.0, sin_s(actor->_63A + actor->_63C) * 0.025f + 1.0f, sin_s(actor->_63A) * 0.025f + 1.0f, 1); + Matrix_scale(1.0, sin_s(actor->_63A + actor->_63C) * 0.025f + 1.0f, sin_s(actor->_63A) * 0.025f + 1.0f, MTX_MULT); } else if (joint_idx == 2) { v = joint_rot->y - (actor->_618.z << 1); joint_rot->y = MIN(MAX(v, DEG2SHORT_ANGLE(-40)), DEG2SHORT_ANGLE(40)); @@ -278,10 +278,10 @@ void mfish_aroana_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { mtxp = skele->mtx[1]; } OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x, actor->position.y + actor->_5AC.y, actor->position.z, 0); - Matrix_rotateXYZ(actor->_60C.x, actor->_60C.y, actor->_60C.z, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + Matrix_translate(actor->position.x, actor->position.y + actor->_5AC.y, actor->position.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_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_aroana_before_disp, NULL, actor); CLOSE_DISP(play->game.graph); diff --git a/src/actor/ac_museum_fish_base.c_inc b/src/actor/ac_museum_fish_base.c_inc index 8558f5e7..15b66490 100644 --- a/src/actor/ac_museum_fish_base.c_inc +++ b/src/actor/ac_museum_fish_base.c_inc @@ -568,14 +568,14 @@ void mfish_onefish_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { graph = play->game.graph; - Matrix_translate(actor->position.x, actor->position.y + actor->_5AC.y, actor->position.z, 0); - Matrix_RotateY(actor->_60C.y, 1); + Matrix_translate(actor->position.x, actor->position.y + actor->_5AC.y, actor->position.z, MTX_LOAD); + Matrix_RotateY(actor->_60C.y, MTX_MULT); - Matrix_translate(0.0f, 0.25f * actor->init_data.ofs_y, 1.5f * actor->init_data.ofs_z, 1); - Matrix_RotateX(actor->_60C.x, 1); - Matrix_RotateZ(MY_CLAMP(-(actor->_618.z >> 1), DEG2SHORT_ANGLE(-20), DEG2SHORT_ANGLE(20)), 1); - Matrix_translate(0.0f, 0.25f * -actor->init_data.ofs_y, 0.5f * -actor->init_data.ofs_z, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + Matrix_translate(0.0f, 0.25f * actor->init_data.ofs_y, 1.5f * actor->init_data.ofs_z, MTX_MULT); + Matrix_RotateX(actor->_60C.x, MTX_MULT); + Matrix_RotateZ(MY_CLAMP(-(actor->_618.z >> 1), DEG2SHORT_ANGLE(-20), DEG2SHORT_ANGLE(20)), MTX_MULT); + Matrix_translate(0.0f, 0.25f * -actor->init_data.ofs_y, 0.5f * -actor->init_data.ofs_z, MTX_MULT); + Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); OPEN_DISP(graph); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(play->game.graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/actor/ac_museum_fish_bass.c_inc b/src/actor/ac_museum_fish_bass.c_inc index 85bae5d2..2594d014 100644 --- a/src/actor/ac_museum_fish_bass.c_inc +++ b/src/actor/ac_museum_fish_bass.c_inc @@ -358,14 +358,14 @@ void mfish_bass_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { graph = play->game.graph; - Matrix_translate(actor->position.x, actor->position.y, actor->position.z, 0); - Matrix_RotateY(actor->_60C.y, 1); + Matrix_translate(actor->position.x, actor->position.y, actor->position.z, MTX_LOAD); + Matrix_RotateY(actor->_60C.y, MTX_MULT); - Matrix_translate(0, 0.25f * actor->init_data.ofs_y, 1.5f * actor->init_data.ofs_z, 1); - Matrix_RotateX(actor->_60C.x, 1); - Matrix_RotateZ(MY_CLAMP(-(actor->_618.z >> 1), DEG2SHORT_ANGLE(-20), DEG2SHORT_ANGLE(20)), 1); - Matrix_translate(0, 0.25f * -actor->init_data.ofs_y, 0.5f * -actor->init_data.ofs_z, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + Matrix_translate(0, 0.25f * actor->init_data.ofs_y, 1.5f * actor->init_data.ofs_z, MTX_MULT); + Matrix_RotateX(actor->_60C.x, MTX_MULT); + Matrix_RotateZ(MY_CLAMP(-(actor->_618.z >> 1), DEG2SHORT_ANGLE(-20), DEG2SHORT_ANGLE(20)), MTX_MULT); + Matrix_translate(0, 0.25f * -actor->init_data.ofs_y, 0.5f * -actor->init_data.ofs_z, MTX_MULT); + Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); OPEN_DISP(graph); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(play->game.graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/actor/ac_museum_fish_big_fish.c_inc b/src/actor/ac_museum_fish_big_fish.c_inc index 6ab59fc4..574aae90 100644 --- a/src/actor/ac_museum_fish_big_fish.c_inc +++ b/src/actor/ac_museum_fish_big_fish.c_inc @@ -163,7 +163,7 @@ BOOL mfish_bfish_before_disp(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int joi i = joint_rot->y + (int)(actor->_644 * (GETREG(TAKREG, 0x14) * 0.01f + 0.5f) * sin_s(actor->_646)); joint_rot->y = MY_CLAMP(i, DEG2SHORT_ANGLE(-30), DEG2SHORT_ANGLE(30)); joint_pos->z += actor->_5AC.x * 0.06f * actor->_644 * sin_s(actor->_646 - DEG2SHORT_ANGLE(90)); - Matrix_scale(1.0f, 1.0f + v * sin_s(actor->_63A + actor->_63C), 1.0f + v * sin_s(actor->_63A), 1); + Matrix_scale(1.0f, 1.0f + v * sin_s(actor->_63A + actor->_63C), 1.0f + v * sin_s(actor->_63A), MTX_MULT); } else if (joint_idx == 2) { f32 v; int i; @@ -199,10 +199,10 @@ void mfish_big_fish_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { mtxp = skele->mtx[1]; } OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x, actor->position.y, actor->position.z, 0); - Matrix_rotateXYZ(actor->_60C.x, actor->_60C.y, actor->_60C.z, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + 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_translate(0.0f, 0.0f, actor->init_data.ofs_z, MTX_MULT); + Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_bfish_before_disp, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_fish_dojou.c_inc b/src/actor/ac_museum_fish_dojou.c_inc index 34e0e750..f26647bd 100644 --- a/src/actor/ac_museum_fish_dojou.c_inc +++ b/src/actor/ac_museum_fish_dojou.c_inc @@ -199,12 +199,12 @@ void mfish_dojou_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { } s = actor->_60C.x; OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x, actor->position.y, actor->position.z, 0); - Matrix_RotateY(actor->_60C.y, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z * (0.5f * cos_s(s) + ABS(cos_s(s))), 1); - Matrix_RotateX(s, 1); - Matrix_translate(0.0f, 0.0f, -actor->init_data.ofs_z * 0.5f * cos_s(s), 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + Matrix_translate(actor->position.x, actor->position.y, actor->position.z, MTX_LOAD); + Matrix_RotateY(actor->_60C.y, MTX_MULT); + Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z * (0.5f * cos_s(s) + ABS(cos_s(s))), MTX_MULT); + Matrix_RotateX(s, MTX_MULT); + Matrix_translate(0.0f, 0.0f, -actor->init_data.ofs_z * 0.5f * cos_s(s), MTX_MULT); + Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_dojou_before_disp, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_fish_donko.c_inc b/src/actor/ac_museum_fish_donko.c_inc index 169ceecb..a0a892b9 100644 --- a/src/actor/ac_museum_fish_donko.c_inc +++ b/src/actor/ac_museum_fish_donko.c_inc @@ -120,12 +120,12 @@ void mfish_donko_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { mtxp = skele->mtx[1]; } OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x, actor->position.y, actor->position.z, 0); - Matrix_RotateY(actor->_60C.y, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z * 1.5f, 1); - Matrix_RotateX(actor->_60C.x, 1); - Matrix_translate(0.0f, 0.0f, -actor->init_data.ofs_z * 0.5f, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + Matrix_translate(actor->position.x, actor->position.y, actor->position.z, MTX_LOAD); + Matrix_RotateY(actor->_60C.y, MTX_MULT); + Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z * 1.5f, MTX_MULT); + Matrix_RotateX(actor->_60C.x, MTX_MULT); + Matrix_translate(0.0f, 0.0f, -actor->init_data.ofs_z * 0.5f, MTX_MULT); + Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_donko_before_disp, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_fish_gupi.c_inc b/src/actor/ac_museum_fish_gupi.c_inc index e3bc8ffe..a8a36343 100644 --- a/src/actor/ac_museum_fish_gupi.c_inc +++ b/src/actor/ac_museum_fish_gupi.c_inc @@ -203,12 +203,12 @@ void mfish_gupi_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { } v = actor->_60C.x * 0.7f; OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x, actor->position.y, actor->position.z, 0); - Matrix_RotateY(actor->_60C.y, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z * 1.5f, 1); - Matrix_RotateX(v, 1); - Matrix_translate(0.0f, 0.0f, -actor->init_data.ofs_z * 0.5f, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + Matrix_translate(actor->position.x, actor->position.y, actor->position.z, MTX_LOAD); + Matrix_RotateY(actor->_60C.y, MTX_MULT); + Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z * 1.5f, MTX_MULT); + Matrix_RotateX(v, MTX_MULT); + Matrix_translate(0.0f, 0.0f, -actor->init_data.ofs_z * 0.5f, MTX_MULT); + Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_gupi_before_disp, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_fish_hasu.c_inc b/src/actor/ac_museum_fish_hasu.c_inc index ae98a3eb..7354f269 100644 --- a/src/actor/ac_museum_fish_hasu.c_inc +++ b/src/actor/ac_museum_fish_hasu.c_inc @@ -22,9 +22,9 @@ void mfish_hasu_dw(mfish_hasu_c* actor, GAME* gamex) { mtxp = actor->mtx[1]; } OPEN_DISP(gamex->graph); - Matrix_translate(hasu_pos.x + GETREG(TAKREG, 0x42) * 0.1f, hasu_pos.y, hasu_pos.z + GETREG(TAKREG, 0x43) * 0.1f, 0); - Matrix_RotateY(DEG2SHORT_ANGLE(-180), 1); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(hasu_pos.x + GETREG(TAKREG, 0x42) * 0.1f, hasu_pos.y, hasu_pos.z + GETREG(TAKREG, 0x43) * 0.1f, MTX_LOAD); + Matrix_RotateY(DEG2SHORT_ANGLE(-180), MTX_MULT); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &actor->keyframe, mtxp, NULL, NULL, NULL); CLOSE_DISP(gamex->graph); @@ -197,16 +197,16 @@ void mfish_kaeru_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { } OPEN_DISP(gamex->graph); - Matrix_translate(hasu_pos.x + GETREG(TAKREG, 0x42) * 0.1f, hasu_pos.y, hasu_pos.z + GETREG(TAKREG, 0x43) * 0.1f, 0); - Matrix_RotateY(DEG2SHORT_ANGLE(-180), 1); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(hasu_pos.x + GETREG(TAKREG, 0x42) * 0.1f, hasu_pos.y, hasu_pos.z + GETREG(TAKREG, 0x43) * 0.1f, MTX_LOAD); + Matrix_RotateY(DEG2SHORT_ANGLE(-180), MTX_MULT); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &keyframe->keyframe, mtxp2, hasu_before_disp, hasu_after_disp, actor); - Matrix_translate(actor->position.x + actor->_5AC.x, actor->position.y, actor->position.z + actor->_5AC.z, 0); - Matrix_rotateXYZ(actor->_60C.x, actor->_60C.y, actor->_60C.z, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + Matrix_translate(actor->position.x + actor->_5AC.x, actor->position.y, 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_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, NULL, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_fish_ito.c_inc b/src/actor/ac_museum_fish_ito.c_inc index 74f3c057..09ae251f 100644 --- a/src/actor/ac_museum_fish_ito.c_inc +++ b/src/actor/ac_museum_fish_ito.c_inc @@ -93,7 +93,7 @@ BOOL mfish_ito_before_disp(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int joint joint_rot->y = MY_CLAMP(i, DEG2SHORT_ANGLE(-30), DEG2SHORT_ANGLE(30)); v = actor->_5AC.x * actor->_644 * sin_s(actor->_646 - DEG2SHORT_ANGLE(90)); joint_pos->z += v; - Matrix_scale(1.0f, sin_s(actor->_63A + actor->_63C) * 0.025f + 1.0f, sin_s(actor->_63A) * 0.025f + 1.0f, 1); + Matrix_scale(1.0f, sin_s(actor->_63A + actor->_63C) * 0.025f + 1.0f, sin_s(actor->_63A) * 0.025f + 1.0f, MTX_MULT); } else if (joint_idx == 2) { int i; i = joint_rot->y - 2 * actor->_618.z + @@ -118,10 +118,10 @@ void mfish_ito_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { mtxp = skele->mtx[1]; } OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x, actor->position.y + actor->_5AC.y, actor->position.z, 0); - Matrix_rotateXYZ(actor->_60C.x, actor->_60C.y, actor->_60C.z, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + Matrix_translate(actor->position.x, actor->position.y + actor->_5AC.y, actor->position.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_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_ito_before_disp, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_fish_kaseki.c_inc b/src/actor/ac_museum_fish_kaseki.c_inc index 9c57961a..58d8dab5 100644 --- a/src/actor/ac_museum_fish_kaseki.c_inc +++ b/src/actor/ac_museum_fish_kaseki.c_inc @@ -182,10 +182,10 @@ void mfish_kaseki_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { mtxp = skele->mtx[1]; } OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x, actor->position.y, actor->position.z, 0); - Matrix_rotateXYZ(actor->_60C.x, actor->_60C.y, actor->_60C.z, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + 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_translate(0.0f, 0.0f, actor->init_data.ofs_z, MTX_MULT); + Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_kaseki_before_disp, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_fish_kingyo.c_inc b/src/actor/ac_museum_fish_kingyo.c_inc index a6de2ae0..c8724109 100644 --- a/src/actor/ac_museum_fish_kingyo.c_inc +++ b/src/actor/ac_museum_fish_kingyo.c_inc @@ -252,12 +252,12 @@ void mfish_kingyo_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { } s = actor->_60C.x * (GETREG(TAKREG, 0x41) * 0.01f + 0.75f); OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x, actor->position.y, actor->position.z, 0); - Matrix_RotateY(actor->_60C.y, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z * 1.5f, 1); - Matrix_RotateX(s, 1); - Matrix_translate(0.0f, 0.0f, -actor->init_data.ofs_z * 0.5f, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + Matrix_translate(actor->position.x, actor->position.y, actor->position.z, MTX_LOAD); + Matrix_RotateY(actor->_60C.y, MTX_MULT); + Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z * 1.5f, MTX_MULT); + Matrix_RotateX(s, MTX_MULT); + Matrix_translate(0.0f, 0.0f, -actor->init_data.ofs_z * 0.5f, MTX_MULT); + Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_kingyo_before_disp, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_fish_koi.c_inc b/src/actor/ac_museum_fish_koi.c_inc index 058fe37e..36569603 100644 --- a/src/actor/ac_museum_fish_koi.c_inc +++ b/src/actor/ac_museum_fish_koi.c_inc @@ -498,13 +498,13 @@ void mfish_koi_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { mtxp = skele->mtx[1]; } OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x, actor->position.y, actor->position.z, 0); - Matrix_RotateY(actor->_60C.y, 1); - Matrix_translate(0.0f, actor->init_data.ofs_y * 0.25f, actor->init_data.ofs_z * 1.5f, 1); - Matrix_RotateX(actor->_60C.x, 1); - Matrix_RotateZ(MY_CLAMP(-(actor->_618.z >> 2), DEG2SHORT_ANGLE(-20), DEG2SHORT_ANGLE(20)), 1); - Matrix_translate(0.0f, -actor->init_data.ofs_y * 0.25f, -actor->init_data.ofs_z * 0.5f, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + Matrix_translate(actor->position.x, actor->position.y, actor->position.z, MTX_LOAD); + Matrix_RotateY(actor->_60C.y, MTX_MULT); + Matrix_translate(0.0f, actor->init_data.ofs_y * 0.25f, actor->init_data.ofs_z * 1.5f, MTX_MULT); + Matrix_RotateX(actor->_60C.x, MTX_MULT); + Matrix_RotateZ(MY_CLAMP(-(actor->_618.z >> 2), DEG2SHORT_ANGLE(-20), DEG2SHORT_ANGLE(20)), MTX_MULT); + Matrix_translate(0.0f, -actor->init_data.ofs_y * 0.25f, -actor->init_data.ofs_z * 0.5f, MTX_MULT); + Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_koi_before_disp, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_fish_kurage.c_inc b/src/actor/ac_museum_fish_kurage.c_inc index f03736d2..b07dd08d 100644 --- a/src/actor/ac_museum_fish_kurage.c_inc +++ b/src/actor/ac_museum_fish_kurage.c_inc @@ -196,25 +196,25 @@ void mfish_kurage_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { a += (actor->_5F4 * sin_s(actor->_632) + 1.0f); OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x, actor->position.y, actor->position.z, 0); - Matrix_rotateXYZ(actor->_60C.x, actor->_60C.y, actor->_60C.z, 1); + 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); Matrix_push(); - Matrix_RotateY(actor->_63C, 1); + 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); - Matrix_RotateY(-actor->_63C, 1); + 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); Matrix_pull(); - Matrix_RotateY(actor->_63C, 1); + 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); - Matrix_RotateY(-actor->_63C, 1); + 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_medaka.c_inc b/src/actor/ac_museum_fish_medaka.c_inc index f1023aa1..27c24131 100644 --- a/src/actor/ac_museum_fish_medaka.c_inc +++ b/src/actor/ac_museum_fish_medaka.c_inc @@ -166,12 +166,12 @@ void mfish_medaka_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { } s = actor->_60C.x * (GETREG(TAKREG, 0x41) * 0.01f + 0.75f); OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x, actor->position.y, actor->position.z, 0); - Matrix_RotateY(actor->_60C.y, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z * 1.5f, 1); - Matrix_RotateX(s, 1); - Matrix_translate(0.0f, 0.0f, -actor->init_data.ofs_z * 0.5f, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + Matrix_translate(actor->position.x, actor->position.y, actor->position.z, MTX_LOAD); + Matrix_RotateY(actor->_60C.y, MTX_MULT); + Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z * 1.5f, MTX_MULT); + Matrix_RotateX(s, MTX_MULT); + Matrix_translate(0.0f, 0.0f, -actor->init_data.ofs_z * 0.5f, MTX_MULT); + Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_medaka_before_disp, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_fish_namazu.c_inc b/src/actor/ac_museum_fish_namazu.c_inc index 101175aa..669d9dfc 100644 --- a/src/actor/ac_museum_fish_namazu.c_inc +++ b/src/actor/ac_museum_fish_namazu.c_inc @@ -293,7 +293,7 @@ BOOL mfish_namazu_before_disp(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int jo joint_rot->z = MY_CLAMP(s, DEG2SHORT_ANGLE(-30), DEG2SHORT_ANGLE(30)); s = joint_rot->x + (actor->_618.z >> 2); joint_rot->x = MY_CLAMP(s, DEG2SHORT_ANGLE(-20), DEG2SHORT_ANGLE(20)); - Matrix_scale(1.0f, 1.0f + 0.01f * sin_s(actor->_63A + actor->_63C), 1.0f + 0.01f * sin_s(actor->_63A), 1); + Matrix_scale(1.0f, 1.0f + 0.01f * sin_s(actor->_63A + actor->_63C), 1.0f + 0.01f * sin_s(actor->_63A), MTX_MULT); } else if (joint_idx == 2) { s = joint_rot->y - (actor->_618.z << 1); joint_rot->y = MY_CLAMP(s, DEG2SHORT_ANGLE(-60), DEG2SHORT_ANGLE(60)); @@ -316,10 +316,10 @@ void mfish_namazu_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { mtxp = skele->mtx[1]; } OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x, actor->position.y, actor->position.z, 0); - Matrix_rotateXYZ(actor->_60C.x, actor->_60C.y, actor->_60C.z, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + 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_translate(0.0f, 0.0f, actor->init_data.ofs_z, MTX_MULT); + Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_namazu_before_disp, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_fish_seafish.c_inc b/src/actor/ac_museum_fish_seafish.c_inc index 4a4f31b7..5b88cb87 100644 --- a/src/actor/ac_museum_fish_seafish.c_inc +++ b/src/actor/ac_museum_fish_seafish.c_inc @@ -239,10 +239,10 @@ void mfish_seafish_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { mtxp = skele->mtx[1]; } OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x, actor->position.y, actor->position.z, 0); - Matrix_rotateXYZ(actor->_60C.x, actor->_60C.y, actor->_60C.z, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + 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_translate(0.0f, 0.0f, actor->init_data.ofs_z, MTX_MULT); + Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_seafish_before_disp, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_fish_small_fish.c_inc b/src/actor/ac_museum_fish_small_fish.c_inc index ec07e081..2abb04a2 100644 --- a/src/actor/ac_museum_fish_small_fish.c_inc +++ b/src/actor/ac_museum_fish_small_fish.c_inc @@ -191,12 +191,12 @@ void mfish_small_fish_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { } v = actor->_60C.x * 0.7f; OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x, actor->position.y, actor->position.z, 0); - Matrix_RotateY(actor->_60C.y, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z * 1.5f, 1); - Matrix_RotateX(v, 1); - Matrix_translate(0.0f, 0.0f, -actor->init_data.ofs_z * 0.5f, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + Matrix_translate(actor->position.x, actor->position.y, actor->position.z, MTX_LOAD); + Matrix_RotateY(actor->_60C.y, MTX_MULT); + Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z * 1.5f, MTX_MULT); + Matrix_RotateX(v, MTX_MULT); + Matrix_translate(0.0f, 0.0f, -actor->init_data.ofs_z * 0.5f, MTX_MULT); + Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_sfish_before_disp, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_fish_tai.c_inc b/src/actor/ac_museum_fish_tai.c_inc index 9ab0868a..a389e443 100644 --- a/src/actor/ac_museum_fish_tai.c_inc +++ b/src/actor/ac_museum_fish_tai.c_inc @@ -268,10 +268,10 @@ void mfish_tai_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { mtxp = skele->mtx[1]; } OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x, actor->position.y, actor->position.z, 0); - Matrix_rotateXYZ(actor->_60C.x, actor->_60C.y, actor->_60C.z, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + 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_translate(0.0f, 0.0f, actor->init_data.ofs_z, MTX_MULT); + Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_tai_before_disp, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_fish_unagi.c_inc b/src/actor/ac_museum_fish_unagi.c_inc index 462dc25e..7b6a34d1 100644 --- a/src/actor/ac_museum_fish_unagi.c_inc +++ b/src/actor/ac_museum_fish_unagi.c_inc @@ -395,10 +395,10 @@ void mfish_unagi_dw(MUSEUM_FISH_PRIVATE_DATA* actor, GAME* gamex) { mtxp = skele->mtx[1]; } OPEN_DISP(gamex->graph); - Matrix_translate(actor->position.x + actor->_5AC.x, actor->position.y, actor->position.z + actor->_5AC.z, 0); - Matrix_rotateXYZ(actor->_60C.x, actor->_60C.y, actor->_60C.z, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z, 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + Matrix_translate(actor->position.x + actor->_5AC.x, actor->position.y, 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_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_unagi_before_disp, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_fish_zarigani.c_inc b/src/actor/ac_museum_fish_zarigani.c_inc index cd47994c..17489c86 100644 --- a/src/actor/ac_museum_fish_zarigani.c_inc +++ b/src/actor/ac_museum_fish_zarigani.c_inc @@ -220,10 +220,10 @@ 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); - Matrix_rotateXYZ(actor->_60C.x, actor->_60C.y, actor->_60C.z, 1); - Matrix_translate(0.0f, 0.0f, actor->init_data.ofs_z, 1); - Matrix_rotateXYZ(DEG2SHORT_ANGLE(-90), DEG2SHORT_ANGLE(-180), DEG2SHORT_ANGLE(0), 1); - Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, 1); + 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); + Matrix_scale(actor->init_data.renderScale, actor->init_data.renderScale, actor->init_data.renderScale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(gamex->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(gamex, &skele->keyframe, mtxp, mfish_zarigani_before_disp, NULL, actor); CLOSE_DISP(gamex->graph); diff --git a/src/actor/ac_museum_indoor.c b/src/actor/ac_museum_indoor.c index 00bdbd1e..3097e4da 100644 --- a/src/actor/ac_museum_indoor.c +++ b/src/actor/ac_museum_indoor.c @@ -94,9 +94,9 @@ static void Museum_Indoor_Actor_draw(ACTOR* actorx, GAME* game) { mEnv_GetRoomPrimColor(&r, &g, &b, (GAME_PLAY*)game); OPEN_DISP(game->graph); - Matrix_translate(0.0f, 0.0f, 0.0f, 0); - Matrix_RotateY(0, 1); - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_RotateY(0, MTX_MULT); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, 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, 0, r, g, b, a); diff --git a/src/actor/ac_museum_insect.c b/src/actor/ac_museum_insect.c index 45257381..7d44707b 100644 --- a/src/actor/ac_museum_insect.c +++ b/src/actor/ac_museum_insect.c @@ -861,8 +861,8 @@ void Museum_Insect_Actor_draw(ACTOR* actorx, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); Evw_Anime_Set((GAME_PLAY*)game, &obj_museum4_water_evw_anime); graph = game->graph; - Matrix_translate(100.0f, 0.0f, 0.0f, FALSE); - Matrix_scale(0.01f, 0.01f, 0.01f, TRUE); + Matrix_translate(100.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); OPEN_DISP(graph); 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, obj_museum4_water_modelT); diff --git a/src/actor/ac_museum_insect_base.c_inc b/src/actor/ac_museum_insect_base.c_inc index 46726502..8d225109 100644 --- a/src/actor/ac_museum_insect_base.c_inc +++ b/src/actor/ac_museum_insect_base.c_inc @@ -78,9 +78,9 @@ void minsect_amenbo_mv(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { void minsect_amenbo_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); OPEN_DISP(game->graph); - Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, FALSE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); - Matrix_rotateXYZ(actor->_68.x, actor->_68.y + (s16)DEG2SHORT_ANGLE2(180), actor->_68.z, TRUE); + Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, MTX_LOAD); + Matrix_scale(actor->_14, actor->_14, actor->_14, MTX_MULT); + Matrix_rotateXYZ(actor->_68.x, actor->_68.y + (s16)DEG2SHORT_ANGLE2(180), actor->_68.z, 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][0]); @@ -169,9 +169,9 @@ extern Gfx act_m_mu_ariT_model; void ari_alone_draw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); OPEN_DISP(game->graph); - Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z + actor->_58, FALSE); - Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, TRUE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); + Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z + actor->_58, MTX_LOAD); + Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, 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); gSPDisplayList(NEXT_POLY_OPA_DISP, &act_m_mu_ariT_model); CLOSE_DISP(game->graph); @@ -239,8 +239,8 @@ void minsect_draw_shadow(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { scale = (GETREG(TAKREG, 0x28) * 0.001f + 0.005f); scale *= minsect_shadow_scale_tbl[(int)actor->_00]; - Matrix_translate(actor->_1C.x, v, actor->_1C.z, FALSE); - Matrix_scale(scale, scale, scale, TRUE); + Matrix_translate(actor->_1C.x, v, actor->_1C.z, MTX_LOAD); + Matrix_scale(scale, scale, scale, MTX_MULT); _texture_z_light_fog_prim_shadow(game->graph); OPEN_SHADOW_DISP(game->graph); diff --git a/src/actor/ac_museum_insect_batta.c_inc b/src/actor/ac_museum_insect_batta.c_inc index e5a4c019..a3dfac64 100644 --- a/src/actor/ac_museum_insect_batta.c_inc +++ b/src/actor/ac_museum_insect_batta.c_inc @@ -232,10 +232,10 @@ void minsect_batta_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); - Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, FALSE); - Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, TRUE); - Matrix_rotateXYZ(actor->_76, 0, 0, TRUE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); + Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, MTX_LOAD); + Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, MTX_MULT); + Matrix_rotateXYZ(actor->_76, 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); gSPDisplayList(NEXT_POLY_OPA_DISP, minsect_mdl[actor->_00][0]); CLOSE_DISP(game->graph); @@ -244,7 +244,7 @@ void minsect_batta_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); OPEN_POLY_XLU_DISP(game->graph); gDPSetEnvColor(POLY_XLU_DISP++, 0xff, 0xff, 0xff, 0xff); - Matrix_scale(actor->_58, 1.0f, 1.0f, TRUE); + Matrix_scale(actor->_58, 1.0f, 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_chou.c_inc b/src/actor/ac_museum_insect_chou.c_inc index c921e8dc..b3dba931 100644 --- a/src/actor/ac_museum_insect_chou.c_inc +++ b/src/actor/ac_museum_insect_chou.c_inc @@ -237,10 +237,10 @@ void minsect_chou_mv(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { void minsect_chou_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); - Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, FALSE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); - Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, TRUE); - Matrix_scale(GETREG(NMREG, 0) * 0.01f + 1.0f, GETREG(NMREG, 1) * 0.01f + 1.0f, GETREG(NMREG, 2) * 0.01f + 1.0f, + Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, MTX_LOAD); + 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); 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); diff --git a/src/actor/ac_museum_insect_dango.c_inc b/src/actor/ac_museum_insect_dango.c_inc index b629bb1b..9c54755d 100644 --- a/src/actor/ac_museum_insect_dango.c_inc +++ b/src/actor/ac_museum_insect_dango.c_inc @@ -181,18 +181,18 @@ void minsect_dango_mv(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { void minsect_dango_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); - Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, FALSE); + 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); } - Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, TRUE); + 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); } - Matrix_scale(1.f, 1.f, actor->_58, TRUE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); + Matrix_scale(1.f, 1.f, actor->_58, 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); if (actor->_7C) { gSPDisplayList(NEXT_POLY_OPA_DISP, minsect_mdl[actor->_00][1]); diff --git a/src/actor/ac_museum_insect_genji.c_inc b/src/actor/ac_museum_insect_genji.c_inc index e9c1e50b..9b8bf786 100644 --- a/src/actor/ac_museum_insect_genji.c_inc +++ b/src/actor/ac_museum_insect_genji.c_inc @@ -170,9 +170,9 @@ void genji_light_draw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { b -= (u8)(b * (1.f - actor->_0C)); _texture_z_light_fog_prim_xlu(game->graph); OPEN_POLY_XLU_DISP(game->graph); - Matrix_translate(p.x, p.y, p.z, FALSE); - Matrix_mult(&((GAME_PLAY*)game)->billboard_matrix, TRUE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); + Matrix_translate(p.x, p.y, p.z, MTX_LOAD); + Matrix_mult(&((GAME_PLAY*)game)->billboard_matrix, MTX_MULT); + Matrix_scale(actor->_14, actor->_14, actor->_14, MTX_MULT); gSPMatrix(POLY_XLU_DISP++, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetEnvColor(POLY_XLU_DISP++, 0, 0xff, 0x9b, a); gSPDisplayList(POLY_XLU_DISP++, m_genji_disp_tbl[actor->_72]); @@ -283,10 +283,10 @@ void minsect_genji_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { 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); - Matrix_rotateXYZ(0, 0, actor->_68.z, TRUE); - Matrix_rotateXYZ(actor->_7E, 0, 0, TRUE); - Matrix_rotateXYZ(DEG2SHORT_ANGLE(110), 0, DEG2SHORT_ANGLE2(180), TRUE); - Matrix_scale(0.01f, 0.01f, 0.01f, TRUE); + 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); + Matrix_scale(0.01f, 0.01f, 0.01f, 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, &act_m_mu_genji_modelT); CLOSE_DISP(game->graph); diff --git a/src/actor/ac_museum_insect_goki.c_inc b/src/actor/ac_museum_insect_goki.c_inc index 94144938..021c5e45 100644 --- a/src/actor/ac_museum_insect_goki.c_inc +++ b/src/actor/ac_museum_insect_goki.c_inc @@ -199,16 +199,16 @@ void minsect_goki_mv(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { void minsect_goki_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); - Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, FALSE); - Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, TRUE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); + Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, MTX_LOAD); + Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, 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); gSPDisplayList(NEXT_POLY_OPA_DISP, minsect_mdl[actor->_00][0]); CLOSE_DISP(game->graph); if (actor->_74) { _texture_z_light_fog_prim_xlu(game->graph); OPEN_POLY_XLU_DISP(game->graph); - Matrix_scale(actor->_58, 1.0f, 1.0f, TRUE); + Matrix_scale(actor->_58, 1.0f, 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_hachi.c_inc b/src/actor/ac_museum_insect_hachi.c_inc index fcabe599..3acbde8c 100644 --- a/src/actor/ac_museum_insect_hachi.c_inc +++ b/src/actor/ac_museum_insect_hachi.c_inc @@ -172,17 +172,17 @@ void minsect_hachi_mv(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { void minsect_hachi_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); - Matrix_translate(hachi_base_pos.x, hachi_base_pos.y, hachi_base_pos.z, FALSE); - Matrix_rotateXYZ(DEG2SHORT_ANGLE(-20), 0, 0, TRUE); - Matrix_translate(0.0f, actor->_1C.y, 0.0f, TRUE); + Matrix_translate(hachi_base_pos.x, hachi_base_pos.y, hachi_base_pos.z, MTX_LOAD); + 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); - Matrix_rotateXYZ(0, actor->_68.y, 0, TRUE); - Matrix_translate(GETREG(NMREG, 0x10) * 0.01f, GETREG(NMREG, 0x11) * 0.01f, 15.f + GETREG(NMREG, 0xe) * 0.01f, TRUE); - Matrix_rotateXYZ(0, 0, actor->_68.z, TRUE); - Matrix_rotateXYZ(actor->_70, 0, 0, TRUE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); - Matrix_rotateXYZ(DEG2SHORT_ANGLE(90), 0, DEG2SHORT_ANGLE(-180), TRUE); + 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); + Matrix_rotateXYZ(actor->_70, 0, 0, MTX_MULT); + Matrix_scale(actor->_14, actor->_14, actor->_14, MTX_MULT); + Matrix_rotateXYZ(DEG2SHORT_ANGLE(90), 0, DEG2SHORT_ANGLE(-180), 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); @@ -192,7 +192,7 @@ void minsect_hachi_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); OPEN_POLY_XLU_DISP(game->graph); gDPSetEnvColor(POLY_XLU_DISP++, 0xff, 0xff, 0xff, 0xff); - Matrix_scale(actor->_5C, 1.0f, 1.0f, TRUE); + Matrix_scale(actor->_5C, 1.0f, 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_ka.c_inc b/src/actor/ac_museum_insect_ka.c_inc index 31bbcfae..d4b93d87 100644 --- a/src/actor/ac_museum_insect_ka.c_inc +++ b/src/actor/ac_museum_insect_ka.c_inc @@ -96,9 +96,9 @@ void minsect_ka_mv(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { void minsect_ka_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); - Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, FALSE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); - Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, TRUE); + Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, MTX_LOAD); + Matrix_scale(actor->_14, actor->_14, actor->_14, MTX_MULT); + Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, 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, minsect_mdl[actor->_00][0]); CLOSE_DISP(game->graph); diff --git a/src/actor/ac_museum_insect_kabuto.c_inc b/src/actor/ac_museum_insect_kabuto.c_inc index 6e64205c..0779b819 100644 --- a/src/actor/ac_museum_insect_kabuto.c_inc +++ b/src/actor/ac_museum_insect_kabuto.c_inc @@ -115,11 +115,11 @@ void minsect_kabuto_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); - Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, FALSE); - Matrix_rotateXYZ(0, 0, actor->_68.z, TRUE); - Matrix_rotateXYZ(actor->_74, 0, 0, TRUE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); - Matrix_rotateXYZ(DEG2SHORT_ANGLE(90), 0, DEG2SHORT_ANGLE2(180), TRUE); + Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, MTX_LOAD); + Matrix_rotateXYZ(0, 0, actor->_68.z, MTX_MULT); + Matrix_rotateXYZ(actor->_74, 0, 0, MTX_MULT); + Matrix_scale(actor->_14, actor->_14, actor->_14, MTX_MULT); + Matrix_rotateXYZ(DEG2SHORT_ANGLE(90), 0, DEG2SHORT_ANGLE2(180), 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][0]); diff --git a/src/actor/ac_museum_insect_kumo.c_inc b/src/actor/ac_museum_insect_kumo.c_inc index 9140399c..cd1849b5 100644 --- a/src/actor/ac_museum_insect_kumo.c_inc +++ b/src/actor/ac_museum_insect_kumo.c_inc @@ -238,15 +238,15 @@ void minsect_kumo_mv(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { void minsect_kumo_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); - Matrix_translate(actor->_1C.x, actor->_1C.y + actor->_58, actor->_1C.z, FALSE); - Matrix_rotateXYZ(0, actor->_7C, 0, TRUE); - Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, TRUE); - Matrix_rotateXYZ(0, -actor->_7C, 0, TRUE); - Matrix_translate(0.f, -actor->_58, 0.f, TRUE); - Matrix_rotateXYZ(0, actor->_78, 0, TRUE); - Matrix_translate(0.f, 0.f, -2.5f, TRUE); - Matrix_rotateXYZ(DEG2SHORT_ANGLE(-90), DEG2SHORT_ANGLE2(180), 0, TRUE); - Matrix_scale(actor->_34.x, actor->_34.y, actor->_34.z, TRUE); + Matrix_translate(actor->_1C.x, actor->_1C.y + actor->_58, actor->_1C.z, MTX_LOAD); + Matrix_rotateXYZ(0, actor->_7C, 0, MTX_MULT); + Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, MTX_MULT); + Matrix_rotateXYZ(0, -actor->_7C, 0, MTX_MULT); + Matrix_translate(0.f, -actor->_58, 0.f, MTX_MULT); + Matrix_rotateXYZ(0, actor->_78, 0, MTX_MULT); + Matrix_translate(0.f, 0.f, -2.5f, MTX_MULT); + Matrix_rotateXYZ(DEG2SHORT_ANGLE(-90), DEG2SHORT_ANGLE2(180), 0, MTX_MULT); + Matrix_scale(actor->_34.x, actor->_34.y, actor->_34.z, 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); if (actor->_80) { @@ -257,26 +257,26 @@ void minsect_kumo_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { CLOSE_DISP(game->graph); OPEN_DISP(game->graph); - Matrix_translate(actor->_1C.x, actor->_1C.y + actor->_58, actor->_1C.z + (GETREG(NMREG, 0x5F)) * 0.01f, FALSE); - Matrix_rotateXYZ(0, actor->_7C, 0, TRUE); - Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, TRUE); - Matrix_rotateXYZ(0, -actor->_7C, 0, TRUE); - Matrix_translate(0.0f, -actor->_58, 0.0f, TRUE); - Matrix_rotateXYZ(0, actor->_78, 0, TRUE); + Matrix_translate(actor->_1C.x, actor->_1C.y + actor->_58, actor->_1C.z + (GETREG(NMREG, 0x5F)) * 0.01f, MTX_LOAD); + Matrix_rotateXYZ(0, actor->_7C, 0, MTX_MULT); + Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, MTX_MULT); + Matrix_rotateXYZ(0, -actor->_7C, 0, MTX_MULT); + Matrix_translate(0.0f, -actor->_58, 0.0f, MTX_MULT); + Matrix_rotateXYZ(0, actor->_78, 0, MTX_MULT); if (GETREG(NMREG, 5)) { - Matrix_translate(GETREG(NMREG, 4) * 0.001f, GETREG(NMREG, 5) * 0.01f, GETREG(NMREG, 6) * 0.01f, TRUE); + Matrix_translate(GETREG(NMREG, 4) * 0.001f, GETREG(NMREG, 5) * 0.01f, GETREG(NMREG, 6) * 0.01f, MTX_MULT); } else { - Matrix_translate(0.0f, 6.5f, 0.f, TRUE); + Matrix_translate(0.0f, 6.5f, 0.f, MTX_MULT); } if (GETREG(NMREG, 7)) { - Matrix_scale(1.5f, actor->_58 / ((kumo_top_pos.y - kumo_base_pos.y) - (GETREG(NMREG, 7) * 0.01f)), 1.f, TRUE); + Matrix_scale(1.5f, actor->_58 / ((kumo_top_pos.y - kumo_base_pos.y) - (GETREG(NMREG, 7) * 0.01f)), 1.f, MTX_MULT); } else { - Matrix_scale(2.f, actor->_58 / ((kumo_top_pos.y - kumo_base_pos.y) - 10.f), 1.f, TRUE); + Matrix_scale(2.f, actor->_58 / ((kumo_top_pos.y - kumo_base_pos.y) - 10.f), 1.f, MTX_MULT); } - Matrix_translate(0.f, -8.7f + GETREG(NMREG, 0x5d) * 0.01f, 1.f + GETREG(NMREG, 0x5e) * 0.01f, TRUE); - Matrix_rotateXYZ(DEG2SHORT_ANGLE(-90), DEG2SHORT_ANGLE2(180), 0, TRUE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); + Matrix_translate(0.f, -8.7f + GETREG(NMREG, 0x5d) * 0.01f, 1.f + GETREG(NMREG, 0x5e) * 0.01f, MTX_MULT); + Matrix_rotateXYZ(DEG2SHORT_ANGLE(-90), DEG2SHORT_ANGLE2(180), 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); gDPSetEnvColor(NEXT_POLY_OPA_DISP, 0, 0xff, 0x9b, 0xff); gSPDisplayList(NEXT_POLY_OPA_DISP, minsect_mdl[actor->_00][2]); diff --git a/src/actor/ac_museum_insect_kuwagata.c_inc b/src/actor/ac_museum_insect_kuwagata.c_inc index 488ab3cc..568788a2 100644 --- a/src/actor/ac_museum_insect_kuwagata.c_inc +++ b/src/actor/ac_museum_insect_kuwagata.c_inc @@ -308,13 +308,13 @@ void minsect_kuwagata_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { } OPEN_DISP(game->graph); - Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z + 1.5f + GETREG(NMREG, 0xe) * 0.01f, FALSE); - Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, TRUE); - Matrix_rotateXYZ(-0xe38, 0, 0, TRUE); - Matrix_rotateXYZ(0, 0, actor->_74, TRUE); - Matrix_rotateXYZ(actor->_78, 0, 0, TRUE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); - Matrix_rotateXYZ(DEG2SHORT_ANGLE(90), 0, DEG2SHORT_ANGLE2(180), TRUE); + Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z + 1.5f + GETREG(NMREG, 0xe) * 0.01f, MTX_LOAD); + Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, MTX_MULT); + Matrix_rotateXYZ(-0xe38, 0, 0, MTX_MULT); + Matrix_rotateXYZ(0, 0, actor->_74, MTX_MULT); + Matrix_rotateXYZ(actor->_78, 0, 0, MTX_MULT); + Matrix_scale(actor->_14, actor->_14, actor->_14, MTX_MULT); + Matrix_rotateXYZ(DEG2SHORT_ANGLE(90), 0, DEG2SHORT_ANGLE2(180), MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); cKF_Si3_draw_R_SV(game, &actor->_08->_00, mtx, NULL, NULL, actor); diff --git a/src/actor/ac_museum_insect_mino.c_inc b/src/actor/ac_museum_insect_mino.c_inc index d5466ecd..a2beb39d 100644 --- a/src/actor/ac_museum_insect_mino.c_inc +++ b/src/actor/ac_museum_insect_mino.c_inc @@ -273,15 +273,15 @@ void minsect_mino_mv(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { void minsect_mino_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); - Matrix_translate(actor->_1C.x, actor->_1C.y + actor->_58, actor->_1C.z, FALSE); - Matrix_rotateXYZ(0, actor->_7C, 0, TRUE); - Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, TRUE); - Matrix_rotateXYZ(0, -actor->_7C, 0, TRUE); - Matrix_translate(0.f, -actor->_58, 0.f, TRUE); - Matrix_rotateXYZ(0, actor->_78, 0, TRUE); - Matrix_translate(0.f, 0.f, -2.5f, TRUE); - Matrix_rotateXYZ(DEG2SHORT_ANGLE(-90), DEG2SHORT_ANGLE2(180), 0, TRUE); - Matrix_scale(actor->_34.x, actor->_34.y, actor->_34.z, TRUE); + Matrix_translate(actor->_1C.x, actor->_1C.y + actor->_58, actor->_1C.z, MTX_LOAD); + Matrix_rotateXYZ(0, actor->_7C, 0, MTX_MULT); + Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, MTX_MULT); + Matrix_rotateXYZ(0, -actor->_7C, 0, MTX_MULT); + Matrix_translate(0.f, -actor->_58, 0.f, MTX_MULT); + Matrix_rotateXYZ(0, actor->_78, 0, MTX_MULT); + Matrix_translate(0.f, 0.f, -2.5f, MTX_MULT); + Matrix_rotateXYZ(DEG2SHORT_ANGLE(-90), DEG2SHORT_ANGLE2(180), 0, MTX_MULT); + Matrix_scale(actor->_34.x, actor->_34.y, actor->_34.z, 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); if (actor->_80) { @@ -289,27 +289,27 @@ void minsect_mino_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { } else { gSPDisplayList(NEXT_POLY_OPA_DISP, minsect_mdl[actor->_00][0]); } - Matrix_translate(actor->_1C.x, actor->_1C.y + actor->_58, actor->_1C.z, FALSE); - Matrix_rotateXYZ(0, actor->_7C, 0, TRUE); - Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, TRUE); - Matrix_rotateXYZ(0, -actor->_7C, 0, TRUE); - Matrix_translate(0.0f, -actor->_58, 0.0f, TRUE); - Matrix_rotateXYZ(0, actor->_78, 0, TRUE); + Matrix_translate(actor->_1C.x, actor->_1C.y + actor->_58, actor->_1C.z, MTX_LOAD); + Matrix_rotateXYZ(0, actor->_7C, 0, MTX_MULT); + Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, MTX_MULT); + Matrix_rotateXYZ(0, -actor->_7C, 0, MTX_MULT); + Matrix_translate(0.0f, -actor->_58, 0.0f, MTX_MULT); + Matrix_rotateXYZ(0, actor->_78, 0, MTX_MULT); if (GETREG(NMREG, 5)) { - Matrix_translate(GETREG(NMREG, 4) * 0.001f, GETREG(NMREG, 5) * 0.01f, GETREG(NMREG, 6) * 0.01f, TRUE); + Matrix_translate(GETREG(NMREG, 4) * 0.001f, GETREG(NMREG, 5) * 0.01f, GETREG(NMREG, 6) * 0.01f, MTX_MULT); } else if (actor->_80) { - Matrix_translate(0.0f, 7.5f, 0.f, TRUE); + Matrix_translate(0.0f, 7.5f, 0.f, MTX_MULT); } else { - Matrix_translate(0.0f, 5.f, 0.f, TRUE); + Matrix_translate(0.0f, 5.f, 0.f, MTX_MULT); } if (GETREG(NMREG, 7)) { - Matrix_scale(1.5f, actor->_58 / ((mino_top_pos.y - mino_base_pos.y) - (GETREG(NMREG, 7) * 0.01f)), 1.f, TRUE); + Matrix_scale(1.5f, actor->_58 / ((mino_top_pos.y - mino_base_pos.y) - (GETREG(NMREG, 7) * 0.01f)), 1.f, MTX_MULT); } else { - Matrix_scale(1.5f, actor->_58 / ((mino_top_pos.y - mino_base_pos.y) - 10.f), 1.f, TRUE); + Matrix_scale(1.5f, actor->_58 / ((mino_top_pos.y - mino_base_pos.y) - 10.f), 1.f, MTX_MULT); } - Matrix_translate(0.31f, -8.7f, -2.5f, TRUE); - Matrix_rotateXYZ(DEG2SHORT_ANGLE(-90), DEG2SHORT_ANGLE2(180), 0, TRUE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); + Matrix_translate(0.31f, -8.7f, -2.5f, MTX_MULT); + Matrix_rotateXYZ(DEG2SHORT_ANGLE(-90), DEG2SHORT_ANGLE2(180), 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); gDPSetEnvColor(NEXT_POLY_OPA_DISP, 0, 0xff, 0x9b, 0xff); gSPDisplayList(NEXT_POLY_OPA_DISP, minsect_mdl[actor->_00][2]); diff --git a/src/actor/ac_museum_insect_okera.c_inc b/src/actor/ac_museum_insect_okera.c_inc index 48fe06f2..f59fa126 100644 --- a/src/actor/ac_museum_insect_okera.c_inc +++ b/src/actor/ac_museum_insect_okera.c_inc @@ -202,11 +202,11 @@ void minsect_okera_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { } _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); - Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, FALSE); + 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); - Matrix_rotateXYZ(actor->_78, 0, 0, TRUE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); + 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); gDPSetEnvColor(NEXT_POLY_OPA_DISP, 0, 0xff, 0x9b, 0xff); gSPDisplayList(NEXT_POLY_OPA_DISP, minsect_mdl[actor->_00][0]); diff --git a/src/actor/ac_museum_insect_semi.c_inc b/src/actor/ac_museum_insect_semi.c_inc index 0a7890e2..6d86b878 100644 --- a/src/actor/ac_museum_insect_semi.c_inc +++ b/src/actor/ac_museum_insect_semi.c_inc @@ -96,10 +96,10 @@ void minsect_semi_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); - Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, FALSE); - Matrix_rotateXYZ(actor->_72, 0, 0, TRUE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); - Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, TRUE); + Matrix_translate(actor->_1C.x, actor->_1C.y, actor->_1C.z, MTX_LOAD); + Matrix_rotateXYZ(actor->_72, 0, 0, MTX_MULT); + Matrix_scale(actor->_14, actor->_14, actor->_14, MTX_MULT); + Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, 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][0]); diff --git a/src/actor/ac_museum_insect_tentou.c_inc b/src/actor/ac_museum_insect_tentou.c_inc index 7cf999a6..defe083e 100644 --- a/src/actor/ac_museum_insect_tentou.c_inc +++ b/src/actor/ac_museum_insect_tentou.c_inc @@ -246,11 +246,11 @@ void minsect_tentou_mv(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { void minsect_tentou_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); - Matrix_translate(actor->_1C.x, actor->_1C.y + actor->_60, actor->_1C.z, FALSE); - Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, TRUE); - Matrix_rotateXYZ(actor->_74 + actor->_78, 0, 0, TRUE); - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); - Matrix_scale(actor->_5C, 1.0f, 1.0f, TRUE); + Matrix_translate(actor->_1C.x, actor->_1C.y + actor->_60, actor->_1C.z, MTX_LOAD); + Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, MTX_MULT); + Matrix_rotateXYZ(actor->_74 + actor->_78, 0, 0, MTX_MULT); + Matrix_scale(actor->_14, actor->_14, actor->_14, MTX_MULT); + Matrix_scale(actor->_5C, 1.0f, 1.0f, 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][0]); diff --git a/src/actor/ac_museum_insect_tonbo.c_inc b/src/actor/ac_museum_insect_tonbo.c_inc index 8b4abf35..d5ee5c8d 100644 --- a/src/actor/ac_museum_insect_tonbo.c_inc +++ b/src/actor/ac_museum_insect_tonbo.c_inc @@ -575,13 +575,13 @@ void minsect_tonbo_dw(MUSEUM_INSECT_PRIVATE_DATA* actor, GAME* game) { 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); - Matrix_rotateXYZ(actor->_7E, 0, actor->_80, TRUE); - Matrix_translate(arr[gender].x, arr[gender].y, arr[gender].z, TRUE); + Matrix_rotateXYZ(actor->_7E, 0, actor->_80, MTX_MULT); + Matrix_translate(arr[gender].x, arr[gender].y, arr[gender].z, MTX_MULT); } else { - Matrix_translate(actor->_1C.x, actor->_1C.y + actor->_58, actor->_1C.z, FALSE); + Matrix_translate(actor->_1C.x, actor->_1C.y + actor->_58, actor->_1C.z, MTX_LOAD); } - Matrix_scale(actor->_14, actor->_14, actor->_14, TRUE); - Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, TRUE); + Matrix_scale(actor->_14, actor->_14, actor->_14, MTX_MULT); + Matrix_rotateXYZ(actor->_68.x, actor->_68.y, actor->_68.z, MTX_MULT); OPEN_POLY_XLU_DISP(game->graph); gSPMatrix(POLY_XLU_DISP++, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/actor/ac_museum_picture.c b/src/actor/ac_museum_picture.c index 34981d03..d4f23de4 100644 --- a/src/actor/ac_museum_picture.c +++ b/src/actor/ac_museum_picture.c @@ -93,8 +93,8 @@ static void aMP_DrawOneArt(aMP_pos_c* pos_xz, Gfx* disp, GAME* game) { pos.z = pos_xz->z * 40.0f + 20.0f; pos.y = 40.0f; - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); OPEN_DISP(graph); diff --git a/src/actor/ac_my_house_draw.c_inc b/src/actor/ac_my_house_draw.c_inc index 4a340995..661420d5 100644 --- a/src/actor/ac_my_house_draw.c_inc +++ b/src/actor/ac_my_house_draw.c_inc @@ -52,13 +52,13 @@ static int aMHS_actor_draw_before(GAME* game, cKF_SkeletonInfo_R_c* keyframe, in } if (my_house->arg0 == 0) { - Matrix_RotateY(angle, 1); + Matrix_RotateY(angle, MTX_MULT); } else { - Matrix_RotateX(angle, 1); + Matrix_RotateX(angle, MTX_MULT); } if (my_house->arg0 == 1) { - Matrix_RotateZ(DEG2SHORT_ANGLE(-90.0f), 1); + Matrix_RotateZ(DEG2SHORT_ANGLE(-90.0f), MTX_MULT); } } else { *joint_shape = NULL; // do not draw fish decoration joints @@ -253,7 +253,7 @@ static void aMHS_actor_draw(ACTOR* actorx, GAME* game) { 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); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + 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_indoor.c b/src/actor/ac_my_indoor.c index 11fd0d32..da51c410 100644 --- a/src/actor/ac_my_indoor.c +++ b/src/actor/ac_my_indoor.c @@ -420,8 +420,8 @@ static void aMI_DrawMyStep(ACTOR* actorx, GAME* game) { OPEN_DISP(graph); - Matrix_translate(pos->x, pos->y, pos->z, 0); - Matrix_scale(aMI_scale_x_table[i] * 0.01f, 0.01f, 0.01f, 1); + Matrix_translate(pos->x, pos->y, pos->z, MTX_LOAD); + Matrix_scale(aMI_scale_x_table[i] * 0.01f, 0.01f, 0.01f, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -450,8 +450,8 @@ static void aMI_DrawMyFloor(ACTOR* actorx, GAME* game) { graph = game->graph; _texture_z_light_fog_prim(graph); - Matrix_translate(0.0f, 0.0f, 0.0f, 0); - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, MTX_MULT); OPEN_DISP(graph); @@ -600,8 +600,8 @@ static void aMI_DrawMyOriginalFloor(ACTOR* actorx, GAME* game) { graph = game->graph; _texture_z_light_fog_prim(graph); - Matrix_translate(0.0f, 0.0f, 0.0f, 0); - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, MTX_MULT); OPEN_DISP(graph); @@ -639,8 +639,8 @@ static void aMI_DrawMyWall(ACTOR* actorx, GAME* game) { graph = game->graph; _texture_z_light_fog_prim(graph); - Matrix_translate(0.0f, 0.0f, 0.0f, 0); - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, MTX_MULT); OPEN_DISP(graph); @@ -681,8 +681,8 @@ static void aMI_DrawMyOriginalWall(ACTOR* actorx, GAME* game) { graph = game->graph; _texture_z_light_fog_prim(graph); - Matrix_translate(0.0f, 0.0f, 0.0f, 0); - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, MTX_MULT); OPEN_DISP(graph); diff --git a/src/actor/ac_my_room_draw.c_inc b/src/actor/ac_my_room_draw.c_inc index c20f2cdb..8e8bbdd4 100644 --- a/src/actor/ac_my_room_draw.c_inc +++ b/src/actor/ac_my_room_draw.c_inc @@ -214,36 +214,36 @@ static void aMR_DrawOneFurniture(FTR_ACTOR* ftr_actor, ACTOR* actorx, GAME* game aMR_fit_ftr_c* fit_ftr_info_p = &parent_ftr->fit_ftr_table[fit_no & 3]; xyz_t* pos = &fit_ftr_info_p->pos; - Matrix_translate(fit_ftr_p->position.x, fit_ftr_p->position.y, fit_ftr_p->position.z, 0); - Matrix_RotateY(angle, 1); - Matrix_translate(fit_ftr_p->base_position.x, fit_ftr_p->base_position.y, fit_ftr_p->base_position.z, 1); + Matrix_translate(fit_ftr_p->position.x, fit_ftr_p->position.y, fit_ftr_p->position.z, MTX_LOAD); + Matrix_RotateY(angle, MTX_MULT); + Matrix_translate(fit_ftr_p->base_position.x, fit_ftr_p->base_position.y, fit_ftr_p->base_position.z, MTX_MULT); if (ftr_actor->name == 0x9A) { /* lower alarm clock ftr's height */ - Matrix_translate(pos->x, pos->y - 4.0f, pos->z, 1); + Matrix_translate(pos->x, pos->y - 4.0f, pos->z, MTX_MULT); } else { - Matrix_translate(pos->x, pos->y, pos->z, 1); + Matrix_translate(pos->x, pos->y, pos->z, MTX_MULT); } - Matrix_RotateY(ftr_actor->s_angle_y, 1); - Matrix_translate(ftr_actor->base_position.x, ftr_actor->base_position.y, ftr_actor->base_position.z, 1); + Matrix_RotateY(ftr_actor->s_angle_y, MTX_MULT); + Matrix_translate(ftr_actor->base_position.x, ftr_actor->base_position.y, ftr_actor->base_position.z, MTX_MULT); if (ftr_actor->state == aFTR_STATE_BIRTH && ftr_actor->shape_type <= aFTR_SHAPE_TYPEB_0) { - Matrix_translate(mFI_UT_WORLDSIZE_HALF_X_F, 0.0f, 0.0f, 1); + Matrix_translate(mFI_UT_WORLDSIZE_HALF_X_F, 0.0f, 0.0f, MTX_MULT); } - Matrix_scale(ftr_scale.x, ftr_scale.y, ftr_scale.z, 1); + Matrix_scale(ftr_scale.x, ftr_scale.y, ftr_scale.z, MTX_MULT); if (ftr_actor->state == aFTR_STATE_BIRTH && ftr_actor->shape_type <= aFTR_SHAPE_TYPEB_0) { - Matrix_translate(-mFI_UT_WORLDSIZE_HALF_X_F, 0.0f, 0.0f, 1); + Matrix_translate(-mFI_UT_WORLDSIZE_HALF_X_F, 0.0f, 0.0f, MTX_MULT); } - Matrix_scale(scale, scale, scale, 1); + Matrix_scale(scale, scale, scale, MTX_MULT); } else { if (ftr_actor->name == 0x9A) { /* lower alarm clock ftr's height */ - Matrix_translate(ftr_actor->position.x, ftr_actor->position.y - 4.0f, ftr_actor->position.z, 0); + Matrix_translate(ftr_actor->position.x, ftr_actor->position.y - 4.0f, ftr_actor->position.z, MTX_LOAD); } else { - Matrix_translate(ftr_actor->position.x, ftr_actor->position.y, ftr_actor->position.z, 0); + Matrix_translate(ftr_actor->position.x, ftr_actor->position.y, ftr_actor->position.z, MTX_LOAD); } - Matrix_RotateY(ftr_actor->s_angle_y, 1); + Matrix_RotateY(ftr_actor->s_angle_y, MTX_MULT); if (Save_Get(scene_no) == SCENE_MUSEUM_ROOM_FOSSIL && aFTR_CHECK_INTERACTION(profile->interaction_type, aFTR_INTERACTION_TYPE_FOSSIL) && @@ -251,18 +251,18 @@ static void aMR_DrawOneFurniture(FTR_ACTOR* ftr_actor, ACTOR* actorx, GAME* game Matrix_translate(ftr_actor->base_position.x + 2.5f, ftr_actor->base_position.y, ftr_actor->base_position.z, 1); } else { - Matrix_translate(ftr_actor->base_position.x, ftr_actor->base_position.y, ftr_actor->base_position.z, 1); + Matrix_translate(ftr_actor->base_position.x, ftr_actor->base_position.y, ftr_actor->base_position.z, MTX_MULT); } if (ftr_actor->state == aFTR_STATE_BIRTH && ftr_actor->shape_type <= aFTR_SHAPE_TYPEB_0) { - Matrix_translate(mFI_UT_WORLDSIZE_HALF_X_F, 0.0f, 0.0f, 1); + Matrix_translate(mFI_UT_WORLDSIZE_HALF_X_F, 0.0f, 0.0f, MTX_MULT); } - Matrix_scale(ftr_scale.x, ftr_scale.y, ftr_scale.z, 1); + Matrix_scale(ftr_scale.x, ftr_scale.y, ftr_scale.z, MTX_MULT); if (ftr_actor->state == aFTR_STATE_BIRTH && ftr_actor->shape_type <= aFTR_SHAPE_TYPEB_0) { - Matrix_translate(-mFI_UT_WORLDSIZE_HALF_X_F, 0.0f, 0.0f, 1); + Matrix_translate(-mFI_UT_WORLDSIZE_HALF_X_F, 0.0f, 0.0f, MTX_MULT); } - Matrix_scale(scale, scale, scale, 1); + Matrix_scale(scale, scale, scale, MTX_MULT); } aMR_SetLoopTextureAnime(ftr_actor, profile, game); @@ -355,8 +355,8 @@ static void aMR_DrawLeaf(MY_ROOM_ACTOR* my_room, GAME_PLAY* play) { OPEN_DISP(game->graph); _texture_z_light_fog_prim(game->graph); - Matrix_translate(my_room->leaf_info.pos.x, my_room->leaf_info.pos.y, my_room->leaf_info.pos.z, 0); - Matrix_scale(scale, scale, scale, 1); + Matrix_translate(my_room->leaf_info.pos.x, my_room->leaf_info.pos.y, my_room->leaf_info.pos.z, MTX_LOAD); + Matrix_scale(scale, scale, scale, 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(my_room->pickup_info.icon)); diff --git a/src/actor/ac_my_room_move.c_inc b/src/actor/ac_my_room_move.c_inc index c5acea27..4ecbabda 100644 --- a/src/actor/ac_my_room_move.c_inc +++ b/src/actor/ac_my_room_move.c_inc @@ -2556,9 +2556,9 @@ static void aMR_GetItemPosOnMovingFurniture(MY_ROOM_ACTOR* my_room, FTR_ACTOR* f s16 angle = ftr_actor->s_angle_y; int i; - Matrix_translate(ftr_actor->position.x, ftr_actor->position.y, ftr_actor->position.z, 0); - Matrix_RotateY(angle - parent_ftr->angle_y, 1); - Matrix_translate(ftr_actor->base_position.x, ftr_actor->base_position.y, ftr_actor->base_position.z, 1); + Matrix_translate(ftr_actor->position.x, ftr_actor->position.y, ftr_actor->position.z, MTX_LOAD); + Matrix_RotateY(angle - parent_ftr->angle_y, MTX_MULT); + Matrix_translate(ftr_actor->base_position.x, ftr_actor->base_position.y, ftr_actor->base_position.z, MTX_MULT); for (i = 0; i < aMR_FIT_FTR_MAX; i++) { if (parent_ftr->fit_ftr_table[i].exist_flag == TRUE) { diff --git a/src/actor/ac_needlework_indoor.c b/src/actor/ac_needlework_indoor.c index cd49ad78..8549933e 100644 --- a/src/actor/ac_needlework_indoor.c +++ b/src/actor/ac_needlework_indoor.c @@ -173,7 +173,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); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); gSPSegment(NEXT_POLY_OPA_DISP, ANIME_1_TXT_SEG, texture); gSPSegment(NEXT_POLY_OPA_DISP, ANIME_2_TXT_SEG, palette); @@ -200,7 +200,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); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); gSPSegment(NEXT_POLY_OPA_DISP, ANIME_2_TXT_SEG, texture); gSPSegment(NEXT_POLY_OPA_DISP, ANIME_1_TXT_SEG, palette); diff --git a/src/actor/ac_needlework_shop_draw.c_inc b/src/actor/ac_needlework_shop_draw.c_inc index 678ea184..96ee13fd 100644 --- a/src/actor/ac_needlework_shop_draw.c_inc +++ b/src/actor/ac_needlework_shop_draw.c_inc @@ -108,7 +108,7 @@ static void aNW_actor_draw(ACTOR* actor, GAME* game) { CLOSE_DISP(graph); cKF_Si3_draw_R_SV(game, keyframe, mtx, &aNW_actor_draw_before, &aNW_actor_draw_after, actor); - Matrix_translate(0.0f, 60.0f, 0.0f, TRUE); + Matrix_translate(0.0f, 60.0f, 0.0f, MTX_MULT); (*Common_Get(clip).bg_item_clip->draw_shadow_proc)(game, &aNW_shadow_data, FALSE); } } diff --git a/src/actor/ac_psnowman.c b/src/actor/ac_psnowman.c index 90f03d39..6b348403 100644 --- a/src/actor/ac_psnowman.c +++ b/src/actor/ac_psnowman.c @@ -139,8 +139,8 @@ static void aPSM_actor_draw(ACTOR* actor, GAME* game) { gSPDisplayList(gfx++, act_darumaB_model); Matrix_translate(actor->world.position.x, actor->world.position.y + snowman->eye_heigth, actor->world.position.z, FALSE); - Matrix_RotateX(0xF380, TRUE); - Matrix_scale(snowman->head_scale, snowman->head_scale, snowman->head_scale, TRUE); + Matrix_RotateX(0xF380, MTX_MULT); + Matrix_scale(snowman->head_scale, snowman->head_scale, snowman->head_scale, MTX_MULT); if (snowman->speed > 20.0f) { mRlib_PSnowmanBreakNeckSwing(&snowman->head_angle, snowman->speed, snowman->head); diff --git a/src/actor/ac_radio_move.c_inc b/src/actor/ac_radio_move.c_inc index 04c470e2..aa25ccbc 100644 --- a/src/actor/ac_radio_move.c_inc +++ b/src/actor/ac_radio_move.c_inc @@ -11,7 +11,7 @@ static void aRAD_wait(RADIO_ACTOR* radio, GAME_PLAY* play){ if(radio->next_action >= 0x24){ radio->next_action = 0; Matrix_push(); - Matrix_translate(radio->actor_class.world.position.x,radio->actor_class.world.position.y, radio->actor_class.world.position.z, 0); + Matrix_translate(radio->actor_class.world.position.x,radio->actor_class.world.position.y, radio->actor_class.world.position.z, MTX_LOAD); Matrix_Position(&def, &newPos); Matrix_pull(); diff --git a/src/actor/ac_shop_goods.c b/src/actor/ac_shop_goods.c index 0ac393c1..e029aa60 100644 --- a/src/actor/ac_shop_goods.c +++ b/src/actor/ac_shop_goods.c @@ -289,11 +289,11 @@ static void Shop_Goods_Actor_single_drawR(GAME* game, mActor_name_t item, xyz_t* LightsN_list_check(lightsN, play->global_light.list, pos); LightsN_disp(lightsN, play->game.graph); - Matrix_translate(pos->x, pos->y, pos->z, 0); + Matrix_translate(pos->x, pos->y, pos->z, MTX_LOAD); if ((data_p->flags & aSG_DATA_ROTATE_Y_FLAG) && layer == mCoBG_LAYER1) { - Matrix_RotateY(angle_y, 1); + Matrix_RotateY(angle_y, MTX_MULT); } - Matrix_scale(scale->x, scale->y, scale->z, 1); + Matrix_scale(scale->x, scale->y, scale->z, 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, data_p->gfx0[mode]); @@ -438,11 +438,11 @@ static void aSG_DrawGoods(GRAPH* graph, Global_light* glight, SHOP_GOODS_ACTOR* LightsN_disp(lightsN, graph); if (gfx0 != NULL || xlu_gfx0 != NULL) { - Matrix_translate(pos.x, pos.y, pos.z, 0); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); if ((data_p->flags & aSG_DATA_ROTATE_Y_FLAG) && layer == mCoBG_LAYER1) { - Matrix_RotateY(SG_angle_y[uz][ux], 1); + Matrix_RotateY(SG_angle_y[uz][ux], MTX_MULT); } - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); if (gfx0 != NULL) { _texture_z_light_fog_prim(graph); diff --git a/src/actor/ac_shop_indoor.c b/src/actor/ac_shop_indoor.c index af06714a..eeb6ff6c 100644 --- a/src/actor/ac_shop_indoor.c +++ b/src/actor/ac_shop_indoor.c @@ -308,8 +308,8 @@ static void aSI_DrawShopFloor(ACTOR* actorx, GAME* game) { gSPSegment(NEXT_POLY_OPA_DISP, ANIME_4_TXT_SEG, tex3); gSPSegment(NEXT_POLY_OPA_DISP, ANIME_5_TXT_SEG, pal); - Matrix_translate(0.0f, 0.0f, 0.0f, 0); - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, 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, aSI_disp_data_table[shop_level].floor_gfx); @@ -327,8 +327,8 @@ static void aSI_DrawShopFloor(ACTOR* actorx, GAME* game) { gSPSegment(NEXT_POLY_XLU_DISP, ANIME_4_TXT_SEG, tex3); gSPSegment(NEXT_POLY_XLU_DISP, ANIME_5_TXT_SEG, pal); - Matrix_translate(0.0f, 0.0f, 0.0f, 0); - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, 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, aSI_disp_data_table[shop_level].floor_xlu_gfx); @@ -354,8 +354,8 @@ static void aSI_DrawShopFukubiki(ACTOR* actorx, GAME* game) { OPEN_DISP(game->graph); - Matrix_translate(0.0f, 0.0f, 0.0f, 0); - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Global_kankyo_set_room_prim(game); @@ -368,8 +368,8 @@ static void aSI_DrawShopFukubiki(ACTOR* actorx, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); OPEN_DISP(game->graph); - Matrix_translate(0.0f, 0.0f, 0.0f, 0); - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, 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, aSI_disp_data_table[shop_level].fukubiki_xlu_gfx); @@ -404,8 +404,8 @@ static void aSI_DrawShopWall(ACTOR* actorx, GAME* game) { gSPSegment(NEXT_POLY_OPA_DISP, ANIME_2_TXT_SEG, tex1); gSPSegment(NEXT_POLY_OPA_DISP, ANIME_3_TXT_SEG, pal); - Matrix_translate(0.0f, 0.0f, 0.0f, 0); - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Global_kankyo_set_room_prim(game); @@ -426,8 +426,8 @@ static void aSI_DrawShopWall(ACTOR* actorx, GAME* game) { gSPSegment(NEXT_POLY_XLU_DISP, ANIME_2_TXT_SEG, tex1); gSPSegment(NEXT_POLY_XLU_DISP, ANIME_3_TXT_SEG, pal); - Matrix_translate(0.0f, 0.0f, 0.0f, 0); - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Global_kankyo_set_room_prim(game); diff --git a/src/actor/ac_shop_manekin.c b/src/actor/ac_shop_manekin.c index 01eca279..08246b21 100644 --- a/src/actor/ac_shop_manekin.c +++ b/src/actor/ac_shop_manekin.c @@ -264,8 +264,8 @@ static void Shop_Manekin_Actor_draw(ACTOR* actorx, GAME* game) { OPEN_DISP(game->graph); _texture_z_light_fog_prim(game->graph); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); lights = Global_light_read(&play->global_light, game->graph); LightsN_list_check(lights, play->global_light.list, &pos); LightsN_disp(lights, game->graph); diff --git a/src/actor/ac_shop_umbrella.c b/src/actor/ac_shop_umbrella.c index e41e9827..ac4acd74 100644 --- a/src/actor/ac_shop_umbrella.c +++ b/src/actor/ac_shop_umbrella.c @@ -338,8 +338,8 @@ static void Shop_Umbrella_Actor_draw(ACTOR* actorx, GAME* game) { lights = Global_light_read(&play->global_light, play->game.graph); LightsN_list_check(lights, play->global_light.list, &pos); LightsN_disp(lights, play->game.graph); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_scale(scale, scale, scale, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_scale(scale, scale, scale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_LOAD | G_MTX_NOPUSH); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_LOAD | G_MTX_NOPUSH); diff --git a/src/actor/ac_shrine_move.c_inc b/src/actor/ac_shrine_move.c_inc index e25a3ad1..007af87c 100644 --- a/src/actor/ac_shrine_move.c_inc +++ b/src/actor/ac_shrine_move.c_inc @@ -107,7 +107,7 @@ static void aSHR_Present_move(aSHR_Present_c* present, SHRINE_ACTOR* shrine, GAM 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); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); Matrix_get(&handOverItem->tools_class.matrix_work); Matrix_pull(); handOverItem->tools_class.init_matrix = TRUE; diff --git a/src/actor/ac_sign.c b/src/actor/ac_sign.c index 4b4014f4..702035d3 100644 --- a/src/actor/ac_sign.c +++ b/src/actor/ac_sign.c @@ -839,8 +839,8 @@ static void aSIGN_single_all_draw(SIGN_ACTOR* sign, GAME* game) { player_no = (sign->single[i].item >> 3) & 3; my_original_idx = sign->single[i].item & 7; - Matrix_translate(sign_pos.x, sign_pos.y, sign_pos.z - 1.0f, 0); - Matrix_scale(sign->single[i].scale.x, sign->single[i].scale.y, sign->single[i].scale.z, 1); + Matrix_translate(sign_pos.x, sign_pos.y, sign_pos.z - 1.0f, MTX_LOAD); + Matrix_scale(sign->single[i].scale.x, sign->single[i].scale.y, sign->single[i].scale.z, MTX_MULT); OPEN_POLY_OPA_DISP(graph); diff --git a/src/actor/ac_snowman.c b/src/actor/ac_snowman.c index 1d151f3f..fb4199ee 100644 --- a/src/actor/ac_snowman.c +++ b/src/actor/ac_snowman.c @@ -1387,8 +1387,8 @@ static void aSMAN_actor_draw(ACTOR* actorx, GAME* game) { int idx; if ((actor->flags & aSMAN_FLAG_HEAD_JUMP) == 0 || actor->process != aSMAN_process_combine_head) { - Matrix_translate(0.0f, actor->y_ofs, 0.0, 1); - Matrix_rotateXYZ(actor->head_vec.x, actor->head_vec.y, actor->head_vec.z, 1); + Matrix_translate(0.0f, actor->y_ofs, 0.0, MTX_MULT); + Matrix_rotateXYZ(actor->head_vec.x, actor->head_vec.y, actor->head_vec.z, MTX_MULT); idx = 1; } else { idx = 0; diff --git a/src/actor/ac_station_draw.c_inc b/src/actor/ac_station_draw.c_inc index 7a926b66..0635f772 100644 --- a/src/actor/ac_station_draw.c_inc +++ b/src/actor/ac_station_draw.c_inc @@ -5,10 +5,10 @@ static int aSTA_actor_draw_before(GAME* game, cKF_SkeletonInfo_R_c* keyframe, in u8* joint_flags, void* arg, s_xyz* joint_rot, xyz_t* joint_pos) { switch (joint_idx) { case 4: - Matrix_RotateZ(-Common_Get(time.rad_hour), 1); + Matrix_RotateZ(-Common_Get(time.rad_hour), MTX_MULT); break; case 2: - Matrix_RotateZ(-Common_Get(time.rad_min), 1); + Matrix_RotateZ(-Common_Get(time.rad_min), MTX_MULT); break; } diff --git a/src/actor/ac_tama_draw.c_inc b/src/actor/ac_tama_draw.c_inc index 77ba7c57..f500fda6 100644 --- a/src/actor/ac_tama_draw.c_inc +++ b/src/actor/ac_tama_draw.c_inc @@ -14,7 +14,7 @@ static void aTAM_actor_draw(ACTOR* actorx, GAME* game) { _texture_z_light_fog_prim(graph); gfx = NOW_POLY_OPA_DISP; gSPSegment(gfx++, G_MWO_SEGMENT_8, pal); - Matrix_translate(0.0f, 0.0f, 4000.0f, 1); + Matrix_translate(0.0f, 0.0f, 4000.0f, MTX_MULT); mtx = _Matrix_to_Mtx_new(graph); if (mtx != NULL) { diff --git a/src/actor/ac_train0_draw.c_inc b/src/actor/ac_train0_draw.c_inc index f58d3564..f2332b01 100644 --- a/src/actor/ac_train0_draw.c_inc +++ b/src/actor/ac_train0_draw.c_inc @@ -10,8 +10,8 @@ static void aTR0_actor_draw(ACTOR* actor, GAME* game) { if (mtx != NULL) { _texture_z_light_fog_prim_npc(graph); Matrix_push(); - Matrix_translate(train0->arg0_f, train0->actor_class.world.position.y, train0->actor_class.world.position.z, 0); - Matrix_scale(train0->actor_class.scale.x, train0->actor_class.scale.y, train0->actor_class.scale.z, 1); + Matrix_translate(train0->arg0_f, train0->actor_class.world.position.y, train0->actor_class.world.position.z, MTX_LOAD); + Matrix_scale(train0->actor_class.scale.x, train0->actor_class.scale.y, train0->actor_class.scale.z, MTX_MULT); OPEN_POLY_OPA_DISP(graph); diff --git a/src/actor/ac_train_window.c b/src/actor/ac_train_window.c index 0d354e21..49e7e214 100644 --- a/src/actor/ac_train_window.c +++ b/src/actor/ac_train_window.c @@ -505,8 +505,8 @@ static void Train_Window_Actor_draw(ACTOR* actor, GAME* game) { TRAIN_WINDOW_ACTOR* window = (TRAIN_WINDOW_ACTOR*)actor; GRAPH* graph = game->graph; - Matrix_translate(0.0f, 0.0f, 0.0f, FALSE); - Matrix_scale(0.05f, 0.05f, 0.05f, TRUE); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.05f, 0.05f, 0.05f, MTX_MULT); OPEN_DISP(graph); diff --git a/src/actor/ac_uki_draw.c_inc b/src/actor/ac_uki_draw.c_inc index 0820a3be..d1686c0a 100644 --- a/src/actor/ac_uki_draw.c_inc +++ b/src/actor/ac_uki_draw.c_inc @@ -19,27 +19,27 @@ static void aUKI_actor_draw(ACTOR* actorx, GAME* game) { OPEN_POLY_OPA_DISP(graph); - Matrix_mult(&uki->mtxf, 1); + Matrix_mult(&uki->mtxf, MTX_MULT); gDPPipeSync(POLY_OPA_DISP++); switch (uki->proc) { case aUKI_PROC_CARRY: aUKI_rotate_calc(uki); - Matrix_RotateY(player_actor->shape_info.rotation.y, 1); + Matrix_RotateY(player_actor->shape_info.rotation.y, MTX_MULT); break; case aUKI_PROC_READY: case aUKI_PROC_AIR: uki->uki_angle.x = search_position_angleX(&actorx->world.position, &uki->rod_top_position); uki->uki_angle.y = search_position_angleY(&actorx->world.position, &uki->rod_top_position); uki->uki_angle.x += DEG2SHORT_ANGLE2(180.0f); - Matrix_RotateY(uki->uki_angle.y, 1); - Matrix_RotateX(uki->uki_angle.x, 1); + Matrix_RotateY(uki->uki_angle.y, MTX_MULT); + Matrix_RotateX(uki->uki_angle.x, MTX_MULT); break; case aUKI_PROC_CAST: add_calc_short_angle2(&uki->uki_angle.x, DEG2SHORT_ANGLE2(90.0f), 1.0f - sqrtf(0.95f), 1024, 0); uki->uki_angle.y = search_position_angleY(&actorx->world.position, &uki->rod_top_position); - Matrix_RotateY(uki->uki_angle.y, 1); - Matrix_RotateX(uki->uki_angle.x, 1); + Matrix_RotateY(uki->uki_angle.y, MTX_MULT); + Matrix_RotateX(uki->uki_angle.x, MTX_MULT); break; case aUKI_PROC_HIT: uki->uki_angle.y = search_position_angleY(&actorx->world.position, &uki->rod_top_position); @@ -49,8 +49,8 @@ static void aUKI_actor_draw(ACTOR* actorx, GAME* game) { uki->uki_angle.x = search_position_angleX(&actorx->world.position, &uki->rod_top_position); uki->uki_angle.x += DEG2SHORT_ANGLE2(-90.0f); } - Matrix_RotateY(uki->uki_angle.y, 1); - Matrix_RotateX(uki->uki_angle.x, 1); + Matrix_RotateY(uki->uki_angle.y, MTX_MULT); + Matrix_RotateX(uki->uki_angle.x, MTX_MULT); break; case aUKI_PROC_WAIT: if (uki->cast_timer == 0) { @@ -60,13 +60,13 @@ static void aUKI_actor_draw(ACTOR* actorx, GAME* game) { add_calc_short_angle2(&uki->uki_angle.x, DEG2SHORT_ANGLE2(90.0f), 1.0f - sqrtf(0.95f), 1024, 0); } uki->uki_angle.y = search_position_angleY(&actorx->world.position, &uki->rod_top_position); - Matrix_RotateY(uki->uki_angle.y, 1); - Matrix_RotateX(uki->uki_angle.x, 1); + Matrix_RotateY(uki->uki_angle.y, MTX_MULT); + Matrix_RotateX(uki->uki_angle.x, MTX_MULT); break; case aUKI_PROC_BITE: if (uki->gyo_status == 4) { add_calc_short_angle2(&uki->uki_angle.x, DEG2SHORT_ANGLE2(-90.0f), 1.0f - sqrtf(0.95f), 1024, 0); - Matrix_RotateY(uki->uki_angle.y, 1); + Matrix_RotateY(uki->uki_angle.y, MTX_MULT); } break; } diff --git a/src/actor/ac_weather_rain.c b/src/actor/ac_weather_rain.c index 942993cf..16a7b24e 100644 --- a/src/actor/ac_weather_rain.c +++ b/src/actor/ac_weather_rain.c @@ -182,9 +182,9 @@ void aWeatherRain_draw(aWeather_Priv* priv, GAME* game) { disp = disp >> 1; - Matrix_translate(pos.x, pos.y, pos.z, FALSE); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_scale(picha_scale[0], picha_scale[1], picha_scale[2], TRUE); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_scale(picha_scale[0], picha_scale[1], picha_scale[2], MTX_MULT); OPEN_DISP(graph); diff --git a/src/actor/npc/ac_npc_draw.c_inc b/src/actor/npc/ac_npc_draw.c_inc index 52e33c36..affde212 100644 --- a/src/actor/npc/ac_npc_draw.c_inc +++ b/src/actor/npc/ac_npc_draw.c_inc @@ -41,16 +41,16 @@ static void aNPC_set_chn_base(GAME* game, NPC_ACTOR* nactorx, s_xyz* rot_p, xyz_ actorx->world.position.z); } - Matrix_scale(0.01f, actorx->scale.y, 0.01f, 1); - Matrix_translate(trans_p->x, trans_p->y, trans_p->z, 1); - Matrix_scale(actorx->scale.x * 100.0f, 1.0f, actorx->scale.z * 100.0f, 1); + Matrix_scale(0.01f, actorx->scale.y, 0.01f, MTX_MULT); + Matrix_translate(trans_p->x, trans_p->y, trans_p->z, MTX_MULT); + Matrix_scale(actorx->scale.x * 100.0f, 1.0f, actorx->scale.z * 100.0f, MTX_MULT); bzero(trans_p, sizeof(xyz_t)); } static void aNPC_set_head_angl(GAME* game, NPC_ACTOR* nactorx, s_xyz* rot_p, xyz_t* trans_p) { s_xyz world_rot; - Matrix_to_rotate_new(get_Matrix_now(), &world_rot, 0); + Matrix_to_rotate_new(get_Matrix_now(), &world_rot, MTX_LOAD); aNPC_search_eye_target(nactorx, (GAME_PLAY*)game, &world_rot, rot_p); rot_p->x = nactorx->head.angle_y; rot_p->y = nactorx->head.angle_x; @@ -106,7 +106,7 @@ static void aNPC_set_right_hand_item(GAME* game, NPC_ACTOR* nactorx, int joint_i f32 scale = 1.0f / (nactorx->actor_class.scale.x * 100.0f); Matrix_push(); - Matrix_scale(scale, scale, scale, 1); + Matrix_scale(scale, scale, scale, MTX_MULT); Matrix_get(&item_p->matrix_work); item_p->init_matrix = TRUE; Matrix_pull(); @@ -120,8 +120,8 @@ static void aNPC_set_left_hand_item(GAME* game, NPC_ACTOR* nactorx, int joint_id item_p = (TOOLS_ACTOR*)nactorx->left_hand.item_actor_p; if (item_p != NULL) { Matrix_push(); - Matrix_translate(nactorx->left_hand.pos.x, nactorx->left_hand.pos.y, nactorx->left_hand.pos.z, 0); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(nactorx->left_hand.pos.x, nactorx->left_hand.pos.y, nactorx->left_hand.pos.z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); Matrix_get(&item_p->matrix_work); item_p->init_matrix = TRUE; Matrix_pull(); @@ -156,7 +156,7 @@ static void aNPC_set_accessory_mtx(NPC_ACTOR* nactorx, int joint_idx) { f32 scale = 1.0f / (nactorx->actor_class.scale.x * 100.0f); Matrix_push(); - Matrix_scale(scale, scale, scale, 1); + Matrix_scale(scale, scale, scale, MTX_MULT); Matrix_get(&accessory->matrix_work); accessory->init_matrix = TRUE; 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 b6fa7d8f..7d5e69d7 100644 --- a/src/actor/npc/ac_npc_sendo_move.c_inc +++ b/src/actor/npc/ac_npc_sendo_move.c_inc @@ -1264,10 +1264,10 @@ 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); - Matrix_RotateY(boat->actor_class.shape_info.rotation.y, 1); - Matrix_RotateZ(boat->actor_class.shape_info.rotation.z, 1); - Matrix_translate(-8.0f, 20.0f, -34.0f, 1); - Matrix_RotateY(sendo->npc_class.actor_class.shape_info.rotation.y, 1); + 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); + Matrix_RotateY(sendo->npc_class.actor_class.shape_info.rotation.y, MTX_MULT); Matrix_get(&aSEN_matrix); Matrix_Position_Zero(&sendo->npc_class.actor_class.world.position); diff --git a/src/actor/tool/ac_t_cracker.c b/src/actor/tool/ac_t_cracker.c index 0966ecb1..e1ace214 100644 --- a/src/actor/tool/ac_t_cracker.c +++ b/src/actor/tool/ac_t_cracker.c @@ -104,10 +104,10 @@ 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); - Matrix_scale(0.01f, 0.01f, 0.01f, TRUE); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); } - Matrix_scale(cracker->tools_class.actor_class.scale.x, cracker->tools_class.actor_class.scale.y, cracker->tools_class.actor_class.scale.z, TRUE); + Matrix_scale(cracker->tools_class.actor_class.scale.x, cracker->tools_class.actor_class.scale.y, cracker->tools_class.actor_class.scale.z, MTX_MULT); _texture_z_light_fog_prim_npc(graph); gfxp = NOW_POLY_OPA_DISP; @@ -118,5 +118,3 @@ static void aTCR_actor_draw(ACTOR* actor, GAME* game){ CLOSE_DISP(graph); } - - diff --git a/src/actor/tool/ac_t_flag.c b/src/actor/tool/ac_t_flag.c index 0c55870d..138d8d67 100644 --- a/src/actor/tool/ac_t_flag.c +++ b/src/actor/tool/ac_t_flag.c @@ -62,7 +62,7 @@ static void aTFL_make_vtx(Vtx* v, ACTOR* actor){ fact = 0; if(tools->init_matrix == 1){ Matrix_put(&flag->tools_class.matrix_work); - Matrix_translate(0.0f,0.0f,48.0999984741f,1); + Matrix_translate(0.0f, 0.0f, 48.0999984741f, MTX_MULT); Matrix_Position_Zero(&pos); if(flag->unk1D0 == 0){ xyz_t_move(&flag->work, &pos); @@ -122,7 +122,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); - Matrix_scale(0.01f, 0.01f, 0.01f, TRUE); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); } OPEN_DISP(graph); @@ -151,4 +151,4 @@ static void aTFL_actor_draw(ACTOR* actor, GAME* game){ } CLOSE_DISP(graph); -} \ No newline at end of file +} diff --git a/src/actor/tool/ac_t_hanabi.c b/src/actor/tool/ac_t_hanabi.c index e075efe1..6794792b 100644 --- a/src/actor/tool/ac_t_hanabi.c +++ b/src/actor/tool/ac_t_hanabi.c @@ -103,7 +103,7 @@ static void aTHB_actor_draw(ACTOR* actor, GAME* game) { 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); - Matrix_scale(0.01f, 0.01f, 0.01f, TRUE); + 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, diff --git a/src/actor/tool/ac_t_keitai.c b/src/actor/tool/ac_t_keitai.c index 151557d7..a67ce6c4 100644 --- a/src/actor/tool/ac_t_keitai.c +++ b/src/actor/tool/ac_t_keitai.c @@ -149,8 +149,8 @@ static void aTKT_actor_draw(ACTOR* actor, GAME* game) { Matrix_Position_Zero(&actor->world.position); keitai->tools_class.init_matrix = FALSE; } else { - Matrix_translate(actor->world.position.x, actor->world.position.y, actor->world.position.z, FALSE); - Matrix_scale(0.01f, 0.01f, 0.01f, TRUE); + Matrix_translate(actor->world.position.x, actor->world.position.y, actor->world.position.z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); } _texture_z_light_fog_prim_npc(graph); @@ -158,7 +158,7 @@ static void aTKT_actor_draw(ACTOR* actor, GAME* game) { OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; - Matrix_scale(actor->scale.x, actor->scale.y, actor->scale.z, TRUE); + Matrix_scale(actor->scale.x, actor->scale.y, actor->scale.z, MTX_MULT); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); SET_POLY_OPA_DISP(gfx); diff --git a/src/actor/tool/ac_t_npc_sao.c b/src/actor/tool/ac_t_npc_sao.c index f7e09fcc..2d462516 100644 --- a/src/actor/tool/ac_t_npc_sao.c +++ b/src/actor/tool/ac_t_npc_sao.c @@ -79,8 +79,8 @@ extern void aTNS_actor_draw(ACTOR* actorx, GAME* game) { Matrix_Position_Zero(&actorx->world.position); npc_sao->tool_class.init_matrix = FALSE; } else { - Matrix_translate(actorx->world.position.x, actorx->world.position.y, actorx->world.position.z, FALSE); - Matrix_scale(0.01f, 0.01f, 0.01f, TRUE); + Matrix_translate(actorx->world.position.x, actorx->world.position.y, actorx->world.position.z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); } _texture_z_light_fog_prim_npc(g); @@ -90,8 +90,8 @@ extern void aTNS_actor_draw(ACTOR* actorx, GAME* game) { gSPMatrix(gfx++, _Matrix_to_Mtx_new(g), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfx++, tol_npcsao_1_sao_model); - Matrix_translate(npc_sao->pos_x, npc_sao->pos_y, npc_sao->pos_z, FALSE); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(npc_sao->pos_x, npc_sao->pos_y, npc_sao->pos_z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); gSPMatrix(gfx++, _Matrix_to_Mtx_new(g), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfx++, tol_npcsao_1_uki_model); diff --git a/src/actor/tool/ac_t_pistol.c b/src/actor/tool/ac_t_pistol.c index 7060be95..ab7912df 100644 --- a/src/actor/tool/ac_t_pistol.c +++ b/src/actor/tool/ac_t_pistol.c @@ -104,10 +104,10 @@ 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); - Matrix_scale(0.01f, 0.01f, 0.01f, TRUE); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); } - Matrix_scale(pistol->tools_class.actor_class.scale.x, pistol->tools_class.actor_class.scale.y, pistol->tools_class.actor_class.scale.z, TRUE); + Matrix_scale(pistol->tools_class.actor_class.scale.x, pistol->tools_class.actor_class.scale.y, pistol->tools_class.actor_class.scale.z, MTX_MULT); _texture_z_light_fog_prim_npc(graph); gfxp = NOW_POLY_OPA_DISP; @@ -118,5 +118,3 @@ static void aTPT_actor_draw(ACTOR* actor, GAME* game){ CLOSE_DISP(graph); } - - diff --git a/src/actor/tool/ac_t_tama.c b/src/actor/tool/ac_t_tama.c index e240ee4a..2ba5981c 100644 --- a/src/actor/tool/ac_t_tama.c +++ b/src/actor/tool/ac_t_tama.c @@ -68,12 +68,12 @@ void aTTM_actor_draw(ACTOR* actor, GAME* game) { case 0: case 1: Matrix_put(&tama->tools_class.matrix_work); - Matrix_scale(0.5f, 0.5f, 0.5f, TRUE); + Matrix_scale(0.5f, 0.5f, 0.5f, MTX_MULT); break; case 2: case 3: - Matrix_RotateY(parent->shape_info.rotation.y - 0x4000, FALSE); - Matrix_translate(6.0f, 3.0f, 3.0f, TRUE); + Matrix_RotateY(parent->shape_info.rotation.y - 0x4000, MTX_LOAD); + Matrix_translate(6.0f, 3.0f, 3.0f, MTX_MULT); Matrix_Position_Zero(&position1); Matrix_put(&tama->tools_class.matrix_work); Matrix_Position_Zero(&position2); @@ -81,8 +81,8 @@ void aTTM_actor_draw(ACTOR* actor, GAME* game) { position2.x += position1.x; position2.y += position1.y; position2.z += position1.z; - Matrix_translate(position2.x, position2.y, position2.z, FALSE); - Matrix_scale(0.01f, 0.01f, 0.01f, TRUE); + Matrix_translate(position2.x, position2.y, position2.z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); break; default: return; diff --git a/src/actor/tool/ac_t_tumbler.c b/src/actor/tool/ac_t_tumbler.c index 31b593d8..f73ce47f 100644 --- a/src/actor/tool/ac_t_tumbler.c +++ b/src/actor/tool/ac_t_tumbler.c @@ -89,11 +89,11 @@ extern void aTTB_actor_draw(ACTOR* actorx, GAME* game) { Matrix_Position_Zero(&actorx->world.position); tumbler->tools_class.init_matrix = FALSE; } else { - Matrix_translate(actorx->world.position.x, actorx->world.position.y, actorx->world.position.z, 0); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(actorx->world.position.x, actorx->world.position.y, actorx->world.position.z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); } - Matrix_scale(actorx->scale.x, actorx->scale.y, actorx->scale.z, 1); + Matrix_scale(actorx->scale.x, actorx->scale.y, actorx->scale.z, MTX_MULT); _texture_z_light_fog_prim_npc(graph); OPEN_DISP(graph); diff --git a/src/actor/tool/ac_t_umbrella.c b/src/actor/tool/ac_t_umbrella.c index ff50ac2f..22a25c7a 100644 --- a/src/actor/tool/ac_t_umbrella.c +++ b/src/actor/tool/ac_t_umbrella.c @@ -315,14 +315,14 @@ static void aTUMB_actor_draw(ACTOR* actor, GAME* game) { OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; - Matrix_rotateXYZ(0, -0x4000, 0, TRUE); - Matrix_scale(umbrella->scale_e.x, umbrella->scale_e.y, umbrella->scale_e.z, TRUE); + Matrix_rotateXYZ(0, -0x4000, 0, MTX_MULT); + Matrix_scale(umbrella->scale_e.x, umbrella->scale_e.y, umbrella->scale_e.z, MTX_MULT); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfx++, umbrella_model->model_e); - Matrix_translate(4500.0f, 0.0f, 0.0f, TRUE); - Matrix_scale(umbrella->scale_kasa.x, umbrella->scale_kasa.y, umbrella->scale_kasa.z, TRUE); + Matrix_translate(4500.0f, 0.0f, 0.0f, MTX_MULT); + Matrix_scale(umbrella->scale_kasa.x, umbrella->scale_kasa.y, umbrella->scale_kasa.z, MTX_MULT); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/actor/tool/ac_t_utiwa.c b/src/actor/tool/ac_t_utiwa.c index ba0581d2..4e3b1684 100644 --- a/src/actor/tool/ac_t_utiwa.c +++ b/src/actor/tool/ac_t_utiwa.c @@ -100,10 +100,10 @@ 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); - Matrix_scale(0.01f, 0.01f, 0.01f, TRUE); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); } - Matrix_scale(utiwa->tools_class.actor_class.scale.x, utiwa->tools_class.actor_class.scale.y, utiwa->tools_class.actor_class.scale.z, TRUE); + Matrix_scale(utiwa->tools_class.actor_class.scale.x, utiwa->tools_class.actor_class.scale.y, utiwa->tools_class.actor_class.scale.z, MTX_MULT); _texture_z_light_fog_prim_npc(graph); gfxp = NOW_POLY_OPA_DISP; diff --git a/src/bg_item/bg_item_common.c_inc b/src/bg_item/bg_item_common.c_inc index 08f5cf9b..bf47628c 100644 --- a/src/bg_item/bg_item_common.c_inc +++ b/src/bg_item/bg_item_common.c_inc @@ -1807,11 +1807,11 @@ static void bit_cmn_single_draw_BT_shadow(GAME* game, bg_item_common_info_c* com draw_pos.cull_flag = FALSE; draw_pos.alpha = alpha; - Matrix_translate(pos->x, pos->y, pos->z, 0); - Matrix_RotateY(angle->y, 1); - Matrix_RotateX(angle->x, 1); - Matrix_RotateZ(angle->z, 1); - Matrix_scale(scale->x, scale->y, scale->z, 1); + Matrix_translate(pos->x, pos->y, pos->z, MTX_LOAD); + Matrix_RotateY(angle->y, MTX_MULT); + Matrix_RotateX(angle->x, MTX_MULT); + Matrix_RotateZ(angle->z, MTX_MULT); + Matrix_scale(scale->x, scale->y, scale->z, MTX_MULT); Matrix_get(&draw_pos.mtx); bit_cmn_single_draw_item_shadow(game->graph, draw_part, &draw_pos, shadow_pos, shadow_color); Matrix_pull(); @@ -1988,11 +1988,11 @@ static void bit_cmn_single_draw_BT(GAME* game, bg_item_common_info_c* common_inf draw_pos.cull_flag = FALSE; draw_pos.alpha = alpha; - Matrix_translate(pos->x, pos->y, pos->z, 0); - Matrix_RotateY(angle->y, 1); - Matrix_RotateX(angle->x, 1); - Matrix_RotateZ(angle->z, 1); - Matrix_scale(scale->x, scale->y, scale->z, 1); + Matrix_translate(pos->x, pos->y, pos->z, MTX_LOAD); + Matrix_RotateY(angle->y, MTX_MULT); + Matrix_RotateX(angle->x, MTX_MULT); + Matrix_RotateZ(angle->z, MTX_MULT); + Matrix_scale(scale->x, scale->y, scale->z, MTX_MULT); Matrix_get(&draw_pos.mtx); if (draw_bf != NULL) { @@ -2460,8 +2460,8 @@ static void bg_item_common_chg_BGDataR(bg_item_common_c* common) { static void bg_item_common_outPutData(GAME_PLAY* play, bg_item_draw_pos_c* draw_pos, s16 next, int gfx_idx, xyz_t* pos) { - Matrix_translate(pos->x, pos->y, pos->z, 0); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(pos->x, pos->y, pos->z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); Matrix_get(&draw_pos->mtxf); draw_pos->next_add_cnt = next; draw_pos->sub_idx = gfx_idx; diff --git a/src/bg_item/bg_police_item_move.c_inc b/src/bg_item/bg_police_item_move.c_inc index 6492dace..3e7aa432 100644 --- a/src/bg_item/bg_police_item_move.c_inc +++ b/src/bg_item/bg_police_item_move.c_inc @@ -12,8 +12,8 @@ static void bPI_outPutData(u16* draw_start, bPI_draw_pos_c** draw_pos_pp, u16* d pos.z = block_tbl->pos_z + pos_table[(idx >> 4) & 15]; pos.y = mCoBG_GetBgY_OnlyCenter_FromWpos2(pos, 1.0f); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); Matrix_get(&(*draw_pos_pp)->mtx); (*draw_pos_pp)->next = draw_start[type] - *data_count; draw_start[type] = *data_count; diff --git a/src/bg_item/bg_post_item.c b/src/bg_item/bg_post_item.c index 71cedc78..a5d1d11a 100644 --- a/src/bg_item/bg_post_item.c +++ b/src/bg_item/bg_post_item.c @@ -64,8 +64,8 @@ static void bPTI_actor_draw(ACTOR* actorx, GAME* game) { gSPDisplayList(gfx++, obj_letterT_mat_model); for (keep_mail_sum; keep_mail_sum != 0; keep_mail_sum--) { - Matrix_translate(*setX_p, 60.0f, 60.0f, 0); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(*setX_p, 60.0f, 60.0f, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); gDPPipeSync(gfx++); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/c_keyframe.c b/src/c_keyframe.c index e9b14c18..d5feea14 100644 --- a/src/c_keyframe.c +++ b/src/c_keyframe.c @@ -1150,8 +1150,8 @@ extern void cKF_SkeletonInfo_R_AnimationMove_base(xyz_t* base, s16* sbase, xyz_t base_x = keyframe->base_model_rotation.x; update_base = &keyframe->updated_base_model_rotation; Matrix_push(); - Matrix_rotateXYZ(keyframe->current_joint[1].x, keyframe->current_joint[1].y, keyframe->current_joint[1].z, 0); - Matrix_to_rotate2_new(get_Matrix_now(), update_base, 0); + Matrix_rotateXYZ(keyframe->current_joint[1].x, keyframe->current_joint[1].y, keyframe->current_joint[1].z, MTX_LOAD); + Matrix_to_rotate2_new(get_Matrix_now(), update_base, MTX_LOAD); Matrix_pull(); *sbase = angley + angle_c + (update_base->x - base_x); } diff --git a/src/effect/ef_ami_mizu.c b/src/effect/ef_ami_mizu.c index 0a8e0017..34cec4a2 100644 --- a/src/effect/ef_ami_mizu.c +++ b/src/effect/ef_ami_mizu.c @@ -54,8 +54,8 @@ static void eAmi_Mizu_dw(eEC_Effect_c* effect, GAME* game) { _texture_z_light_fog_prim_xlu(graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, TRUE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); OPEN_DISP(graph); diff --git a/src/effect/ef_anahikari.c b/src/effect/ef_anahikari.c index 500461db..bcdc20a4 100644 --- a/src/effect/ef_anahikari.c +++ b/src/effect/ef_anahikari.c @@ -62,8 +62,8 @@ static void eAnahikari_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->position.y, effect->position.z, FALSE); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, TRUE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); Evw_Anime_Set(play, ef_anahikari_anime_tbl[idx]); gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, 255, 255, 255, 255, alpha); diff --git a/src/effect/ef_break_axe.c b/src/effect/ef_break_axe.c index c24bc726..09a6bdc1 100644 --- a/src/effect/ef_break_axe.c +++ b/src/effect/ef_break_axe.c @@ -182,11 +182,11 @@ static void eBreak_Axe_dw(eEC_Effect_c* effect, GAME* game) { OPEN_DISP(game->graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, 0); - Matrix_RotateY(effect->effect_specific[4] + (int)(GETREG(TAKREG, 21) * 182.04445f), 1); + 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); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 1); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, 128, 255, 255, 255, a); 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_car_blight.c b/src/effect/ef_car_blight.c index 64dc2ea2..019c39e6 100644 --- a/src/effect/ef_car_blight.c +++ b/src/effect/ef_car_blight.c @@ -106,10 +106,10 @@ static void eCar_Blight_dw(eEC_Effect_c* effect, GAME* game) { graph = game->graph; _texture_z_light_fog_prim_xlu(graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); scaleFact = 1.0f + (0.01f * (f32)(int)GETREG(MYKREG,27)); - Matrix_scale(effect->scale.x * scaleFact, effect->scale.y * scaleFact, effect->scale.z * scaleFact, TRUE); + Matrix_scale(effect->scale.x * scaleFact, effect->scale.y * scaleFact, effect->scale.z * scaleFact, MTX_MULT); Setpos_HiliteReflect_xlu_init(&effect->position, play); gfx = two_tex_scroll_dolphin(game->graph,0, timer * 3, timer * 7, 16, 16, 1,timer * 3, timer * -7, 16,16); diff --git a/src/effect/ef_coin.c b/src/effect/ef_coin.c index de46f5b5..2b5b1605 100644 --- a/src/effect/ef_coin.c +++ b/src/effect/ef_coin.c @@ -153,11 +153,11 @@ static void eCoin_dw(eEC_Effect_c* effect, GAME* game) { OPEN_DISP(game->graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, 0); - Matrix_RotateX(effect->effect_specific[1], 1); - Matrix_RotateY(effect->effect_specific[2], 1); - Matrix_RotateZ(effect->effect_specific[3], 1); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_RotateX(effect->effect_specific[1], MTX_MULT); + Matrix_RotateY(effect->effect_specific[2], MTX_MULT); + Matrix_RotateZ(effect->effect_specific[3], MTX_MULT); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, eCoin_pal_table[effect->effect_specific[5] & 1]); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -172,11 +172,11 @@ static void eCoin_dw(eEC_Effect_c* effect, GAME* game) { OPEN_DISP(game->graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, 0); - Matrix_RotateX(effect->effect_specific[1], 1); - Matrix_RotateY(effect->effect_specific[2], 1); - Matrix_RotateZ(effect->effect_specific[3], 1); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_RotateX(effect->effect_specific[1], MTX_MULT); + Matrix_RotateY(effect->effect_specific[2], MTX_MULT); + Matrix_RotateZ(effect->effect_specific[3], MTX_MULT); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, 128, 255, 255, 255, alpha); gSPSegment(NEXT_POLY_XLU_DISP, G_MWO_SEGMENT_8, eCoin_pal_table[effect->effect_specific[5] & 1]); diff --git a/src/effect/ef_dig_hole.c b/src/effect/ef_dig_hole.c index ce4d4727..c40d21f4 100644 --- a/src/effect/ef_dig_hole.c +++ b/src/effect/ef_dig_hole.c @@ -159,10 +159,10 @@ static void eDig_Hole_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->position.y, effect->position.z, 0); - Matrix_RotateY(effect->effect_specific[0], 1); - Matrix_RotateX(effect->effect_specific[1], 1); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_RotateY(effect->effect_specific[0], MTX_MULT); + Matrix_RotateX(effect->effect_specific[1], MTX_MULT); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 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_effect_lib.c b/src/effect/ef_effect_lib.c index 3d5975cc..42b5b6de 100644 --- a/src/effect/ef_effect_lib.c +++ b/src/effect/ef_effect_lib.c @@ -95,12 +95,12 @@ static void eEL_AutoMatrixXlu_Offset(GAME* game, xyz_t* pos, xyz_t* scale, xyz_t OPEN_DISP(game->graph); _texture_z_light_fog_prim_xlu(game->graph); - Matrix_translate(pos->x, pos->y, pos->z, 0); - Matrix_mult(&play->billboard_matrix, 1); + 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); 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, 1); + Matrix_scale(scale->x * adj_scale, scale->y * adj_scale, scale->z * adj_scale, 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_flash.c b/src/effect/ef_flash.c index faea2416..13afc07a 100644 --- a/src/effect/ef_flash.c +++ b/src/effect/ef_flash.c @@ -60,9 +60,9 @@ extern Gfx ef_takurami01_kira_modelT[]; static void eFlash_dw(eEC_Effect_c* effect, GAME* game) { GAME_PLAY* play = (GAME_PLAY*)game; - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, 0); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); _texture_z_light_fog_prim_xlu(game->graph); OPEN_DISP(game->graph); diff --git a/src/effect/ef_footprint.c b/src/effect/ef_footprint.c index 507773e9..cff69af6 100644 --- a/src/effect/ef_footprint.c +++ b/src/effect/ef_footprint.c @@ -107,12 +107,12 @@ static void eFootPrint_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->position.y, effect->position.z, 0); - Matrix_RotateX(effect->effect_specific[0], 1); - Matrix_RotateY(effect->effect_specific[2], 1); - Matrix_RotateZ(effect->effect_specific[1], 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_RotateX(effect->effect_specific[0], MTX_MULT); + Matrix_RotateY(effect->effect_specific[2], MTX_MULT); + Matrix_RotateZ(effect->effect_specific[1], MTX_MULT); scale = (1.0f + ((f32)(int)GETREG(MYKREG, 27)) * 0.01f) * 0.005f; - Matrix_scale(scale, scale, 0.0075f, 1); + Matrix_scale(scale, scale, 0.0075f, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (effect->effect_specific[3]) { diff --git a/src/effect/ef_goki.c b/src/effect/ef_goki.c index 49d04217..c0c46a03 100644 --- a/src/effect/ef_goki.c +++ b/src/effect/ef_goki.c @@ -75,12 +75,12 @@ static void eGoki_dw(eEC_Effect_c* effect, GAME* game) { int opacity = (u8)eEC_CLIP->calc_adjust_proc(effect->timer, 0, 20, 100.f, 255.f); _texture_z_light_fog_prim_xlu(game->graph); OPEN_DISP(game->graph); - Matrix_translate(effect->position.x + effect->offset.x, effect->position.y, effect->position.z, FALSE); + 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); - Matrix_mult(&play->billboard_matrix, TRUE); - Matrix_RotateZ(effect->effect_specific[0], TRUE); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_RotateZ(effect->effect_specific[0], MTX_MULT); Evw_Anime_Set(play, ef_goki01_01_evw_anime); 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, 255, 255, 255, 255, opacity); diff --git a/src/effect/ef_ha.c b/src/effect/ef_ha.c index f58833cd..b165be1e 100644 --- a/src/effect/ef_ha.c +++ b/src/effect/ef_ha.c @@ -60,11 +60,11 @@ static void eHA_dw(eEC_Effect_c* effect, GAME* game) { int opacity = (u8)eEC_CLIP->calc_adjust_proc(EFFECT_LIFETIME - effect->timer, 24, EFFECT_LIFETIME, 255.f, 0.f); OPEN_DISP(game->graph); _texture_z_light_fog_prim_xlu(game->graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); - Matrix_mult(&play->billboard_matrix, TRUE); + 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); - Matrix_RotateZ(eHA_angle_z_data[v], TRUE); + 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); diff --git a/src/effect/ef_hanabi_botan1.c b/src/effect/ef_hanabi_botan1.c index dd4f1bf6..b12b24fa 100644 --- a/src/effect/ef_hanabi_botan1.c +++ b/src/effect/ef_hanabi_botan1.c @@ -101,10 +101,10 @@ static void eHanabiBotan1_dw(eEC_Effect_c* effect, GAME* game) { _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); - Matrix_RotateX(DEG2SHORT_ANGLE2(270), TRUE); - Matrix_RotateZ(-effect->effect_specific[1], TRUE); - Matrix_scale(v, 1.f, 1.f, TRUE); - Matrix_RotateZ(effect->effect_specific[1], TRUE); + 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); 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_hanabi_botan2.c b/src/effect/ef_hanabi_botan2.c index b21d45c1..1627b150 100644 --- a/src/effect/ef_hanabi_botan2.c +++ b/src/effect/ef_hanabi_botan2.c @@ -96,10 +96,10 @@ static void eHanabiBotan2_dw(eEC_Effect_c* effect, GAME* game) { _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); - Matrix_RotateX(DEG2SHORT_ANGLE2(270), TRUE); - Matrix_RotateZ(-effect->effect_specific[1], TRUE); - Matrix_scale(v, 1.f, 1.f, TRUE); - Matrix_RotateZ(effect->effect_specific[1], TRUE); + 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); @@ -108,7 +108,7 @@ static void eHanabiBotan2_dw(eEC_Effect_c* effect, GAME* game) { gDPSetEnvColor(NEXT_POLY_XLU_DISP, res1[5], res1[6], res1[7], res1[8]); gSPDisplayList(NEXT_POLY_XLU_DISP, ef_hanabi_b_00_modelT); Matrix_pull(); - Matrix_scale(v2 * 0.6f, v2 * 0.6f, v2 * 0.6f, TRUE); + Matrix_scale(v2 * 0.6f, v2 * 0.6f, v2 * 0.6f, MTX_MULT); gDPPipeSync(NEXT_POLY_XLU_DISP); 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, res2[4], res2[0], res2[1], res2[2], res2[3]); diff --git a/src/effect/ef_hanabi_hoshi.c b/src/effect/ef_hanabi_hoshi.c index 74231e0b..c8a38789 100644 --- a/src/effect/ef_hanabi_hoshi.c +++ b/src/effect/ef_hanabi_hoshi.c @@ -101,10 +101,10 @@ static void eHanabiHoshi_dw(eEC_Effect_c* effect, GAME* game) { _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); - Matrix_RotateX(DEG2SHORT_ANGLE2(270), TRUE); - Matrix_RotateZ(-effect->effect_specific[1], TRUE); - Matrix_scale(v, 1.f, 1.f, TRUE); - Matrix_RotateZ(effect->effect_specific[1], TRUE); + 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); 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_hanabi_yanagi.c b/src/effect/ef_hanabi_yanagi.c index c5c3376b..4e7c4820 100644 --- a/src/effect/ef_hanabi_yanagi.c +++ b/src/effect/ef_hanabi_yanagi.c @@ -92,10 +92,10 @@ static void eHanabiYanagi_dw(eEC_Effect_c* effect, GAME* game) { _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); - Matrix_RotateX(DEG2SHORT_ANGLE2(270), TRUE); - Matrix_RotateZ(-effect->effect_specific[1], TRUE); - Matrix_scale(v, 1.f, 1.f, TRUE); - Matrix_RotateZ(effect->effect_specific[1], TRUE); + 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); @@ -104,7 +104,7 @@ static void eHanabiYanagi_dw(eEC_Effect_c* effect, GAME* game) { gDPSetEnvColor(NEXT_POLY_XLU_DISP, res1[5], res1[6], res1[7], res1[8]); gSPDisplayList(NEXT_POLY_XLU_DISP, ef_hanabi_y_00_modelT); Matrix_pull(); - Matrix_scale(v2 * 0.6f, v2 * 0.6f, v2 * 0.6f, TRUE); + Matrix_scale(v2 * 0.6f, v2 * 0.6f, v2 * 0.6f, MTX_MULT); gDPPipeSync(NEXT_POLY_XLU_DISP); 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, res2[4], res2[0], res2[1], res2[2], res2[3]); diff --git a/src/effect/ef_impact_star.c b/src/effect/ef_impact_star.c index b13c4d9e..b2172c3e 100644 --- a/src/effect/ef_impact_star.c +++ b/src/effect/ef_impact_star.c @@ -86,10 +86,10 @@ static void eImpact_Star_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->position.y, effect->position.z, 0); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_RotateZ(effect->effect_specific[0], 1); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_RotateZ(effect->effect_specific[0], MTX_MULT); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 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, 255, 255, 255, 100, alpha); diff --git a/src/effect/ef_kagu_happa.c b/src/effect/ef_kagu_happa.c index ea755b0a..e447b978 100644 --- a/src/effect/ef_kagu_happa.c +++ b/src/effect/ef_kagu_happa.c @@ -65,10 +65,10 @@ static void eKagu_Happa_dw(eEC_Effect_c* effect, GAME* game) { GAME_PLAY* play = (GAME_PLAY*)game; OPEN_DISP(game->graph); _texture_z_light_fog_prim(game->graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); if (!effect->arg0) { - Matrix_RotateZ(s, TRUE); - Matrix_mult(&play->billboard_matrix, TRUE); + Matrix_RotateZ(s, MTX_MULT); + Matrix_mult(&play->billboard_matrix, MTX_MULT); } Matrix_scale(effect->scale.x * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), effect->scale.y * (GETREG(MYKREG, 0x1b) * 0.01f + 1.f), diff --git a/src/effect/ef_kamifubuki.c b/src/effect/ef_kamifubuki.c index 531c8079..fed0c3d4 100644 --- a/src/effect/ef_kamifubuki.c +++ b/src/effect/ef_kamifubuki.c @@ -35,8 +35,8 @@ static void eKamifubuki_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) { xyz_t p; f32 s; s = sin_s(d) * 7.f; - Matrix_RotateY(a, FALSE); - Matrix_RotateX(effect->arg1, TRUE); + Matrix_RotateY(a, MTX_LOAD); + Matrix_RotateX(effect->arg1, MTX_MULT); p.x = s * sin_s(r); p.y = cos_s(d) * 7.f; p.z = s * cos_s(r); @@ -51,7 +51,7 @@ static void eKamifubuki_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) { Matrix_Position(&p, &effect->acceleration); effect->effect_specific[0] = qrand(); effect->effect_specific[1] = DEG2SHORT_ANGLE2(RANDOM2_F(15.f) + 15.f); - Matrix_rotateXYZ(qrand(), qrand(), qrand(), FALSE); + Matrix_rotateXYZ(qrand(), qrand(), qrand(), MTX_LOAD); Matrix_Position(&unit_axis, &effect->offset); effect->timer = EFFECT_LIFETIME - RANDOM(5.f); } @@ -74,8 +74,8 @@ static void eKamifubuki_mv(eEC_Effect_c* effect, GAME* game) { extern Gfx ef_kamihubuki01_00_model[]; static void eKamifubuki_one_draw(eEC_Effect_c* effect, xyz_t* pos, GAME* game) { OPEN_DISP(game->graph); - Matrix_translate(pos->x, pos->y, pos->z, FALSE); - Matrix_RotateVector(effect->effect_specific[0], &effect->offset, TRUE); + 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); 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_kangaeru.c b/src/effect/ef_kangaeru.c index 4083ee31..c5162057 100644 --- a/src/effect/ef_kangaeru.c +++ b/src/effect/ef_kangaeru.c @@ -100,25 +100,25 @@ static void eKG_dw(eEC_Effect_c* effect, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); - Matrix_mult(&play->billboard_matrix, TRUE); + 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); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, TRUE); - Matrix_translate(-475.0f, 950.0f, 0.0f, TRUE); - Matrix_RotateZ(effect->effect_specific[1], TRUE); + 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); 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, 255, 255, 255, 255, effect->effect_specific[4]); gSPDisplayList(NEXT_POLY_XLU_DISP, ef_think_l_modelT); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); - Matrix_mult(&play->billboard_matrix, TRUE); + 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); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, TRUE); - Matrix_translate(475.0f, 0.0f, 0.0f, TRUE); - Matrix_RotateZ(effect->effect_specific[2], TRUE); + 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); 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, 255, 255, 255, 255, effect->effect_specific[4]); diff --git a/src/effect/ef_kasamizu.c b/src/effect/ef_kasamizu.c index c02ccc0a..1a844c6e 100644 --- a/src/effect/ef_kasamizu.c +++ b/src/effect/ef_kasamizu.c @@ -28,7 +28,7 @@ static void eKasamizu_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) { static xyz_t base_offset = {0, 45.0f, -20.0f}; xyz_t pos; s16 angle = *(s16*)ct_arg; - Matrix_RotateY(angle, 0); + Matrix_RotateY(angle, MTX_LOAD); Matrix_Position(&base_offset, &pos); xyz_t_add(&effect->position, &pos, &effect->position); effect->effect_specific[0] = angle; diff --git a/src/effect/ef_kasamizutama.c b/src/effect/ef_kasamizutama.c index 12cdc31a..fce6e0c4 100644 --- a/src/effect/ef_kasamizutama.c +++ b/src/effect/ef_kasamizutama.c @@ -40,8 +40,8 @@ static void eKasamizutama_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) { xyz_t pos; f32 sin = 2.5f * sin_s(rand_angle); - Matrix_RotateY(angle, 0); - Matrix_RotateX(DEG2SHORT_ANGLE2(-45.0f), 1); + Matrix_RotateY(angle, MTX_LOAD); + Matrix_RotateX(DEG2SHORT_ANGLE2(-45.0f), MTX_MULT); pos.x = (sin) * sin_s(rand); pos.y = 2.5f * cos_s(rand_angle); diff --git a/src/effect/ef_kaze.c b/src/effect/ef_kaze.c index 6b414de9..dffd2e02 100644 --- a/src/effect/ef_kaze.c +++ b/src/effect/ef_kaze.c @@ -89,18 +89,18 @@ static void eKZ_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->position.y, effect->position.z, 0); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_translate(effect->offset.x, effect->offset.y, effect->offset.z, 1); + 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, effect->offset.y, effect->offset.z, MTX_MULT); if (effect->effect_specific[0] == 0) { - Matrix_RotateZ(DEG2SHORT_ANGLE2(-11.25f), 1); + Matrix_RotateZ(DEG2SHORT_ANGLE2(-11.25f), MTX_MULT); } else { - Matrix_RotateZ(DEG2SHORT_ANGLE2(11.25f), 1); + Matrix_RotateZ(DEG2SHORT_ANGLE2(11.25f), MTX_MULT); } scale = GETREG(MYKREG, 27) * 0.01f + 1.0f; - Matrix_scale(effect->scale.x * scale, effect->scale.y * scale, effect->scale.z * scale, 1); + Matrix_scale(effect->scale.x * scale, effect->scale.y * scale, effect->scale.z * scale, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Evw_Anime_Set(play, &ef_kaze01_evw_anime); diff --git a/src/effect/ef_kaze_happa.c b/src/effect/ef_kaze_happa.c index 662cbf20..b58defa6 100644 --- a/src/effect/ef_kaze_happa.c +++ b/src/effect/ef_kaze_happa.c @@ -118,17 +118,17 @@ static void eKZH_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->position.y, effect->position.z, 0); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_translate(effect->offset.x + GETREG(MYKREG, 24), effect->offset.y + GETREG(MYKREG, 25), effect->offset.z + GETREG(MYKREG, 26), 1); + 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, 24), effect->offset.y + GETREG(MYKREG, 25), effect->offset.z + GETREG(MYKREG, 26), MTX_MULT); if (effect->effect_specific[1] == 0) { - Matrix_RotateZ(effect->effect_specific[3], 1); + Matrix_RotateZ(effect->effect_specific[3], MTX_MULT); } else { - Matrix_RotateZ(-effect->effect_specific[3], 1); + Matrix_RotateZ(-effect->effect_specific[3], MTX_MULT); } - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 1); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 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_kaze01_happa_modelT); diff --git a/src/effect/ef_kikuzu.c b/src/effect/ef_kikuzu.c index 2e8d341d..1c9f30e1 100644 --- a/src/effect/ef_kikuzu.c +++ b/src/effect/ef_kikuzu.c @@ -84,10 +84,10 @@ static void eKikuzu_dw(eEC_Effect_c* effect, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); OPEN_DISP(game->graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, 0); - Matrix_RotateX(effect->effect_specific[0], 1); - Matrix_RotateZ(effect->effect_specific[2], 1); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_RotateX(effect->effect_specific[0], MTX_MULT); + Matrix_RotateZ(effect->effect_specific[2], MTX_MULT); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, 255, 255, 255, 200, a); 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_killer.c b/src/effect/ef_killer.c index 1a4ce55a..84bcc5cc 100644 --- a/src/effect/ef_killer.c +++ b/src/effect/ef_killer.c @@ -140,9 +140,9 @@ extern Gfx act_killer_model[]; static void eKL_dw(eEC_Effect_c* effect, GAME* game) { GAME_PLAY* play = (GAME_PLAY*)game; - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, 0); - Matrix_RotateY(effect->arg0, 1); - Matrix_scale(0.01f, 0.01f, effect->scale.z * 0.01f, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_RotateY(effect->arg0, MTX_MULT); + Matrix_scale(0.01f, 0.01f, effect->scale.z * 0.01f, MTX_MULT); _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); diff --git a/src/effect/ef_konpu.c b/src/effect/ef_konpu.c index 312fb08b..9c0f98c2 100644 --- a/src/effect/ef_konpu.c +++ b/src/effect/ef_konpu.c @@ -143,10 +143,10 @@ static void eKONP_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->position.y, effect->position.z, 0); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_RotateZ(effect->effect_specific[4], 1); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_RotateZ(effect->effect_specific[4], MTX_MULT); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 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, 255, eKONP_prim_color_data[color_idx].r, eKONP_prim_color_data[color_idx].g, eKONP_prim_color_data[color_idx].b, a); diff --git a/src/effect/ef_kpun.c b/src/effect/ef_kpun.c index b74d51b6..cdb43099 100644 --- a/src/effect/ef_kpun.c +++ b/src/effect/ef_kpun.c @@ -135,11 +135,11 @@ static void eKPun_dw(eEC_Effect_c* effect, GAME* game) { OPEN_DISP(game->graph); _texture_z_light_fog_prim_xlu(game->graph); - Matrix_translate(pos_p->x, pos_p->y, pos_p->z, 0); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_RotateZ(effect->effect_specific[0], 1); - Matrix_translate(offset_p->x, offset_p->y, offset_p->z, 1); - Matrix_scale(scale_p->x, scale_p->y, scale_p->z, 1); + Matrix_translate(pos_p->x, pos_p->y, pos_p->z, MTX_LOAD); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_RotateZ(effect->effect_specific[0], MTX_MULT); + Matrix_translate(offset_p->x, offset_p->y, offset_p->z, MTX_MULT); + Matrix_scale(scale_p->x, scale_p->y, scale_p->z, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(NEXT_POLY_XLU_DISP, ANIME_1_TXT_SEG, eKPun_yuge_texture_table[tex0]); diff --git a/src/effect/ef_make_hem.c b/src/effect/ef_make_hem.c index 45aba1a3..18bf24fc 100644 --- a/src/effect/ef_make_hem.c +++ b/src/effect/ef_make_hem.c @@ -118,8 +118,8 @@ static void eMH_dw(eEC_Effect_c* effect, GAME* game) { f32 scale = effect->scale.x * 0.01f; Setpos_HiliteReflect_xlu_init(pos, play); - Matrix_translate(pos->x, pos->y, pos->z, 0); - Matrix_scale(scale, scale, scale, 1); + Matrix_translate(pos->x, pos->y, pos->z, MTX_LOAD); + Matrix_scale(scale, scale, scale, MTX_MULT); _texture_z_light_fog_prim(game->graph); OPEN_DISP(game->graph); @@ -210,9 +210,9 @@ extern Gfx ef_takurami01_kira_modelT[]; static void eMHK_dw(eEC_Effect_c* effect, GAME* game) { GAME_PLAY* play = (GAME_PLAY*)game; - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, 0); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); _texture_z_light_fog_prim_xlu(game->graph); OPEN_DISP(game->graph); @@ -275,8 +275,8 @@ extern Gfx ef_circle_light_model[]; static void eMHL_dw(eEC_Effect_c* effect, GAME* game) { u8 alpha = effect->effect_specific[0]; - Matrix_translate(effect->position.x, effect->position.y + 0.1f, effect->position.z, 0); - Matrix_scale(0.01f, 0.01f, 0.01f, 1); + Matrix_translate(effect->position.x, effect->position.y + 0.1f, effect->position.z, MTX_LOAD); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); _texture_z_light_fog_prim_shadow(game->graph); OPEN_DISP(game->graph); diff --git a/src/effect/ef_motiyuge.c b/src/effect/ef_motiyuge.c index 2dace510..473de7ff 100644 --- a/src/effect/ef_motiyuge.c +++ b/src/effect/ef_motiyuge.c @@ -72,10 +72,10 @@ static void eMotiyuge_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->position.y, effect->position.z, 0); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_RotateZ(effect->effect_specific[0], 1); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_RotateZ(effect->effect_specific[0], MTX_MULT); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(NEXT_POLY_XLU_DISP, ANIME_1_TXT_SEG, tex_p); diff --git a/src/effect/ef_namida.c b/src/effect/ef_namida.c index 9a8aa9b1..f29dd854 100644 --- a/src/effect/ef_namida.c +++ b/src/effect/ef_namida.c @@ -92,10 +92,10 @@ static void eNamida_dw(eEC_Effect_c* effect, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); - Matrix_translate(vec.x, vec.y, vec.z, TRUE); - Matrix_mult(&((GAME_PLAY*)game)->billboard_matrix, TRUE); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, TRUE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_translate(vec.x, vec.y, vec.z, MTX_MULT); + Matrix_mult(&((GAME_PLAY*)game)->billboard_matrix, MTX_MULT); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 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_namida01_modelT); diff --git a/src/effect/ef_neboke_awa.c b/src/effect/ef_neboke_awa.c index affda1ff..9d0e184d 100644 --- a/src/effect/ef_neboke_awa.c +++ b/src/effect/ef_neboke_awa.c @@ -98,11 +98,11 @@ static void eSleep_dw(eEC_Effect_c* effect, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); - Matrix_translate(vec.x, vec.y, vec.z, FALSE); - Matrix_mult(&((GAME_PLAY*)game)->billboard_matrix, TRUE); + Matrix_translate(vec.x, vec.y, vec.z, MTX_LOAD); + Matrix_mult(&((GAME_PLAY*)game)->billboard_matrix, MTX_MULT); atan = atans_table(vec.y - effect->offset.y, vec.x - effect->offset.x); - Matrix_RotateZ(-(atan + DEG2SHORT_ANGLE2(180.0f)), TRUE); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, TRUE); + Matrix_RotateZ(-(atan + DEG2SHORT_ANGLE2(180.0f)), MTX_MULT); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 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, effect->effect_specific[1]); diff --git a/src/effect/ef_night13_moon.c b/src/effect/ef_night13_moon.c index c7f485a5..c913eca1 100644 --- a/src/effect/ef_night13_moon.c +++ b/src/effect/ef_night13_moon.c @@ -120,14 +120,14 @@ static void eNight13Moon_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, 0); - Matrix_RotateY(-angle0, 1); - Matrix_scale(1.075f, 1.0f, 1.0f, 1); - Matrix_RotateY(angle0, 1); - Matrix_RotateY(-angle1, 1); - Matrix_scale(1.0f, 1.0f, 1.075f, 1); - Matrix_RotateY(angle1, 1); - Matrix_scale(0.049f, 1.0f, 0.049f, 1); + Matrix_translate(effect->position.x + effect->offset.x, effect->position.y + effect->offset.y, effect->position.z + effect->offset.z, MTX_LOAD); + Matrix_RotateY(-angle0, MTX_MULT); + Matrix_scale(1.075f, 1.0f, 1.0f, MTX_MULT); + Matrix_RotateY(angle0, MTX_MULT); + Matrix_RotateY(-angle1, MTX_MULT); + Matrix_scale(1.0f, 1.0f, 1.075f, MTX_MULT); + Matrix_RotateY(angle1, MTX_MULT); + Matrix_scale(0.049f, 1.0f, 0.049f, 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, 40, 255, 255, 100, 170); diff --git a/src/effect/ef_night15_moon.c b/src/effect/ef_night15_moon.c index 25672ff4..ee57d411 100644 --- a/src/effect/ef_night15_moon.c +++ b/src/effect/ef_night15_moon.c @@ -120,14 +120,14 @@ static void eNight15Moon_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, 0); - Matrix_RotateY(-angle0, 1); - Matrix_scale(1.075f, 1.0f, 1.0f, 1); - Matrix_RotateY(angle0, 1); - Matrix_RotateY(-angle1, 1); - Matrix_scale(1.0f, 1.0f, 1.075f, 1); - Matrix_RotateY(angle1, 1); - Matrix_scale(0.049f, 1.0f, 0.049f, 1); + Matrix_translate(effect->position.x + effect->offset.x, effect->position.y + effect->offset.y, effect->position.z + effect->offset.z, MTX_LOAD); + Matrix_RotateY(-angle0, MTX_MULT); + Matrix_scale(1.075f, 1.0f, 1.0f, MTX_MULT); + Matrix_RotateY(angle0, MTX_MULT); + Matrix_RotateY(-angle1, MTX_MULT); + Matrix_scale(1.0f, 1.0f, 1.075f, MTX_MULT); + Matrix_RotateY(angle1, MTX_MULT); + Matrix_scale(0.049f, 1.0f, 0.049f, 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, 40, 255, 255, 100, 170); diff --git a/src/effect/ef_ongen.c b/src/effect/ef_ongen.c index e9dac5c1..833fcc9e 100644 --- a/src/effect/ef_ongen.c +++ b/src/effect/ef_ongen.c @@ -57,9 +57,9 @@ static void eOngen_dw(eEC_Effect_c* effect, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); - Matrix_mult(&((GAME_PLAY*)game)->billboard_matrix, TRUE); - Matrix_scale(scale, scale, scale, TRUE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_mult(&((GAME_PLAY*)game)->billboard_matrix, MTX_MULT); + Matrix_scale(scale, scale, scale, 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, 190); diff --git a/src/effect/ef_otikomi.c b/src/effect/ef_otikomi.c index fc0dfb38..0188ec01 100644 --- a/src/effect/ef_otikomi.c +++ b/src/effect/ef_otikomi.c @@ -102,29 +102,29 @@ static void eOMN_dw(eEC_Effect_c* effect, GAME* game) { OPEN_DISP(game->graph); - Matrix_translate(effect->position.x, effect->position.y + 4.0f, effect->position.z, FALSE); - Matrix_mult(&play->billboard_matrix, TRUE); + 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); if (GETREG(MYKREG, 0)) { - Matrix_RotateZ(-effect->effect_specific[0], TRUE); - Matrix_scale(scale_m * 1.025f, scale_m, scale_m, TRUE); - Matrix_RotateZ(effect->effect_specific[0], TRUE); + Matrix_RotateZ(-effect->effect_specific[0], MTX_MULT); + Matrix_scale(scale_m * 1.025f, scale_m, scale_m, MTX_MULT); + Matrix_RotateZ(effect->effect_specific[0], MTX_MULT); } else { - Matrix_scale(0.01f, 0.01f, 0.01f, TRUE); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); } - Matrix_scale(effect->velocity.z * 1.3f, effect->velocity.y, 1.0f, TRUE); + Matrix_scale(effect->velocity.z * 1.3f, effect->velocity.y, 1.0f, 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, 255, 40, 30, 40, alpha); gDPSetEnvColor(NEXT_POLY_XLU_DISP, 100, 100, 255, 255); gSPDisplayList(NEXT_POLY_XLU_DISP, ef_doyon01_00_modelT); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); - Matrix_mult(&play->billboard_matrix, TRUE); + 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); - Matrix_scale(0.015f, scale_y, 0.01f, TRUE); + 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); gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, 255, 0, 255, 255, alpha2); diff --git a/src/effect/ef_pun_yuge.c b/src/effect/ef_pun_yuge.c index 555b897b..e898ce80 100644 --- a/src/effect/ef_pun_yuge.c +++ b/src/effect/ef_pun_yuge.c @@ -107,11 +107,11 @@ static void ePunYuge_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->position.y, effect->position.z, 0); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_RotateZ(effect->effect_specific[0], 1); - Matrix_translate(effect->offset.x, effect->offset.y, effect->offset.z, 1); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_RotateZ(effect->effect_specific[0], MTX_MULT); + Matrix_translate(effect->offset.x, effect->offset.y, effect->offset.z, MTX_MULT); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(NEXT_POLY_XLU_DISP, G_MWO_SEGMENT_8, ePunYuge_yuge_texture_table[anime_idx0]); diff --git a/src/effect/ef_reset_hole.c b/src/effect/ef_reset_hole.c index 57382e78..6fe60474 100644 --- a/src/effect/ef_reset_hole.c +++ b/src/effect/ef_reset_hole.c @@ -116,10 +116,10 @@ static void eReset_Hole_dw(eEC_Effect_c* effect, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); scale = GETREG(MYKREG, 0x1b) * 0.01f + 1.0f; - Matrix_scale(effect->scale.x * scale, effect->scale.y * scale, effect->scale.z * scale, TRUE); + Matrix_scale(effect->scale.x * scale, effect->scale.y * scale, effect->scale.z * scale, 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_reset_hole_modelT); diff --git a/src/effect/ef_room_sunshine.c b/src/effect/ef_room_sunshine.c index c764606a..ad04d292 100644 --- a/src/effect/ef_room_sunshine.c +++ b/src/effect/ef_room_sunshine.c @@ -142,7 +142,7 @@ static void setup_mode_Ef_Room_Sunshine(ACTOR* actor, GAME_PLAY* play) { Matrix_translate(sunshine->actor_class.world.position.x, 0.1f + sunshine->actor_class.world.position.y, sunshine->actor_class.world.position.z, 0); - Matrix_scale(sunshine->actor_class.scale.x, sunshine->actor_class.scale.y, sunshine->actor_class.scale.z, 1); + 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 980ee1d7..56ca34f9 100644 --- a/src/effect/ef_room_sunshine_minsect.c +++ b/src/effect/ef_room_sunshine_minsect.c @@ -149,7 +149,7 @@ static void setup_mode_Ef_Room_Sunshine_Minsect(ACTOR* actor, GAME_PLAY* play) { Matrix_translate(sunshine->actor_class.world.position.x, sunshine->actor_class.world.position.y, sunshine->actor_class.world.position.z, 0); - Matrix_scale(sunshine->actor_class.scale.x, sunshine->actor_class.scale.y, sunshine->actor_class.scale.z, 1); + Matrix_scale(sunshine->actor_class.scale.x, sunshine->actor_class.scale.y, sunshine->actor_class.scale.z, MTX_MULT); gDPPipeSync(NEXT_POLY_XLU_DISP); @@ -178,7 +178,7 @@ static void setup_mode_Ef_Room_Sunshine_Minsect_decal(ACTOR* actor, GAME_PLAY* p Matrix_translate(sunshine->actor_class.world.position.x, sunshine->actor_class.world.position.y, sunshine->actor_class.world.position.z, 0); - Matrix_scale(sunshine->actor_class.scale.x, sunshine->actor_class.scale.y, sunshine->actor_class.scale.z, 1); + Matrix_scale(sunshine->actor_class.scale.x, sunshine->actor_class.scale.y, sunshine->actor_class.scale.z, MTX_MULT); gDPPipeSync(NEXT_POLY_OPA_DISP); @@ -208,7 +208,7 @@ static void BG_draw_Minsect(ACTOR* actor, GAME_PLAY* play) { } graph = play->game.graph; - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 0); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, MTX_LOAD); Global_kankyo_set_room_prim((GAME*)play); OPEN_DISP(graph); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(play->game.graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -221,7 +221,7 @@ static void BG_draw_Minsect_niwa(ACTOR* actor, GAME_PLAY* play) { GRAPH* graph; graph = play->game.graph; - Matrix_scale(0.0625f, 0.0625f, 0.0625f, 0); + Matrix_scale(0.0625f, 0.0625f, 0.0625f, MTX_LOAD); Global_kankyo_set_room_prim((GAME*)play); OPEN_DISP(graph); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(play->game.graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/effect/ef_room_sunshine_museum.c b/src/effect/ef_room_sunshine_museum.c index 3565934c..73f96c1c 100644 --- a/src/effect/ef_room_sunshine_museum.c +++ b/src/effect/ef_room_sunshine_museum.c @@ -146,7 +146,7 @@ void setup_mode_Ef_Room_Sunshine_Museum(ACTOR* actor, GAME_PLAY* play){ 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); - Matrix_scale(sunshine->actor_class.scale.x, sunshine->actor_class.scale.y, sunshine->actor_class.scale.z,1); + Matrix_scale(sunshine->actor_class.scale.x, sunshine->actor_class.scale.y, sunshine->actor_class.scale.z, MTX_MULT); gDPPipeSync(NEXT_POLY_XLU_DISP); @@ -202,4 +202,4 @@ void Ef_Room_Sunshine_MuseumR_actor_draw(ACTOR* actor, GAME* game){ CLOSE_DISP(graph); } -} \ No newline at end of file +} diff --git a/src/effect/ef_room_sunshine_police.c b/src/effect/ef_room_sunshine_police.c index 76f9459b..846d4ca4 100644 --- a/src/effect/ef_room_sunshine_police.c +++ b/src/effect/ef_room_sunshine_police.c @@ -152,7 +152,7 @@ static void setup_mode_Ef_Room_Sunshine_Police(ACTOR* actor, GAME_PLAY* play) { Matrix_translate(sunshine->actor_class.world.position.x, sunshine->actor_class.world.position.y, sunshine->actor_class.world.position.z, 0); - Matrix_scale(sunshine->actor_class.scale.x, sunshine->actor_class.scale.y, sunshine->actor_class.scale.z, 1); + 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 43f92cec..37c7b7d3 100644 --- a/src/effect/ef_room_sunshine_posthouse.c +++ b/src/effect/ef_room_sunshine_posthouse.c @@ -144,7 +144,7 @@ static void setup_mode_Ef_Room_Sunshine_Posthouse(ACTOR* actor, GAME_PLAY* play) Matrix_translate(sunshine->actor_class.world.position.x, sunshine->actor_class.world.position.y, sunshine->actor_class.world.position.z, 0); - Matrix_scale(sunshine->actor_class.scale.x, sunshine->actor_class.scale.y, sunshine->actor_class.scale.z, 1); + 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_sandsplash.c b/src/effect/ef_sandsplash.c index cf2e61fc..fb765525 100644 --- a/src/effect/ef_sandsplash.c +++ b/src/effect/ef_sandsplash.c @@ -102,11 +102,11 @@ static void eSandsplash_dw(eEC_Effect_c* effect, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); - Matrix_RotateX(DEG2SHORT_ANGLE2(-45.0f), TRUE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_RotateX(DEG2SHORT_ANGLE2(-45.0f), MTX_MULT); scale = GETREG(MYKREG, 0x1b) * 0.01f + 1.0f; - Matrix_scale(effect->scale.x * scale, effect->scale.y * scale, effect->scale.z * scale, TRUE); + Matrix_scale(effect->scale.x * scale, effect->scale.y * scale, effect->scale.z * scale, MTX_MULT); gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, 130, 20, 20, 20, 255); gDPSetEnvColor(NEXT_POLY_XLU_DISP, 205, 180, 140, 255); diff --git a/src/effect/ef_shooting.c b/src/effect/ef_shooting.c index 087617fb..88263de2 100644 --- a/src/effect/ef_shooting.c +++ b/src/effect/ef_shooting.c @@ -61,12 +61,12 @@ static void eShooting_dw(eEC_Effect_c* effect, GAME* game) { _texture_z_light_fog_prim_xlu(graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); - Matrix_RotateY(-effect->effect_specific[1], TRUE); - Matrix_scale(1.035f, 1.0f, 1.0f, TRUE); - Matrix_RotateY(effect->effect_specific[1], TRUE); - Matrix_RotateY(effect->arg1, TRUE); - Matrix_scale(0.01f, 0.01f, 0.01f * scale_z, TRUE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_RotateY(-effect->effect_specific[1], MTX_MULT); + Matrix_scale(1.035f, 1.0f, 1.0f, MTX_MULT); + Matrix_RotateY(effect->effect_specific[1], MTX_MULT); + Matrix_RotateY(effect->arg1, MTX_MULT); + Matrix_scale(0.01f, 0.01f, 0.01f * scale_z, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(NEXT_POLY_XLU_DISP, G_MWO_SEGMENT_9, two_tile); diff --git a/src/effect/ef_shooting_kira.c b/src/effect/ef_shooting_kira.c index abcfee7b..d9a870e4 100644 --- a/src/effect/ef_shooting_kira.c +++ b/src/effect/ef_shooting_kira.c @@ -86,10 +86,10 @@ static void eShootingKira_dw(eEC_Effect_c* effect, GAME* game) { } angle_z = eEC_CLIP->calc_adjust_proc(counter, 0, 42 + GETREG(MYKREG, 32), 0.0f, 0x20000); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, 0); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_RotateZ(angle_z, 1); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_RotateZ(angle_z, MTX_MULT); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); _texture_z_light_fog_prim_xlu(game->graph); OPEN_DISP(game->graph); diff --git a/src/effect/ef_siawase_hana_ch.c b/src/effect/ef_siawase_hana_ch.c index 92af2b5e..71635144 100644 --- a/src/effect/ef_siawase_hana_ch.c +++ b/src/effect/ef_siawase_hana_ch.c @@ -108,10 +108,10 @@ static void eSSHNC_dw(eEC_Effect_c* effect, GAME* game) { _texture_z_light_fog_prim_xlu(graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); - Matrix_mult(&((GAME_PLAY*)game)->billboard_matrix, TRUE); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, TRUE); - Matrix_RotateZ(effect->effect_specific[1], TRUE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_mult(&((GAME_PLAY*)game)->billboard_matrix, MTX_MULT); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); + Matrix_RotateZ(effect->effect_specific[1], 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, 255, prim[0], prim[1], prim[2], prim_a); diff --git a/src/effect/ef_situren.c b/src/effect/ef_situren.c index 8cbafbda..a2a1cd2e 100644 --- a/src/effect/ef_situren.c +++ b/src/effect/ef_situren.c @@ -95,10 +95,10 @@ static void eSN_dw(eEC_Effect_c* effect, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); - Matrix_mult(&((GAME_PLAY*)game)->billboard_matrix, TRUE); - Matrix_translate(effect->offset.x, effect->offset.y, effect->offset.z, TRUE); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, TRUE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_mult(&((GAME_PLAY*)game)->billboard_matrix, MTX_MULT); + Matrix_translate(effect->offset.x, effect->offset.y, effect->offset.z, MTX_MULT); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 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, 255, 255, 200, 255, alpha); diff --git a/src/effect/ef_slip_footprint.c b/src/effect/ef_slip_footprint.c index c5dc1dd0..215219cc 100644 --- a/src/effect/ef_slip_footprint.c +++ b/src/effect/ef_slip_footprint.c @@ -106,11 +106,11 @@ static void eSlipFootPrint_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->position.y, effect->position.z, 0); - Matrix_RotateX(effect->effect_specific[0], TRUE); - Matrix_RotateY(effect->effect_specific[2], TRUE); - Matrix_RotateZ(effect->effect_specific[1], TRUE); - Matrix_scale(scale, 0.008f, scale, TRUE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_RotateX(effect->effect_specific[0], MTX_MULT); + Matrix_RotateY(effect->effect_specific[2], MTX_MULT); + Matrix_RotateZ(effect->effect_specific[1], MTX_MULT); + Matrix_scale(scale, 0.008f, scale, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (effect->effect_specific[3]) { diff --git a/src/effect/ef_tamaire.c b/src/effect/ef_tamaire.c index 0fc4599c..1f375294 100644 --- a/src/effect/ef_tamaire.c +++ b/src/effect/ef_tamaire.c @@ -145,18 +145,18 @@ static void eTamaire_dw(eEC_Effect_c* effect, GAME* game) { _texture_z_light_fog_prim_xlu(graph); if ((effect->effect_specific[2] & 1) == 0) { - Matrix_translate(effect->position.x, effect->offset.y - 3.0f, effect->position.z, FALSE); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, TRUE); + Matrix_translate(effect->position.x, effect->offset.y - 3.0f, effect->position.z, MTX_LOAD); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); gDPSetPrimColor(NEXT_SHADOW_DISP, 0, 255, 0, 0, 0, shadow_alpha); gSPMatrix(NEXT_SHADOW_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(NEXT_SHADOW_DISP, ef_tamaire_shadow_modelT); } - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); - Matrix_mult(&play->billboard_matrix, TRUE); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, TRUE); - Matrix_RotateZ(effect->effect_specific[0], TRUE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); + Matrix_RotateZ(effect->effect_specific[0], 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, 255, 255, 255, 255, (int)alpha); diff --git a/src/effect/ef_tape.c b/src/effect/ef_tape.c index ee7b28e8..ca362ae9 100644 --- a/src/effect/ef_tape.c +++ b/src/effect/ef_tape.c @@ -40,8 +40,8 @@ static void eTape_ct(eEC_Effect_c* effect, GAME* game, void* ct_arg) { pos.x = ofs_x * sin_s(effect->effect_specific[1]); pos.z = ofs_x * cos_s(effect->effect_specific[1]); pos.y = cos_s(effect->effect_specific[0]) * 2.0f; - Matrix_RotateY(effect->arg0, 0); - Matrix_RotateX(effect->arg1, 1); + Matrix_RotateY(effect->arg0, MTX_LOAD); + Matrix_RotateX(effect->arg1, MTX_MULT); Matrix_Position(&pos, &effect->velocity); effect->acceleration = ZeroVec; effect->acceleration.y = -0.025f; @@ -83,12 +83,12 @@ static void eTape_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->position.y, effect->position.z, 0); - Matrix_RotateY(effect->arg0, 1); - Matrix_RotateX(effect->arg1, 1); - Matrix_rotateXYZ(effect->effect_specific[0], effect->effect_specific[1], 0, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_RotateY(effect->arg0, MTX_MULT); + Matrix_RotateX(effect->arg1, MTX_MULT); + Matrix_rotateXYZ(effect->effect_specific[0], effect->effect_specific[1], 0, MTX_MULT); scale = GETREG(MYKREG, 27) * 0.01f + 1.0f; - Matrix_scale(0.01f * scale, scale_y * scale, scale_z * scale, 1); + Matrix_scale(0.01f * scale, scale_y * scale, scale_z * scale, 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, 255, 155, 155, 0, a); gSPDisplayList(NEXT_POLY_XLU_DISP, ef_tape01_01_model); diff --git a/src/effect/ef_tent_lamp.c b/src/effect/ef_tent_lamp.c index f497a8a1..4fee3827 100644 --- a/src/effect/ef_tent_lamp.c +++ b/src/effect/ef_tent_lamp.c @@ -74,8 +74,8 @@ static void eTL_dw(eEC_Effect_c* effect, GAME* game) { OPEN_DISP(game->graph); - Matrix_translate(0.0f, 0.0f, 0.0f, 0); - Matrix_scale(0.05f, 0.05f, 0.05f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_LOAD); + Matrix_scale(0.05f, 0.05f, 0.05f, MTX_MULT); gDPSetPrimColor(NEXT_POLY_OPA_DISP, 0, l, 255, 255, 255, 255); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/effect/ef_tumble_bodyprint.c b/src/effect/ef_tumble_bodyprint.c index ae9d8eb7..5cdb4282 100644 --- a/src/effect/ef_tumble_bodyprint.c +++ b/src/effect/ef_tumble_bodyprint.c @@ -93,11 +93,11 @@ static void eTumbleBodyPrint_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->position.y, effect->position.z, 0); - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 1); - Matrix_RotateZ(effect->effect_specific[2], 1); - Matrix_RotateX(effect->effect_specific[0], 1); - Matrix_RotateY(effect->effect_specific[1], 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); + Matrix_RotateZ(effect->effect_specific[2], MTX_MULT); + Matrix_RotateX(effect->effect_specific[0], MTX_MULT); + Matrix_RotateY(effect->effect_specific[1], MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (effect->effect_specific[3] != 0) { diff --git a/src/effect/ef_turi_hamon.c b/src/effect/ef_turi_hamon.c index 9c3617d2..c2375864 100644 --- a/src/effect/ef_turi_hamon.c +++ b/src/effect/ef_turi_hamon.c @@ -107,8 +107,8 @@ static void eTH_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->position.y, effect->position.z, FALSE); - Matrix_scale(scale.x, scale.y, scale.z, TRUE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_scale(scale.x, scale.y, scale.z, 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, 255, 255, 255, 255, effect->effect_specific[0]); diff --git a/src/effect/ef_turi_hane0.c b/src/effect/ef_turi_hane0.c index f8b2db5e..5160a16b 100644 --- a/src/effect/ef_turi_hane0.c +++ b/src/effect/ef_turi_hane0.c @@ -78,8 +78,8 @@ static void eTH0_dw(eEC_Effect_c* effect, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); - Matrix_scale(scale.x, scale.y, scale.z, TRUE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_scale(scale.x, scale.y, scale.z, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(NEXT_POLY_XLU_DISP, G_MWO_SEGMENT_8, eTuri_Hane0Ptn[counter]); diff --git a/src/effect/ef_turi_hane1.c b/src/effect/ef_turi_hane1.c index 290934f7..d512b644 100644 --- a/src/effect/ef_turi_hane1.c +++ b/src/effect/ef_turi_hane1.c @@ -58,8 +58,8 @@ static void eTH0_dw(eEC_Effect_c* effect, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, FALSE); - Matrix_scale(scale.x, scale.y, scale.z, TRUE); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_scale(scale.x, scale.y, scale.z, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(NEXT_POLY_XLU_DISP, G_MWO_SEGMENT_8, eTuri_Hane1Ptn[counter]); diff --git a/src/effect/ef_turi_suiteki.c b/src/effect/ef_turi_suiteki.c index 339f79da..f47ad2d7 100644 --- a/src/effect/ef_turi_suiteki.c +++ b/src/effect/ef_turi_suiteki.c @@ -74,8 +74,8 @@ static void eTS_dw(eEC_Effect_c* effect, GAME* game) { OPEN_DISP(game->graph); _texture_z_light_fog_prim_xlu(game->graph); - Matrix_translate(effect->velocity.x, effect->velocity.y, effect->velocity.z, 0); - Matrix_scale(scale.x, scale.y, scale.z, 1); + Matrix_translate(effect->velocity.x, effect->velocity.y, effect->velocity.z, MTX_LOAD); + Matrix_scale(scale.x, scale.y, scale.z, 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_turi_suiteki01_00_modelT); diff --git a/src/effect/ef_turn_footprint.c b/src/effect/ef_turn_footprint.c index 7b033a48..d57dfa5d 100644 --- a/src/effect/ef_turn_footprint.c +++ b/src/effect/ef_turn_footprint.c @@ -98,11 +98,11 @@ static void eTurnFootPrint_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->position.y, effect->position.z, 0); - Matrix_RotateX(effect->effect_specific[0], 1); - Matrix_RotateY(effect->effect_specific[2], 1); - Matrix_RotateZ(effect->effect_specific[1], 1); - Matrix_scale(scale, 0.0072500003f, scale, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_RotateX(effect->effect_specific[0], MTX_MULT); + Matrix_RotateY(effect->effect_specific[2], MTX_MULT); + Matrix_RotateZ(effect->effect_specific[1], MTX_MULT); + Matrix_scale(scale, 0.0072500003f, scale, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (effect->effect_specific[3] != 0) { diff --git a/src/effect/ef_young_tree.c b/src/effect/ef_young_tree.c index 7ed1dcc4..2572d53c 100644 --- a/src/effect/ef_young_tree.c +++ b/src/effect/ef_young_tree.c @@ -134,20 +134,20 @@ static void eYoung_Tree_dw(eEC_Effect_c* effect, GAME* game) { graph = game->graph; _texture_z_light_fog_prim_xlu(graph); - Matrix_translate(effect->position.x, effect->position.y + 3.0f, effect->position.z + 3.0f, 0); + Matrix_translate(effect->position.x, effect->position.y + 3.0f, effect->position.z + 3.0f, MTX_LOAD); if (effect->arg1 == 0 || effect->arg1 == 3) { - Matrix_RotateVector(effect->effect_specific[1], &effect->offset, 1); + Matrix_RotateVector(effect->effect_specific[1], &effect->offset, MTX_MULT); } else if (effect->arg1 == 1) { - Matrix_translate(0.0f, (f32)GETREG(TAKREG, 20) + 5.0f, 0.0f, 1); - Matrix_RotateVector(effect->effect_specific[1], &effect->offset, 1); - Matrix_translate(0.0f, -5.0f - (f32)GETREG(TAKREG, 20), 0.0f, 1); + Matrix_translate(0.0f, (f32)GETREG(TAKREG, 20) + 5.0f, 0.0f, MTX_MULT); + Matrix_RotateVector(effect->effect_specific[1], &effect->offset, MTX_MULT); + Matrix_translate(0.0f, -5.0f - (f32)GETREG(TAKREG, 20), 0.0f, MTX_MULT); } else { - Matrix_translate(0.0f, 15.0f, 0.0f, 1); - Matrix_RotateVector(effect->effect_specific[1], &effect->offset, 1); - Matrix_translate(0.0f, -15.0f, 0.0f, 1); + Matrix_translate(0.0f, 15.0f, 0.0f, MTX_MULT); + Matrix_RotateVector(effect->effect_specific[1], &effect->offset, MTX_MULT); + Matrix_translate(0.0f, -15.0f, 0.0f, MTX_MULT); } - Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, 1); + Matrix_scale(effect->scale.x, effect->scale.y, effect->scale.z, MTX_MULT); OPEN_DISP(graph); 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_yukidaruma.c b/src/effect/ef_yukidaruma.c index 867fc8f3..cd03fcad 100644 --- a/src/effect/ef_yukidaruma.c +++ b/src/effect/ef_yukidaruma.c @@ -65,8 +65,8 @@ static void eYukidaruma_dw(eEC_Effect_c* effect, GAME* game) { _texture_z_light_fog_prim_xlu(game->graph); if (model < ARRAY_COUNT(ef_yukidaruma_model_tbl)) { - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, 0); - Matrix_scale(effect->offset.x, effect->offset.x, effect->offset.x, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_scale(effect->offset.x, effect->offset.x, effect->offset.x, 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, 255); @@ -74,8 +74,8 @@ static void eYukidaruma_dw(eEC_Effect_c* effect, GAME* game) { } if (frame == 3 || frame == 6 || frame == 9) { - Matrix_translate(effect->position.x, effect->position.y, effect->position.z, 0); - Matrix_scale(effect->offset.x, effect->offset.x, effect->offset.x, 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_scale(effect->offset.x, effect->offset.x, effect->offset.x, 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, 120); diff --git a/src/effect/ef_yukihane.c b/src/effect/ef_yukihane.c index feb0f7c4..ce6e4c99 100644 --- a/src/effect/ef_yukihane.c +++ b/src/effect/ef_yukihane.c @@ -68,10 +68,10 @@ static void eYukihane_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->position.y, effect->position.z, 0); - Matrix_RotateX(DEG2SHORT_ANGLE(-45.0f), 1); + Matrix_translate(effect->position.x, effect->position.y, effect->position.z, MTX_LOAD); + Matrix_RotateX(DEG2SHORT_ANGLE(-45.0f), MTX_MULT); scale = 1.0f + ((f32)(int)GETREG(MYKREG, 27)) * 0.01f; - Matrix_scale(effect->scale.x * scale, effect->scale.y * scale, effect->scale.z * scale, 1); + Matrix_scale(effect->scale.x * scale, effect->scale.y * scale, effect->scale.z * scale, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(NEXT_POLY_XLU_DISP, G_MWO_SEGMENT_8, eYukihane_pattern_table[frame]); diff --git a/src/furniture/ac_ike_tent_fire01.c b/src/furniture/ac_ike_tent_fire01.c index 72bdd0ae..68ddc8da 100644 --- a/src/furniture/ac_ike_tent_fire01.c +++ b/src/furniture/ac_ike_tent_fire01.c @@ -39,10 +39,10 @@ static int fITF_DwAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int joint_id Matrix_Position(&zero_pos, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_RotateY(DEG2SHORT_ANGLE(90.0f), 1); - Matrix_scale(scale_x, scale_y, scale_z, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_RotateY(DEG2SHORT_ANGLE(90.0f), MTX_MULT); + Matrix_scale(scale_x, scale_y, scale_z, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Matrix_pull(); diff --git a/src/furniture/ac_ike_tent_fire02.c b/src/furniture/ac_ike_tent_fire02.c index 88e4ddbf..bfb826af 100644 --- a/src/furniture/ac_ike_tent_fire02.c +++ b/src/furniture/ac_ike_tent_fire02.c @@ -40,10 +40,10 @@ static int fITF02_DwAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int joint_ Matrix_Position(&zero_pos, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_RotateY(DEG2SHORT_ANGLE(90.0f), 1); - Matrix_scale(scale_x, scale_y, scale_z, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_RotateY(DEG2SHORT_ANGLE(90.0f), MTX_MULT); + Matrix_scale(scale_x, scale_y, scale_z, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Matrix_pull(); diff --git a/src/furniture/ac_nog_pawnB.c b/src/furniture/ac_nog_pawnB.c index d666cf30..038dcab9 100644 --- a/src/furniture/ac_nog_pawnB.c +++ b/src/furniture/ac_nog_pawnB.c @@ -36,10 +36,10 @@ static int aNogPawnB_DwAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int joi Matrix_Position(&old_pos, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_RotateY(DEG2SHORT_ANGLE(-90.0f), 1); - Matrix_scale(scale_x, scale_y, scale_z, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_RotateY(DEG2SHORT_ANGLE(-90.0f), MTX_MULT); + Matrix_scale(scale_x, scale_y, scale_z, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Matrix_pull(); diff --git a/src/furniture/ac_nog_pawnW.c b/src/furniture/ac_nog_pawnW.c index 3e6105d2..6b634774 100644 --- a/src/furniture/ac_nog_pawnW.c +++ b/src/furniture/ac_nog_pawnW.c @@ -36,10 +36,10 @@ static int aNogpawnW_DwAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int joi Matrix_Position(&old_pos, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_RotateY(DEG2SHORT_ANGLE(-90.0f), 1); - Matrix_scale(scale_x, scale_y, scale_z, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_RotateY(DEG2SHORT_ANGLE(-90.0f), MTX_MULT); + Matrix_scale(scale_x, scale_y, scale_z, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Matrix_pull(); diff --git a/src/furniture/ac_radio_test.c b/src/furniture/ac_radio_test.c index 48e31be8..e4a7b494 100644 --- a/src/furniture/ac_radio_test.c +++ b/src/furniture/ac_radio_test.c @@ -30,7 +30,7 @@ static void fRT_dw(FTR_ACTOR* ftr_actor, ACTOR* my_room_actor, GAME* game, u8* d OPEN_DISP(game->graph); - Matrix_RotateY(DEG2SHORT_ANGLE(-157.5f), 1); + Matrix_RotateY(DEG2SHORT_ANGLE(-157.5f), MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, radio_pal); gSPDisplayList(NEXT_POLY_OPA_DISP, radio_DL_model); diff --git a/src/furniture/ac_sugi_torch.c b/src/furniture/ac_sugi_torch.c index 538323ee..82f55f84 100644 --- a/src/furniture/ac_sugi_torch.c +++ b/src/furniture/ac_sugi_torch.c @@ -37,10 +37,10 @@ static int fSGT_DwAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int joint_id Matrix_Position(&zero_pos, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_RotateY(DEG2SHORT_ANGLE(90.0f), 1); - Matrix_scale(scale_x, scale_y, scale_z, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_RotateY(DEG2SHORT_ANGLE(90.0f), MTX_MULT); + Matrix_scale(scale_x, scale_y, scale_z, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Matrix_pull(); diff --git a/src/furniture/ac_sum_blue_clk.c b/src/furniture/ac_sum_blue_clk.c index f432e785..775c2374 100644 --- a/src/furniture/ac_sum_blue_clk.c +++ b/src/furniture/ac_sum_blue_clk.c @@ -19,10 +19,10 @@ static int aSumBlueClk_DwAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int j Setpos_HiliteReflect_xlu_init(&ftr_actor->position, play); Matrix_Position(&save_pos, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_RotateY(base_angle_y, 1); - Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f), 1); - Matrix_scale(scale_x, scale_y, scale_z, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_RotateY(base_angle_y, MTX_MULT); + Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f), MTX_MULT); + Matrix_scale(scale_x, scale_y, scale_z, MTX_MULT); OPEN_DISP(graph); @@ -34,11 +34,11 @@ static int aSumBlueClk_DwAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int j } else if (joint_idx == 5) { Matrix_Position(&save_pos, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_RotateY(base_angle_y, 1); - Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_hour), 1); - Matrix_translate(0.0f, 0.0f, 1.0f, 1); - Matrix_scale(scale_x, scale_y, scale_z, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_RotateY(base_angle_y, MTX_MULT); + Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_hour), MTX_MULT); + Matrix_translate(0.0f, 0.0f, 1.0f, MTX_MULT); + Matrix_scale(scale_x, scale_y, scale_z, MTX_MULT); OPEN_DISP(graph); @@ -50,11 +50,11 @@ static int aSumBlueClk_DwAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int j } else if (joint_idx == 7) { Matrix_Position(&save_pos, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_RotateY(base_angle_y, 1); - Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_min), 1); - Matrix_translate(0.0f, 0.0f, 1.0f, 1); - Matrix_scale(scale_x, scale_y, scale_z, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_RotateY(base_angle_y, MTX_MULT); + Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_min), MTX_MULT); + Matrix_translate(0.0f, 0.0f, 1.0f, MTX_MULT); + Matrix_scale(scale_x, scale_y, scale_z, MTX_MULT); OPEN_DISP(graph); diff --git a/src/furniture/ac_sum_hal_clk01.c b/src/furniture/ac_sum_hal_clk01.c index 1b61c39d..9a722def 100644 --- a/src/furniture/ac_sum_hal_clk01.c +++ b/src/furniture/ac_sum_hal_clk01.c @@ -16,11 +16,11 @@ static int aSumHalClk01_DwAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int if (joint_idx == 3) { Matrix_Position(&save_pos, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_RotateY(base_angle_y, 1); - Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_hour), 1); - Matrix_translate(0.0f, 0.0f, 1.0f, 1); - Matrix_scale(scale_x, scale_y, scale_z, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_RotateY(base_angle_y, MTX_MULT); + Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_hour), MTX_MULT); + Matrix_translate(0.0f, 0.0f, 1.0f, MTX_MULT); + Matrix_scale(scale_x, scale_y, scale_z, MTX_MULT); OPEN_DISP(graph); @@ -32,11 +32,11 @@ static int aSumHalClk01_DwAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int } else if (joint_idx == 4) { Matrix_Position(&save_pos, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_RotateY(base_angle_y, 1); - Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_min), 1); - Matrix_translate(0.0f, 0.0f, 1.0f, 1); - Matrix_scale(scale_x, scale_y, scale_z, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_RotateY(base_angle_y, MTX_MULT); + Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_min), MTX_MULT); + Matrix_translate(0.0f, 0.0f, 1.0f, MTX_MULT); + Matrix_scale(scale_x, scale_y, scale_z, MTX_MULT); OPEN_DISP(graph); diff --git a/src/furniture/ac_sum_log_hatoclk.c b/src/furniture/ac_sum_log_hatoclk.c index 9cdd92f3..9a796032 100644 --- a/src/furniture/ac_sum_log_hatoclk.c +++ b/src/furniture/ac_sum_log_hatoclk.c @@ -34,11 +34,11 @@ static int aSumLogHatoclk_DwAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, in if (joint_idx == 7) { Matrix_Position(&save_pos, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_RotateY(base_angle_y, 1); - Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_hour), 1); - Matrix_translate(0.0f, 0.0f, 1.0f, 1); - Matrix_scale(scale_x, scale_y, scale_z, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_RotateY(base_angle_y, MTX_MULT); + Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_hour), MTX_MULT); + Matrix_translate(0.0f, 0.0f, 1.0f, MTX_MULT); + Matrix_scale(scale_x, scale_y, scale_z, MTX_MULT); OPEN_DISP(graph); @@ -50,11 +50,11 @@ static int aSumLogHatoclk_DwAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, in } else if (joint_idx == 8) { Matrix_Position(&save_pos, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_RotateY(base_angle_y, 1); - Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_min), 1); - Matrix_translate(0.0f, 0.0f, 1.0f, 1); - Matrix_scale(scale_x, scale_y, scale_z, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_RotateY(base_angle_y, MTX_MULT); + Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_min), MTX_MULT); + Matrix_translate(0.0f, 0.0f, 1.0f, MTX_MULT); + Matrix_scale(scale_x, scale_y, scale_z, MTX_MULT); OPEN_DISP(graph); diff --git a/src/furniture/ac_sum_x_clk.c b/src/furniture/ac_sum_x_clk.c index 74937302..dbfdb4c7 100644 --- a/src/furniture/ac_sum_x_clk.c +++ b/src/furniture/ac_sum_x_clk.c @@ -19,10 +19,10 @@ static int aSumXClk_DwAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int join Setpos_HiliteReflect_xlu_init(&ftr_actor->position, play); Matrix_Position(&save_pos, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_RotateY(base_angle_y, 1); - Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f), 1); - Matrix_scale(scale_x, scale_y, scale_z, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_RotateY(base_angle_y, MTX_MULT); + Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f), MTX_MULT); + Matrix_scale(scale_x, scale_y, scale_z, MTX_MULT); OPEN_DISP(graph); @@ -34,11 +34,11 @@ static int aSumXClk_DwAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int join } else if (joint_idx == 3) { Matrix_Position(&save_pos, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_RotateY(base_angle_y, 1); - Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_hour), 1); - Matrix_translate(0.0f, 0.0f, 1.0f, 1); - Matrix_scale(scale_x, scale_y, scale_z, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_RotateY(base_angle_y, MTX_MULT); + Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_hour), MTX_MULT); + Matrix_translate(0.0f, 0.0f, 1.0f, MTX_MULT); + Matrix_scale(scale_x, scale_y, scale_z, MTX_MULT); OPEN_DISP(graph); @@ -50,11 +50,11 @@ static int aSumXClk_DwAfter(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int join } else if (joint_idx == 7) { Matrix_Position(&save_pos, &pos); Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_RotateY(base_angle_y, 1); - Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_min), 1); - Matrix_translate(0.0f, 0.0f, 1.0f, 1); - Matrix_scale(scale_x, scale_y, scale_z, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_RotateY(base_angle_y, MTX_MULT); + Matrix_RotateZ(DEG2SHORT_ANGLE(90.0f) - Common_Get(time.rad_min), MTX_MULT); + Matrix_translate(0.0f, 0.0f, 1.0f, MTX_MULT); + Matrix_scale(scale_x, scale_y, scale_z, MTX_MULT); OPEN_DISP(graph); diff --git a/src/game/m_actor.c b/src/game/m_actor.c index 7a72c94a..07f20876 100644 --- a/src/game/m_actor.c +++ b/src/game/m_actor.c @@ -252,7 +252,7 @@ static void Actor_draw(GAME_PLAY* play, ACTOR* actor) { /* Load actor position/scale matrix */ Matrix_softcv3_load(&actor->shape_info.rotation, actor->world.position.x, actor->world.position.y + actor->shape_info.ofs_y * actor->scale.y, actor->world.position.z); - Matrix_scale(actor->scale.x, actor->scale.y, actor->scale.z, 1); + Matrix_scale(actor->scale.x, actor->scale.y, actor->scale.z, MTX_MULT); /* Draw actor */ Actor_draw_ta_set(actor, play); diff --git a/src/game/m_actor_shadow.c b/src/game/m_actor_shadow.c index 2152d208..055a7bab 100644 --- a/src/game/m_actor_shadow.c +++ b/src/game/m_actor_shadow.c @@ -216,42 +216,42 @@ void mActorShadow_DrawActorShadow(ACTOR* actor, Shadow_Info* shadow, GAME_PLAY* x = actor->shape_info.shadow_position->x + ofs.x; y = actor->shape_info.shadow_position->y + y_adjust + ofs.y; z = actor->shape_info.shadow_position->z + ofs.z; - Matrix_translate(x, y, z, 0); + Matrix_translate(x, y, z, MTX_LOAD); break; default: x = shadow->position.x + ofs.x; y = shadow->groundY + y_adjust + ofs.y; z = shadow->position.z + ofs.z; - Matrix_translate(x, y, z, 0); + Matrix_translate(x, y, z, MTX_LOAD); break; } switch (actor->shape_info.force_shadow_position) { case 1: - Matrix_RotateZ(0, 1); - Matrix_RotateX(0, 1); + Matrix_RotateZ(0, MTX_MULT); + Matrix_RotateX(0, MTX_MULT); break; default: - Matrix_RotateZ(shadow->unk24, 1); - Matrix_RotateX(shadow->unk20, 1); + Matrix_RotateZ(shadow->unk24, MTX_MULT); + Matrix_RotateX(shadow->unk20, MTX_MULT); break; } if ((shadow->kind == 0) && (id == 0)) { - Matrix_RotateY(shadow->unk26, 1); + Matrix_RotateY(shadow->unk26, MTX_MULT); } switch (id) { case 1: - Matrix_scale(shadow->unk10, shadow->unk10, rad, 1); + Matrix_scale(shadow->unk10, shadow->unk10, rad, MTX_MULT); break; default: switch (actor->shape_info.force_shadow_position) { case 1: - Matrix_scale(shadow->unk10, shadow->unk10, shadow->unk10, 1); + Matrix_scale(shadow->unk10, shadow->unk10, shadow->unk10, MTX_MULT); break; default: - Matrix_scale(scale, scale, scale, 1); + Matrix_scale(scale, scale, scale, MTX_MULT); break; } break; diff --git a/src/game/m_address_ovl.c b/src/game/m_address_ovl.c index a0592c70..cd7c2e58 100644 --- a/src/game/m_address_ovl.c +++ b/src/game/m_address_ovl.c @@ -462,8 +462,8 @@ static void mAD_set_first_tag(Submenu* submenu, GAME* game, GRAPH* graph, f32 po int idx; idx = 0; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); @@ -496,8 +496,8 @@ static void mAD_set_addressSel_tag_field(GRAPH* graph, f32 pos_x, f32 pos_y, int rgba_t* color_p = &prim_color[idx != 0][col_idx]; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); diff --git a/src/game/m_bank_ovl.c b/src/game/m_bank_ovl.c index 33501177..21abb6b7 100644 --- a/src/game/m_bank_ovl.c +++ b/src/game/m_bank_ovl.c @@ -248,8 +248,8 @@ static void mBN_set_frame_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) u8 s; u8 t; - Matrix_translate(menu->position[0] * 16.0f, menu->position[1] * 16.0f, 140.0f, 0); - Matrix_scale(16.0f, 16.0f, 1.0f, 1); + Matrix_translate(menu->position[0] * 16.0f, menu->position[1] * 16.0f, 140.0f, MTX_LOAD); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_MULT); OPEN_DISP(g); gfx = NOW_POLY_OPA_DISP; diff --git a/src/game/m_banti.c b/src/game/m_banti.c index 5b8766ef..6fa01a4a 100644 --- a/src/game/m_banti.c +++ b/src/game/m_banti.c @@ -394,7 +394,7 @@ static void banti_draw_hiduke_sub(Gfx** gfx_pp, GAME* game, Banti_anim_c* anim, Banti_callback_c callback_data; Matrix_push(); - Matrix_translate(set_pos->x, set_pos->y, set_pos->z, 1); + Matrix_translate(set_pos->x, set_pos->y, set_pos->z, MTX_MULT); m = (Mtx*)GRAPH_ALLOC_TYPE(g, Mtx, anim->keyframe.skeleton->num_shown_joints); callback_data.mtx = m; @@ -455,7 +455,7 @@ static void banti_draw_jikan_sub(Gfx** gfx_pp, GAME* game, Banti_anim_c* anim, i Banti_callback_c callback_data; Matrix_push(); - Matrix_translate(set_pos->x, set_pos->y, set_pos->z, 1); + Matrix_translate(set_pos->x, set_pos->y, set_pos->z, MTX_MULT); if (hide_zero == TRUE) { if (idx0 == 0) { @@ -560,10 +560,10 @@ extern void banti_draw(GAME_PLAY* play) { } } - Matrix_scale(16.0f, 16.0f, 16.0f, 0); + Matrix_scale(16.0f, 16.0f, 16.0f, MTX_LOAD); if (banti.disp_left == TRUE) { - Matrix_translate(-184.0f, 0.0f, 0.0f, 1); + Matrix_translate(-184.0f, 0.0f, 0.0f, MTX_MULT); } { diff --git a/src/game/m_birthday_ovl.c b/src/game/m_birthday_ovl.c index b74d98f1..bccf6cf6 100644 --- a/src/game/m_birthday_ovl.c +++ b/src/game/m_birthday_ovl.c @@ -160,8 +160,8 @@ static void mBR_set_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* game) u8 t; Gfx* gfx; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(x, y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(x, y, 140.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; diff --git a/src/game/m_board_ovl.c b/src/game/m_board_ovl.c index 411d4f3c..3f4d03c7 100644 --- a/src/game/m_board_ovl.c +++ b/src/game/m_board_ovl.c @@ -963,8 +963,8 @@ static void mBD_set_frame_dl(GRAPH* graph, mSM_MenuInfo_c* menu_info, f32 x, f32 int paper_type = board_ovl->mail.content.paper_type; Gfx* gfx; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(x, y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(x, y, 140.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; @@ -1006,8 +1006,8 @@ static void mBD_set_point(Submenu* submenu, GAME* game, f32 x, f32 y) { board_ovl->ofs_x = x + (f32)pre_back_width + 36.0f + -96.0f; board_ovl->ofs_y = y - -76.0f; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(board_ovl->ofs_x, board_ovl->ofs_y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(board_ovl->ofs_x, board_ovl->ofs_y, 140.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; diff --git a/src/game/m_calendar_ovl_draw.c_inc b/src/game/m_calendar_ovl_draw.c_inc index 474439cf..350d1826 100644 --- a/src/game/m_calendar_ovl_draw.c_inc +++ b/src/game/m_calendar_ovl_draw.c_inc @@ -193,8 +193,8 @@ static void mCD_set_base_dl(Submenu* submenu, GAME* game, f32 pos_x, f32 pos_y, year_ofs = sel / lbRTC_MONTHS_MAX; month = sel % lbRTC_MONTHS_MAX; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); @@ -244,7 +244,7 @@ static void mCD_set_base_dl(Submenu* submenu, GAME* game, f32 pos_x, f32 pos_y, for (i = 0; i < 37; k++) { for (j = 0; j < lbRTC_WEEK && i < 37; i++) { Matrix_push(); - Matrix_translate(j * 32, -k * 20, 0.0f, 1); + Matrix_translate(j * 32, -k * 20, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -268,7 +268,7 @@ static void mCD_set_base_dl(Submenu* submenu, GAME* game, f32 pos_x, f32 pos_y, for (k = 0; k < 37; j++) { for (i = 0; i < lbRTC_WEEK && k < 37; k++) { Matrix_push(); - Matrix_translate(i * 32, -j * 20, 0.0f, 1); + Matrix_translate(i * 32, -j * 20, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -299,7 +299,7 @@ static void mCD_set_base_dl(Submenu* submenu, GAME* game, f32 pos_x, f32 pos_y, day = calendar->month_entries[sel].day_data[idx] & 0x1F; day_type = calendar->day_type; Matrix_push(); - Matrix_translate((idx % lbRTC_WEEK) * 32, -(idx / lbRTC_WEEK) * 20, 0.0f, 1); + Matrix_translate((idx % lbRTC_WEEK) * 32, -(idx / lbRTC_WEEK) * 20, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPLoadTextureBlock_8b_Dolphin(POLY_OPA_DISP++, cal_win_box2_tex_rgb_ia8, G_IM_FMT_IA, 32, 32, 0, GX_MIRROR, GX_MIRROR, 0, 0); @@ -310,7 +310,7 @@ static void mCD_set_base_dl(Submenu* submenu, GAME* game, f32 pos_x, f32 pos_y, gDPSetEnvColor(POLY_OPA_DISP++, env_p[0], env_p[1], env_p[2], 255); gSPDisplayList(POLY_OPA_DISP++, cal_win_boxT_model); - Matrix_translate(0.0f, 4.0f, 0.0f, 1); + Matrix_translate(0.0f, 4.0f, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (day > 0) { prim_p = number2_prim_table[day_type]; @@ -345,7 +345,7 @@ static void mCD_set_base_dl(Submenu* submenu, GAME* game, f32 pos_x, f32 pos_y, if (calendar->_103C[calendar->_1042] & 0x80) { Matrix_push(); - Matrix_translate(0.0f, 0.0f, 0.0f, 1); + Matrix_translate(0.0f, 0.0f, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, cal_icon_sakana_model); Matrix_pull(); @@ -355,7 +355,7 @@ static void mCD_set_base_dl(Submenu* submenu, GAME* game, f32 pos_x, f32 pos_y, if (flag == TRUE && calendar->_1043 > 1) { Matrix_push(); - Matrix_translate(calendar->_1034, -1.5f, 0.0f, 1); + Matrix_translate(calendar->_1034, -1.5f, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(POLY_OPA_DISP++, 0, 255, 0, 0, 255, calendar->_1054); gSPDisplayList(POLY_OPA_DISP++, cal_icon_yajirushi_model); @@ -386,8 +386,8 @@ static void mCD_set_hyoji_dl(Submenu* submenu, GAME* game, f32 pos_x, f32 pos_y) GRAPH* graph = game->graph; mCD_Ovl_c* calendar = submenu->overlay->calendar_ovl; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); @@ -414,7 +414,7 @@ static void mCD_set_hyoji_dl(Submenu* submenu, GAME* game, f32 pos_x, f32 pos_y) if (calendar->_105C == mCD_STICK_AREA_RIGHT) { Matrix_push(); - Matrix_RotateY(DEG2SHORT_ANGLE2(180.0f), 1); + Matrix_RotateY(DEG2SHORT_ANGLE2(180.0f), MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); } gSPDisplayList(POLY_OPA_DISP++, cal_hyouji_stT_model); @@ -436,8 +436,8 @@ extern Gfx cal_hyouji2_bmojiT_model[]; static void mCD_set_hyoji2_dl(Submenu* submenu, GAME* game, f32 pos_x, f32 pos_y) { GRAPH* graph = game->graph; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); diff --git a/src/game/m_catalog_ovl.c b/src/game/m_catalog_ovl.c index f735c709..919509ba 100644 --- a/src/game/m_catalog_ovl.c +++ b/src/game/m_catalog_ovl.c @@ -756,10 +756,10 @@ static void mCL_furniture_draw(mCL_Item_c* item, GAME* game) { mCL_SetKankyoMapping(profile, (GAME_PLAY*)game); scale = item->scale; - Matrix_RotateY(RAD2SHORT_ANGLE2(DEG2RAD(ftr_actor->angle_y)), 0); - Matrix_scale(scale, scale, scale, 1); - Matrix_translate(ftr_actor->position.x, ftr_actor->position.y, ftr_actor->position.z, 1); - Matrix_scale(profile->scale, profile->scale, profile->scale, 1); + Matrix_RotateY(RAD2SHORT_ANGLE2(DEG2RAD(ftr_actor->angle_y)), MTX_LOAD); + Matrix_scale(scale, scale, scale, MTX_MULT); + Matrix_translate(ftr_actor->position.x, ftr_actor->position.y, ftr_actor->position.z, MTX_MULT); + Matrix_scale(profile->scale, profile->scale, profile->scale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -852,7 +852,7 @@ static void mCL_music_draw(mCL_Item_c* item, mSM_MenuInfo_c* menu_info, GRAPH* g OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; - Matrix_RotateZ(cos_s(item->timer * 0x222) * 0x1000, 1); + Matrix_RotateZ(cos_s(item->timer * 0x222) * 0x1000, MTX_MULT); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfx++, mCL_music_model); @@ -884,10 +884,10 @@ static void mCL_item_draw(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* gam } else if (item->gfx_type != mCL_DRAW_TYPE_NONE) { Gfx* gfx; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); + 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); - Matrix_scale(item->scale, item->scale, 1.0f, 1); + Matrix_scale(item->scale, item->scale, 1.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; @@ -1005,8 +1005,8 @@ static void mCL_set_page_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* g pos_y = -menu_info->position[1]; } - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; @@ -1047,7 +1047,7 @@ static void mCL_set_page_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* g if (menu->top_idx != 0) { Matrix_push(); - Matrix_translate(-11.0f, 80.0f, 0.0f, 1); + Matrix_translate(-11.0f, 80.0f, 0.0f, MTX_MULT); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfx++, clg_win_shirushi1T_model); @@ -1057,8 +1057,8 @@ static void mCL_set_page_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* g if (menu->top_idx + mCL_MENU_PAGE_SIZE < menu->item_count) { Matrix_push(); - Matrix_translate(-11.0f, -66.0f, 0.0f, 1); - Matrix_RotateZ(DEG2SHORT_ANGLE2(-180.0f), 1); + Matrix_translate(-11.0f, -66.0f, 0.0f, MTX_MULT); + Matrix_RotateZ(DEG2SHORT_ANGLE2(-180.0f), MTX_MULT); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfx++, clg_win_shirushi1T_model); @@ -1159,8 +1159,8 @@ static void mCL_set_page_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* g if (menu->completed_flag) { Gfx* gfx; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(tmp, (97.0f + pos_y) - 163.0f, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(tmp, (97.0f + pos_y) - 163.0f, 140.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; @@ -1189,8 +1189,8 @@ static void mCL_set_wchange_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GRAP int i; Gfx* gfx; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(menu_info->position[0], -menu_info->position[1], 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(menu_info->position[0], -menu_info->position[1], 140.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; @@ -1221,7 +1221,7 @@ static void mCL_set_wchange_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GRAP } } - Matrix_translate(0.0f, menu_info->position[1] * 2.0f, 0.0f, 1); + Matrix_translate(0.0f, menu_info->position[1] * 2.0f, 0.0f, MTX_MULT); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); win_data = &mCL_win_data[catalog_ovl->page_no]; diff --git a/src/game/m_choice_draw.c_inc b/src/game/m_choice_draw.c_inc index b65b574c..1eddcfc8 100644 --- a/src/game/m_choice_draw.c_inc +++ b/src/game/m_choice_draw.c_inc @@ -5,8 +5,8 @@ static void mChoice_SetMatrix(mChoice_c* choice, GAME* game, int type) { f32 y = (-choice->center_y + 120.0f) * 16.0f; Matrix_push(); - Matrix_translate(x, y, 0.0f, 1); - Matrix_scale(scale, scale, 1.0f, 1); + Matrix_translate(x, y, 0.0f, MTX_MULT); + Matrix_scale(scale, scale, 1.0f, MTX_MULT); OPEN_DISP(graph); @@ -26,7 +26,7 @@ static void mChoice_SetMatrixDisplay(mChoice_c* choice, GAME* game, int type) { f32 scale_y = choice->scale_y; Matrix_push(); - Matrix_scale(scale_x, scale_y, 1.0f, 1); + Matrix_scale(scale_x, scale_y, 1.0f, MTX_MULT); OPEN_DISP(graph); diff --git a/src/game/m_collision_bg_line.c_inc b/src/game/m_collision_bg_line.c_inc index 7c42abf1..9fa215f7 100644 --- a/src/game/m_collision_bg_line.c_inc +++ b/src/game/m_collision_bg_line.c_inc @@ -413,9 +413,9 @@ static int mCoBG_LineGroundCheck_Move(xyz_t* rev, xyz_t* start_pos, xyz_t* end_p point[1] = pos_p->z; if (mCoBG_JudgeMoveBgGroundCheck(point, start, regist_p->active_dist) || mCoBG_JudgeMoveBgGroundCheck(point, end, regist_p->active_dist)) { - Matrix_translate(pos_p->x, pos_p->y, pos_p->z, 0); - Matrix_RotateY(angle, 1); - Matrix_translate(ofs.x, ofs.y, ofs.z, 1); + Matrix_translate(pos_p->x, pos_p->y, pos_p->z, MTX_LOAD); + Matrix_RotateY(angle, MTX_MULT); + Matrix_translate(ofs.x, ofs.y, ofs.z, MTX_MULT); p0 = xyz0; p1 = xyz0; diff --git a/src/game/m_cpmail_ovl.c b/src/game/m_cpmail_ovl.c index 63c12789..54ff95f5 100644 --- a/src/game/m_cpmail_ovl.c +++ b/src/game/m_cpmail_ovl.c @@ -234,8 +234,8 @@ static void mCM_set_page_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* g int tex_x; int tex_y; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); @@ -263,7 +263,7 @@ static void mCM_set_page_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* g } if (cpmail_ovl->next_page_id == page_num) { - Matrix_translate(97.0f, 51.0f - 15.0f * page_num, 0.0f, 1); + Matrix_translate(97.0f, 51.0f - 15.0f * page_num, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, ctl_sentaku_taguT_model); } diff --git a/src/game/m_cporiginal_ovl.c b/src/game/m_cporiginal_ovl.c index d374429f..ca0b7d26 100644 --- a/src/game/m_cporiginal_ovl.c +++ b/src/game/m_cporiginal_ovl.c @@ -165,9 +165,9 @@ extern void mCO_draw_cporiginal(Submenu* submenu, GRAPH* graph, f32 pos_x, f32 p OPEN_POLY_OPA_DISP(graph); - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); - Matrix_scale(scale, scale, 1.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); + Matrix_scale(scale, scale, 1.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_OPA_DISP++, ANIME_1_TXT_SEG, mCO_get_texture_pat_idx(submenu, idx)); @@ -376,7 +376,7 @@ static void mCO_set_frame_tagS_dl(Submenu* submenu, GAME* game, int folder) { if (idx != folder) { Matrix_push(); - Matrix_translate(0.0f, -((idx * 29) / 2), 0.0f, 1); + Matrix_translate(0.0f, -((idx * 29) / 2), 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(POLY_OPA_DISP++, 0, 255, prim_table[idx].r, prim_table[idx].g, prim_table[idx].b, 255); @@ -419,7 +419,7 @@ static void mCO_set_frame_tagT_dl(Submenu* submenu, GAME* game, int folder) { // something is wrong with this function call, likely the calculation for y ofs_y = ((folder * 29) / 2); ofs_y = 52 - ofs_y; - Matrix_translate(105.0f, ofs_y, 0.0f, 1); + Matrix_translate(105.0f, ofs_y, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(POLY_OPA_DISP++, 0, 255, prim_table[folder].r, prim_table[folder].g, prim_table[folder].b, 255); @@ -549,7 +549,7 @@ static void mCO_set_frame_main_dl(Submenu* submenu, GAME* game, int folder) { for (k = 0; k < 4; k++) { for (j = 0; j < 3; j++, idx++) { Matrix_push(); - Matrix_translate(32 * j, 29 * -k, 0.0f, 1); + Matrix_translate(32 * j, 29 * -k, 0.0f, MTX_MULT); if (mCO_check_hide_flg(submenu, folder, idx) == FALSE) { gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -661,7 +661,7 @@ static void mCO_set_frame_change_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c mCO_Ovl_c* cporiginal_ovl = submenu->overlay->cporiginal_ovl; Matrix_push(); - Matrix_translate(menu_info->position[0], -menu_info->position[1], 140.0f, 1); + Matrix_translate(menu_info->position[0], -menu_info->position[1], 140.0f, MTX_MULT); mCO_set_frame_main_dl(submenu, game, folder); mCO_set_frame_tagS_dl(submenu, game, cporiginal_ovl->up_folder); @@ -675,7 +675,7 @@ static void mCO_set_frame_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu_ mCO_Ovl_c* cporiginal_ovl = submenu->overlay->cporiginal_ovl; int folder; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); if (cporiginal_ovl->timer != 0) { if (cporiginal_ovl->page_order[0] == cporiginal_ovl->up_folder) { @@ -685,7 +685,7 @@ static void mCO_set_frame_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu_ folder = cporiginal_ovl->up_folder; Matrix_push(); - Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, 1); + Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, MTX_MULT); mCO_set_frame_main_dl(submenu, game, folder); mCO_set_frame_ueT_dl(submenu, game, folder); mCO_set_frame_tagT_dl(submenu, game, folder); @@ -698,7 +698,7 @@ static void mCO_set_frame_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu_ } else { folder = cporiginal_ovl->page_order[0]; - Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, 1); + Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, MTX_MULT); mCO_set_frame_main_dl(submenu, game, folder); mCO_set_frame_tagS_dl(submenu, game, folder); mCO_set_frame_ueT_dl(submenu, game, folder); diff --git a/src/game/m_cpwarning_ovl.c b/src/game/m_cpwarning_ovl.c index fd27fb26..b2059950 100644 --- a/src/game/m_cpwarning_ovl.c +++ b/src/game/m_cpwarning_ovl.c @@ -98,8 +98,8 @@ static void mCW_set_frame_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu_ GRAPH* graph = game->graph; mCW_Ovl_c* cpwarning_ovl = submenu->overlay->cpwarning_ovl; - Matrix_scale(16.0f * cpwarning_ovl->scale, 16.0f * cpwarning_ovl->scale, 1.0f, 0); - Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, 1); + Matrix_scale(16.0f * cpwarning_ovl->scale, 16.0f * cpwarning_ovl->scale, 1.0f, MTX_LOAD); + Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); @@ -108,9 +108,9 @@ static void mCW_set_frame_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu_ gSPDisplayList(POLY_OPA_DISP++, dia_att_winT_model); if (cpwarning_ovl->diary_edit_mode) { - Matrix_translate(19.0f, -29.0f, 0.0f, 1); + Matrix_translate(19.0f, -29.0f, 0.0f, MTX_MULT); } else { - Matrix_translate(-19.0f, -29.0f, 0.0f, 1); + Matrix_translate(-19.0f, -29.0f, 0.0f, MTX_MULT); } gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, dia_att_cursor_model); diff --git a/src/game/m_debug_display.c b/src/game/m_debug_display.c index 7371f1d0..95b4ca58 100644 --- a/src/game/m_debug_display.c +++ b/src/game/m_debug_display.c @@ -86,10 +86,10 @@ static void debug_display_output_sprite_16x16_I8(Debug_display* display, void* t softsprite_prim(play->game.graph); gDPSetPrimColor(NEXT_POLY_XLU_DISP, 0, 0, display->color.r, display->color.g, display->color.b, display->color.a); - Matrix_translate(display->pos.x, display->pos.y, display->pos.z, 0); - Matrix_scale(display->scale.x, display->scale.y, display->scale.z, 1); - Matrix_mult(&play->billboard_matrix, 1); - Matrix_rotateXYZ(display->rot.x, display->rot.y, display->rot.z, 1); + Matrix_translate(display->pos.x, display->pos.y, display->pos.z, MTX_LOAD); + Matrix_scale(display->scale.x, display->scale.y, display->scale.z, MTX_MULT); + Matrix_mult(&play->billboard_matrix, MTX_MULT); + Matrix_rotateXYZ(display->rot.x, display->rot.y, display->rot.z, MTX_MULT); gDPLoadTextureBlock(NEXT_POLY_XLU_DISP, txt, G_IM_FMT_I, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -112,7 +112,7 @@ static void debug_display_output_polygon(Debug_display* display, void* dl, GAME_ gSPSetLights1(NEXT_POLY_XLU_DISP, material); Matrix_softcv3_load(&display->rot, display->pos.x, display->pos.y, display->pos.z); - Matrix_scale(display->scale.x, display->scale.y, display->scale.z, 1); + Matrix_scale(display->scale.x, display->scale.y, display->scale.z, MTX_MULT); gSPMatrix(NEXT_POLY_XLU_DISP, _Matrix_to_Mtx_new(play->game.graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(NEXT_POLY_XLU_DISP, dl); diff --git a/src/game/m_design_ovl.c b/src/game/m_design_ovl.c index 387ef314..8e2f7bbd 100644 --- a/src/game/m_design_ovl.c +++ b/src/game/m_design_ovl.c @@ -2216,8 +2216,8 @@ void mDE_set_frame_tool_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) { des_tool_kao5_tex }; GRAPH* graph = game->graph; mDE_Ovl_c* design_ovl = submenu->overlay->design_ovl; - Matrix_scale(16.f, 16.f, 1.f, FALSE); - Matrix_translate(menu->position[0], menu->position[1], 140.f, TRUE); + Matrix_scale(16.f, 16.f, 1.f, MTX_LOAD); + Matrix_translate(menu->position[0], menu->position[1], 140.f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -2268,8 +2268,8 @@ void mDE_set_frame_suuji_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) mDE_Ovl_c* design_ovl = submenu->overlay->design_ovl; GRAPH* graph = game->graph; int pal = design_ovl->palette_no + 1; - Matrix_scale(16.f, 16.f, 1.f, FALSE); - Matrix_translate(menu->position[0], menu->position[1], 140.f, TRUE); + Matrix_scale(16.f, 16.f, 1.f, MTX_LOAD); + Matrix_translate(menu->position[0], menu->position[1], 140.f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (design_ovl->mode == mDE_MODE_PALLET) { @@ -2288,7 +2288,7 @@ void mDE_set_frame_suuji_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) gSPDisplayList(POLY_OPA_DISP++, des_win_suuji2_model); } else { Matrix_push(); - Matrix_translate(-2.f, 0.f, 0.f, TRUE); + Matrix_translate(-2.f, 0.f, 0.f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_OPA_DISP++, ANIME_2_TXT_SEG, suuji_table[pal]); gSPDisplayList(POLY_OPA_DISP++, des_win_suuji2_model); @@ -2301,25 +2301,25 @@ void mDE_set_frame_suuji_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) void mDE_set_frame_mark_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) { GRAPH* graph = game->graph; mDE_Ovl_c* design_ovl = submenu->overlay->design_ovl; - Matrix_scale(16.f, 16.f, 1.f, FALSE); - Matrix_translate(menu->position[0], menu->position[1], 140.f, TRUE); + Matrix_scale(16.f, 16.f, 1.f, MTX_LOAD); + Matrix_translate(menu->position[0], menu->position[1], 140.f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); gSPDisplayList(POLY_OPA_DISP++, des_win_before); Matrix_push(); if (design_ovl->mode == mDE_MODE_TOOL) { - Matrix_translate(-112.f + design_ovl->_69E * 0x18, 16.f - design_ovl->_69F * 0x18, 0.f, TRUE); + Matrix_translate(-112.f + design_ovl->_69E * 0x18, 16.f - design_ovl->_69F * 0x18, 0.f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(POLY_OPA_DISP++, 0, 255, 185, 50, 50, 255); } else { - Matrix_translate(-112.f, 16.f - design_ovl->_69F * 0x18, 0.f, TRUE); + Matrix_translate(-112.f, 16.f - design_ovl->_69F * 0x18, 0.f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(POLY_OPA_DISP++, 0, 255, 215, 195, 195, 255); } gSPDisplayList(POLY_OPA_DISP++, des_win_marking_model); Matrix_pull(); Matrix_push(); - Matrix_translate(110.f, 0x3f - design_ovl->_6A4 * 10, 0.f, TRUE); + Matrix_translate(110.f, 0x3f - design_ovl->_6A4 * 10, 0.f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (design_ovl->mode != mDE_MODE_PALLET) { gDPSetPrimColor(POLY_OPA_DISP++, 0, 255, 0xcd, 0xb9, 0xb9, 255); @@ -2333,12 +2333,12 @@ void mDE_set_frame_mark_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) { if (design_ovl->mode == mDE_MODE_PALLET) { Matrix_push(); if (design_ovl->_6A5 == 0) { - Matrix_translate(110.f, 71.f, 0.f, TRUE); + Matrix_translate(110.f, 71.f, 0.f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(POLY_OPA_DISP++, 0, 255, 185, 50, 50, 255); gSPDisplayList(POLY_OPA_DISP++, des_win_marking_model); } else { - Matrix_translate(110.f, 0x3f - design_ovl->_6A5 * 10, 0.f, TRUE); + Matrix_translate(110.f, 0x3f - design_ovl->_6A5 * 10, 0.f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(POLY_OPA_DISP++, 0, 255, 255, 80, 80, 255); gDPSetEnvColor(POLY_OPA_DISP++, 30, 30, 30, 255); @@ -2412,9 +2412,9 @@ void mDE_set_frame_cursor_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) design_ovl->_694 -= b; Matrix_push(); - Matrix_scale(16.f, 16.f, 1.f, FALSE); - Matrix_translate(design_ovl->_680, design_ovl->_684, 0.f, TRUE); - Matrix_scale(a, 2.f, 1.f, TRUE); + Matrix_scale(16.f, 16.f, 1.f, MTX_LOAD); + Matrix_translate(design_ovl->_680, design_ovl->_684, 0.f, MTX_MULT); + Matrix_scale(a, 2.f, 1.f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (GETREG(NMREG, 2)) { @@ -2429,12 +2429,12 @@ void mDE_set_frame_cursor_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) Matrix_pull(); Matrix_push(); - Matrix_scale(16.f, 16.f, 1.f, FALSE); - Matrix_translate(design_ovl->_680, design_ovl->_694, 0.f, TRUE); + Matrix_scale(16.f, 16.f, 1.f, MTX_LOAD); + Matrix_translate(design_ovl->_680, design_ovl->_694, 0.f, MTX_MULT); if (a) { a += 2.f; } - Matrix_scale(a, 2.f, 1.f, TRUE); + Matrix_scale(a, 2.f, 1.f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (GETREG(NMREG, 2)) { @@ -2449,9 +2449,9 @@ void mDE_set_frame_cursor_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) Matrix_pull(); Matrix_push(); - Matrix_scale(16.f, 16.f, 1.f, FALSE); - Matrix_translate(design_ovl->_680, design_ovl->_684, 0.f, TRUE); - Matrix_scale(2.f, b, 1.f, TRUE); + Matrix_scale(16.f, 16.f, 1.f, MTX_LOAD); + Matrix_translate(design_ovl->_680, design_ovl->_684, 0.f, MTX_MULT); + Matrix_scale(2.f, b, 1.f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (GETREG(NMREG, 2)) { @@ -2466,9 +2466,9 @@ void mDE_set_frame_cursor_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) Matrix_pull(); Matrix_push(); - Matrix_scale(16.f, 16.f, 1.f, FALSE); - Matrix_translate(design_ovl->_690, design_ovl->_684, 0.f, TRUE); - Matrix_scale(2.f, b, 1.f, TRUE); + Matrix_scale(16.f, 16.f, 1.f, MTX_LOAD); + Matrix_translate(design_ovl->_690, design_ovl->_684, 0.f, MTX_MULT); + Matrix_scale(2.f, b, 1.f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (GETREG(NMREG, 2)) { @@ -2483,8 +2483,8 @@ void mDE_set_frame_cursor_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) Matrix_pull(); } } - Matrix_scale(16.f, 16.f, 1.f, FALSE); - Matrix_translate(menu->position[0], menu->position[1], 140.f, TRUE); + Matrix_scale(16.f, 16.f, 1.f, MTX_LOAD); + Matrix_translate(menu->position[0], menu->position[1], 140.f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); gSPDisplayList(POLY_OPA_DISP++, des_win_before); if (design_ovl->_69A && design_ovl->_699 != 9) { @@ -2495,20 +2495,20 @@ void mDE_set_frame_cursor_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) f2 = 0.f; mDE_set_cursor_waku_rotate(design_ovl, 1, &f1, &f2, &s1); Matrix_push(); - Matrix_translate(design_ovl->_658 - 3.f - 75.f - f1, design_ovl->_65C + 2.f - (-75.f) - f2, 0.f, TRUE); - Matrix_RotateZ(s1, TRUE); + Matrix_translate(design_ovl->_658 - 3.f - 75.f - f1, design_ovl->_65C + 2.f - (-75.f) - f2, 0.f, MTX_MULT); + Matrix_RotateZ(s1, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, des_cursor_waku1T_model); Matrix_pull(); } else if (design_ovl->_69A && design_ovl->_699 == 9) { Matrix_push(); - Matrix_translate(design_ovl->_658 - 3.f - 75.f, (design_ovl->_65C + 10.f) - (-75.f), 0.f, TRUE); + Matrix_translate(design_ovl->_658 - 3.f - 75.f, (design_ovl->_65C + 10.f) - (-75.f), 0.f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, des_cursor_wakuT_model); Matrix_pull(); } if (design_ovl->_699 == 1) { - Matrix_translate(design_ovl->_650 + 1.f - 75.f, design_ovl->_654 + 11.f - (-75.f), 0.f, TRUE); + Matrix_translate(design_ovl->_650 + 1.f - 75.f, design_ovl->_654 + 11.f - (-75.f), 0.f, MTX_MULT); } else if (design_ovl->_699 == 2) { if (design_ovl->_69A) { float f1, f2; @@ -2517,35 +2517,35 @@ void mDE_set_frame_cursor_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) f1 = 0.f; f2 = 0.f; mDE_set_cursor_waku_rotate(design_ovl, 0, &f1, &f2, &s1); - Matrix_translate(design_ovl->_650 - 4.f - 75.f - f1, design_ovl->_654 + 3.f - (-75.f) - f2, 0.f, TRUE); - Matrix_RotateZ(s1, TRUE); + Matrix_translate(design_ovl->_650 - 4.f - 75.f - f1, design_ovl->_654 + 3.f - (-75.f) - f2, 0.f, MTX_MULT); + Matrix_RotateZ(s1, MTX_MULT); } else { - Matrix_translate(design_ovl->_650 - 3.f - 75.f, design_ovl->_654 + 2.f - (-75.f), 0.f, TRUE); + Matrix_translate(design_ovl->_650 - 3.f - 75.f, design_ovl->_654 + 2.f - (-75.f), 0.f, MTX_MULT); } } else if (design_ovl->_699 == 3) { - Matrix_translate(design_ovl->_650 - 1.f - 75.f, design_ovl->_654 + 8.f - (-75.f), 0.f, TRUE); + Matrix_translate(design_ovl->_650 - 1.f - 75.f, design_ovl->_654 + 8.f - (-75.f), 0.f, MTX_MULT); } else if (design_ovl->_699 == 4) { - Matrix_translate(design_ovl->_650 - 1.f - 75.f, design_ovl->_654 + 8.f - (-75.f), 0.f, TRUE); + Matrix_translate(design_ovl->_650 - 1.f - 75.f, design_ovl->_654 + 8.f - (-75.f), 0.f, MTX_MULT); } else if (design_ovl->_699 == 5) { - Matrix_translate(design_ovl->_650 - 1.f - 75.f, design_ovl->_654 + 8.f - (-75.f), 0.f, TRUE); + Matrix_translate(design_ovl->_650 - 1.f - 75.f, design_ovl->_654 + 8.f - (-75.f), 0.f, MTX_MULT); } else if (design_ovl->_699 == 6) { - Matrix_translate(design_ovl->_650 - 1.f - 75.f, design_ovl->_654 + 8.f - (-75.f), 0.f, TRUE); + Matrix_translate(design_ovl->_650 - 1.f - 75.f, design_ovl->_654 + 8.f - (-75.f), 0.f, MTX_MULT); } else if (design_ovl->_699 == 7) { - Matrix_translate(design_ovl->_650 - 1.f - 75.f, design_ovl->_654 + 8.f - (-75.f), 0.f, TRUE); + Matrix_translate(design_ovl->_650 - 1.f - 75.f, design_ovl->_654 + 8.f - (-75.f), 0.f, MTX_MULT); } else if (design_ovl->_699 == 9) { - Matrix_translate(design_ovl->_650 - 3.f - 75.f, design_ovl->_654 + 10.f - (-75.f), 0.f, TRUE); + Matrix_translate(design_ovl->_650 - 3.f - 75.f, design_ovl->_654 + 10.f - (-75.f), 0.f, MTX_MULT); } else if (design_ovl->_699 == 10) { - Matrix_translate(design_ovl->_650 - 75.f, design_ovl->_654 + 5.f - (-75.f), 0.f, TRUE); + Matrix_translate(design_ovl->_650 - 75.f, design_ovl->_654 + 5.f - (-75.f), 0.f, MTX_MULT); } else if (design_ovl->_699 == 11) { - Matrix_translate(design_ovl->_650 - 75.f, design_ovl->_654 + 5.f - (-75.f), 0.f, TRUE); + Matrix_translate(design_ovl->_650 - 75.f, design_ovl->_654 + 5.f - (-75.f), 0.f, MTX_MULT); } else if (design_ovl->_699 == 12) { - Matrix_translate(design_ovl->_650 + 2.f - 75.f, design_ovl->_654 + 7.f - (-75.f), 0.f, TRUE); + Matrix_translate(design_ovl->_650 + 2.f - 75.f, design_ovl->_654 + 7.f - (-75.f), 0.f, MTX_MULT); } else if (design_ovl->_699 == 13) { - Matrix_translate(design_ovl->_650 - 1.f - 75.f, design_ovl->_654 + 5.f - (-75.f), 0.f, TRUE); + Matrix_translate(design_ovl->_650 - 1.f - 75.f, design_ovl->_654 + 5.f - (-75.f), 0.f, MTX_MULT); } else if (design_ovl->_699 == 14) { - Matrix_translate(design_ovl->_650 - 1.f - 75.f, design_ovl->_654 + 5.f - (-75.f), 0.f, TRUE); + Matrix_translate(design_ovl->_650 - 1.f - 75.f, design_ovl->_654 + 5.f - (-75.f), 0.f, MTX_MULT); } else { - Matrix_translate(design_ovl->_650 + 8.f - 75.f, design_ovl->_654 + 13.f - (-75.f), 0.f, TRUE); + Matrix_translate(design_ovl->_650 + 8.f - 75.f, design_ovl->_654 + 13.f - (-75.f), 0.f, MTX_MULT); } gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (design_ovl->_69A && design_ovl->_699 == 2) { @@ -2563,8 +2563,8 @@ void mDE_set_frame_main_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) { GRAPH* graph = game->graph; mDE_Ovl_c* design_ovl = submenu->overlay->design_ovl; - Matrix_scale(16.f, 16.f, 1.f, FALSE); - Matrix_translate(menu->position[0], menu->position[1], 140.f, TRUE); + Matrix_scale(16.f, 16.f, 1.f, MTX_LOAD); + Matrix_translate(menu->position[0], menu->position[1], 140.f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, des_win_before_model); @@ -2591,7 +2591,7 @@ void mDE_set_frame_main_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) { gDPSetPrimColor(POLY_OPA_DISP++, 0, 128, design_ovl->rgb8_pal[i + 1].r, design_ovl->rgb8_pal[i + 1].g, design_ovl->rgb8_pal[i + 1].b, 255); gSPDisplayList(POLY_OPA_DISP++, des_win_color_model); - Matrix_translate(0.f, -10.f, 0.f, TRUE); + Matrix_translate(0.f, -10.f, 0.f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); } Matrix_pull(); diff --git a/src/game/m_diary_ovl.c b/src/game/m_diary_ovl.c index a3bcac0f..e4db743f 100644 --- a/src/game/m_diary_ovl.c +++ b/src/game/m_diary_ovl.c @@ -654,8 +654,8 @@ extern Gfx dia_win_mojiT_model[]; static void mDI_set_button_dl(GRAPH* graph, f32 pos_x, f32 pos_y) { OPEN_POLY_OPA_DISP(graph); - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, dia_init_mode); @@ -729,8 +729,8 @@ static void mDI_set_frame_dl(GRAPH* graph, mSM_MenuInfo_c* menu_info, mDI_Ovl_c* OPEN_POLY_OPA_DISP(graph); - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, dia_init_mode_letter); @@ -740,20 +740,20 @@ static void mDI_set_frame_dl(GRAPH* graph, mSM_MenuInfo_c* menu_info, mDI_Ovl_c* gSPDisplayList(POLY_OPA_DISP++, dia_win_tukiT_model); Matrix_push(); - Matrix_translate(month_tex_adjust[month], 0.0f, 0.0f, 1); + Matrix_translate(month_tex_adjust[month], 0.0f, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, dia_win_moji_model); Matrix_pull(); - Matrix_translate(0.0f, -194.0f, 0.0f, 1); + Matrix_translate(0.0f, -194.0f, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, dia_win2_wT_model); gSPDisplayList(POLY_OPA_DISP++, dia_win2_fusenT_model); - Matrix_translate(0.0f, -164.0f, 0.0f, 1); + Matrix_translate(0.0f, -164.0f, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, dia_win3_wT_model); diff --git a/src/game/m_editEndChk_ovl.c b/src/game/m_editEndChk_ovl.c index 36171c1a..3d32c16f 100644 --- a/src/game/m_editEndChk_ovl.c +++ b/src/game/m_editEndChk_ovl.c @@ -125,8 +125,8 @@ extern Gfx lat_kakunin_c_model[]; static void mEE_set_question_field(Submenu* submenu, GRAPH* graph, f32 x, f32 y) { Gfx* gfx; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(x, y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(x, y, 140.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; @@ -146,9 +146,9 @@ static void mEE_set_answer_field(Submenu* submenu, GRAPH* graph, mEE_win_data_c* f32 scale = submenu->overlay->editEndChk_ovl->scale; Gfx* gfx; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(x, y, 140.0f, 1); - Matrix_scale(scale, scale, 1.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(x, y, 140.0f, MTX_MULT); + Matrix_scale(scale, scale, 1.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; @@ -158,8 +158,8 @@ static void mEE_set_answer_field(Submenu* submenu, GRAPH* graph, mEE_win_data_c* gSPDisplayList(gfx++, data->win_model); if (scale == 1.0f) { - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(x, y - ((f32)submenu->overlay->editEndChk_ovl->selected_answer * 16.0f), 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(x, y - ((f32)submenu->overlay->editEndChk_ovl->selected_answer * 16.0f), 140.0f, MTX_MULT); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfx++, data->char_model); } diff --git a/src/game/m_editor_ovl.c b/src/game/m_editor_ovl.c index b1fdc0fa..9d7f7351 100644 --- a/src/game/m_editor_ovl.c +++ b/src/game/m_editor_ovl.c @@ -2349,11 +2349,11 @@ static void mED_KeyDraw_3D_stick(GRAPH* graph, mED_Ovl_c* editor_ovl) { Matrix_push(); if (stick_area >= mED_STICK_AREA_TOP_RIGHT && stick_area <= mED_STICK_AREA_BOTTOM_RIGHT) { - Matrix_translate(-111.0f, -50.0f, 0.0f, 1); - Matrix_RotateY(DEG2SHORT_ANGLE(-180.0f), 1); + Matrix_translate(-111.0f, -50.0f, 0.0f, MTX_MULT); + Matrix_RotateY(DEG2SHORT_ANGLE(-180.0f), MTX_MULT); } else { - Matrix_translate(-110.0f, -50.0f, 0.0f, 1); + Matrix_translate(-110.0f, -50.0f, 0.0f, MTX_MULT); } OPEN_DISP(graph); @@ -2379,8 +2379,8 @@ extern Gfx kai_sousa_mojibanT_model[]; static void mED_KeyDraw(mED_Ovl_c* editor_ovl, GRAPH* graph, f32 x, f32 y) { Gfx* gfx; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(x, y, 0.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(x, y, 0.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; @@ -2438,8 +2438,8 @@ static void mED_InkPotDraw(Submenu* submenu, mED_Ovl_c* editor_ovl, GRAPH* graph return; } - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(x, y, 0.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(x, y, 0.0f, MTX_MULT); single_line_y = 0.0f; line_y = ((f32)editor_ovl->now_str_len * 15.0f) / (f32)(editor_ovl->input_length * editor_ovl->max_line_no); @@ -2493,9 +2493,9 @@ static void mED_StringsDraw_spaceCode(GAME* game, rgba_t* color, f32 x, f32 y) { OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(x, y, 0.0f, 1); - Matrix_scale(0.75f, 1.0f, 1.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(x, y, 0.0f, MTX_MULT); + Matrix_scale(0.75f, 1.0f, 1.0f, MTX_MULT); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(gfx++, 0, 255, color->r, color->g, color->b, 255); @@ -2635,8 +2635,8 @@ static void mED_endCode_draw(Submenu* submenu, GAME* game, f32 x, f32 y) { GRAPH* graph = game->graph; Gfx* gfx; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(x, y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(x, y, 140.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; diff --git a/src/game/m_gba_ovl.c b/src/game/m_gba_ovl.c index 1cb29f4b..dd642ddb 100644 --- a/src/game/m_gba_ovl.c +++ b/src/game/m_gba_ovl.c @@ -83,9 +83,9 @@ extern void mGB_draw_gba(Submenu* submenu, GRAPH* graph, f32 pos_x, f32 pos_y, f OPEN_POLY_OPA_DISP(graph); - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); - Matrix_scale(scale, scale, 1.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); + Matrix_scale(scale, scale, 1.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_OPA_DISP++, ANIME_1_TXT_SEG, mGB_get_image_texture(submenu, idx)); @@ -209,8 +209,8 @@ static void mGB_set_frame_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu_ int tex_x; int tex_y; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); @@ -277,8 +277,8 @@ static void mGB_set_card_frame_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* int tex_y; int idx; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); diff --git a/src/game/m_hand_ovl.c b/src/game/m_hand_ovl.c index b083f70b..cf7402d7 100644 --- a/src/game/m_hand_ovl.c +++ b/src/game/m_hand_ovl.c @@ -926,19 +926,19 @@ static void mHD_hand_shape_draw(Submenu* submenu, GAME* game, int shadow_flag) { if (mtx != NULL) { if (shadow_flag) { - Matrix_translate(0.0f, 0.0f, 76.4f, 0); + Matrix_translate(0.0f, 0.0f, 76.4f, MTX_LOAD); } else { - Matrix_translate(0.0f, 0.0f, 77.0f, 0); + Matrix_translate(0.0f, 0.0f, 77.0f, MTX_LOAD); } if (shadow_flag) { - Matrix_scale(0.042f, 0.042f, 0.0f, 1); + Matrix_scale(0.042f, 0.042f, 0.0f, MTX_MULT); } else { - Matrix_scale(0.04f, 0.04f, 0.04f, 1); + Matrix_scale(0.04f, 0.04f, 0.04f, MTX_MULT); } - Matrix_scale(0.01f, 0.01f, 0.01f, 1); - Matrix_rotateXYZ(mHD_ROT_X, mHD_ROT_Y, mHD_ROT_Z, 1); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_MULT); + Matrix_rotateXYZ(mHD_ROT_X, mHD_ROT_Y, mHD_ROT_Z, MTX_MULT); OPEN_DISP(graph); diff --git a/src/game/m_haniwaPortrait_ovl.c b/src/game/m_haniwaPortrait_ovl.c index cc846fcf..3137c20f 100644 --- a/src/game/m_haniwaPortrait_ovl.c +++ b/src/game/m_haniwaPortrait_ovl.c @@ -28,7 +28,7 @@ static void mHP_haniwaPortrait_shape_draw(Submenu* submenu, mSM_MenuInfo_c* menu if (mtx != NULL) { _texture_z_light_fog_prim(game->graph); - Matrix_scale(0.01f, 0.01f, 0.01f, 0); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_LOAD); OPEN_DISP(graph); diff --git a/src/game/m_haniwa_ovl.c b/src/game/m_haniwa_ovl.c index 4108f240..2fc0b491 100644 --- a/src/game/m_haniwa_ovl.c +++ b/src/game/m_haniwa_ovl.c @@ -261,8 +261,8 @@ static void mHW_set_frame_dl(Submenu* submenu, GRAPH* graph, f32 pos_x, f32 pos_ int tex_x; int tex_y; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, -809.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, -809.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); diff --git a/src/game/m_hboard_ovl.c b/src/game/m_hboard_ovl.c index b55c5c91..29b18103 100644 --- a/src/game/m_hboard_ovl.c +++ b/src/game/m_hboard_ovl.c @@ -84,8 +84,8 @@ extern Gfx hni_den_model[]; static void mHB_set_frame_dl(GRAPH* graph, mSM_MenuInfo_c* menu_info, f32 x, f32 y) { Gfx* gfx; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(x, y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(x, y, 140.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; diff --git a/src/game/m_inventory_ovl.c b/src/game/m_inventory_ovl.c index 69fdaa01..fa3ab311 100644 --- a/src/game/m_inventory_ovl.c +++ b/src/game/m_inventory_ovl.c @@ -710,12 +710,12 @@ static void mIV_pl_shape_item_draw_umbrella(Submenu* submenu, GAME* game) { gSPLoadGeometryMode(POLY_OPA_DISP++, G_ZBUFFER | G_SHADE | G_FOG | G_LIGHTING | G_SHADING_SMOOTH); - Matrix_RotateY(DEG2SHORT_ANGLE2(-90.0f), 1); - Matrix_translate(800.0f, 0.0f, 0.0f, 1); + Matrix_RotateY(DEG2SHORT_ANGLE2(-90.0f), MTX_MULT); + Matrix_translate(800.0f, 0.0f, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, pl_umb_data_p->e_model); - Matrix_translate(4000.0f, 0.0f, 0.0f, 1); + Matrix_translate(4000.0f, 0.0f, 0.0f, MTX_MULT); /* Handle custom designs */ if (umbrella_item_kind >= mPlayer_ITEM_KIND_ORG_UMBRELLA00) { @@ -745,11 +745,11 @@ static void mIV_pl_shape_item_draw_rod(Submenu* submenu, GAME* game) { Matrix_Position_VecZ(1500.0f, &pos); cKF_Si3_draw_R_SV(game, item_kf, mtx, NULL, NULL, NULL); Matrix_put(&submenu->overlay->inventory_ovl->item_mtx); - Matrix_translate(0.0f, 0.0f, 1500.0f, 1); - Matrix_RotateZ(DEG2SHORT_ANGLE2(24.219360f), 1); // 0x1139 - Matrix_RotateX(DEG2SHORT_ANGLE2(65.494995f), 1); // 0x2E93 - Matrix_RotateY(DEG2SHORT_ANGLE2(79.634399f), 1); // 0x38A1 - Matrix_translate(0.0f, -500.0f, 0.0f, 1); + Matrix_translate(0.0f, 0.0f, 1500.0f, MTX_MULT); + Matrix_RotateZ(DEG2SHORT_ANGLE2(24.219360f), MTX_MULT); // 0x1139 + Matrix_RotateX(DEG2SHORT_ANGLE2(65.494995f), MTX_MULT); // 0x2E93 + Matrix_RotateY(DEG2SHORT_ANGLE2(79.634399f), MTX_MULT); // 0x38A1 + Matrix_translate(0.0f, -500.0f, 0.0f, MTX_MULT); OPEN_DISP(game->graph); @@ -1117,7 +1117,7 @@ static void mIV_pl_shape_draw(Submenu* submenu, GAME* game) { mouth_tex_p = mPlib_Get_mouth_tex_p(0); } - Matrix_scale(0.01f, 0.01f, 0.01f, 0); + Matrix_scale(0.01f, 0.01f, 0.01f, MTX_LOAD); gDPPipeSync(NEXT_POLY_OPA_DISP); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -1153,8 +1153,8 @@ static void mIV_pl_eff_draw(GRAPH* graph, Submenu* submenu) { gSPSegment(NEXT_POLY_OPA_DISP, G_MWO_SEGMENT_8, ef_takurami01_menu_render_mode); for (i = 0; i < mIV_PLAYER_EFFECT_NUM; i++) { if (pl_eff->timer != 0) { - Matrix_translate(pl_eff->pos.x, pl_eff->pos.y, pl_eff->pos.z, 0); - Matrix_scale(pl_eff->scale, pl_eff->scale, pl_eff->scale, 1); + Matrix_translate(pl_eff->pos.x, pl_eff->pos.y, pl_eff->pos.z, MTX_LOAD); + Matrix_scale(pl_eff->scale, pl_eff->scale, pl_eff->scale, MTX_MULT); gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(NEXT_POLY_OPA_DISP, ef_takurami01_kira_modelT); @@ -1172,7 +1172,7 @@ static void mIV_pl_shadow_draw(GAME_PLAY* play, ACTOR* actorx) { if (actorx != NULL) { GRAPH* graph = play->game.graph; - Matrix_scale(actorx->shape_info.shadow_size_x * 0.001f, 1.0f, actorx->shape_info.shadow_size_z * 0.001f, 0); + Matrix_scale(actorx->shape_info.shadow_size_x * 0.001f, 1.0f, actorx->shape_info.shadow_size_z * 0.001f, MTX_LOAD); _texture_z_light_fog_prim(graph); OPEN_DISP(graph); @@ -1471,8 +1471,8 @@ static void mIV_set_base_frame_dl(Submenu* submenu, GAME_PLAY* play, GRAPH* grap static Gfx* part_frame[] = { inv_sakana_part_model, inv_mwin_model, inv_mushi_part_model }; static Gfx* scroll_set[] = { inv_sakana_scroll_mode, NULL, inv_mushi_scroll_mode }; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); diff --git a/src/game/m_ledit_ovl.c b/src/game/m_ledit_ovl.c index 4c40d6f8..835a53b3 100644 --- a/src/game/m_ledit_ovl.c +++ b/src/game/m_ledit_ovl.c @@ -183,8 +183,8 @@ static void mLE_set_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu_info) f32 text_pos_x; f32 text_pos_y; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); @@ -207,8 +207,8 @@ static void mLE_set_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu_info) int width = mFont_GetStringWidth(editor_ovl->input_str, i, TRUE); Matrix_push(); - Matrix_translate(6.0f + (edit_pos_x - 160.0f) + (f32)width, -(8.0f + (edit_pos_y - 120.0f)), 0.0f, 1); - Matrix_scale(0.625f, 1.0f, 1.0f, 1); + Matrix_translate(6.0f + (edit_pos_x - 160.0f) + (f32)width, -(8.0f + (edit_pos_y - 120.0f)), 0.0f, MTX_MULT); + Matrix_scale(0.625f, 1.0f, 1.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, lat_sousa_spT_model); diff --git a/src/game/m_lib.c b/src/game/m_lib.c index f0eaeb31..2e627bde 100644 --- a/src/game/m_lib.c +++ b/src/game/m_lib.c @@ -784,7 +784,7 @@ extern f32 get_percent_forAccelBrake(f32 now, f32 start, f32 end, f32 accelerate extern void Game_play_Projection_Trans(GAME_PLAY* const play, xyz_t* world_pos, xyz_t* screen_pos) { f32 w; - Matrix_mult(&play->projection_matrix, 0); + Matrix_mult(&play->projection_matrix, MTX_LOAD); Matrix_Position(world_pos, screen_pos); w = play->projection_matrix.ww + ((play->projection_matrix.wx * world_pos->x) + (play->projection_matrix.wy * world_pos->y) + diff --git a/src/game/m_lights.c b/src/game/m_lights.c index 3423bba7..a79c3a3a 100644 --- a/src/game/m_lights.c +++ b/src/game/m_lights.c @@ -367,8 +367,8 @@ extern void Light_list_point_draw(GAME_PLAY* play) { rad = (lightInfo->radius * lightInfo->radius) * 2.60000001617e-06f; gDPSetPrimColor(dl++, 0, 0, lightInfo->color[0], lightInfo->color[1], lightInfo->color[2], 50); - Matrix_translate(lightInfo->x, lightInfo->y, lightInfo->z, 0); - Matrix_scale(rad, rad, rad, 1); + Matrix_translate(lightInfo->x, lightInfo->y, lightInfo->z, MTX_LOAD); + Matrix_scale(rad, rad, rad, MTX_MULT); gSPMatrix(dl++, _Matrix_to_Mtx_new(play->game.graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/game/m_mailbox_ovl.c b/src/game/m_mailbox_ovl.c index 326c2d37..33613b9a 100644 --- a/src/game/m_mailbox_ovl.c +++ b/src/game/m_mailbox_ovl.c @@ -92,8 +92,8 @@ static void mMB_set_frame_dl(Submenu* submenu, GRAPH* graph, mSM_MenuInfo_c* men int tex_x; int tex_y; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); @@ -107,7 +107,7 @@ static void mMB_set_frame_dl(Submenu* submenu, GRAPH* graph, mSM_MenuInfo_c* men gSPDisplayList(POLY_OPA_DISP++, pos_win_model); if (submenu->overlay->mailbox_ovl->display_flag) { - Matrix_translate(20.0f, 10.0f, 0.0f, 1); + Matrix_translate(20.0f, 10.0f, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, pos_yaji_wakuT_model); } diff --git a/src/game/m_map_ovl.c b/src/game/m_map_ovl.c index ff74aa22..dd3d3b2c 100644 --- a/src/game/m_map_ovl.c +++ b/src/game/m_map_ovl.c @@ -745,7 +745,7 @@ static void mMP_set_house_dl(GRAPH* graph, mMP_Ovl_c* map_ovl, f32 pos_x, f32 po resident_p = label_info->residents; for (i = 0; i < label_info->label_cnt; i++) { - Matrix_scale(16.0f, 16.0f, 1.0f, 0); + 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); @@ -766,7 +766,7 @@ static void mMP_set_house_dl(GRAPH* graph, mMP_Ovl_c* map_ovl, f32 pos_x, f32 po /* draw "current acre" icon */ - Matrix_scale(16.0f, 16.0f, 1.0f, 0); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); Matrix_translate( ((pos_x + 11.7f) - (0.5f * mMP_BLOCK_SIZE_F) + (f32)map_ovl->player_bx * mMP_BLOCK_SIZE_F) + 3.0f + 5.0f, (pos_y + 45.7f - (0.5f * mMP_BLOCK_SIZE_F) - (f32)map_ovl->player_bz * mMP_BLOCK_SIZE_F) + 4.0f + 5.0f, 140.0f, @@ -793,7 +793,7 @@ static void mMP_set_map_dl(GRAPH* graph, mMP_Ovl_c* map_ovl) { gSPDisplayList(gfx++, kan_tizu_mode); Matrix_push(); - Matrix_translate(11.7f, 45.7f, 0.0f, 1); + Matrix_translate(11.7f, 45.7f, 0.0f, MTX_MULT); for (bz = 0; bz < FG_BLOCK_Z_NUM; bz++) { for (bx = 0; bx < FG_BLOCK_X_NUM; bx++) { @@ -803,12 +803,12 @@ static void mMP_set_map_dl(GRAPH* graph, mMP_Ovl_c* map_ovl) { gSPDisplayList(gfx++, kan_tizu_model); /* move right one acre */ - Matrix_translate(mMP_BLOCK_SIZE_F, 0.0f, 0.0f, 1); + Matrix_translate(mMP_BLOCK_SIZE_F, 0.0f, 0.0f, MTX_MULT); block++; } /* move left to '1' acre and down one acre */ - Matrix_translate((-mMP_BLOCK_SIZE_F) * FG_BLOCK_X_NUM, -mMP_BLOCK_SIZE_F, 0.0f, 1); + Matrix_translate((-mMP_BLOCK_SIZE_F) * FG_BLOCK_X_NUM, -mMP_BLOCK_SIZE_F, 0.0f, MTX_MULT); } Matrix_pull(); @@ -829,10 +829,10 @@ static void mMP_set_cursol_dl(GRAPH* graph, mMP_Ovl_c* map_ovl, f32 base_x, f32 int frame = map_ovl->cursor_frame; Gfx* gfx; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(x + 11.7f, y + 45.7f, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(x + 11.7f, y + 45.7f, 140.0f, MTX_MULT); - Matrix_scale(cursol_scale[frame], cursol_scale[frame], 1.0f, 1); + Matrix_scale(cursol_scale[frame], cursol_scale[frame], 1.0f, MTX_MULT); OPEN_DISP(graph); @@ -959,7 +959,7 @@ static void mMP_set_label_top_dl(GRAPH* graph, mMP_LabelInfo_c* label_info) { gfx = NOW_POLY_OPA_DISP; Matrix_push(); - Matrix_translate(label->ofs_x, label->ofs_y, 0.0f, 1); + Matrix_translate(label->ofs_x, label->ofs_y, 0.0f, MTX_MULT); if (label_info->label_no == mMP_LABEL_NPC) { resident_p = label_info->residents; @@ -981,7 +981,7 @@ static void mMP_set_label_top_dl(GRAPH* graph, mMP_LabelInfo_c* label_info) { } } - Matrix_translate(0.0f, -12.0f, 0.0f, 1); + Matrix_translate(0.0f, -12.0f, 0.0f, MTX_MULT); } Matrix_pull(); @@ -1007,8 +1007,8 @@ static void mMP_set_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu) { f32 str_xpos; f32 str_ypos; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(xpos, ypos, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(xpos, ypos, 140.0f, MTX_MULT); mMP_set_base_dl(graph, menu); mMP_set_map_dl(graph, map_ovl); diff --git a/src/game/m_mscore_ovl.c b/src/game/m_mscore_ovl.c index a4b649e8..01fa060f 100644 --- a/src/game/m_mscore_ovl.c +++ b/src/game/m_mscore_ovl.c @@ -393,8 +393,8 @@ static void mMS_set_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* game) anm_scale = mscore_ovl->scale; inst_count = sAdo_InstCountGet(); - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 1.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 1.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); @@ -431,7 +431,7 @@ static void mMS_set_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* game) stick_x = -91.0f + 21.2f * (play_idx % 8) + ((play_idx < 8) ? 0.0f : 19.0f); stick_y = 20.0f + ((play_idx < 8) ? 0.0f : -50.0f); - Matrix_translate(stick_x, stick_y, 0.0f, 1); + Matrix_translate(stick_x, stick_y, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, onp_hyouji_moji_mode); gSPDisplayList(POLY_OPA_DISP++, onp_hyouji_bouT_model); @@ -449,10 +449,10 @@ static void mMS_set_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* game) for (i = 0; i < 16; i++) { note_moji_p = ¬e_moji[mscore_ovl->melody[i]]; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(base_x, base_y + note_moji_p->ofs_y, 0.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(base_x, base_y + note_moji_p->ofs_y, 0.0f, MTX_MULT); if (i == cursor_idx) { - Matrix_scale(scale, scale, 1.0f, 1); + Matrix_scale(scale, scale, 1.0f, MTX_MULT); } gDPSetPrimColor(POLY_OPA_DISP++, 0, 255, note_moji_p->prim_color[0], note_moji_p->prim_color[1], @@ -478,12 +478,12 @@ static void mMS_set_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* game) for (i = 0; i < 16; i++) { if (i != play_idx) { note_moji_p = ¬e_moji[mscore_ovl->melody[i]]; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); + 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); if (i == cursor_idx) { - Matrix_scale(scale, scale, 1.0f, 1); + Matrix_scale(scale, scale, 1.0f, MTX_MULT); color_p = &color_data[0]; } else { color_p = &color_data[1]; @@ -512,20 +512,20 @@ static void mMS_set_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* game) gDPSetAlphaCompare(POLY_OPA_DISP++, G_AC_THRESHOLD); gDPSetBlendColor(POLY_OPA_DISP++, 255, 255, 255, 40); - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(-17.0f + pos_x, -65.0f + pos_y, 140.0f, 1); - Matrix_scale(anm_scale, anm_scale, 1.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(-17.0f + pos_x, -65.0f + pos_y, 140.0f, MTX_MULT); + Matrix_scale(anm_scale, anm_scale, 1.0f, MTX_MULT); Matrix_push(); - Matrix_translate(16.0f, 35.0f, 0.0f, 1); - Matrix_scale(0.897059f, 0.708333f, 1.0f, 1); + Matrix_translate(16.0f, 35.0f, 0.0f, MTX_MULT); + Matrix_scale(0.897059f, 0.708333f, 1.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(POLY_OPA_DISP++, 0, 128, 225, 255, 175, 255); gDPSetEnvColor(POLY_OPA_DISP++, 0, 255, 40, 255); gSPDisplayList(POLY_OPA_DISP++, sen_win_wakuT_model); Matrix_pull(); - Matrix_translate(-26.0f, 51.0f - (mscore_ovl->menu_idx + 1) * 16, 0.0f, 1); + Matrix_translate(-26.0f, 51.0f - (mscore_ovl->menu_idx + 1) * 16, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(POLY_OPA_DISP++, 0, 255, 235, 60, 60, 255); gSPDisplayList(POLY_OPA_DISP++, sen_win_cursor_model); diff --git a/src/game/m_msg_draw_window.c_inc b/src/game/m_msg_draw_window.c_inc index 15a97be2..96fc9f14 100644 --- a/src/game/m_msg_draw_window.c_inc +++ b/src/game/m_msg_draw_window.c_inc @@ -5,8 +5,8 @@ static void mMsg_SetMatrix(mMsg_Window_c* msg_p, GAME* game, int mode) { f32 center_y = (-msg_p->center_y + (SCREEN_HEIGHT_F * 0.5f)) * 16.0f; Matrix_push(); - Matrix_translate(center_x, center_y, 0.0f, 1); - Matrix_scale(scale, scale, scale, 1); + Matrix_translate(center_x, center_y, 0.0f, MTX_MULT); + Matrix_scale(scale, scale, scale, MTX_MULT); OPEN_DISP(graph); diff --git a/src/game/m_music_ovl.c b/src/game/m_music_ovl.c index 87865330..91051da4 100644 --- a/src/game/m_music_ovl.c +++ b/src/game/m_music_ovl.c @@ -118,8 +118,8 @@ static void mMU_set_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* game) f32 tex_x; f32 tex_y; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); @@ -139,8 +139,8 @@ static void mMU_set_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* game) gSPDisplayList(POLY_OPA_DISP++, mus_tag_nes_model); gSPDisplayList(POLY_OPA_DISP++, mus_icon_model_before); - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(menu_info->position[0] - 100.0f, menu_info->position[1] + 28.0f, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(menu_info->position[0] - 100.0f, menu_info->position[1] + 28.0f, 140.0f, MTX_MULT); for (j = 0, md_item = ITM_MINIDISK_START; j < mMU_ROW_NUM; j++) { for (i = 0; i < mMU_COL_NUM; i++) { @@ -149,11 +149,11 @@ static void mMU_set_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* game) gSPDisplayList(POLY_OPA_DISP++, mus_icon_model); } - Matrix_translate(20.0f, 0.0f, 0.0f, 1); + Matrix_translate(20.0f, 0.0f, 0.0f, MTX_MULT); md_item++; } - Matrix_translate(-220.0f, -20.0f, 0.0f, 1); + Matrix_translate(-220.0f, -20.0f, 0.0f, MTX_MULT); } gSPDisplayList(POLY_OPA_DISP++, mus_mark_before); @@ -166,8 +166,8 @@ static void mMU_set_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* game) gDPSetPrimColor(POLY_OPA_DISP++, 0, 255, 0, 95 + frame * 9, 0, 255); gDPSetEnvColor(POLY_OPA_DISP++, frame * 6, 210 + (frame * 9) / 2, frame * 6, 255); - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(menu_info->position[0] - 100.0f, menu_info->position[1] + 28.0f, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(menu_info->position[0] - 100.0f, menu_info->position[1] + 28.0f, 140.0f, MTX_MULT); for (j = 0, md_item2 = ITM_MINIDISK_START; j < mMU_ROW_NUM; j++) { for (i = 0; i < mMU_COL_NUM; i++) { @@ -176,11 +176,11 @@ static void mMU_set_dl(Submenu* submenu, mSM_MenuInfo_c* menu_info, GAME* game) gSPDisplayList(POLY_OPA_DISP++, mus_mark_model); } - Matrix_translate(20.0f, 0.0f, 0.0f, 1); + Matrix_translate(20.0f, 0.0f, 0.0f, MTX_MULT); md_item2++; } - Matrix_translate(-220.0f, -20.0f, 0.0f, 1); + Matrix_translate(-220.0f, -20.0f, 0.0f, MTX_MULT); } CLOSE_POLY_OPA_DISP(graph); diff --git a/src/game/m_needlework_ovl.c b/src/game/m_needlework_ovl.c index 33e15a67..44919650 100644 --- a/src/game/m_needlework_ovl.c +++ b/src/game/m_needlework_ovl.c @@ -149,9 +149,9 @@ extern void mNW_draw_original(Submenu* submenu, GRAPH* graph, f32 pos_x, f32 pos OPEN_POLY_OPA_DISP(graph); - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); - Matrix_scale(scale, scale, 1.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); + Matrix_scale(scale, scale, 1.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_OPA_DISP++, ANIME_1_TXT_SEG, mNW_get_image_texture(submenu, idx)); @@ -289,13 +289,13 @@ static void mNW_set_frame_dl(Submenu* submenu, GAME* game, mSM_MenuInfo_c* menu_ int tex_y; int tex_x; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, MTX_MULT); if (menu_info->data0 == mNW_OPEN_INV) { - Matrix_translate(46.0f, 0.0f, 0.0f, 1); + Matrix_translate(46.0f, 0.0f, 0.0f, MTX_MULT); } else if (menu_info->data0 == mNW_OPEN_DESIGN) { - Matrix_translate(10.0f, 0.0f, 0.0f, 1); + Matrix_translate(10.0f, 0.0f, 0.0f, MTX_MULT); } OPEN_POLY_OPA_DISP(graph); @@ -367,7 +367,7 @@ extern void mNW_draw_sav_mark(GAME* game, int x, int y) { OPEN_POLY_OPA_DISP(graph); - Matrix_translate((f32)x, (f32)y, 0.0f, 1); + Matrix_translate((f32)x, (f32)y, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, sav_mark_winT_model); @@ -409,13 +409,13 @@ static void mNW_set_frame_dl_cpo(Submenu* submenu, GAME* game, mSM_MenuInfo_c* m int tex_x; int j; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, MTX_MULT); switch (menu_info->data0) { case mNW_OPEN_GBA: case mNW_OPEN_CARD: - Matrix_translate(136.0f, -5.0f, 0.0f, 1); + Matrix_translate(136.0f, -5.0f, 0.0f, MTX_MULT); break; } diff --git a/src/game/m_notice_ovl.c b/src/game/m_notice_ovl.c index a85d555f..1acc6fc2 100644 --- a/src/game/m_notice_ovl.c +++ b/src/game/m_notice_ovl.c @@ -419,8 +419,8 @@ extern Gfx kei_win_model[]; static void mNT_set_frame_dl(GRAPH* graph, f32 x, f32 y) { Gfx* gfx; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(x, y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(x, y, 140.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; @@ -441,8 +441,8 @@ extern Gfx kei_win_stT_model[]; static void mNT_set_key_dl(mNT_Ovl_c* notice_ovl, GRAPH* graph, f32 y) { Gfx* gfx; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(0.0f, y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(0.0f, y, 140.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; @@ -462,11 +462,11 @@ static void mNT_set_key_dl(mNT_Ovl_c* notice_ovl, GRAPH* graph, f32 y) { } } - Matrix_translate(3.0f, 0.0f, 0.0f, 1); + Matrix_translate(3.0f, 0.0f, 0.0f, MTX_MULT); if (notice_ovl->stick_area >= mED_STICK_AREA_TOP_RIGHT && notice_ovl->stick_area <= mED_STICK_AREA_BOTTOM_RIGHT) { - Matrix_translate(-0.5f, 0.0f, 0.0f, 1); - Matrix_RotateY(DEG2SHORT_ANGLE(-180.0f), 1); + Matrix_translate(-0.5f, 0.0f, 0.0f, MTX_MULT); + Matrix_RotateY(DEG2SHORT_ANGLE(-180.0f), MTX_MULT); } gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/game/m_passwordChk_ovl.c b/src/game/m_passwordChk_ovl.c index 3808a1a7..b2fa0c2b 100644 --- a/src/game/m_passwordChk_ovl.c +++ b/src/game/m_passwordChk_ovl.c @@ -53,8 +53,8 @@ static void mPC_set_frame_dl(Submenu* submenu, GRAPH* graph, f32 x, f32 y) { u8 s; u8 t; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(x, y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(x, y, 140.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; diff --git a/src/game/m_passwordMake_ovl.c b/src/game/m_passwordMake_ovl.c index f6a13bbb..09015423 100644 --- a/src/game/m_passwordMake_ovl.c +++ b/src/game/m_passwordMake_ovl.c @@ -65,8 +65,8 @@ static void mPM_set_frame_dl(Submenu* submenu, GRAPH* graph, mSM_MenuInfo_c* men f32 tile_x; f32 tile_y; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(x, y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(x, y, 140.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; diff --git a/src/game/m_player_common.c_inc b/src/game/m_player_common.c_inc index 65ff354b..9a36b551 100644 --- a/src/game/m_player_common.c_inc +++ b/src/game/m_player_common.c_inc @@ -3958,10 +3958,10 @@ static void Player_actor_Get_ItemRodTopInitPos(ACTOR* actorx, xyz_t* pos_p) { pos.z -= 21.69f; Matrix_push(); - Matrix_translate(pos.x, pos.y, pos.z, 0); - Matrix_RotateZ(player_rot_p->z, 1); - Matrix_RotateX(player_rot_p->x, 1); - Matrix_RotateY(player_rot_p->y, 1); + Matrix_translate(pos.x, pos.y, pos.z, MTX_LOAD); + Matrix_RotateZ(player_rot_p->z, MTX_MULT); + Matrix_RotateX(player_rot_p->x, MTX_MULT); + Matrix_RotateY(player_rot_p->y, MTX_MULT); Matrix_Position(&pos, pos_p); Matrix_pull(); } diff --git a/src/game/m_player_draw.c_inc b/src/game/m_player_draw.c_inc index 1fea1c66..ae94d31f 100644 --- a/src/game/m_player_draw.c_inc +++ b/src/game/m_player_draw.c_inc @@ -5,11 +5,11 @@ static void Player_actor_draw_Before_head(ACTOR* actorx, GAME* game, cKF_Skeleto if (head_angle->x != 0 || head_angle->y != 0 || head_angle->z != 0) { Matrix_push(); - Matrix_mult(&MtxF_clear, 0); + Matrix_mult(&MtxF_clear, MTX_LOAD); Matrix_softcv3_mult(&ZeroVec, rot); - Matrix_RotateX(head_angle->x, 1); - Matrix_RotateY(head_angle->y, 1); - Matrix_to_rotate2_new(get_Matrix_now(), rot, 0); + Matrix_RotateX(head_angle->x, MTX_MULT); + Matrix_RotateY(head_angle->y, MTX_MULT); + Matrix_to_rotate2_new(get_Matrix_now(), rot, MTX_LOAD); Matrix_pull(); } } @@ -60,7 +60,7 @@ static int Player_actor_draw_Before(GAME* game, cKF_SkeletonInfo_R_c* kf, int jo static void Player_actor_draw_After_Culc_FootMarkPos(xyz_t* pos, s_xyz* rot) { Matrix_Position_Zero(pos); - Matrix_to_rotate_new(get_Matrix_now(), rot, 0); + Matrix_to_rotate_new(get_Matrix_now(), rot, MTX_LOAD); } static void Player_actor_draw_After_head(ACTOR* actorx, GAME* game, cKF_SkeletonInfo_R_c* kf, Gfx** gfx_pp, u8* flag, @@ -219,7 +219,7 @@ static void Player_actor_draw_Normal(ACTOR* actorx, GAME* game) { } Matrix_push(); - Matrix_RotateZ(boat_angle_z, 1); + Matrix_RotateZ(boat_angle_z, MTX_MULT); } gSPSegment(POLY_OPA_DISP++, ANIME_1_TXT_SEG, eye_tex_p); diff --git a/src/game/m_player_item.c_inc b/src/game/m_player_item.c_inc index 8bab419e..c220b6af 100644 --- a/src/game/m_player_item.c_inc +++ b/src/game/m_player_item.c_inc @@ -126,7 +126,7 @@ static void Player_actor_Item_draw(ACTOR* actor, GAME* game) { Matrix_put(&player->right_hand_mtx); if (scale != 1.0f) { - Matrix_scale(scale, scale, scale, 1); + Matrix_scale(scale, scale, scale, MTX_MULT); } mtx = _Matrix_to_Mtx_new(game->graph); diff --git a/src/game/m_player_item_balloon.c_inc b/src/game/m_player_item_balloon.c_inc index c1388e00..a8d4e447 100644 --- a/src/game/m_player_item_balloon.c_inc +++ b/src/game/m_player_item_balloon.c_inc @@ -253,12 +253,12 @@ static void Player_actor_Item_draw_balloon(ACTOR* actor, GAME* game) { scale = player->item_scale; angle = DEG2SHORT_ANGLE2(-90.0f) + player->balloon_lean_angle + angle_p->x + player->ballon_add_rot_x; - Matrix_translate(player->right_hand_pos.x, player->right_hand_pos.y, player->right_hand_pos.z, 0); - Matrix_RotateY(rot, 1); - Matrix_RotateX(angle, 1); - Matrix_RotateZ(0x4000, 1); - Matrix_RotateX(player->balloon_angle.z, 1); - Matrix_scale(actor->scale.x * scale, actor->scale.y * scale, actor->scale.z * scale, 1); + Matrix_translate(player->right_hand_pos.x, player->right_hand_pos.y, player->right_hand_pos.z, MTX_LOAD); + Matrix_RotateY(rot, MTX_MULT); + Matrix_RotateX(angle, MTX_MULT); + Matrix_RotateZ(0x4000, MTX_MULT); + Matrix_RotateX(player->balloon_angle.z, MTX_MULT); + Matrix_scale(actor->scale.x * scale, actor->scale.y * scale, actor->scale.z * scale, MTX_MULT); OPEN_POLY_OPA_DISP(graph); diff --git a/src/game/m_player_item_common.c_inc b/src/game/m_player_item_common.c_inc index f6b309b2..9fb53b52 100644 --- a/src/game/m_player_item_common.c_inc +++ b/src/game/m_player_item_common.c_inc @@ -390,7 +390,7 @@ static void Player_actor_CorrectSomething_net(ACTOR* actor, xyz_t* pos) { if (label != NULL && player->item_net_catch_type == mPlayer_NET_CATCH_TYPE_INSECT) { Matrix_push(); - Matrix_translate(pos->x, pos->y, pos->z, FALSE); + Matrix_translate(pos->x, pos->y, pos->z, MTX_LOAD); Matrix_get(&label->matrix_work); Matrix_pull(); label->init_matrix = TRUE; diff --git a/src/game/m_player_item_net.c_inc b/src/game/m_player_item_net.c_inc index 8a91d428..c1512ef5 100644 --- a/src/game/m_player_item_net.c_inc +++ b/src/game/m_player_item_net.c_inc @@ -213,7 +213,7 @@ static int Player_actor_Item_main_net_stop(ACTOR* actor, GAME* game) { static void Player_actor_Item_draw_net_After_dummy_net(ACTOR* actor) { PLAYER_ACTOR* player = (PLAYER_ACTOR*)actor; - Matrix_rotateXYZ(player->net_angle.x, player->net_angle.y, player->net_angle.z, 1); + Matrix_rotateXYZ(player->net_angle.x, player->net_angle.y, player->net_angle.z, MTX_MULT); } typedef void (*mPlayer_item_net_draw_proc)(void* arg, GAME* game, cKF_SkeletonInfo_R_c* keyframe, Gfx** joint_shape, @@ -240,7 +240,7 @@ static void Player_actor_Item_draw_net(ACTOR* actor, GAME* game) { PLAYER_ACTOR* player = (PLAYER_ACTOR*)actor; Matrix_push(); - Matrix_rotateXYZ(0, 3000, 0, 1); + Matrix_rotateXYZ(0, 3000, 0, MTX_MULT); Matrix_Position_VecZ(-2400.0f, &player->net_start_pos); Matrix_Position_VecZ(5500.0f, &player->net_end_pos); Matrix_Position_VecZ(4000.0f, &player->net_pos); diff --git a/src/game/m_player_item_rod.c_inc b/src/game/m_player_item_rod.c_inc index 7a2d66f5..9ea8bd48 100644 --- a/src/game/m_player_item_rod.c_inc +++ b/src/game/m_player_item_rod.c_inc @@ -367,7 +367,7 @@ static void Player_actor_Item_draw_rod(ACTOR* actor, GAME* game) { Matrix_Position_VecZ(6000.0f, &player->item_rod_virtual_top_pos); Matrix_push(); - Matrix_RotateZ(player->item_rod_angle_z, 1); + Matrix_RotateZ(player->item_rod_angle_z, MTX_MULT); mtx = _Matrix_to_Mtx_new(play->game.graph); diff --git a/src/game/m_player_item_windmill.c_inc b/src/game/m_player_item_windmill.c_inc index a172627f..86ac8e57 100644 --- a/src/game/m_player_item_windmill.c_inc +++ b/src/game/m_player_item_windmill.c_inc @@ -117,7 +117,7 @@ static void Player_actor_Item_draw_windmill_After_kaza1_fan(ACTOR* actor) { Matrix_Position_Zero(item_end); - Matrix_to_rotate_new(get_Matrix_now(), angle, 0); + Matrix_to_rotate_new(get_Matrix_now(), angle, MTX_LOAD); angle->x *= -1; angle->y += 0x8000; @@ -161,7 +161,7 @@ static void Player_actor_Item_draw_windmill(ACTOR* actor, GAME* game) { OPEN_POLY_OPA_DISP(graph); ang = (s16)(-0.5f * actor->shape_info.rotation.x); - Matrix_RotateY(ang, 1); + Matrix_RotateY(ang, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/game/m_repay_ovl.c b/src/game/m_repay_ovl.c index a0f233f5..956d8f1d 100644 --- a/src/game/m_repay_ovl.c +++ b/src/game/m_repay_ovl.c @@ -161,8 +161,8 @@ static void mRP_set_frame_dl(Submenu* submenu, GRAPH* graph, mSM_MenuInfo_c* men int t; Gfx* gfx; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(x, y, 140.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(x, y, 140.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; diff --git a/src/game/m_roll_lib.c b/src/game/m_roll_lib.c index f072f584..8ad5a4c0 100644 --- a/src/game/m_roll_lib.c +++ b/src/game/m_roll_lib.c @@ -60,7 +60,7 @@ extern int mRlib_Get_norm_Clif(ACTOR* actor, xyz_t* normal_vec) { rot.y = 0.0f; rot.z = cos_s(angle); - Matrix_RotateVector((int)DEG2SHORT_ANGLE((0.5f - percent) * 80.0f), &rot, 0); + Matrix_RotateVector((int)DEG2SHORT_ANGLE((0.5f - percent) * 80.0f), &rot, MTX_LOAD); Matrix_Position(&pos, normal_vec); return TRUE; @@ -79,10 +79,10 @@ extern void mRlib_Roll_Matrix_to_s_xyz(ACTOR* actor, s_xyz* rot, s16 angle) { axis.z = -sin_s(actor->world.angle.y); axis.y = 0.0f; - Matrix_RotateVector(angle, &axis, 0); - Matrix_rotateXYZ(rot->x, rot->y, rot->z, 1); + Matrix_RotateVector(angle, &axis, MTX_LOAD); + Matrix_rotateXYZ(rot->x, rot->y, rot->z, MTX_MULT); Matrix_get(&matrix); - Matrix_to_rotate2_new(&matrix, rot, 0); + Matrix_to_rotate2_new(&matrix, rot, MTX_LOAD); } extern s16 mRlib_Get_HitWallAngleY(ACTOR* actor) { @@ -292,9 +292,9 @@ extern int mRlib_PSnowmanBreakNeckSwing(s16* head_angle_y, f32 f0, f32 scale) { rot_x = (f0 * 4.5f) * sin_s(angle); rot_z = (f0 * 4.5f) * cos_s(angle); - Matrix_translate(0.0f, scale * -1400.0f, 0.0f, 1); // move to neck location? - Matrix_rotateXYZ(rot_x, 0, rot_z, 1); // rotate at location - Matrix_translate(0.0f, scale * 1400.0f, 0.0f, 1); // restore original location + Matrix_translate(0.0f, scale * -1400.0f, 0.0f, MTX_MULT); // move to neck location? + Matrix_rotateXYZ(rot_x, 0, rot_z, MTX_MULT); // rotate at location + Matrix_translate(0.0f, scale * 1400.0f, 0.0f, MTX_MULT); // restore original location } } diff --git a/src/game/m_submenu_ovl.c b/src/game/m_submenu_ovl.c index 7e79d6bf..ccce383e 100644 --- a/src/game/m_submenu_ovl.c +++ b/src/game/m_submenu_ovl.c @@ -1538,9 +1538,9 @@ static void mSM_draw_mail(GRAPH* graph, f32 pos_x, f32 pos_y, f32 scale, Mail_c* } icon = &letter_tex_data_table[type]; - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(pos_x, pos_y, 140.0f, 1); - Matrix_scale(scale, scale, 1.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(pos_x, pos_y, 140.0f, MTX_MULT); + Matrix_scale(scale, scale, 1.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); diff --git a/src/game/m_tag_ovl.c b/src/game/m_tag_ovl.c index 584a526b..3e9cd516 100644 --- a/src/game/m_tag_ovl.c +++ b/src/game/m_tag_ovl.c @@ -8327,9 +8327,9 @@ static void mTG_set_win_field(GRAPH* graph, Submenu* submenu, mSM_MenuInfo_c* me } /* Setup tag DL env */ - Matrix_scale(16.0f, 16.0f, 1.0f, 0); - Matrix_translate(tag->base_pos[0] + pos_x, tag->base_pos[1] + pos_y, 140.0f, 1); - Matrix_scale(tag->scale, tag->scale, 1.0f, 1); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_LOAD); + Matrix_translate(tag->base_pos[0] + pos_x, tag->base_pos[1] + pos_y, 140.0f, MTX_MULT); + Matrix_scale(tag->scale, tag->scale, 1.0f, MTX_MULT); OPEN_POLY_OPA_DISP(graph); gSPDisplayList(POLY_OPA_DISP++, sen_item2_DL_mode); @@ -8338,8 +8338,8 @@ static void mTG_set_win_field(GRAPH* graph, Submenu* submenu, mSM_MenuInfo_c* me /* Draw window shadow */ Matrix_push(); - Matrix_translate(tag->body_ofs[0], tag->body_ofs[1], 0.0f, 1); - Matrix_scale(tag->body_scale[0] * tag->_34, tag->body_scale[1] * tag->_34, 1.0f, 1); + Matrix_translate(tag->body_ofs[0], tag->body_ofs[1], 0.0f, MTX_MULT); + Matrix_scale(tag->body_scale[0] * tag->_34, tag->body_scale[1] * tag->_34, 1.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, disp_data_p->frame_shadow); Matrix_pull(); @@ -8347,7 +8347,7 @@ static void mTG_set_win_field(GRAPH* graph, Submenu* submenu, mSM_MenuInfo_c* me /* Draw arrow */ if (tag->arrow_dir != 0) { Matrix_push(); - Matrix_scale(tag->arrow_scale[0], tag->arrow_scale[1], 1.0f, 1); + Matrix_scale(tag->arrow_scale[0], tag->arrow_scale[1], 1.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (tag->table == mTG_TABLE_CPORIGINAL_WC) { @@ -8388,8 +8388,8 @@ static void mTG_set_win_field(GRAPH* graph, Submenu* submenu, mSM_MenuInfo_c* me /* Draw window */ Matrix_push(); - Matrix_translate(tag->body_ofs[0], tag->body_ofs[1], 0.0f, 1); - Matrix_scale(tag->body_scale[0] * tag->_34, tag->body_scale[1] * tag->_34, 1.0f, 1); + Matrix_translate(tag->body_ofs[0], tag->body_ofs[1], 0.0f, MTX_MULT); + Matrix_scale(tag->body_scale[0] * tag->_34, tag->body_scale[1] * tag->_34, 1.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, disp_data_p->frame); Matrix_pull(); @@ -8412,7 +8412,7 @@ static void mTG_set_win_field(GRAPH* graph, Submenu* submenu, mSM_MenuInfo_c* me x = tag->text_ofs[0] + (tag->_34 * -4.0f + tag->body_ofs[0]); y = (tag->text_ofs[1] + (tag->_34 * -8.0f + tag->body_ofs[1])) - cursor_ofs * 16.0f * tag->_34; - Matrix_translate(x, y, 0.0f, 1); + Matrix_translate(x, y, 0.0f, MTX_MULT); gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); color_p = &cursol_color[special_color]; gDPSetPrimColor(POLY_OPA_DISP++, 0, 255, color_p->r, color_p->g, color_p->b, 255); diff --git a/src/game/m_timeIn_ovl.c b/src/game/m_timeIn_ovl.c index 1b949ab8..c548dbe5 100644 --- a/src/game/m_timeIn_ovl.c +++ b/src/game/m_timeIn_ovl.c @@ -305,8 +305,8 @@ static void mTI_set_frame_dl(Submenu* submenu, GRAPH* graph, f32 x, f32 y) { week = lbRTC_Week(GAME_YEAR_MIN + timeIn_ovl->values[mTI_IDX_YEAR], timeIn_ovl->values[mTI_IDX_MONTH], timeIn_ovl->values[mTI_IDX_DAY]); - Matrix_translate(x * 16.0f, y * 16.0f, 140.0f, 0); - Matrix_scale(16.0f, 16.0f, 1.0f, 1); + Matrix_translate(x * 16.0f, y * 16.0f, 140.0f, MTX_LOAD); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; @@ -370,9 +370,9 @@ static void mTI_set_clock(Submenu* submenu, GRAPH* graph, f32 x, f32 y) { r[1] = -(((f32)save_min / (f32)((lbRTC_MINUTES_PER_HOUR * lbRTC_HOURS_PER_DAY) / 2)) * 65536.0f); // hour hand r[2] = 0; // second hand? - Matrix_translate((x + -61.0f) * 16.0f, (y + 45.0f) * 16.0f, 140.0f, 0); - Matrix_scale(16.0f, 16.0f, 1.0f, 1); - Matrix_translate(-5.0f, -4.0f, 0.0f, 1); + Matrix_translate((x + -61.0f) * 16.0f, (y + 45.0f) * 16.0f, 140.0f, MTX_LOAD); + Matrix_scale(16.0f, 16.0f, 1.0f, MTX_MULT); + Matrix_translate(-5.0f, -4.0f, 0.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; @@ -383,7 +383,7 @@ static void mTI_set_clock(Submenu* submenu, GRAPH* graph, f32 x, f32 y) { for (i = 0; i < 3; i++) { /* Rotate & draw the clock hand */ Matrix_push(); - Matrix_RotateZ(r[i], 1); + Matrix_RotateZ(r[i], MTX_MULT); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfx++, displayList_table[i]); Matrix_pull(); diff --git a/src/game/m_view.c b/src/game/m_view.c index f6ae2a55..e4ee8f24 100644 --- a/src/game/m_view.c +++ b/src/game/m_view.c @@ -186,17 +186,17 @@ static int do_stretch_view(View* view, Mtx* mtx) { Matrix_put(&mtx_f); /* do rotation */ - Matrix_RotateX(rot.x, 1); - Matrix_RotateY(rot.y, 1); - Matrix_RotateZ(rot.z, 1); + Matrix_RotateX(rot.x, MTX_MULT); + Matrix_RotateY(rot.y, MTX_MULT); + Matrix_RotateZ(rot.z, MTX_MULT); /* do scaling */ - Matrix_scale(view->stretch.scale.x, view->stretch.scale.y, view->stretch.scale.z, 1); + Matrix_scale(view->stretch.scale.x, view->stretch.scale.y, view->stretch.scale.z, MTX_MULT); /* undo rotation */ - Matrix_RotateZ(-rot.z, 1); - Matrix_RotateY(-rot.y, 1); - Matrix_RotateX(-rot.x, 1); + Matrix_RotateZ(-rot.z, MTX_MULT); + Matrix_RotateY(-rot.y, MTX_MULT); + Matrix_RotateX(-rot.x, MTX_MULT); /* update matrix */ _Matrix_to_Mtx(mtx); diff --git a/src/game/m_warning_ovl.c b/src/game/m_warning_ovl.c index 8b8c508f..64f22e82 100644 --- a/src/game/m_warning_ovl.c +++ b/src/game/m_warning_ovl.c @@ -341,8 +341,8 @@ static void mWR_set_frame_dl(Submenu* submenu, GRAPH* graph, mSM_MenuInfo_c* men Gfx* gfx; f32 scale = submenu->overlay->warning_ovl->scale * 16.0f; - Matrix_scale(scale * data->scale_x, scale * data->scale_y, 1.0f, 0); - Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, 1); + Matrix_scale(scale * data->scale_x, scale * data->scale_y, 1.0f, MTX_LOAD); + Matrix_translate(menu_info->position[0], menu_info->position[1], 140.0f, MTX_MULT); OPEN_DISP(graph); gfx = NOW_POLY_OPA_DISP; @@ -371,8 +371,8 @@ static void mWR_set_frame_dl(Submenu* submenu, GRAPH* graph, mSM_MenuInfo_c* men y = (menu_info->position[1] + 60.0f * data->scale_y) - (data->lines[0].pos_y + data->lines[1].pos_y + data->lines[2].pos_y + data->lines[3].pos_y + 8.0f); - Matrix_scale(scale, scale, 1.0f, 0); - Matrix_translate(x, y, 0.0f, 1); + Matrix_scale(scale, scale, 1.0f, MTX_LOAD); + Matrix_translate(x, y, 0.0f, MTX_MULT); gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfx++, att_win_cursor_model); } diff --git a/src/game/m_watch_my_step.c b/src/game/m_watch_my_step.c index 3c4631b7..3045e85e 100644 --- a/src/game/m_watch_my_step.c +++ b/src/game/m_watch_my_step.c @@ -208,8 +208,8 @@ extern void watch_my_step_draw(GAME_PLAY* play) { gSPMatrix(NOW_FONT_DISP++, font_mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); } - Matrix_scale(16.0f, 16.0f, 16.0f, 0); - Matrix_translate(S_watch_my_step.pos_x, -S_watch_my_step.pos_y, 0.0f, 1); + Matrix_scale(16.0f, 16.0f, 16.0f, MTX_LOAD); + Matrix_translate(S_watch_my_step.pos_x, -S_watch_my_step.pos_y, 0.0f, MTX_MULT); { Gfx* font_gfx = NOW_FONT_DISP; @@ -231,7 +231,7 @@ extern void watch_my_step_draw(GAME_PLAY* play) { /* fallthrough 3 -> 2 */ case 2: { Matrix_push(); - Matrix_translate(S_watch_my_step.trans_x * -1.0f, S_watch_my_step.trans_y * -20.0f, 0.0f, 1); + Matrix_translate(S_watch_my_step.trans_x * -1.0f, S_watch_my_step.trans_y * -20.0f, 0.0f, MTX_MULT); gSPMatrix(font_gfx++, _Matrix_to_Mtx_new(g), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Matrix_pull(); @@ -240,7 +240,7 @@ extern void watch_my_step_draw(GAME_PLAY* play) { /* fallthrough 2 -> 1 */ case 1: { Matrix_push(); - Matrix_translate(S_watch_my_step.trans_x * -13.0f, S_watch_my_step.trans_y * -30.0f, 0.0f, 1); + Matrix_translate(S_watch_my_step.trans_x * -13.0f, S_watch_my_step.trans_y * -30.0f, 0.0f, MTX_MULT); gSPMatrix(font_gfx++, _Matrix_to_Mtx_new(g), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Matrix_pull(); @@ -264,7 +264,7 @@ extern void watch_my_step_draw(GAME_PLAY* play) { } /* Reset font matrix scale */ - Matrix_scale(1.0f, 1.0f, 1.0f, 0); + Matrix_scale(1.0f, 1.0f, 1.0f, MTX_LOAD); gSPMatrix(font_gfx++, _Matrix_to_Mtx_new(g), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); SET_FONT_DISP(font_gfx); } @@ -356,7 +356,7 @@ static void navigate_camera_draw(GAME_PLAY* play) { gSPMatrix(NOW_FONT_DISP++, font_mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); } - Matrix_scale(16.0f, 16.0f, 16.0f, 0); + Matrix_scale(16.0f, 16.0f, 16.0f, MTX_LOAD); font_gfx = NOW_FONT_DISP; gSPMatrix(font_gfx++, _Matrix_to_Mtx_new(g), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -532,7 +532,7 @@ static void mWt_mybell_confirmation_draw(GAME_PLAY* play) { gSPMatrix(NOW_FONT_DISP++, font_mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); } - Matrix_scale(16.0f, 16.0f, 16.0f, 0); + Matrix_scale(16.0f, 16.0f, 16.0f, MTX_LOAD); font_gfx = NOW_FONT_DISP; gSPMatrix(font_gfx++, _Matrix_to_Mtx_new(g), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -550,7 +550,7 @@ static void mWt_mybell_confirmation_draw(GAME_PLAY* play) { gDPSetPrimColor(font_gfx++, 0, a, 255, 245, 255, a); gSPDisplayList(font_gfx++, mny_win_mojiT_model); - Matrix_scale(1.0f, 1.0f, 1.0f, 0); + Matrix_scale(1.0f, 1.0f, 1.0f, MTX_LOAD); gSPMatrix(font_gfx++, _Matrix_to_Mtx_new(g), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); SET_FONT_DISP(font_gfx); diff --git a/src/system/sys_matrix.c b/src/system/sys_matrix.c index ee337197..effd7aaf 100644 --- a/src/system/sys_matrix.c +++ b/src/system/sys_matrix.c @@ -56,7 +56,7 @@ MtxF* get_Matrix_now(void) { void Matrix_mult(MtxF* m, u8 mode) { MtxF* curm = get_Matrix_now(); - if (mode == 1) { + if (mode == MTX_MULT) { Skin_Matrix_MulMatrix(curm, m, curm); } else { Matrix_copy_MtxF(Matrix_now, m); @@ -67,7 +67,7 @@ void Matrix_translate(f32 x, f32 y, f32 z, u8 mode) { MtxF* curm = Matrix_now; f32 tx, ty; - if (mode == 1) { + if (mode == MTX_MULT) { tx = curm->xx; ty = curm->xy; curm->xw += tx * x + ty * y + curm->xz * z; @@ -88,7 +88,7 @@ void Matrix_translate(f32 x, f32 y, f32 z, u8 mode) { void Matrix_scale(f32 x, f32 y, f32 z, u8 mode) { MtxF* curm = Matrix_now; - if (mode == 1) { + if (mode == MTX_MULT) { curm->xx *= x; curm->yx *= x; curm->zx *= x; @@ -112,7 +112,7 @@ void Matrix_RotateX(s16 x, int mode) { f32 cos; f32 fp, st2; - if (mode == 1) { + if (mode == MTX_MULT) { if (x != 0) { curm = Matrix_now; @@ -175,7 +175,7 @@ void Matrix_RotateY(s16 y, int mode) { f32 cos; f32 fp, st2; - if (mode == 1) { + if (mode == MTX_MULT) { if (y != 0) { curm = Matrix_now; @@ -239,7 +239,7 @@ void Matrix_RotateZ(s16 z, int mode) { f32 cos; f32 fp, st2; - if (mode == 1) { + if (mode == MTX_MULT) { if (z != 0) { curm = Matrix_now; @@ -303,7 +303,7 @@ void Matrix_rotateXYZ(s16 x, s16 y, s16 z, int mode) { f32 cos; f32 fp, st2; - if (mode == 1) { + if (mode == MTX_MULT) { sin = sin_s(z); cos = cos_s(z); @@ -805,7 +805,7 @@ void Matrix_RotateVector(s16 angle, xyz_t* axis, u8 mode) { f32 temp3; // component z f32 temp4; // component q? - if (mode == 1) { + if (mode == MTX_MULT) { if (angle != 0) { curm = Matrix_now;