diff --git a/source/glest_game/types/tech_tree.cpp b/source/glest_game/types/tech_tree.cpp index b6d264a1..75c35f52 100644 --- a/source/glest_game/types/tech_tree.cpp +++ b/source/glest_game/types/tech_tree.cpp @@ -132,13 +132,14 @@ void TechTree::load(const string &dir, set &factions, Checksum* checksum int i=0; for ( set::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 diff --git a/source/shared_lib/include/util/checksum.h b/source/shared_lib/include/util/checksum.h index 5b087f2a..647476f5 100644 --- a/source/shared_lib/include/util/checksum.h +++ b/source/shared_lib/include/util/checksum.h @@ -44,6 +44,7 @@ public: int32 getSum(); int32 getFinalFileListSum(); + int32 getFileCount(); void addByte(int8 value); void addString(const string &value); diff --git a/source/shared_lib/sources/platform/common/platform_common.cpp b/source/shared_lib/sources/platform/common/platform_common.cpp index 1175c3be..98b1fd41 100644 --- a/source/shared_lib/sources/platform/common/platform_common.cpp +++ b/source/shared_lib/sources/platform/common/platform_common.cpp @@ -328,6 +328,9 @@ int32 getFolderTreeContentsCheckSumRecursively(vector 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); diff --git a/source/shared_lib/sources/util/checksum.cpp b/source/shared_lib/sources/util/checksum.cpp index 2fc1cea4..5a5ded28 100644 --- a/source/shared_lib/sources/util/checksum.cpp +++ b/source/shared_lib/sources/util/checksum.cpp @@ -168,4 +168,8 @@ int32 Checksum::getFinalFileListSum() { return getSum(); } +int32 Checksum::getFileCount() { + return fileList.size(); +} + }}//end namespace