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

Code cleanup

This commit is contained in:
Sergey Lipskiy 2016-09-11 17:52:14 +07:00
parent 32172d30af
commit 9d2d8f481e
4 changed files with 27 additions and 35 deletions

View File

@ -33,26 +33,26 @@ u32 last_good_ucode = (u32) -1;
SpecialMicrocodeInfo specialMicrocodes[] =
{
{ F3D, FALSE, 0xe62a706d, "Fast3D" },
{ F3D, FALSE, 0x7d372819, "Fast3D" },
{ F3D, FALSE, 0x2edee7be, "Fast3D" },
{ F3D, FALSE, 0xe01e14be, "Fast3D" },
{ F3D, FALSE, 0x4AED6B3B, "Fast3D" }, //Vivid Dolls [ALECK64]
{ F3D, false, 0xe62a706d, "Fast3D" },
{ F3D, false, 0x7d372819, "Fast3D" },
{ F3D, false, 0x2edee7be, "Fast3D" },
{ F3D, false, 0xe01e14be, "Fast3D" },
{ F3D, false, 0x4AED6B3B, "Fast3D" }, //Vivid Dolls [ALECK64]
{ F3DWRUS, FALSE, 0xd17906e2, "RSP SW Version: 2.0D, 04-01-96" },
{ F3DSWSE, FALSE, 0x94c4c833, "RSP SW Version: 2.0D, 04-01-96" },
{ F3DEX, TRUE, 0x637b4b58, "RSP SW Version: 2.0D, 04-01-96" },
{ F3D, TRUE, 0x54c558ba, "RSP SW Version: 2.0D, 04-01-96" }, // Pilot Wings
{ F3D, TRUE, 0x302bca09, "RSP SW Version: 2.0G, 09-30-96" }, // GoldenEye
{ F3DWRUS, false, 0xd17906e2, "RSP SW Version: 2.0D, 04-01-96" },
{ F3DSWSE, false, 0x94c4c833, "RSP SW Version: 2.0D, 04-01-96" },
{ F3DEX, true, 0x637b4b58, "RSP SW Version: 2.0D, 04-01-96" },
{ F3D, true, 0x54c558ba, "RSP SW Version: 2.0D, 04-01-96" }, // Pilot Wings
{ F3D, true, 0x302bca09, "RSP SW Version: 2.0G, 09-30-96" }, // GoldenEye
{ S2DEX, FALSE, 0x9df31081, "RSP Gfx ucode S2DEX 1.06 Yoshitaka Yasumoto Nintendo." },
{ S2DEX, false, 0x9df31081, "RSP Gfx ucode S2DEX 1.06 Yoshitaka Yasumoto Nintendo." },
{ F3DDKR, FALSE, 0x8d91244f, "Diddy Kong Racing" },
{ F3DDKR, FALSE, 0x6e6fc893, "Diddy Kong Racing" },
{ F3DJFG, FALSE, 0xbde9d1fb, "Jet Force Gemini" },
{ F3DPD, TRUE, 0x1c4f7869, "Perfect Dark" },
{ Turbo3D, FALSE, 0x2bdcfc8a, "Turbo3D" },
{ F3DEX2CBFD, TRUE, 0x1b4ace88, "Conker's Bad Fur Day" }
{ F3DDKR, false, 0x8d91244f, "Diddy Kong Racing" },
{ F3DDKR, false, 0x6e6fc893, "Diddy Kong Racing" },
{ F3DJFG, false, 0xbde9d1fb, "Jet Force Gemini" },
{ F3DPD, true, 0x1c4f7869, "Perfect Dark" },
{ Turbo3D, false, 0x2bdcfc8a, "Turbo3D" },
{ F3DEX2CBFD, true, 0x1b4ace88, "Conker's Bad Fur Day" }
};
u32 G_RDPHALF_1, G_RDPHALF_2, G_RDPHALF_CONT;

View File

@ -666,7 +666,7 @@ typedef void (*GBIFunc)( u32 w0, u32 w1 );
struct SpecialMicrocodeInfo
{
u32 type;
u32 NoN;
bool NoN;
u32 crc;
const char *text;
};

View File

@ -490,7 +490,7 @@ void OGLRender::TexrectDrawer::add()
CombinerInfo::get().update();
glDisable(GL_DEPTH_TEST);
glDepthMask(FALSE);
glDepthMask(GL_FALSE);
glDisable(GL_BLEND);
if (m_pBuffer == nullptr)
@ -1059,16 +1059,16 @@ void OGLRender::updateScissor(FrameBuffer * _pBuffer) const
void OGLRender::_updateDepthUpdate() const
{
if (gDP.otherMode.depthUpdate != 0)
glDepthMask( TRUE );
glDepthMask( GL_TRUE );
else
glDepthMask( FALSE );
glDepthMask( GL_FALSE );
}
void OGLRender::_updateDepthCompare() const
{
if (config.frameBufferEmulation.N64DepthCompare != 0) {
glDisable( GL_DEPTH_TEST );
glDepthMask( FALSE );
glDepthMask( GL_FALSE );
} else if ((gDP.changed & (CHANGED_RENDERMODE | CHANGED_CYCLETYPE)) != 0) {
if (((gSP.geometryMode & G_ZBUFFER) || gDP.otherMode.depthSource == G_ZS_PRIM) && gDP.otherMode.cycleType <= G_CYC_2CYCLE) {
if (gDP.otherMode.depthCompare != 0) {
@ -1201,7 +1201,7 @@ void OGLRender::_updateStates(RENDER_STATE _renderState) const
}
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_ALWAYS);
glDepthMask(TRUE);
glDepthMask(GL_TRUE);
gDP.changed |= CHANGED_RENDERMODE;
}
#endif
@ -1863,11 +1863,11 @@ void OGLRender::clearDepthBuffer(u32 _ulx, u32 _uly, u32 _lrx, u32 _lry)
glDisable( GL_SCISSOR_TEST );
#ifdef ANDROID
glDepthMask( FALSE );
glDepthMask( GL_FALSE );
glClear( GL_DEPTH_BUFFER_BIT );
#endif
glDepthMask( TRUE );
glDepthMask( GL_TRUE );
glClear( GL_DEPTH_BUFFER_BIT );
_updateDepthUpdate();
@ -1945,7 +1945,7 @@ void OGLRender::_initStates()
glDisable( GL_DEPTH_TEST );
glDisable( GL_POLYGON_OFFSET_FILL );
glDepthFunc( GL_ALWAYS );
glDepthMask( FALSE );
glDepthMask( GL_FALSE );
} else {
#ifdef ANDROID
if(config.generalEmulation.forcePolygonOffset != 0)
@ -2111,7 +2111,7 @@ void OGLRender::copyTexturedRect(GLint _srcX0, GLint _srcY0, GLint _srcX1, GLint
glDisable(GL_CULL_FACE);
glDisable(GL_BLEND);
glDisable(GL_DEPTH_TEST);
glDepthMask(FALSE);
glDepthMask(GL_FALSE);
glDisable(GL_SCISSOR_TEST);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
glEnable(GL_SCISSOR_TEST);

View File

@ -158,20 +158,12 @@ void VI_UpdateScreen()
frameBufferList().renderBuffer(*REG.VI_ORIGIN);
frameBufferList().clearBuffersChanged();
VI.lastOrigin = *REG.VI_ORIGIN;
#ifdef DEBUG
while (Debug.paused && !Debug.step);
Debug.step = FALSE;
#endif
}
}
else {
if (gDP.changed & CHANGED_COLORBUFFER) {
ogl.swapBuffers();
gDP.changed &= ~CHANGED_COLORBUFFER;
#ifdef DEBUG
while (Debug.paused && !Debug.step);
Debug.step = FALSE;
#endif
VI.lastOrigin = *REG.VI_ORIGIN;
}
}