Skip to content

Commit 430798d

Browse files
committed
Reset lookat structure to default before display list execution.
Fixes Super Mario 64 water bomb texture has wrong oriantation with HLE #2899
1 parent 17d9703 commit 430798d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Diff for: src/RSP.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ void RSP_ProcessDList()
139139
gSP.matrix.modelViewi = 0;
140140
gSP.status[0] = gSP.status[1] = gSP.status[2] = gSP.status[3] = 0;
141141
gSP.geometryMode = 0U;
142+
memset(&gSP.lookat, 0, sizeof(gSPInfo::lookat));
143+
gSP.lookat.xyz[0][Y] = gSP.lookat.xyz[1][X] = 1.0f;
142144
gSP.changed |= CHANGED_MATRIX | CHANGED_LIGHT | CHANGED_LOOKAT | CHANGED_GEOMETRYMODE;
143145
gSP.tri_num = 0;
144146
gSP.cbfd.advancedLighting = false;

Diff for: src/gSP.h

-3
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,8 @@ struct gSPInfo
7777

7878
struct
7979
{
80-
f32 rgb[2][3];
8180
f32 xyz[2][3];
8281
f32 i_xyz[2][3];
83-
f32 pos_xyzw[2][4];
84-
f32 ca[2], la[2], qa[2];
8582
} lookat;
8683

8784
u32 numLights;

0 commit comments

Comments
 (0)