Cleanup; fixed tons of warnings, set up the project to treat warnings as errors

This commit is contained in:
parax0
2015-11-24 03:22:37 -07:00
parent 367cb6c3d8
commit 5ffa24592c
39 changed files with 90 additions and 929 deletions

View File

@@ -353,8 +353,7 @@ CMaterial* CMaterialLoader::ReadCorruptionMaterial()
if (AnimSize > 0)
{
u16 Unknown1 = mpFile->ReadShort();
u16 Unknown2 = mpFile->ReadShort();
mpFile->Seek(0x4, SEEK_CUR);
pPass->mAnimMode = (EUVAnimMode) mpFile->ReadLong();
switch (pPass->mAnimMode)

View File

@@ -330,7 +330,7 @@ SSurface* CModelLoader::LoadAssimpMesh(const aiMesh *pMesh, CMaterialSet *pSet)
pSurf->CenterPoint = pSurf->AABox.Center();
if (pMesh->HasNormals())
pSurf->ReflectionDirection /= pMesh->mNumVertices;
pSurf->ReflectionDirection /= (float) pMesh->mNumVertices;
else
pSurf->ReflectionDirection = CVector3f(1.f, 0.f, 0.f);

View File

@@ -270,7 +270,7 @@ CPropertyTemplate* CTemplateLoader::LoadPropertyTemplate(tinyxml2::XMLElement *p
}
// ************ SCRIPT OBJECT ************
CScriptTemplate* CTemplateLoader::LoadScriptTemplate(tinyxml2::XMLDocument *pDoc, const TString& templateName, u32 objectID)
CScriptTemplate* CTemplateLoader::LoadScriptTemplate(tinyxml2::XMLDocument *pDoc, const TString& /*templateName*/, u32 objectID)
{
CScriptTemplate *pScript = new CScriptTemplate(mpMaster);
pScript->mObjectID = objectID;

View File

@@ -228,7 +228,7 @@ void CWorldLoader::LoadReturnsMLVL(CInputStream& MLVL)
{
mpWorld->mpWorldName = (CStringTable*) gResCache.GetResource(MLVL.ReadLongLong(), "STRG");
bool Check = MLVL.ReadByte();
bool Check = (MLVL.ReadByte() != 0);
if (Check)
{
MLVL.ReadString();