mirror of
https://github.com/glest/glest-source.git
synced 2025-10-03 02:41:50 +02:00
- attempt to bugfix windows using proper printf syntax for data types
This commit is contained in:
@@ -176,13 +176,13 @@ static void cleanupProcessObjects() {
|
||||
SystemFlags::Close();
|
||||
SystemFlags::SHUTDOWN_PROGRAM_MODE=true;
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("start running threads = %zu\n",Thread::getThreadList().size());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("start running threads = " MG_SIZE_T_SPECIFIER "\n",Thread::getThreadList().size());
|
||||
time_t elapsed = time(NULL);
|
||||
for(;Thread::getThreadList().size() > 0 &&
|
||||
difftime((long int)time(NULL),elapsed) <= 10;) {
|
||||
//sleep(0);
|
||||
}
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("end running threads = %zu\n",Thread::getThreadList().size());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("end running threads = " MG_SIZE_T_SPECIFIER "\n",Thread::getThreadList().size());
|
||||
|
||||
std::map<int,Texture2D *> &crcPlayerTextureCache = CacheManager::getCachedItem< std::map<int,Texture2D *> >(GameConstants::playerTextureCacheLookupKey);
|
||||
//deleteMapValues(crcPlayerTextureCache.begin(),crcPlayerTextureCache.end());
|
||||
@@ -193,10 +193,10 @@ static void cleanupProcessObjects() {
|
||||
crcFactionPreviewTextureCache.clear();
|
||||
|
||||
std::map<string, vector<FileReader<Pixmap2D> const * >* > &list2d = FileReader<Pixmap2D>::getFileReadersMap();
|
||||
//printf("list2d = %zu\n",list2d.size());
|
||||
//printf("list2d = " MG_SIZE_T_SPECIFIER "\n",list2d.size());
|
||||
deleteMapValues(list2d.begin(),list2d.end());
|
||||
std::map<string, vector<FileReader<Pixmap3D> const * >* > &list3d = FileReader<Pixmap3D>::getFileReadersMap();
|
||||
//printf("list3d = %zu\n",list3d.size());
|
||||
//printf("list3d = " MG_SIZE_T_SPECIFIER "\n",list3d.size());
|
||||
deleteMapValues(list3d.begin(),list3d.end());
|
||||
|
||||
XmlIo::getInstance().cleanup();
|
||||
@@ -1359,7 +1359,7 @@ void runTilesetValidationForPath(string tilesetPath, string tilesetName,
|
||||
}
|
||||
}
|
||||
|
||||
printf("Found tileset filecount = %zu, used = %zu\n",foundFileList.size(),loadedFileList.size());
|
||||
printf("Found tileset filecount = " MG_SIZE_T_SPECIFIER ", used = " MG_SIZE_T_SPECIFIER "\n",foundFileList.size(),loadedFileList.size());
|
||||
|
||||
int purgeCount = 0;
|
||||
bool foundUnusedFile = false;
|
||||
@@ -1581,7 +1581,7 @@ void runTilesetValidationForPath(string tilesetPath, string tilesetName,
|
||||
}
|
||||
}
|
||||
|
||||
//printf("\nPurge Duplicate Files #2 DISABLED [%zu] - START:\n=====================\n",fileList.size());
|
||||
//printf("\nPurge Duplicate Files #2 DISABLED [" MG_SIZE_T_SPECIFIER "] - START:\n=====================\n",fileList.size());
|
||||
|
||||
for(unsigned int idx = 0; idx < fileList.size(); ++idx) {
|
||||
string duplicateFile = fileList[idx];
|
||||
@@ -1790,7 +1790,7 @@ void runTechValidationForPath(string techPath, string techName,
|
||||
}
|
||||
}
|
||||
|
||||
printf("Found techtree filecount = %zu, used = %zu\n",foundFileList.size(),loadedFileList.size());
|
||||
printf("Found techtree filecount = " MG_SIZE_T_SPECIFIER ", used = " MG_SIZE_T_SPECIFIER "\n",foundFileList.size(),loadedFileList.size());
|
||||
|
||||
// for( std::map<string,vector<string> >::iterator iterMap = loadedFileList.begin();
|
||||
// iterMap != loadedFileList.end(); ++iterMap) {
|
||||
@@ -1884,7 +1884,7 @@ void runTechValidationForPath(string techPath, string techName,
|
||||
printf("\nWarning, duplicate files were detected - START:\n=====================\n");
|
||||
}
|
||||
|
||||
printf("----- START duplicate files for CRC [%u] count [%zu] first file is [%s]\n",iterMap->first,fileList.size(),fileList[0].c_str());
|
||||
printf("----- START duplicate files for CRC [%u] count [" MG_SIZE_T_SPECIFIER "] first file is [%s]\n",iterMap->first,fileList.size(),fileList[0].c_str());
|
||||
|
||||
map<string,int> parentList;
|
||||
for(unsigned int idx = 0; idx < fileList.size(); ++idx) {
|
||||
@@ -1924,7 +1924,7 @@ void runTechValidationForPath(string techPath, string techName,
|
||||
//}
|
||||
}
|
||||
|
||||
printf("----- Finding parents for duplicate files [%zu] first file is [%s]\n",fileList.size(),fileList[0].c_str());
|
||||
printf("----- Finding parents for duplicate files [" MG_SIZE_T_SPECIFIER "] first file is [%s]\n",fileList.size(),fileList[0].c_str());
|
||||
|
||||
for(map<string,int>::iterator iterMap1 = parentList.begin();
|
||||
iterMap1 != parentList.end(); ++iterMap1) {
|
||||
@@ -1938,7 +1938,7 @@ void runTechValidationForPath(string techPath, string techName,
|
||||
if(purgeDuplicateFiles == true) {
|
||||
//printf("\nPurge Duplicate Files detected - START:\n=====================\n");
|
||||
|
||||
printf("----- move / remove duplicate files [%zu] first file is [%s]\n",fileList.size(),fileList[0].c_str());
|
||||
printf("----- move / remove duplicate files [" MG_SIZE_T_SPECIFIER "] first file is [%s]\n",fileList.size(),fileList[0].c_str());
|
||||
// First move first duplicate to commondata and delete all other copies
|
||||
string newCommonFileName = "";
|
||||
for(unsigned int idx = 0; idx < fileList.size(); ++idx) {
|
||||
@@ -1947,7 +1947,7 @@ void runTechValidationForPath(string techPath, string techName,
|
||||
if(fileExt == "wav" || fileExt == "ogg") {
|
||||
off_t fileSize = getFileSize(duplicateFile);
|
||||
|
||||
printf("#1 [%u / %zu] removing duplicate [%s]\n",idx,fileList.size(),duplicateFile.c_str());
|
||||
printf("#1 [%u / " MG_SIZE_T_SPECIFIER "] removing duplicate [%s]\n",idx,fileList.size(),duplicateFile.c_str());
|
||||
|
||||
if(idx == 0) {
|
||||
newCommonFileName = "$COMMONDATAPATH/sounds/" + extractFileFromDirectoryPath(duplicateFile);
|
||||
@@ -2015,7 +2015,7 @@ void runTechValidationForPath(string techPath, string techName,
|
||||
}
|
||||
}
|
||||
|
||||
printf("----- update XML files for duplicate files [%zu] first file is [%s]\n",fileList.size(),fileList[0].c_str());
|
||||
printf("----- update XML files for duplicate files [" MG_SIZE_T_SPECIFIER "] first file is [%s]\n",fileList.size(),fileList[0].c_str());
|
||||
std::map<string,int> mapUniqueParentList;
|
||||
|
||||
// Update the XML files to point to the new single copy in commondata
|
||||
@@ -2085,7 +2085,7 @@ void runTechValidationForPath(string techPath, string techName,
|
||||
}
|
||||
}
|
||||
|
||||
//printf("\nPurge Duplicate Files #2 DISABLED [%zu] - START:\n=====================\n",fileList.size());
|
||||
//printf("\nPurge Duplicate Files #2 DISABLED [" MG_SIZE_T_SPECIFIER "] - START:\n=====================\n",fileList.size());
|
||||
|
||||
for(unsigned int idx = 0; idx < fileList.size(); ++idx) {
|
||||
string duplicateFile = fileList[idx];
|
||||
@@ -2137,7 +2137,7 @@ void runTechValidationForPath(string techPath, string techName,
|
||||
}
|
||||
|
||||
|
||||
printf("----- END duplicate files [%zu] first file is [%s]\n",fileList.size(),fileList[0].c_str());
|
||||
printf("----- END duplicate files [" MG_SIZE_T_SPECIFIER "] first file is [%s]\n",fileList.size(),fileList[0].c_str());
|
||||
}
|
||||
}
|
||||
if(foundDuplicates == true) {
|
||||
@@ -3083,7 +3083,7 @@ int glestMain(int argc, char** argv) {
|
||||
printf("%s %s",extractFileFromDirectoryPath(argv[0]).c_str(),getNetworkPlatformFreeVersionString().c_str());
|
||||
printf("\nCompiled using: %s on: %s platform: %s endianness: %s",getCompilerNameString().c_str(),getCompileDateTime().c_str(),getPlatformNameString().c_str(),(Shared::PlatformByteOrder::isBigEndian() == true ? "big" : "little"));
|
||||
|
||||
// printf("\n\nData type sizes int8 = %zu int16 = %zu int32 = %zu int64 = %zu\n\n",sizeof(int8),sizeof(int16),sizeof(int32),sizeof(int64));
|
||||
// printf("\n\nData type sizes int8 = " MG_SIZE_T_SPECIFIER " int16 = " MG_SIZE_T_SPECIFIER " int32 = " MG_SIZE_T_SPECIFIER " int64 = " MG_SIZE_T_SPECIFIER "\n\n",sizeof(int8),sizeof(int16),sizeof(int32),sizeof(int64));
|
||||
//
|
||||
// Config::getInstance().setBool("DebugNetworkPackets",true,true);
|
||||
// NetworkMessageIntro data(424336, "mg_version_x","player_x", 3, nmgstOk,444444, 555555, "english");
|
||||
@@ -3153,8 +3153,8 @@ int glestMain(int argc, char** argv) {
|
||||
testVar = Shared::PlatformByteOrder::fromCommonEndian(testVar);
|
||||
printf("\nEndian from common value = %d",testVar);
|
||||
|
||||
printf("\nint8 sizeof = %zu",sizeof(int8));
|
||||
printf("\nSwitchSetupRequest sizeof = %zu",SwitchSetupRequest().getDataSize());
|
||||
printf("\nint8 sizeof = " MG_SIZE_T_SPECIFIER "",sizeof(int8));
|
||||
printf("\nSwitchSetupRequest sizeof = " MG_SIZE_T_SPECIFIER "",SwitchSetupRequest().getDataSize());
|
||||
}
|
||||
|
||||
printf("\nSVN: [%s]",getSVNRevisionString().c_str());
|
||||
@@ -4056,7 +4056,7 @@ int glestMain(int argc, char** argv) {
|
||||
string mapName = maps[i];
|
||||
printf("%s\n",mapName.c_str());
|
||||
}
|
||||
printf("===========================================\nTotal: %zu\n",maps.size());
|
||||
printf("===========================================\nTotal: " MG_SIZE_T_SPECIFIER "\n",maps.size());
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -4117,13 +4117,13 @@ int glestMain(int argc, char** argv) {
|
||||
string name2 = results2[k];
|
||||
printf("--> %s\n",name2.c_str());
|
||||
}
|
||||
printf("--> Total Factions: %zu\n",results2.size());
|
||||
printf("--> Total Factions: " MG_SIZE_T_SPECIFIER "\n",results2.size());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("===========================================\nTotal Techtrees: %zu\n",results.size());
|
||||
printf("===========================================\nTotal Techtrees: " MG_SIZE_T_SPECIFIER "\n",results.size());
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -4166,7 +4166,7 @@ int glestMain(int argc, char** argv) {
|
||||
string name = results[i];
|
||||
printf("%s\n",name.c_str());
|
||||
}
|
||||
printf("===========================================\nTotal: %zu\n",results.size());
|
||||
printf("===========================================\nTotal: " MG_SIZE_T_SPECIFIER "\n",results.size());
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -4230,7 +4230,7 @@ int glestMain(int argc, char** argv) {
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("===========================================\nTotal: %zu\n",results.size());
|
||||
printf("===========================================\nTotal: " MG_SIZE_T_SPECIFIER "\n",results.size());
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -4294,7 +4294,7 @@ int glestMain(int argc, char** argv) {
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("===========================================\nTotal: %zu\n",results.size());
|
||||
printf("===========================================\nTotal: " MG_SIZE_T_SPECIFIER "\n",results.size());
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -4649,7 +4649,7 @@ int glestMain(int argc, char** argv) {
|
||||
renderer.clearBuffers();
|
||||
renderer.clearZBuffer();
|
||||
renderer.reset2d();
|
||||
snprintf(szTextBuf,8096,"Please wait, converting models [%u of %zu] ...",i,models.size());
|
||||
snprintf(szTextBuf,8096,"Please wait, converting models [%u of " MG_SIZE_T_SPECIFIER "] ...",i,models.size());
|
||||
|
||||
if(CoreData::getInstance().getMenuFontBig3D() != NULL) {
|
||||
renderer.renderText3D(
|
||||
@@ -4673,7 +4673,7 @@ int glestMain(int argc, char** argv) {
|
||||
|
||||
Model *model = renderer.newModel(rsGlobal);
|
||||
try {
|
||||
printf("About to load model [%s] [%u of %zu]\n",file.c_str(),i,models.size());
|
||||
printf("About to load model [%s] [%u of " MG_SIZE_T_SPECIFIER "]\n",file.c_str(),i,models.size());
|
||||
model->load(file);
|
||||
modelLoadedOk = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user