1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Code cleanup:

* make RSPInfo::busy and RSPInfo::halt boolean
* remove RSPInfo::close
* rename RSPInfo::bLLE to RSPInfo::LLE
This commit is contained in:
Sergey Lipskiy 2017-10-24 13:34:22 +07:00
parent 8935510a26
commit 35cc66bad4
11 changed files with 26 additions and 25 deletions

View File

@ -936,7 +936,7 @@ void Debugger::_drawVertexCoords(f32 _ulx, f32 _uly, f32 _yShift)
if (m_triSel->type == ttTriangle) {
for (u32 j = 0; j < m_triSel->vertices.size(); ++j) {
const Vertex & v = m_triSel->vertices[j];
if (RSP.bLLE) {
if (RSP.LLE) {
OUTPUT2("v[%d].x: %f", j, v.x);
OUTPUT2("v[%d].y: %f", j, v.y);
OUTPUT2("v[%d].z: %f", j, v.z);

View File

@ -247,7 +247,7 @@ public:
void update(bool _force) override
{
if (RSP.bLLE) {
if (RSP.LLE) {
uFogUsage.set(0, _force);
return;
}
@ -436,7 +436,7 @@ public:
void update(bool _force) override
{
const u32 texturePersp = (RSP.bLLE || GBI.isTexturePersp()) ? gDP.otherMode.texturePersp : 1U;
const u32 texturePersp = (RSP.LLE || GBI.isTexturePersp()) ? gDP.otherMode.texturePersp : 1U;
uTexturePersp.set(texturePersp, _force);
}
@ -513,7 +513,7 @@ public:
void update(bool _force) override
{
if (RSP.bLLE)
if (RSP.LLE)
uDepthScale.set(0.5f, 0.5f, _force);
else
uDepthScale.set(gSP.viewport.vscale[2], gSP.viewport.vtrans[2], _force);

View File

@ -663,7 +663,7 @@ void GraphicsDrawer::_prepareDrawTriangle()
m_drawingState = DrawingState::Triangle;
bool bFlatColors = false;
if (!RSP.bLLE && (gSP.geometryMode & G_LIGHTING) == 0) {
if (!RSP.LLE && (gSP.geometryMode & G_LIGHTING) == 0) {
bFlatColors = (gSP.geometryMode & G_SHADE) == 0;
bFlatColors |= (gSP.geometryMode & G_SHADING_SMOOTH) == 0;
}

View File

@ -231,7 +231,7 @@ void RDP_LoadSync( u32 w0, u32 w1 )
static
bool _getTexRectParams(u32 & w2, u32 & w3)
{
if (RSP.bLLE) {
if (RSP.LLE) {
w2 = RDP.w2;
w3 = RDP.w3;
return true;
@ -566,7 +566,7 @@ void RDP_ProcessRDPList()
if (dp_end <= dp_current) return;
RSP.bLLE = true;
RSP.LLE = true;
// load command data
for (u32 i = 0; i < length; i += 4) {
@ -602,7 +602,7 @@ void RDP_ProcessRDPList()
RDP.cmd_cur = 0;
}
RSP.bLLE = false;
RSP.LLE = false;
gDP.changed |= CHANGED_COLORBUFFER;
gDP.changed &= ~CHANGED_CPU_FB_WRITE;

View File

@ -112,8 +112,8 @@ void RSP_ProcessDList()
RSP.PCi = 0;
RSP.count = -1;
RSP.halt = FALSE;
RSP.busy = TRUE;
RSP.halt = false;
RSP.busy = true;
gSP.matrix.stackSize = min( 32U, *(u32*)&DMEM[0x0FE4] >> 6 );
if (gSP.matrix.stackSize == 0)
@ -164,7 +164,7 @@ void RSP_ProcessDList()
FrameBuffer_CopyDepthBuffer(gDP.colorImage.address);
}
RSP.busy = FALSE;
RSP.busy = false;
gDP.changed |= CHANGED_COLORBUFFER;
}
@ -241,7 +241,7 @@ void RSP_Init()
}
RSP.uc_start = RSP.uc_dstart = 0;
RSP.bLLE = false;
RSP.LLE = false;
// get the name of the ROM
char romname[21];

View File

@ -8,10 +8,11 @@ typedef struct
{
u32 PC[18], PCi;
u32 swDL[10];
u32 busy, halt, close, uc_start, uc_dstart, cmd, nextCmd;
u32 uc_start, uc_dstart, cmd, nextCmd;
u32 w0, w1;
s32 count;
bool bLLE;
bool busy, halt;
bool LLE;
char romname[21];
wchar_t pluginpath[PLUGIN_PATH_SIZE];
} RSPInfo;

View File

@ -870,7 +870,7 @@ void gDPFullSync()
)
FrameBuffer_CopyToRDRAM(gDP.colorImage.address, sync);
if (RSP.bLLE) {
if (RSP.LLE) {
if (config.frameBufferEmulation.copyDepthToRDRAM != Config::cdDisable && !FBInfo::fbInfo.isSupported())
FrameBuffer_CopyDepthBuffer(gDP.colorImage.address);
}

View File

@ -1503,7 +1503,7 @@ void gSPCullDisplayList( u32 v0, u32 vn )
RSP.PCi--;
else {
DebugMsg(DEBUG_NORMAL, "End of display list, halting execution\n");
RSP.halt = TRUE;
RSP.halt = true;
}
DebugMsg( DEBUG_DETAIL, "// Culling display list\n" );
DebugMsg(DEBUG_NORMAL, "gSPCullDisplayList( %i, %i );\n\n", v0, vn );
@ -1745,7 +1745,7 @@ void gSPEndDisplayList()
--RSP.PCi;
else {
DebugMsg( DEBUG_NORMAL, "End of display list, halting execution\n" );
RSP.halt = TRUE;
RSP.halt = true;
}
DebugMsg(DEBUG_NORMAL, "gSPEndDisplayList();\n\n");

View File

@ -62,7 +62,7 @@ void T3DUX_ProcessRDP(u32 _cmds)
{
u32 addr = RSP_SegmentToPhysical(_cmds) >> 2;
if (addr != 0) {
RSP.bLLE = true;
RSP.LLE = true;
u32 w0 = ((u32*)RDRAM)[addr++];
u32 w1 = ((u32*)RDRAM)[addr++];
RSP.cmd = _SHIFTR( w0, 24, 8 );
@ -83,7 +83,7 @@ void T3DUX_ProcessRDP(u32 _cmds)
break;
}
}
RSP.bLLE = false;
RSP.LLE = false;
}
}
@ -219,7 +219,7 @@ void RunT3DUX()
const u32 pcol = ((u32*)RDRAM)[addr++];
//const u32 pstore = ((u32*)RDRAM)[addr];
if (pstate == 0) {
RSP.halt = 1;
RSP.halt = true;
break;
}
if (pgstate != 0)

View File

@ -53,7 +53,7 @@ void Turbo3D_ProcessRDP(u32 _cmds)
{
u32 addr = RSP_SegmentToPhysical(_cmds) >> 2;
if (addr != 0) {
RSP.bLLE = true;
RSP.LLE = true;
u32 w0 = ((u32*)RDRAM)[addr++];
u32 w1 = ((u32*)RDRAM)[addr++];
RSP.cmd = _SHIFTR( w0, 24, 8 );
@ -67,7 +67,7 @@ void Turbo3D_ProcessRDP(u32 _cmds)
RDP.w3 = ((u32*)RDRAM)[addr++];
}
}
RSP.bLLE = false;
RSP.LLE = false;
}
}
@ -140,7 +140,7 @@ void RunTurbo3D()
const u32 pvtx = ((u32*)RDRAM)[addr++];
const u32 ptri = ((u32*)RDRAM)[addr];
if (pstate == 0) {
RSP.halt = 1;
RSP.halt = true;
break;
}
if (pgstate != 0)

View File

@ -38,7 +38,7 @@ void ZSort_RDPCMD( u32, u32 _w1 )
{
u32 addr = RSP_SegmentToPhysical(_w1) >> 2;
if (addr) {
RSP.bLLE = true;
RSP.LLE = true;
while(true)
{
u32 w0 = ((u32*)RDRAM)[addr++];
@ -54,7 +54,7 @@ void ZSort_RDPCMD( u32, u32 _w1 )
}
GBI.cmd[RSP.cmd]( w0, w1 );
};
RSP.bLLE = false;
RSP.LLE = false;
}
}