removed debug messages

This commit is contained in:
KillaBilla 2014-04-11 21:33:48 +02:00 committed by oy
parent e96f1995b2
commit 1ea6100a3b
2 changed files with 16 additions and 25 deletions

View file

@ -82,16 +82,10 @@ bool CMapChecker::ReadAndValidateMap(IStorage *pStorage, const char *pFilename,
{
if(str_comp(pCurrent->m_aMapName, aMapName) == 0)
{
dbg_msg("DEBUG", "CHECKING MAP: %s", aMapName);
char aBuffer[512]; // TODO: MAX_PATH_LENGTH (512) should be defined in a more central header and not in storage.cpp and editor.h
bool CrcSizeMatch = false;
if(!pStorage->FindFile(aMapNameExt, "maps", StorageType, aBuffer, sizeof(aBuffer), pCurrent->m_MapCrc, pCurrent->m_MapSize, &CrcSizeMatch))
{
dbg_msg("DEBUG", "FindFile returned false");
return true;
}
dbg_msg("DEBUG", "FindFile returned true, CrcSizeMatch: %s", CrcSizeMatch ? "y" : "n");
// output filename
if(pBuffer != 0 && BufferSize > 0)

View file

@ -341,30 +341,27 @@ public:
if(Data->pBuffer[0])
return 1;
}
else
else if(!str_comp(pName, Data->pFilename))
{
if(!str_comp(pName, Data->pFilename))
// found the file
str_format(Data->pBuffer, Data->BufferSize, "%s/%s", Data->pPath, Data->pFilename);
// check crc and size
if(Data->pCrcSizeMatch != 0)
{
// found the file
str_format(Data->pBuffer, Data->BufferSize, "%s/%s", Data->pPath, Data->pFilename);
// check crc and size
if(Data->pCrcSizeMatch != 0)
unsigned Crc = 0;
unsigned Size = 0;
if(!Data->pStorage->GetCrcSize(Data->pBuffer, Type, &Crc, &Size) || Crc != Data->WantedCrc || Size != Data->WantedSize)
{
unsigned Crc = 0;
unsigned Size = 0;
if(!Data->pStorage->GetCrcSize(Data->pBuffer, Type, &Crc, &Size) || Crc != Data->WantedCrc || Size != Data->WantedSize)
{
*Data->pCrcSizeMatch = false;
Data->pBuffer[0] = 0;
return 0;
}
else
*Data->pCrcSizeMatch = true;
*Data->pCrcSizeMatch = false;
Data->pBuffer[0] = 0;
return 0;
}
return 1;
else
*Data->pCrcSizeMatch = true;
}
return 1;
}
return 0;