mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Fixed gSPSegment command (sic!)
This commit is contained in:
parent
99e3869056
commit
bcdce0d501
2
F3D.cpp
2
F3D.cpp
|
@ -147,7 +147,7 @@ void F3D_MoveWord( u32 w0, u32 w1 )
|
|||
gSPClipRatio( w1 );
|
||||
break;
|
||||
case G_MW_SEGMENT:
|
||||
gSPSegment( _SHIFTR( w0, 8, 16 ) >> 2, w1 & 0x00FFFFFF );
|
||||
gSPSegment( _SHIFTR( w0, 10, 4 ), w1 & 0x00FFFFFF );
|
||||
break;
|
||||
case G_MW_FOG:
|
||||
/* u32 fm, fo, min, max;
|
||||
|
|
22
gSP.cpp
22
gSP.cpp
|
@ -1503,32 +1503,10 @@ void gSPPopMatrix( u32 param )
|
|||
|
||||
void gSPSegment( s32 seg, s32 base )
|
||||
{
|
||||
if (seg > 0xF) {
|
||||
#ifdef DEBUG
|
||||
DebugMsg( DEBUG_HIGH | DEBUG_ERROR, "// Attempting to load address into invalid segment\n",
|
||||
SegmentText[seg], base );
|
||||
DebugMsg( DEBUG_HIGH | DEBUG_HANDLED, "gSPSegment( %s, 0x%08X );\n",
|
||||
SegmentText[seg], base );
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if ((unsigned int)base > RDRAMSize - 1) {
|
||||
#ifdef DEBUG
|
||||
DebugMsg( DEBUG_HIGH | DEBUG_ERROR, "// Attempting to load invalid address into segment array\n",
|
||||
SegmentText[seg], base );
|
||||
DebugMsg( DEBUG_HIGH | DEBUG_HANDLED, "gSPSegment( %s, 0x%08X );\n",
|
||||
SegmentText[seg], base );
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
gSP.segment[seg] = base;
|
||||
|
||||
#ifdef DEBUG
|
||||
DebugMsg( DEBUG_HIGH | DEBUG_HANDLED, "gSPSegment( %s, 0x%08X );\n",
|
||||
SegmentText[seg], base );
|
||||
#endif
|
||||
}
|
||||
|
||||
void gSPClipRatio( u32 r )
|
||||
|
|
Loading…
Reference in New Issue
Block a user