mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Correct code for 'noDepthBuffers' situation.
Enable 'noDepthBuffers' for "MICKEY USA". Fixed pause screen in "MICKEY USA"
This commit is contained in:
parent
f41bd934ef
commit
2f83ab8963
|
@ -390,6 +390,7 @@ void FrameBufferList::saveBuffer(u32 _address, u16 _format, u16 _size, u16 _widt
|
|||
|
||||
m_pCurrent->m_cleared = false;
|
||||
m_pCurrent->m_isDepthBuffer = _address == gDP.depthImageAddress;
|
||||
m_pCurrent->m_isPauseScreen = false;
|
||||
|
||||
gSP.changed |= CHANGED_TEXTURE;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ struct FrameBuffer
|
|||
bool m_changed;
|
||||
bool m_cfb;
|
||||
bool m_isDepthBuffer;
|
||||
bool m_isPauseScreen;
|
||||
bool m_needHeightCorrection;
|
||||
|
||||
GLuint m_FBO;
|
||||
|
|
5
RSP.cpp
5
RSP.cpp
|
@ -324,7 +324,10 @@ void RSP_Init()
|
|||
setDepthClearColor();
|
||||
if (strstr(RSP.romname, (const char *)"OgreBattle64") != NULL)
|
||||
config.generalEmulation.hacks |= hack_Ogre64;
|
||||
else if (strstr(RSP.romname, (const char *)"MarioGolf64") != NULL || strstr(RSP.romname, (const char *)"CONKER BFD") != NULL)
|
||||
else if (strstr(RSP.romname, (const char *)"MarioGolf64") != NULL ||
|
||||
strstr(RSP.romname, (const char *)"CONKER BFD") != NULL ||
|
||||
strstr(RSP.romname, (const char *)"MICKEY USA") != NULL
|
||||
)
|
||||
config.generalEmulation.hacks |= hack_noDepthFrameBuffers;
|
||||
|
||||
api().FindPluginPath(RSP.pluginpath);
|
||||
|
|
9
gDP.cpp
9
gDP.cpp
|
@ -515,14 +515,19 @@ bool CheckForFrameBufferTexture(u32 _address, u32 _bytes)
|
|||
|
||||
FrameBuffer *pBuffer = frameBufferList().findBuffer(_address);
|
||||
const bool noDepthBuffers = (config.generalEmulation.hacks & hack_noDepthFrameBuffers) != 0;
|
||||
bool bRes = pBuffer != NULL && (!noDepthBuffers || !pBuffer->m_isDepthBuffer);
|
||||
bool bRes = pBuffer != NULL;
|
||||
if ((bRes)
|
||||
//&& ((*(u32*)&RDRAM[pBuffer->startAddress] & 0xFFFEFFFE) == (pBuffer->startAddress & 0xFFFEFFFE)) // Does not work for Jet Force Gemini
|
||||
)
|
||||
{
|
||||
if (noDepthBuffers && gDP.colorImage.address == gDP.depthImageAddress && pBuffer->m_RdramCrc != 0) {
|
||||
if (noDepthBuffers) {
|
||||
if (gDP.colorImage.address == gDP.depthImageAddress && pBuffer->m_RdramCrc != 0) {
|
||||
memcpy(RDRAM + gDP.depthImageAddress, RDRAM + pBuffer->m_startAddress, (pBuffer->m_width*pBuffer->m_height) << pBuffer->m_size >> 1);
|
||||
pBuffer->m_RdramCrc = 0;
|
||||
frameBufferList().getCurrent()->m_isPauseScreen = true;
|
||||
}
|
||||
if (pBuffer->m_isPauseScreen)
|
||||
bRes = false;
|
||||
}
|
||||
|
||||
const u32 texEndAddress = _address + _bytes - 1;
|
||||
|
|
Loading…
Reference in New Issue
Block a user