diff --git a/src/Core/Resource/CMaterial.h b/src/Core/Resource/CMaterial.h index c46b5865..4e33e74d 100644 --- a/src/Core/Resource/CMaterial.h +++ b/src/Core/Resource/CMaterial.h @@ -25,19 +25,19 @@ public: // Enums enum EMaterialOption { - eNoSettings = 0, - eKonst = 0x8, - eTransparent = 0x10, - ePunchthrough = 0x20, - eReflection = 0x40, - eDepthWrite = 0x80, - eSurfaceReflection = 0x100, - eOccluder = 0x200, - eIndStage = 0x400, - eLightmap = 0x800, - eShortTexCoord = 0x2000, - eDrawWhiteAmbient = 0x80000, // this flag is possibly incorrect! attempted fix for black world models in DKCR - eAllSettings = 0x82FF8 + eNoSettings = 0, + eKonst = 0x8, + eTransparent = 0x10, + ePunchthrough = 0x20, + eReflection = 0x40, + eDepthWrite = 0x80, + eSurfaceReflection = 0x100, + eOccluder = 0x200, + eIndStage = 0x400, + eLightmap = 0x800, + eShortTexCoord = 0x2000, + eAllMP1Settings = 0x2FF8, + eDrawWhiteAmbientDKCR = 0x80000 }; DECLARE_FLAGS(EMaterialOption, FMaterialOptions) diff --git a/src/Core/Resource/Factory/CMaterialLoader.cpp b/src/Core/Resource/Factory/CMaterialLoader.cpp index 1076e33d..f4918c18 100644 --- a/src/Core/Resource/Factory/CMaterialLoader.cpp +++ b/src/Core/Resource/Factory/CMaterialLoader.cpp @@ -50,7 +50,7 @@ CMaterial* CMaterialLoader::ReadPrimeMaterial() pMat->mEnableBloom = false; // Flags - pMat->mOptions = (mpFile->ReadLong() & CMaterial::eAllSettings); + pMat->mOptions = (mpFile->ReadLong() & CMaterial::eAllMP1Settings); // Textures u32 NumTextures = mpFile->ReadLong(); @@ -263,7 +263,7 @@ CMaterial* CMaterialLoader::ReadCorruptionMaterial() if (Flags & 0x10) pMat->mOptions |= CMaterial::ePunchthrough; 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); mpFile->Seek(0x8, SEEK_CUR); // Don't know what any of this is diff --git a/src/Core/Scene/CStaticNode.cpp b/src/Core/Scene/CStaticNode.cpp index 22157f35..aece22f4 100644 --- a/src/Core/Scene/CStaticNode.cpp +++ b/src/Core/Scene/CStaticNode.cpp @@ -58,7 +58,7 @@ void CStaticNode::Draw(FRenderOptions Options, int ComponentIndex, const SViewIn if (!mpModel) return; 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) {