- now show more info when loading factions (which faction is currently being loaded)

- when AllowGameDataSynchCheck=true we now show count of files found in CRC check both to log and screen output
This commit is contained in:
Mark Vejvoda 2010-07-17 20:10:16 +00:00
parent 2276df63b8
commit add0275120
4 changed files with 14 additions and 2 deletions

View File

@ -132,13 +132,14 @@ void TechTree::load(const string &dir, set<string> &factions, Checksum* checksum
int i=0;
for ( set<string>::iterator it = factions.begin(); it != factions.end(); ++it ) {
string factionName = *it;
char szBuf[1024]="";
sprintf(szBuf,"%s %s %d / %d",Lang::getInstance().get("Loading").c_str(),Lang::getInstance().get("Faction").c_str(),i+1,factions.size());
sprintf(szBuf,"%s %s [%d / %d] - %s",Lang::getInstance().get("Loading").c_str(),Lang::getInstance().get("Faction").c_str(),i+1,factions.size(),factionName.c_str());
Logger &logger= Logger::getInstance();
logger.setState(szBuf);
str=dir+"/factions/" + *it;
str=dir+"/factions/" + factionName;
factionTypes[i++].load(str, this, checksum);
// give CPU time to update other things to avoid apperance of hanging

View File

@ -44,6 +44,7 @@ public:
int32 getSum();
int32 getFinalFileListSum();
int32 getFileCount();
void addByte(int8 value);
void addString(const string &value);

View File

@ -328,6 +328,9 @@ int32 getFolderTreeContentsCheckSumRecursively(vector<string> paths, string path
*recursiveChecksum = checksum;
}
printf("In [%s::%s Line: %d] Final CRC file count: %d\n",__FILE__,__FUNCTION__,__LINE__,checksum.getFileCount());
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] Final CRC file count: %d\n",__FILE__,__FUNCTION__,__LINE__,checksum.getFileCount());
crcTreeCache[cacheKey] = checksum.getFinalFileListSum();
return crcTreeCache[cacheKey];
}
@ -418,6 +421,9 @@ int32 getFolderTreeContentsCheckSumRecursively(const string &path, const string
}
if(topLevelCaller == true) {
printf("In [%s::%s Line: %d] Final CRC file count for [%s]: %d\n",__FILE__,__FUNCTION__,__LINE__,path.c_str(),checksum.getFileCount());
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] Final CRC file count for [%s]: %d\n",__FILE__,__FUNCTION__,__LINE__,path.c_str(),checksum.getFileCount());
crcTreeCache[cacheKey] = checksum.getFinalFileListSum();
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] scanning [%s] ending checksum = %d for cacheKey [%s] fileMatchCount = %d, fileLoopCount = %d\n",__FILE__,__FUNCTION__,path.c_str(),crcTreeCache[cacheKey],cacheKey.c_str(),fileMatchCount,fileLoopCount);

View File

@ -168,4 +168,8 @@ int32 Checksum::getFinalFileListSum() {
return getSum();
}
int32 Checksum::getFileCount() {
return fileList.size();
}
}}//end namespace