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.
This commit is contained in:
Agent X 2025-01-12 22:06:18 -05:00
parent ebeb58da13
commit b9d48e0952

View file

@ -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;