Quick fix to keep the "white ambient" flag from being enabled in MP1/2

This commit is contained in:
parax0 2016-02-19 18:47:21 -07:00
parent 1727a337c6
commit 8c722c8308
3 changed files with 16 additions and 16 deletions

View File

@ -36,8 +36,8 @@ public:
eIndStage = 0x400, eIndStage = 0x400,
eLightmap = 0x800, eLightmap = 0x800,
eShortTexCoord = 0x2000, eShortTexCoord = 0x2000,
eDrawWhiteAmbient = 0x80000, // this flag is possibly incorrect! attempted fix for black world models in DKCR eAllMP1Settings = 0x2FF8,
eAllSettings = 0x82FF8 eDrawWhiteAmbientDKCR = 0x80000
}; };
DECLARE_FLAGS(EMaterialOption, FMaterialOptions) DECLARE_FLAGS(EMaterialOption, FMaterialOptions)

View File

@ -50,7 +50,7 @@ CMaterial* CMaterialLoader::ReadPrimeMaterial()
pMat->mEnableBloom = false; pMat->mEnableBloom = false;
// Flags // Flags
pMat->mOptions = (mpFile->ReadLong() & CMaterial::eAllSettings); pMat->mOptions = (mpFile->ReadLong() & CMaterial::eAllMP1Settings);
// Textures // Textures
u32 NumTextures = mpFile->ReadLong(); u32 NumTextures = mpFile->ReadLong();
@ -263,7 +263,7 @@ CMaterial* CMaterialLoader::ReadCorruptionMaterial()
if (Flags & 0x10) pMat->mOptions |= CMaterial::ePunchthrough; if (Flags & 0x10) pMat->mOptions |= CMaterial::ePunchthrough;
if (Flags & 0x100) pMat->mOptions |= CMaterial::eOccluder; if (Flags & 0x100) pMat->mOptions |= CMaterial::eOccluder;
if (Flags & 0x80000) pMat->mOptions |= CMaterial::eDrawWhiteAmbient; if (Flags & 0x80000) pMat->mOptions |= CMaterial::eDrawWhiteAmbientDKCR;
mHas0x400 = ((Flags & 0x400) != 0); mHas0x400 = ((Flags & 0x400) != 0);
mpFile->Seek(0x8, SEEK_CUR); // Don't know what any of this is mpFile->Seek(0x8, SEEK_CUR); // Don't know what any of this is

View File

@ -58,7 +58,7 @@ void CStaticNode::Draw(FRenderOptions Options, int ComponentIndex, const SViewIn
if (!mpModel) return; if (!mpModel) return;
bool IsLightingEnabled = CGraphics::sLightMode == CGraphics::eWorldLighting || ViewInfo.GameMode; bool IsLightingEnabled = CGraphics::sLightMode == CGraphics::eWorldLighting || ViewInfo.GameMode;
bool UseWhiteAmbient = (mpModel->GetMaterial()->Options() & CMaterial::eDrawWhiteAmbient) != 0; bool UseWhiteAmbient = (mpModel->GetMaterial()->Options() & CMaterial::eDrawWhiteAmbientDKCR) != 0;
if (IsLightingEnabled) if (IsLightingEnabled)
{ {