From b9d48e095251a9a149d2b7ebb06936bf0a9c079e Mon Sep 17 00:00:00 2001 From: Agent X <44549182+AgentXLP@users.noreply.github.com> Date: Sun, 12 Jan 2025 22:06:18 -0500 Subject: [PATCH] Fix 5 year bug where envmaps use the wrong orientation Fixed gfx intepreter bug that has existed for about 5 years now in the PC Port. I have now cleansed this platform of Super Mario 64 of its sin. No longer shall I hear people complain about this specific bug. PC Port has now been deshittified. It is now pure and excellent. Mario 64 is reborn, PC Port is real, the future is now. P.S. I really hope this doesn't have incredibly strange unintended side effects that cause me to require to revert this and implement it in a more convoluted way. --- src/pc/gfx/gfx_pc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pc/gfx/gfx_pc.c b/src/pc/gfx/gfx_pc.c index 8568c5ae2..d5c1614f9 100644 --- a/src/pc/gfx/gfx_pc.c +++ b/src/pc/gfx/gfx_pc.c @@ -816,8 +816,8 @@ static void OPTIMIZE_O3 gfx_sp_vertex(size_t n_vertices, size_t dest_index, cons for (int32_t i = 0; i < rsp.current_num_lights - 1; i++) { calculate_normal_dir(&rsp.current_lights[i], rsp.current_lights_coeffs[i], applyLightingDir); } - static const Light_t lookat_x = {{0, 0, 0}, 0, {0, 0, 0}, 0, {127, 0, 0}, 0}; - static const Light_t lookat_y = {{0, 0, 0}, 0, {0, 0, 0}, 0, {0, 127, 0}, 0}; + static const Light_t lookat_x = {{0, 0, 0}, 0, {0, 0, 0}, 0, {0, 127, 0}, 0}; + static const Light_t lookat_y = {{0, 0, 0}, 0, {0, 0, 0}, 0, {127, 0, 0}, 0}; calculate_normal_dir(&lookat_x, rsp.current_lookat_coeffs[0], applyLightingDir); calculate_normal_dir(&lookat_y, rsp.current_lookat_coeffs[1], applyLightingDir); rsp.lights_changed = false;