- 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:
parent
2276df63b8
commit
add0275120
|
@ -132,13 +132,14 @@ void TechTree::load(const string &dir, set<string> &factions, Checksum* checksum
|
||||||
|
|
||||||
int i=0;
|
int i=0;
|
||||||
for ( set<string>::iterator it = factions.begin(); it != factions.end(); ++it ) {
|
for ( set<string>::iterator it = factions.begin(); it != factions.end(); ++it ) {
|
||||||
|
string factionName = *it;
|
||||||
|
|
||||||
char szBuf[1024]="";
|
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 &logger= Logger::getInstance();
|
||||||
logger.setState(szBuf);
|
logger.setState(szBuf);
|
||||||
|
|
||||||
str=dir+"/factions/" + *it;
|
str=dir+"/factions/" + factionName;
|
||||||
factionTypes[i++].load(str, this, checksum);
|
factionTypes[i++].load(str, this, checksum);
|
||||||
|
|
||||||
// give CPU time to update other things to avoid apperance of hanging
|
// give CPU time to update other things to avoid apperance of hanging
|
||||||
|
|
|
@ -44,6 +44,7 @@ public:
|
||||||
|
|
||||||
int32 getSum();
|
int32 getSum();
|
||||||
int32 getFinalFileListSum();
|
int32 getFinalFileListSum();
|
||||||
|
int32 getFileCount();
|
||||||
|
|
||||||
void addByte(int8 value);
|
void addByte(int8 value);
|
||||||
void addString(const string &value);
|
void addString(const string &value);
|
||||||
|
|
|
@ -328,6 +328,9 @@ int32 getFolderTreeContentsCheckSumRecursively(vector<string> paths, string path
|
||||||
*recursiveChecksum = checksum;
|
*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();
|
crcTreeCache[cacheKey] = checksum.getFinalFileListSum();
|
||||||
return crcTreeCache[cacheKey];
|
return crcTreeCache[cacheKey];
|
||||||
}
|
}
|
||||||
|
@ -418,6 +421,9 @@ int32 getFolderTreeContentsCheckSumRecursively(const string &path, const string
|
||||||
}
|
}
|
||||||
|
|
||||||
if(topLevelCaller == true) {
|
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();
|
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);
|
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);
|
||||||
|
|
||||||
|
|
|
@ -168,4 +168,8 @@ int32 Checksum::getFinalFileListSum() {
|
||||||
return getSum();
|
return getSum();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32 Checksum::getFileCount() {
|
||||||
|
return fileList.size();
|
||||||
|
}
|
||||||
|
|
||||||
}}//end namespace
|
}}//end namespace
|
||||||
|
|
Loading…
Reference in New Issue
Block a user