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

Correct commit e4b6224 for culling in Mortal Kombat 4.

Disable cullboth for F3DLX.Rej version 1 since this ucode does not support cullboth.
This commit is contained in:
Sergey Lipskiy 2018-11-11 16:06:23 +07:00
parent 1ec435d6e7
commit 087ac76536
3 changed files with 6 additions and 3 deletions

View File

@ -415,9 +415,10 @@ void GBIInfo::loadMicrocode(u32 uc_start, u32 uc_dstart, u16 uc_dsize)
type = F3DTEXA;
else if (strncmp(&uc_str[14], "F3DAM", 5) == 0)
type = F3DAM;
else if (strncmp(&uc_str[14], "F3DLX.Rej", 9) == 0)
else if (strncmp(&uc_str[14], "F3DLX.Rej", 9) == 0) {
current.NoN = true;
else if (strncmp(&uc_str[14], "F3DLP.Rej", 9) == 0) {
current.cullBoth = false;
} else if (strncmp(&uc_str[14], "F3DLP.Rej", 9) == 0) {
current.texturePersp = false;
current.NoN = true;
}

View File

@ -503,6 +503,7 @@ struct MicrocodeInfo
u16 dataSize;
u32 type;
bool NoN = false;
bool cullBoth = true;
bool negativeY = true;
bool fast3DPersp = false;
bool texturePersp = true;
@ -522,6 +523,7 @@ struct GBIInfo
bool isHWLSupported() const;
void setHWLSupported(bool _supported);
bool isNoN() const { return m_pCurrent != nullptr ? m_pCurrent->NoN : false; }
bool isCullBoth() const { return m_pCurrent != nullptr ? m_pCurrent->cullBoth : false; }
bool isNegativeY() const { return m_pCurrent != nullptr ? m_pCurrent->negativeY : true; }
bool isTexturePersp() const { return m_pCurrent != nullptr ? m_pCurrent->texturePersp: true; }
bool isCombineMatrices() const { return m_pCurrent != nullptr ? m_pCurrent->combineMatrices: false; }

View File

@ -101,7 +101,7 @@ void GraphicsDrawer::_updateCullFace() const
if (gSP.geometryMode & G_CULL_BOTH) {
gfxContext.enable(enable::CULL_FACE, true);
if ((gSP.geometryMode & G_CULL_BOTH) == G_CULL_BOTH && !GBI.isNoN())
if ((gSP.geometryMode & G_CULL_BOTH) == G_CULL_BOTH && GBI.isCullBoth())
gfxContext.cullFace(cullMode::FRONT_AND_BACK);
else if ((gSP.geometryMode & G_CULL_BACK) == G_CULL_BACK)
gfxContext.cullFace(cullMode::BACK);