Merge pull request #1 from Antidote/cmake

Silence Warnings
This commit is contained in:
Jack Andersen
2019-05-26 15:38:50 -10:00
committed by GitHub
26 changed files with 55 additions and 22 deletions

View File

@@ -72,6 +72,7 @@ bool CTexture::BufferGL()
GLFormat = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
IsCompressed = true;
break;
default: break;
}
// The smallest mipmaps are probably not being loaded correctly, because mipmaps in GX textures have a minimum size depending on the format, and these don't.
@@ -188,7 +189,7 @@ bool CTexture::WriteDDS(IOutputStream& rOut)
CopyGLBuffer();
rOut.WriteFourCC(FOURCC('DDS')); // "DDS " fourCC
rOut.WriteFourCC(FOURCC('DDS ')); // "DDS " fourCC
rOut.WriteLong(0x7C); // dwSize
rOut.WriteLong(0x21007); // dwFlags
rOut.WriteLong(mHeight); // dwHeight
@@ -243,6 +244,8 @@ bool CTexture::WriteDDS(IOutputStream& rOut)
case ETexelFormat::DXT1:
PFFlags = 0x4;
break;
default:
break;
}
rOut.WriteLong(PFFlags); // DDS_PIXELFORMAT.dwFlags

View File

@@ -45,6 +45,8 @@ void CAreaCooker::DetermineSectionNumbersPrime()
case EGame::Echoes:
GeometrySections = 3 + (9 * OriginalMeshCount); // Acount for materials + AROT + an unknown section
break;
default:
break;
}
for (uint32 iMesh = 0; iMesh < mpArea->mWorldModels.size(); iMesh++)

View File

@@ -366,6 +366,8 @@ void CMaterialCooker::WriteCookedMatSet(CMaterialSet *pSet, EGame Version, IOutp
case EGame::Echoes:
Cooker.WriteMatSetPrime(rOut);
break;
default:
break;
}
}
@@ -384,5 +386,6 @@ void CMaterialCooker::WriteCookedMaterial(CMaterial *pMat, EGame Version, IOutpu
Cooker.WriteMaterialPrime(rOut);
break;
// TODO: Corruption/Uncooked
default: break;
}
}

View File

@@ -214,7 +214,8 @@ void CScriptCooker::WriteProperty(IOutputStream& rOut, IProperty* pProperty, voi
break;
}
default:
break;
}
if (SizeOffset != 0)

View File

@@ -219,6 +219,8 @@ SSurface* CModelLoader::LoadSurface(IInputStream& rModel)
case EPrimitiveType::TriangleStrip:
pSurf->TriangleCount += VertexCount - 2;
break;
default:
break;
}
pSurf->Primitives.push_back(Prim);

View File

@@ -264,7 +264,7 @@ void CScriptLoader::ReadProperty(IProperty *pProp, uint32 Size, IInputStream& rS
mpCurrentData = pOldData;
break;
}
default: break;
}
}

View File

@@ -179,6 +179,8 @@ int32 CScriptTemplate::CheckVolumeConditions(CScriptObject *pObj, bool LogErrors
case EPropertyType::Choice:
Val = TPropCast<CEnumProperty>(pProp)->Value(pData);
break;
default:
break;
}
// Test and check whether any of the conditions are true

View File

@@ -20,12 +20,12 @@ public:
CreateIntrinsic(EPropertyType::Float, this, mOffset + 8, "Z");
}
virtual void SerializeValue(void* pData, IArchive& Arc) const
virtual void SerializeValue(void* pData, IArchive& Arc) const override
{
ValueRef(pData).Serialize(Arc);
}
virtual TString ValueAsString(void* pData) const
virtual TString ValueAsString(void* pData) const override
{
return Value(pData).ToString();
}

View File

@@ -633,6 +633,7 @@ IProperty* IProperty::Create(EPropertyType Type,
case EPropertyType::Pointer: pOut = new CPointerProperty(Game); break;
case EPropertyType::Struct: pOut = new CStructProperty(Game); break;
case EPropertyType::Array: pOut = new CArrayProperty(Game); break;
default: break;
}
// If this assertion fails, then there is an unhandled type!

View File

@@ -453,6 +453,8 @@ public:
case EPropertyType::Guid:
MakeOptional = true;
break;
default:
break;
}
}