Skip to content

Commit

Permalink
Reset lookat structure to default before display list execution.
Browse files Browse the repository at this point in the history
Fixes Super Mario 64 water bomb texture has wrong oriantation with HLE #2899
  • Loading branch information
gonetz committed Feb 8, 2025
1 parent 17d9703 commit 430798d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/RSP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ void RSP_ProcessDList()
gSP.matrix.modelViewi = 0;
gSP.status[0] = gSP.status[1] = gSP.status[2] = gSP.status[3] = 0;
gSP.geometryMode = 0U;
memset(&gSP.lookat, 0, sizeof(gSPInfo::lookat));
gSP.lookat.xyz[0][Y] = gSP.lookat.xyz[1][X] = 1.0f;
gSP.changed |= CHANGED_MATRIX | CHANGED_LIGHT | CHANGED_LOOKAT | CHANGED_GEOMETRYMODE;
gSP.tri_num = 0;
gSP.cbfd.advancedLighting = false;
Expand Down
3 changes: 0 additions & 3 deletions src/gSP.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,8 @@ struct gSPInfo

struct
{
f32 rgb[2][3];
f32 xyz[2][3];
f32 i_xyz[2][3];
f32 pos_xyzw[2][4];
f32 ca[2], la[2], qa[2];
} lookat;

u32 numLights;
Expand Down

0 comments on commit 430798d

Please sign in to comment.