- attempt to bugfix windows using proper printf syntax for data types
This commit is contained in:
parent
a43ebdb69e
commit
ff58a868b3
|
@ -314,7 +314,7 @@ MainWindow::MainWindow( std::pair<string,vector<string> > unitToLoad,
|
|||
|
||||
if(modelPath != "") {
|
||||
this->modelPathList.push_back(modelPath);
|
||||
printf("Startup Adding model [%s] list size %zu\n",modelPath.c_str(),this->modelPathList.size());
|
||||
printf("Startup Adding model [%s] list size " MG_SIZE_T_SPECIFIER "\n",modelPath.c_str(),this->modelPathList.size());
|
||||
}
|
||||
if(particlePath != "") {
|
||||
this->particlePathList.push_back(particlePath);
|
||||
|
@ -1232,14 +1232,14 @@ void MainWindow::loadModel(string path) {
|
|||
try {
|
||||
if(path != "" && fileExists(path) == true) {
|
||||
this->modelPathList.push_back(path);
|
||||
printf("Adding model [%s] list size %zu\n",path.c_str(),this->modelPathList.size());
|
||||
printf("Adding model [%s] list size " MG_SIZE_T_SPECIFIER "\n",path.c_str(),this->modelPathList.size());
|
||||
}
|
||||
|
||||
string titlestring=winHeader;
|
||||
for(unsigned int idx =0; idx < this->modelPathList.size(); idx++) {
|
||||
string modelPath = this->modelPathList[idx];
|
||||
|
||||
//printf("Loading model [%s] %u of %zu\n",modelPath.c_str(),idx, this->modelPathList.size());
|
||||
//printf("Loading model [%s] %u of " MG_SIZE_T_SPECIFIER "\n",modelPath.c_str(),idx, this->modelPathList.size());
|
||||
|
||||
if(timer) timer->Stop();
|
||||
delete model;
|
||||
|
@ -1369,7 +1369,7 @@ void MainWindow::loadParticle(string path) {
|
|||
}
|
||||
|
||||
void MainWindow::loadProjectileParticle(string path) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] about to load [%s] particleProjectilePathList.size() = %zu\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,path.c_str(),this->particleProjectilePathList.size());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] about to load [%s] particleProjectilePathList.size() = " MG_SIZE_T_SPECIFIER "\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,path.c_str(),this->particleProjectilePathList.size());
|
||||
|
||||
if(timer) timer->Stop();
|
||||
if(path != "" && fileExists(path) == true) {
|
||||
|
@ -1390,7 +1390,7 @@ void MainWindow::loadProjectileParticle(string path) {
|
|||
|
||||
try {
|
||||
if(this->particleProjectilePathList.empty() == false) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("this->particleProjectilePathList.size() = %zu\n",this->particleProjectilePathList.size());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("this->particleProjectilePathList.size() = " MG_SIZE_T_SPECIFIER "\n",this->particleProjectilePathList.size());
|
||||
|
||||
string titlestring=winHeader;
|
||||
for(unsigned int idx = 0; idx < this->particleProjectilePathList.size(); idx++) {
|
||||
|
@ -1487,7 +1487,7 @@ void MainWindow::loadProjectileParticle(string path) {
|
|||
}
|
||||
|
||||
void MainWindow::loadSplashParticle(string path) { // uses ParticleSystemTypeSplash::load (and own list...)
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] about to load [%s] particleSplashPathList.size() = %zu\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,path.c_str(),this->particleSplashPathList.size());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] about to load [%s] particleSplashPathList.size() = " MG_SIZE_T_SPECIFIER "\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,path.c_str(),this->particleSplashPathList.size());
|
||||
|
||||
if(timer) timer->Stop();
|
||||
if(path != "" && fileExists(path) == true) {
|
||||
|
@ -1590,7 +1590,7 @@ void MainWindow::loadSplashParticle(string path) { // uses ParticleSystemTypeSp
|
|||
wxMessageDialog(NULL, ToUnicode(e.what()), ToUnicode("Not a Mega-Glest projectile particle XML file, or broken"), wxOK | wxICON_ERROR).ShowModal();
|
||||
}
|
||||
if(timer) timer->Start(100);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] after load [%s] particleSplashPathList.size() = %zu\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,path.c_str(),this->particleSplashPathList.size());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] after load [%s] particleSplashPathList.size() = " MG_SIZE_T_SPECIFIER "\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,path.c_str(),this->particleSplashPathList.size());
|
||||
}
|
||||
|
||||
void MainWindow::onMenuModeNormals(wxCommandEvent &event){
|
||||
|
|
|
@ -921,8 +921,8 @@ void AiRuleProduce::produceSpecific(const ProduceTask *pt){
|
|||
int currentProducerIndex = producers[i];
|
||||
if(currentProducerIndex >= aiInterface->getMyUnitCount()) {
|
||||
char szBuf[8096]="";
|
||||
printf("In [%s::%s Line: %d] currentProducerIndex >= aiInterface->getMyUnitCount(), currentProducerIndex = %d, aiInterface->getMyUnitCount() = %d, i = %u,producers.size() = %zu\n",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,aiInterface->getMyUnitCount(),i,producers.size());
|
||||
snprintf(szBuf,8096,"In [%s::%s Line: %d] currentProducerIndex >= aiInterface->getMyUnitCount(), currentProducerIndex = %d, aiInterface->getMyUnitCount() = %u, i = %u,producers.size() = %zu",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,aiInterface->getMyUnitCount(),i,producers.size());
|
||||
printf("In [%s::%s Line: %d] currentProducerIndex >= aiInterface->getMyUnitCount(), currentProducerIndex = %d, aiInterface->getMyUnitCount() = %d, i = %u,producers.size() = " MG_SIZE_T_SPECIFIER "\n",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,aiInterface->getMyUnitCount(),i,producers.size());
|
||||
snprintf(szBuf,8096,"In [%s::%s Line: %d] currentProducerIndex >= aiInterface->getMyUnitCount(), currentProducerIndex = %d, aiInterface->getMyUnitCount() = %u, i = %u,producers.size() = " MG_SIZE_T_SPECIFIER "",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,aiInterface->getMyUnitCount(),i,producers.size());
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
|
||||
|
@ -953,14 +953,14 @@ void AiRuleProduce::produceSpecific(const ProduceTask *pt){
|
|||
|
||||
if(currentProducerIndex >= aiInterface->getMyUnitCount()) {
|
||||
char szBuf[8096]="";
|
||||
printf("In [%s::%s Line: %d] currentProducerIndex >= aiInterface->getMyUnitCount(), currentProducerIndex = %d, aiInterface->getMyUnitCount() = %d, i = %u,producers.size() = %zu\n",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,aiInterface->getMyUnitCount(),i,producers.size());
|
||||
snprintf(szBuf,8096,"In [%s::%s Line: %d] currentProducerIndex >= aiInterface->getMyUnitCount(), currentProducerIndex = %d, aiInterface->getMyUnitCount() = %u, i = %u,producers.size() = %zu",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,aiInterface->getMyUnitCount(),i,producers.size());
|
||||
printf("In [%s::%s Line: %d] currentProducerIndex >= aiInterface->getMyUnitCount(), currentProducerIndex = %d, aiInterface->getMyUnitCount() = %d, i = %u,producers.size() = " MG_SIZE_T_SPECIFIER "\n",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,aiInterface->getMyUnitCount(),i,producers.size());
|
||||
snprintf(szBuf,8096,"In [%s::%s Line: %d] currentProducerIndex >= aiInterface->getMyUnitCount(), currentProducerIndex = %d, aiInterface->getMyUnitCount() = %u, i = %u,producers.size() = " MG_SIZE_T_SPECIFIER "",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,aiInterface->getMyUnitCount(),i,producers.size());
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
if(prIndex >= producers.size()) {
|
||||
char szBuf[8096]="";
|
||||
printf("In [%s::%s Line: %d] prIndex >= producers.size(), currentProducerIndex = %d, i = %u,producers.size() = %zu \n",__FILE__,__FUNCTION__,__LINE__,prIndex,i,producers.size());
|
||||
snprintf(szBuf,8096,"In [%s::%s Line: %d] currentProducerIndex >= producers.size(), currentProducerIndex = %d, i = %u,producers.size() = %zu",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,i,producers.size());
|
||||
printf("In [%s::%s Line: %d] prIndex >= producers.size(), currentProducerIndex = %d, i = %u,producers.size() = " MG_SIZE_T_SPECIFIER " \n",__FILE__,__FUNCTION__,__LINE__,prIndex,i,producers.size());
|
||||
snprintf(szBuf,8096,"In [%s::%s Line: %d] currentProducerIndex >= producers.size(), currentProducerIndex = %d, i = %u,producers.size() = " MG_SIZE_T_SPECIFIER "",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,i,producers.size());
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
|
||||
|
@ -1019,14 +1019,14 @@ void AiRuleProduce::produceSpecific(const ProduceTask *pt){
|
|||
|
||||
if(currentProducerIndex >= aiInterface->getMyUnitCount()) {
|
||||
char szBuf[8096]="";
|
||||
printf("In [%s::%s Line: %d] currentProducerIndex >= aiInterface->getMyUnitCount(), currentProducerIndex = %d, aiInterface->getMyUnitCount() = %d, i = %u,backupProducers.size() = %zu\n",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,aiInterface->getMyUnitCount(),i,backupProducers.size());
|
||||
snprintf(szBuf,8096,"In [%s::%s Line: %d] currentProducerIndex >= aiInterface->getMyUnitCount(), currentProducerIndex = %d, aiInterface->getMyUnitCount() = %d, i = %u,backupProducers.size() = %zu",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,aiInterface->getMyUnitCount(),i,backupProducers.size());
|
||||
printf("In [%s::%s Line: %d] currentProducerIndex >= aiInterface->getMyUnitCount(), currentProducerIndex = %d, aiInterface->getMyUnitCount() = %d, i = %u,backupProducers.size() = " MG_SIZE_T_SPECIFIER "\n",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,aiInterface->getMyUnitCount(),i,backupProducers.size());
|
||||
snprintf(szBuf,8096,"In [%s::%s Line: %d] currentProducerIndex >= aiInterface->getMyUnitCount(), currentProducerIndex = %d, aiInterface->getMyUnitCount() = %d, i = %u,backupProducers.size() = " MG_SIZE_T_SPECIFIER "",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,aiInterface->getMyUnitCount(),i,backupProducers.size());
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
if(prIndex >= backupProducers.size()) {
|
||||
char szBuf[8096]="";
|
||||
printf("In [%s::%s Line: %d] prIndex >= backupProducers.size(), currentProducerIndex = %d, i = %u,backupProducers.size() = %zu \n",__FILE__,__FUNCTION__,__LINE__,prIndex,i,backupProducers.size());
|
||||
snprintf(szBuf,8096,"In [%s::%s Line: %d] currentProducerIndex >= backupProducers.size(), currentProducerIndex = %d, i = %u,backupProducers.size() = %zu",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,i,backupProducers.size());
|
||||
printf("In [%s::%s Line: %d] prIndex >= backupProducers.size(), currentProducerIndex = %d, i = %u,backupProducers.size() = " MG_SIZE_T_SPECIFIER " \n",__FILE__,__FUNCTION__,__LINE__,prIndex,i,backupProducers.size());
|
||||
snprintf(szBuf,8096,"In [%s::%s Line: %d] currentProducerIndex >= backupProducers.size(), currentProducerIndex = %d, i = %u,backupProducers.size() = " MG_SIZE_T_SPECIFIER "",__FILE__,__FUNCTION__,__LINE__,currentProducerIndex,i,backupProducers.size());
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ TravelState PathFinder::findPath(Unit *unit, const Vec2i &finalPos, bool *wasStu
|
|||
|
||||
// if(frameIndex != factions[unit->getFactionIndex()].lastFromToNodeListFrame) {
|
||||
// if(factions[unit->getFactionIndex()].mapFromToNodeList.size() > 0) {
|
||||
// printf("clear duplicate list = %zu for faction = %d frameIndex = %d\n",factions[unit->getFactionIndex()].mapFromToNodeList.size(),unit->getFactionIndex(),frameIndex);
|
||||
// printf("clear duplicate list = " MG_SIZE_T_SPECIFIER " for faction = %d frameIndex = %d\n",factions[unit->getFactionIndex()].mapFromToNodeList.size(),unit->getFactionIndex(),frameIndex);
|
||||
// factions[unit->getFactionIndex()].mapFromToNodeList.clear();
|
||||
// }
|
||||
// factions[unit->getFactionIndex()].lastFromToNodeListFrame = frameIndex;
|
||||
|
@ -918,7 +918,7 @@ TravelState PathFinder::aStar(Unit *unit, const Vec2i &targetPos, bool inBailout
|
|||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"[Setting new path for unit] openNodesList.size() [%zu] openPosList.size() [%zu] finalPos [%s] targetPos [%s] inBailout [%d] ts [%d]",
|
||||
snprintf(szBuf,8096,"[Setting new path for unit] openNodesList.size() [" MG_SIZE_T_SPECIFIER "] openPosList.size() [" MG_SIZE_T_SPECIFIER "] finalPos [%s] targetPos [%s] inBailout [%d] ts [%d]",
|
||||
factions[unitFactionIndex].openNodesList.size(),factions[unitFactionIndex].openPosList.size(),finalPos.getString().c_str(),targetPos.getString().c_str(),inBailout,ts);
|
||||
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||
}
|
||||
|
@ -975,7 +975,7 @@ TravelState PathFinder::aStar(Unit *unit, const Vec2i &targetPos, bool inBailout
|
|||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"[Setting new path for unit] openNodesList.size() [%zu] openPosList.size() [%zu] finalPos [%s] targetPos [%s] inBailout [%d] ts [%d]",
|
||||
snprintf(szBuf,8096,"[Setting new path for unit] openNodesList.size() [" MG_SIZE_T_SPECIFIER "] openPosList.size() [" MG_SIZE_T_SPECIFIER "] finalPos [%s] targetPos [%s] inBailout [%d] ts [%d]",
|
||||
factions[unitFactionIndex].openNodesList.size(),factions[unitFactionIndex].openPosList.size(),finalPos.getString().c_str(),targetPos.getString().c_str(),inBailout,ts);
|
||||
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||
}
|
||||
|
@ -1192,7 +1192,7 @@ TravelState PathFinder::aStar(Unit *unit, const Vec2i &targetPos, bool inBailout
|
|||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"[path for unit BLOCKED] openNodesList.size() [%zu] openPosList.size() [%zu] finalPos [%s] targetPos [%s] inBailout [%d] ts [%d]",
|
||||
snprintf(szBuf,8096,"[path for unit BLOCKED] openNodesList.size() [" MG_SIZE_T_SPECIFIER "] openPosList.size() [" MG_SIZE_T_SPECIFIER "] finalPos [%s] targetPos [%s] inBailout [%d] ts [%d]",
|
||||
factions[unitFactionIndex].openNodesList.size(),factions[unitFactionIndex].openPosList.size(),finalPos.getString().c_str(),targetPos.getString().c_str(),inBailout,ts);
|
||||
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||
}
|
||||
|
@ -1268,7 +1268,7 @@ TravelState PathFinder::aStar(Unit *unit, const Vec2i &targetPos, bool inBailout
|
|||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true && frameIndex < 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"[Setting new path for unit] openNodesList.size() [%zu] openPosList.size() [%zu] finalPos [%s] targetPos [%s] inBailout [%d] ts [%d]",
|
||||
snprintf(szBuf,8096,"[Setting new path for unit] openNodesList.size() [" MG_SIZE_T_SPECIFIER "] openPosList.size() [" MG_SIZE_T_SPECIFIER "] finalPos [%s] targetPos [%s] inBailout [%d] ts [%d]",
|
||||
factions[unitFactionIndex].openNodesList.size(),factions[unitFactionIndex].openPosList.size(),finalPos.getString().c_str(),targetPos.getString().c_str(),inBailout,ts);
|
||||
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||
|
||||
|
|
|
@ -556,7 +556,7 @@ bool Commander::getReplayCommandListForFrame(int worldFrameCount) {
|
|||
bool haveReplyCommands = false;
|
||||
if(replayCommandList.empty() == false) {
|
||||
//int worldFrameCount = world->getFrameCount();
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("worldFrameCount = %d replayCommandList.size() = %zu\n",worldFrameCount,replayCommandList.size());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("worldFrameCount = %d replayCommandList.size() = " MG_SIZE_T_SPECIFIER "\n",worldFrameCount,replayCommandList.size());
|
||||
|
||||
std::vector<NetworkCommand> replayList;
|
||||
for(unsigned int i = 0; i < replayCommandList.size(); ++i) {
|
||||
|
@ -569,7 +569,7 @@ bool Commander::getReplayCommandListForFrame(int worldFrameCount) {
|
|||
if(haveReplyCommands == true) {
|
||||
replayCommandList.erase(replayCommandList.begin(),replayCommandList.begin() + replayList.size());
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("worldFrameCount = %d GIVING COMMANDS replayList.size() = %zu\n",worldFrameCount,replayList.size());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("worldFrameCount = %d GIVING COMMANDS replayList.size() = " MG_SIZE_T_SPECIFIER "\n",worldFrameCount,replayList.size());
|
||||
for(int i= 0; i < replayList.size(); ++i){
|
||||
giveNetworkCommand(&replayList[i]);
|
||||
//pushNetworkCommand(&replayList[i]);
|
||||
|
|
|
@ -1650,7 +1650,7 @@ void Game::update() {
|
|||
try {
|
||||
gameStarted = false;
|
||||
|
||||
//printf("\nname [%s] scenarioFile [%s] results.size() = %zu\n",name.c_str(),scenarioFile.c_str(),results.size());
|
||||
//printf("\nname [%s] scenarioFile [%s] results.size() = " MG_SIZE_T_SPECIFIER "\n",name.c_str(),scenarioFile.c_str(),results.size());
|
||||
//printf("[%s:%s] Line: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
ScenarioInfo scenarioInfo;
|
||||
Scenario::loadScenarioInfo(scenarioFile, &scenarioInfo);
|
||||
|
@ -2446,7 +2446,7 @@ void Game::removeCellMarker(Vec2i surfaceCellPos, const Faction *faction) {
|
|||
gameNetworkInterface->sendUnMarkCellMessage(mc.getTargetPos(),factionIndex);
|
||||
}
|
||||
}
|
||||
//printf("#1 ADDED in marked list pos [%s] markedCells.size() = %zu\n",surfaceCellPos.getString().c_str(),mapMarkedCellList.size());
|
||||
//printf("#1 ADDED in marked list pos [%s] markedCells.size() = " MG_SIZE_T_SPECIFIER "\n",surfaceCellPos.getString().c_str(),mapMarkedCellList.size());
|
||||
|
||||
//isUnMarkCellEnabled = false;
|
||||
|
||||
|
@ -2821,7 +2821,7 @@ void Game::mouseDownLeft(int x, int y) {
|
|||
//GameNetworkInterface *gameNetworkInterface= NetworkManager::getInstance().getGameNetworkInterface();
|
||||
//gameNetworkInterface->sendMarkCellMessage(mc.getTargetPos(),mc.getFaction()->getIndex(),mc.getNote());
|
||||
|
||||
//printf("#1 ADDED in marked list pos [%s] markedCells.size() = %zu\n",surfaceCellPos.getString().c_str(),mapMarkedCellList.size());
|
||||
//printf("#1 ADDED in marked list pos [%s] markedCells.size() = " MG_SIZE_T_SPECIFIER "\n",surfaceCellPos.getString().c_str(),mapMarkedCellList.size());
|
||||
|
||||
isMarkCellEnabled = false;
|
||||
cellMarkedData = mc;
|
||||
|
@ -2851,7 +2851,7 @@ void Game::mouseDownLeft(int x, int y) {
|
|||
isUnMarkCellEnabled = false;
|
||||
|
||||
removeCellMarker(surfaceCellPos, world.getThisFaction());
|
||||
//printf("#1 ADDED in marked list pos [%s] markedCells.size() = %zu\n",surfaceCellPos.getString().c_str(),mapMarkedCellList.size());
|
||||
//printf("#1 ADDED in marked list pos [%s] markedCells.size() = " MG_SIZE_T_SPECIFIER "\n",surfaceCellPos.getString().c_str(),mapMarkedCellList.size());
|
||||
|
||||
Renderer &renderer= Renderer::getInstance();
|
||||
//renderer.updateMarkedCellScreenPosQuadCache(surfaceCellPos);
|
||||
|
@ -2898,7 +2898,7 @@ void Game::mouseDownLeft(int x, int y) {
|
|||
|
||||
MarkedCell mc(targetPos,world.getThisFaction(),"placeholder for note",world.getThisFaction()->getStartLocationIndex());
|
||||
|
||||
//printf("#2 ADDED in marked list pos [%s] markedCells.size() = %zu\n",surfaceCellPos.getString().c_str(),mapMarkedCellList.size());
|
||||
//printf("#2 ADDED in marked list pos [%s] markedCells.size() = " MG_SIZE_T_SPECIFIER "\n",surfaceCellPos.getString().c_str(),mapMarkedCellList.size());
|
||||
|
||||
isMarkCellEnabled = false;
|
||||
cellMarkedData = mc;
|
||||
|
@ -2928,7 +2928,7 @@ void Game::mouseDownLeft(int x, int y) {
|
|||
|
||||
isUnMarkCellEnabled = false;
|
||||
removeCellMarker(surfaceCellPos, world.getThisFaction());
|
||||
//printf("#1 ADDED in marked list pos [%s] markedCells.size() = %zu\n",surfaceCellPos.getString().c_str(),mapMarkedCellList.size());
|
||||
//printf("#1 ADDED in marked list pos [%s] markedCells.size() = " MG_SIZE_T_SPECIFIER "\n",surfaceCellPos.getString().c_str(),mapMarkedCellList.size());
|
||||
|
||||
//Renderer &renderer= Renderer::getInstance();
|
||||
//renderer.updateMarkedCellScreenPosQuadCache(surfaceCellPos);
|
||||
|
@ -5109,7 +5109,7 @@ void Game::loadGame(string name,Program *programPtr,bool isMasterserverMode) {
|
|||
newGame->lastworldFrameCountForReplay = gameNode->getAttribute("LastWorldFrameCount")->getIntValue();
|
||||
|
||||
vector<XmlNode *> networkCommandNodeList = gameNode->getChildList("NetworkCommand");
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("networkCommandNodeList.size() = %zu\n",networkCommandNodeList.size());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("networkCommandNodeList.size() = " MG_SIZE_T_SPECIFIER "\n",networkCommandNodeList.size());
|
||||
for(unsigned int i = 0; i < networkCommandNodeList.size(); ++i) {
|
||||
XmlNode *node = networkCommandNodeList[i];
|
||||
int worldFrameCount = node->getAttribute("worldFrameCount")->getIntValue();
|
||||
|
|
|
@ -781,7 +781,7 @@ string Config::findValidLocalFileFromPath(string fileName) {
|
|||
vector<string> dirList = config.getPathListForType(ptMaps);
|
||||
replaceFileWithLocalFile(dirList, fileNamePart, result);
|
||||
|
||||
printf("Found file [%s] @ %zu [%s]\nNew File [%s]\n",fileName.c_str(),pos,fileNamePart.c_str(),result.c_str());
|
||||
printf("Found file [%s] @ " MG_SIZE_T_SPECIFIER " [%s]\nNew File [%s]\n",fileName.c_str(),pos,fileNamePart.c_str(),result.c_str());
|
||||
}
|
||||
else if(fileName.find("tilesets/") != fileName.npos ) {
|
||||
size_t pos = fileName.find("tilesets/");
|
||||
|
@ -790,7 +790,7 @@ string Config::findValidLocalFileFromPath(string fileName) {
|
|||
vector<string> dirList = config.getPathListForType(ptTilesets);
|
||||
replaceFileWithLocalFile(dirList, fileNamePart, result);
|
||||
|
||||
printf("Found file [%s] @ %zu [%s]\nNew File [%s]\n",fileName.c_str(),pos,fileNamePart.c_str(),result.c_str());
|
||||
printf("Found file [%s] @ " MG_SIZE_T_SPECIFIER " [%s]\nNew File [%s]\n",fileName.c_str(),pos,fileNamePart.c_str(),result.c_str());
|
||||
}
|
||||
else if(fileName.find("techs/") != fileName.npos ) {
|
||||
size_t pos = fileName.find("techs/");
|
||||
|
@ -799,7 +799,7 @@ string Config::findValidLocalFileFromPath(string fileName) {
|
|||
vector<string> dirList = config.getPathListForType(ptTechs);
|
||||
replaceFileWithLocalFile(dirList, fileNamePart, result);
|
||||
|
||||
printf("Found file [%s] @ %zu [%s]\nNew File [%s]\n",fileName.c_str(),pos,fileNamePart.c_str(),result.c_str());
|
||||
printf("Found file [%s] @ " MG_SIZE_T_SPECIFIER " [%s]\nNew File [%s]\n",fileName.c_str(),pos,fileNamePart.c_str(),result.c_str());
|
||||
}
|
||||
else if(fileName.find("scenarios/") != fileName.npos) {
|
||||
size_t pos = fileName.find("scenarios/");
|
||||
|
@ -808,7 +808,7 @@ string Config::findValidLocalFileFromPath(string fileName) {
|
|||
vector<string> dirList = config.getPathListForType(ptScenarios);
|
||||
replaceFileWithLocalFile(dirList, fileNamePart, result);
|
||||
|
||||
printf("Found file [%s] @ %zu [%s]\nNew File [%s]\n",fileName.c_str(),pos,fileNamePart.c_str(),result.c_str());
|
||||
printf("Found file [%s] @ " MG_SIZE_T_SPECIFIER " [%s]\nNew File [%s]\n",fileName.c_str(),pos,fileNamePart.c_str(),result.c_str());
|
||||
}
|
||||
else if(fileName.find("tutorials/") != fileName.npos) {
|
||||
size_t pos = fileName.find("tutorials/");
|
||||
|
@ -817,7 +817,7 @@ string Config::findValidLocalFileFromPath(string fileName) {
|
|||
vector<string> dirList = config.getPathListForType(ptTutorials);
|
||||
replaceFileWithLocalFile(dirList, fileNamePart, result);
|
||||
|
||||
printf("Found file [%s] @ %zu [%s]\nNew File [%s]\n",fileName.c_str(),pos,fileNamePart.c_str(),result.c_str());
|
||||
printf("Found file [%s] @ " MG_SIZE_T_SPECIFIER " [%s]\nNew File [%s]\n",fileName.c_str(),pos,fileNamePart.c_str(),result.c_str());
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
@ -1521,7 +1521,7 @@ void Renderer::computeVisibleQuad() {
|
|||
visibleQuad.p[3].x,visibleQuad.p[3].y);
|
||||
|
||||
for(unsigned int i = 0; i < quadCache.frustumData.size(); ++i) {
|
||||
printf("\nFrustrum #%u [%zu]: ",i,quadCache.frustumData.size());
|
||||
printf("\nFrustrum #%u [" MG_SIZE_T_SPECIFIER "]: ",i,quadCache.frustumData.size());
|
||||
vector<float> &frustumDataInner = quadCache.frustumData[i];
|
||||
for(unsigned int j = 0; j < frustumDataInner.size(); ++j) {
|
||||
printf("[%f]",quadCache.frustumData[i][j]);
|
||||
|
@ -4479,7 +4479,7 @@ void Renderer::renderSurface(const int renderFps) {
|
|||
std::pair<Chrono, std::vector<SurfaceData> > &surfaceCacheEntity = mapSurfaceData[snapshotOfvisibleQuad.getString()];
|
||||
surface = &surfaceCacheEntity.second;
|
||||
|
||||
//printf("Surface Cache Size for Rendering using VA's = %zu\n",mapSurfaceData.size());
|
||||
//printf("Surface Cache Size for Rendering using VA's = " MG_SIZE_T_SPECIFIER "\n",mapSurfaceData.size());
|
||||
}
|
||||
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
|
@ -7756,7 +7756,7 @@ void Renderer::init3dList() {
|
|||
}
|
||||
|
||||
void Renderer::render3dSetup() {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
const Metrics &metrics= Metrics::getInstance();
|
||||
//if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
|
@ -7769,7 +7769,7 @@ void Renderer::render3dSetup() {
|
|||
|
||||
//if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
//texture state
|
||||
glActiveTexture(shadowTexUnit);
|
||||
|
@ -7786,7 +7786,7 @@ void Renderer::render3dSetup() {
|
|||
|
||||
//if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
//material state
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, defSpecularColor.ptr());
|
||||
|
@ -7799,7 +7799,7 @@ void Renderer::render3dSetup() {
|
|||
glDisable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
//alpha test state
|
||||
glEnable(GL_ALPHA_TEST);
|
||||
|
@ -7823,7 +7823,7 @@ void Renderer::render3dSetup() {
|
|||
glDisable(GL_STENCIL_TEST);
|
||||
|
||||
//if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
//fog
|
||||
const Tileset *tileset= NULL;
|
||||
|
@ -8812,14 +8812,14 @@ VisibleQuadContainerCache & Renderer::getQuadCache( bool updateOnDirtyFrame,
|
|||
|
||||
if(markedCells.empty() == false) {
|
||||
if(markedCells.find(pos) != markedCells.end()) {
|
||||
//printf("#1 ******** VISIBLE SCALED CELL FOUND in marked list pos [%s] markedCells.size() = %zu\n",pos.getString().c_str(),markedCells.size());
|
||||
//printf("#1 ******** VISIBLE SCALED CELL FOUND in marked list pos [%s] markedCells.size() = " MG_SIZE_T_SPECIFIER "\n",pos.getString().c_str(),markedCells.size());
|
||||
//if(markedCells.empty() == false) {
|
||||
//SurfaceCell *sc = map->getSurfaceCell(pos);
|
||||
//quadCache.visibleScaledCellToScreenPosList[pos]=computeScreenPosition(sc->getVertex());
|
||||
updateMarkedCellScreenPosQuadCache(pos);
|
||||
}
|
||||
else {
|
||||
//printf("#1 VISIBLE SCALED CELL NOT FOUND in marked list pos [%s] markedCells.size() = %zu\n",pos.getString().c_str(),markedCells.size());
|
||||
//printf("#1 VISIBLE SCALED CELL NOT FOUND in marked list pos [%s] markedCells.size() = " MG_SIZE_T_SPECIFIER "\n",pos.getString().c_str(),markedCells.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8834,13 +8834,13 @@ VisibleQuadContainerCache & Renderer::getQuadCache( bool updateOnDirtyFrame,
|
|||
|
||||
if(markedCells.empty() == false) {
|
||||
if(markedCells.find(pos) != markedCells.end()) {
|
||||
//printf("#2 ******** VISIBLE SCALED CELL FOUND in marked list pos [%s] markedCells.size() = %zu\n",pos.getString().c_str(),markedCells.size());
|
||||
//printf("#2 ******** VISIBLE SCALED CELL FOUND in marked list pos [%s] markedCells.size() = " MG_SIZE_T_SPECIFIER "\n",pos.getString().c_str(),markedCells.size());
|
||||
//if(markedCells.empty() == false) {
|
||||
//quadCache.visibleScaledCellToScreenPosList[pos]=computeScreenPosition(sc->getVertex());
|
||||
updateMarkedCellScreenPosQuadCache(pos);
|
||||
}
|
||||
else {
|
||||
//printf("#2 VISIBLE SCALED CELL NOT FOUND in marked list pos [%s] markedCells.size() = %zu\n",pos.getString().c_str(),markedCells.size());
|
||||
//printf("#2 VISIBLE SCALED CELL NOT FOUND in marked list pos [%s] markedCells.size() = " MG_SIZE_T_SPECIFIER "\n",pos.getString().c_str(),markedCells.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1517,7 +1517,7 @@ void MenuStateConnectedGame::broadCastGameSettingsToHeadlessServer(bool forceNow
|
|||
|
||||
if(forceNow == true ||
|
||||
((needToBroadcastServerSettings == true ) && ( difftime((long int)time(NULL),broadcastServerSettingsDelayTimer) >= HEADLESSSERVER_BROADCAST_SETTINGS_SECONDS))) {
|
||||
//printf("In [%s:%s] Line: %d forceNow = %d broadcastServerSettingsDelayTimer = %zu, now =%zu\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,forceNow,broadcastServerSettingsDelayTimer,time(NULL));
|
||||
//printf("In [%s:%s] Line: %d forceNow = %d broadcastServerSettingsDelayTimer = " MG_SIZE_T_SPECIFIER ", now =" MG_SIZE_T_SPECIFIER "\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,forceNow,broadcastServerSettingsDelayTimer,time(NULL));
|
||||
|
||||
needToBroadcastServerSettings = false;
|
||||
broadcastServerSettingsDelayTimer = time(NULL);
|
||||
|
@ -1845,7 +1845,7 @@ void MenuStateConnectedGame::loadGameSettings(GameSettings *gameSettings) {
|
|||
gameSettings->setScenarioDir("");
|
||||
}
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] listBoxMap.getSelectedItemIndex() = %d, mapFiles.size() = %zu, getCurrentMapFile() [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,listBoxMap.getSelectedItemIndex(),mapFiles.size(),getCurrentMapFile().c_str());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] listBoxMap.getSelectedItemIndex() = %d, mapFiles.size() = " MG_SIZE_T_SPECIFIER ", getCurrentMapFile() [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,listBoxMap.getSelectedItemIndex(),mapFiles.size(),getCurrentMapFile().c_str());
|
||||
|
||||
if(listBoxMap.getSelectedItemIndex() >= 0 && listBoxMap.getSelectedItemIndex() < mapFiles.size()) {
|
||||
gameSettings->setDescription(formatString(getCurrentMapFile()));
|
||||
|
@ -4143,7 +4143,7 @@ void MenuStateConnectedGame::setupUIFromGameSettings(GameSettings *gameSettings,
|
|||
mapFile = ITEM_MISSING;
|
||||
}
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] listBoxMap.getSelectedItemIndex() = %d, mapFiles.size() = %zu, maps.size() = %zu, getCurrentMapFile() [%s] mapFile [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,listBoxMap.getSelectedItemIndex(),mapFiles.size(),maps.size(),getCurrentMapFile().c_str(),mapFile.c_str());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] listBoxMap.getSelectedItemIndex() = %d, mapFiles.size() = " MG_SIZE_T_SPECIFIER ", maps.size() = " MG_SIZE_T_SPECIFIER ", getCurrentMapFile() [%s] mapFile [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,listBoxMap.getSelectedItemIndex(),mapFiles.size(),maps.size(),getCurrentMapFile().c_str(),mapFile.c_str());
|
||||
|
||||
listBoxMap.setItems(maps);
|
||||
|
||||
|
@ -4509,7 +4509,7 @@ int MenuStateConnectedGame::setupMapList(string scenario) {
|
|||
loadMapInfo(Map::getMapPath(scenarioInfo.mapName, scenarioDir, true), &mapInfo, false);
|
||||
//printf("#6.2\n");
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] listBoxMap.getSelectedItemIndex() = %d, mapFiles.size() = %zu, mapInfo.players = %d, formattedPlayerSortedMaps[mapInfo.players].size() = %zu, scenarioInfo.mapName [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,listBoxMap.getSelectedItemIndex(),mapFiles.size(),mapInfo.players,formattedPlayerSortedMaps[mapInfo.players].size(),scenarioInfo.mapName.c_str());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] listBoxMap.getSelectedItemIndex() = %d, mapFiles.size() = " MG_SIZE_T_SPECIFIER ", mapInfo.players = %d, formattedPlayerSortedMaps[mapInfo.players].size() = " MG_SIZE_T_SPECIFIER ", scenarioInfo.mapName [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,listBoxMap.getSelectedItemIndex(),mapFiles.size(),mapInfo.players,formattedPlayerSortedMaps[mapInfo.players].size(),scenarioInfo.mapName.c_str());
|
||||
listBoxMap.setItems(formattedPlayerSortedMaps[mapInfo.players]);
|
||||
}
|
||||
//printf("#7\n");
|
||||
|
|
|
@ -3389,7 +3389,7 @@ void MenuStateCustomGame::loadGameSettings(GameSettings *gameSettings,bool force
|
|||
gameSettings->setMasterserver_admin(serverInterface->getSlot(i)->getSessionKey());
|
||||
gameSettings->setMasterserver_admin_faction_index(serverInterface->getSlot(i)->getPlayerIndex());
|
||||
labelGameName.setText(serverInterface->getSlot(i)->getName()+" controls");
|
||||
//printf("slot = %d, admin key [%d] slot connected time[%zu] clientConnectedTime [%zu]\n",i,gameSettings->getMasterserver_admin(),serverInterface->getSlot(i)->getConnectedTime(),clientConnectedTime);
|
||||
//printf("slot = %d, admin key [%d] slot connected time[" MG_SIZE_T_SPECIFIER "] clientConnectedTime [" MG_SIZE_T_SPECIFIER "]\n",i,gameSettings->getMasterserver_admin(),serverInterface->getSlot(i)->getConnectedTime(),clientConnectedTime);
|
||||
}
|
||||
if(serverInterface->getSlot(i)->getSessionKey() == gameSettings->getMasterserver_admin()){
|
||||
masterserver_admin_found=true;
|
||||
|
@ -3413,7 +3413,7 @@ void MenuStateCustomGame::loadGameSettings(GameSettings *gameSettings,bool force
|
|||
gameSettings->setMasterserver_admin(serverInterface->getSlot(i)->getSessionKey());
|
||||
gameSettings->setMasterserver_admin_faction_index(serverInterface->getSlot(i)->getPlayerIndex());
|
||||
labelGameName.setText(serverInterface->getSlot(i)->getName()+" controls");
|
||||
//printf("slot = %d, admin key [%d] slot connected time[%zu] clientConnectedTime [%zu]\n",i,gameSettings->getMasterserver_admin(),serverInterface->getSlot(i)->getConnectedTime(),clientConnectedTime);
|
||||
//printf("slot = %d, admin key [%d] slot connected time[" MG_SIZE_T_SPECIFIER "] clientConnectedTime [" MG_SIZE_T_SPECIFIER "]\n",i,gameSettings->getMasterserver_admin(),serverInterface->getSlot(i)->getConnectedTime(),clientConnectedTime);
|
||||
}
|
||||
if(serverInterface->getSlot(i)->getSessionKey() == gameSettings->getMasterserver_admin()){
|
||||
masterserver_admin_found=true;
|
||||
|
|
|
@ -274,8 +274,8 @@ void MenuStateKeysetup::mouseClick(int x, int y, MouseButton mouseButton){
|
|||
if(userProperties.empty() == false) {
|
||||
Config &configKeys = Config::getInstance(std::pair<ConfigType,ConfigType>(cfgMainKeys,cfgUserKeys));
|
||||
string userKeysFile = configKeys.getFileName(true);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] save file [%s] userProperties.size() = %zu\n",__FILE__,__FUNCTION__,__LINE__,userKeysFile.c_str(),userProperties.size());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] save file [%s] userProperties.size() = %zu\n",__FILE__,__FUNCTION__,__LINE__,userKeysFile.c_str(),userProperties.size());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] save file [%s] userProperties.size() = " MG_SIZE_T_SPECIFIER "\n",__FILE__,__FUNCTION__,__LINE__,userKeysFile.c_str(),userProperties.size());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] save file [%s] userProperties.size() = " MG_SIZE_T_SPECIFIER "\n",__FILE__,__FUNCTION__,__LINE__,userKeysFile.c_str(),userProperties.size());
|
||||
|
||||
configKeys.setUserProperties(userProperties);
|
||||
configKeys.save();
|
||||
|
|
|
@ -977,7 +977,7 @@ void MenuStateMasterserver::rebuildServerLines(const string &serverInfo) {
|
|||
Tokenize(server,serverEntities,"|");
|
||||
const int MIN_FIELDS_EXPECTED = 14;
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("--------------> server [%s] serverEntities.size() = %zu MIN_FIELDS_EXPECTED = %d\n",server.c_str(),serverEntities.size(),MIN_FIELDS_EXPECTED);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("--------------> server [%s] serverEntities.size() = " MG_SIZE_T_SPECIFIER " MIN_FIELDS_EXPECTED = %d\n",server.c_str(),serverEntities.size(),MIN_FIELDS_EXPECTED);
|
||||
|
||||
if(serverEntities.size() >= MIN_FIELDS_EXPECTED) {
|
||||
labelTitle.setText(lang.get("AvailableServers"));
|
||||
|
|
|
@ -1168,7 +1168,7 @@ void MenuStateOptions::mouseClick(int x, int y, MouseButton mouseButton){
|
|||
vector<string> languageFileMappings;
|
||||
Tokenize(txnURLFileListMapping,languageFileMappings,"|");
|
||||
|
||||
printf("URL5 file count = %zu, %zu [%s]\n",languageFiles.size(),languageFileMappings.size(),(languageFiles.empty() == false ? languageFiles[0].c_str() : ""));
|
||||
printf("URL5 file count = " MG_SIZE_T_SPECIFIER ", " MG_SIZE_T_SPECIFIER " [%s]\n",languageFiles.size(),languageFileMappings.size(),(languageFiles.empty() == false ? languageFiles[0].c_str() : ""));
|
||||
|
||||
if(languageFiles.empty() == false) {
|
||||
|
||||
|
|
|
@ -1180,7 +1180,7 @@ void Faction::addResourceTargetToCache(const Vec2i &pos,bool incrementUseCounter
|
|||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"[addResourceTargetToCache] pos [%s]cacheResourceTargetList.size() [%zu]",
|
||||
snprintf(szBuf,8096,"[addResourceTargetToCache] pos [%s]cacheResourceTargetList.size() [" MG_SIZE_T_SPECIFIER "]",
|
||||
pos.getString().c_str(),cacheResourceTargetList.size());
|
||||
|
||||
//unit->logSynchData(szBuf);
|
||||
|
@ -1203,7 +1203,7 @@ void Faction::removeResourceTargetFromCache(const Vec2i &pos) {
|
|||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"[removeResourceTargetFromCache] pos [%s]cacheResourceTargetList.size() [%zu]",
|
||||
snprintf(szBuf,8096,"[removeResourceTargetFromCache] pos [%s]cacheResourceTargetList.size() [" MG_SIZE_T_SPECIFIER "]",
|
||||
pos.getString().c_str(),cacheResourceTargetList.size());
|
||||
|
||||
//unit->logSynchData(szBuf);
|
||||
|
@ -1347,7 +1347,7 @@ Vec2i Faction::getClosestResourceTypeTargetFromCache(Unit *unit, const ResourceT
|
|||
if(deleteList.empty() == false) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"[cleaning old resource targets] deleteList.size() [%zu] cacheResourceTargetList.size() [%zu] result [%s]",
|
||||
snprintf(szBuf,8096,"[cleaning old resource targets] deleteList.size() [" MG_SIZE_T_SPECIFIER "] cacheResourceTargetList.size() [" MG_SIZE_T_SPECIFIER "] result [%s]",
|
||||
deleteList.size(),cacheResourceTargetList.size(),result.getString().c_str());
|
||||
|
||||
unit->logSynchData(__FILE__,__LINE__,szBuf);
|
||||
|
@ -1494,7 +1494,7 @@ void Faction::cleanupResourceTypeTargetCache(std::vector<Vec2i> *deleteListPtr)
|
|||
if(deleteList.empty() == false) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"[cleaning old resource targets] deleteList.size() [%zu] cacheResourceTargetList.size() [%zu], needToCleanup [%d]",
|
||||
snprintf(szBuf,8096,"[cleaning old resource targets] deleteList.size() [" MG_SIZE_T_SPECIFIER "] cacheResourceTargetList.size() [" MG_SIZE_T_SPECIFIER "], needToCleanup [%d]",
|
||||
deleteList.size(),cacheResourceTargetList.size(),needToCleanup);
|
||||
//unit->logSynchData(szBuf);
|
||||
SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"----------------------------------- START [%d] ------------------------------------------------\n",getFrameCount());
|
||||
|
|
|
@ -3325,7 +3325,7 @@ void Unit::cleanupOldBadHarvestPos() {
|
|||
|
||||
if(purgeList.empty() == false) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"[cleaning old bad harvest targets] purgeList.size() [%zu]",purgeList.size());
|
||||
snprintf(szBuf,8096,"[cleaning old bad harvest targets] purgeList.size() [" MG_SIZE_T_SPECIFIER "]",purgeList.size());
|
||||
logSynchData(__FILE__,__LINE__,szBuf);
|
||||
|
||||
for(int i = 0; i < purgeList.size(); ++i) {
|
||||
|
|
|
@ -592,7 +592,7 @@ std::vector<std::string> FactionType::validateFactionType() {
|
|||
}
|
||||
|
||||
if(foundUnit == false) {
|
||||
//printf("Problem for unit [%s] unitTypes.size() = %zu\n",unitType.getName().c_str(),unitTypes.size());
|
||||
//printf("Problem for unit [%s] unitTypes.size() = " MG_SIZE_T_SPECIFIER "\n",unitType.getName().c_str(),unitTypes.size());
|
||||
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"The Unit [%s] in Faction [%s] has no other units that can produce, build or morph into it in this faction!",unitType.getName().c_str(),this->getName().c_str());
|
||||
|
@ -778,7 +778,7 @@ const UnitType *FactionType::getUnitType(const string &name) const{
|
|||
}
|
||||
}
|
||||
|
||||
printf("In [%s::%s Line: %d] scanning [%s] size = %zu\n",__FILE__,__FUNCTION__,__LINE__,name.c_str(),unitTypes.size());
|
||||
printf("In [%s::%s Line: %d] scanning [%s] size = " MG_SIZE_T_SPECIFIER "\n",__FILE__,__FUNCTION__,__LINE__,name.c_str(),unitTypes.size());
|
||||
for(int i=0; i<unitTypes.size();i++){
|
||||
printf("In [%s::%s Line: %d] scanning [%s] idx = %d [%s]\n",__FILE__,__FUNCTION__,__LINE__,name.c_str(),i,unitTypes[i].getName().c_str());
|
||||
}
|
||||
|
@ -798,7 +798,7 @@ const UnitType *FactionType::getUnitTypeById(int id) const{
|
|||
}
|
||||
}
|
||||
|
||||
printf("In [%s::%s Line: %d] scanning [%d] size = %zu\n",__FILE__,__FUNCTION__,__LINE__,id,unitTypes.size());
|
||||
printf("In [%s::%s Line: %d] scanning [%d] size = " MG_SIZE_T_SPECIFIER "\n",__FILE__,__FUNCTION__,__LINE__,id,unitTypes.size());
|
||||
for(int i=0; i<unitTypes.size();i++){
|
||||
printf("In [%s::%s Line: %d] scanning [%s] idx = %d [%s][%d]\n",__FILE__,__FUNCTION__,__LINE__,name.c_str(),i,unitTypes[i].getName().c_str(),unitTypes[i].getId());
|
||||
}
|
||||
|
@ -818,7 +818,7 @@ const UpgradeType *FactionType::getUpgradeType(const string &name) const{
|
|||
}
|
||||
}
|
||||
|
||||
printf("In [%s::%s Line: %d] scanning [%s] size = %zu\n",__FILE__,__FUNCTION__,__LINE__,name.c_str(),unitTypes.size());
|
||||
printf("In [%s::%s Line: %d] scanning [%s] size = " MG_SIZE_T_SPECIFIER "\n",__FILE__,__FUNCTION__,__LINE__,name.c_str(),unitTypes.size());
|
||||
for(int i=0; i<upgradeTypes.size();i++){
|
||||
printf("In [%s::%s Line: %d] scanning [%s] idx = %d [%s]\n",__FILE__,__FUNCTION__,__LINE__,name.c_str(),i,upgradeTypes[i].getName().c_str());
|
||||
}
|
||||
|
|
|
@ -979,7 +979,7 @@ const CommandType* UnitType::findCommandTypeById(int id) const{
|
|||
const CommandType *UnitType::getCommandType(int i) const {
|
||||
if(i >= commandTypes.size()) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"In [%s::%s Line: %d] i >= commandTypes.size(), i = %d, commandTypes.size() = %zu",__FILE__,__FUNCTION__,__LINE__,i,commandTypes.size());
|
||||
snprintf(szBuf,8096,"In [%s::%s Line: %d] i >= commandTypes.size(), i = %d, commandTypes.size() = " MG_SIZE_T_SPECIFIER "",__FILE__,__FUNCTION__,__LINE__,i,commandTypes.size());
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
return commandTypes[i];
|
||||
|
|
|
@ -406,7 +406,7 @@ Checksum Map::load(const string &path, TechTree *techTree, Tileset *tileset) {
|
|||
readBytes = fread(&x, sizeof(int32), 1, f);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
x = Shared::PlatformByteOrder::fromCommonEndian(x);
|
||||
|
@ -414,7 +414,7 @@ Checksum Map::load(const string &path, TechTree *techTree, Tileset *tileset) {
|
|||
readBytes = fread(&y, sizeof(int32), 1, f);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
y = Shared::PlatformByteOrder::fromCommonEndian(y);
|
||||
|
@ -433,7 +433,7 @@ Checksum Map::load(const string &path, TechTree *techTree, Tileset *tileset) {
|
|||
readBytes = fread(&alt, sizeof(float32), 1, f);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
alt = Shared::PlatformByteOrder::fromCommonEndian(alt);
|
||||
|
@ -450,7 +450,7 @@ Checksum Map::load(const string &path, TechTree *techTree, Tileset *tileset) {
|
|||
readBytes = fread(&surf, sizeof(int8), 1, f);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
surf = Shared::PlatformByteOrder::fromCommonEndian(surf);
|
||||
|
@ -467,7 +467,7 @@ Checksum Map::load(const string &path, TechTree *techTree, Tileset *tileset) {
|
|||
readBytes = fread(&objNumber, sizeof(int8), 1, f);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
objNumber = Shared::PlatformByteOrder::fromCommonEndian(objNumber);
|
||||
|
|
|
@ -25,6 +25,27 @@
|
|||
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define MG_SIZE_T_SPECIFIER "%Iu"
|
||||
#define MG_SSIZE_T_SPECIFIER "%Id"
|
||||
#define MG_PTRDIFF_T_SPECIFIER "%Id"
|
||||
#elif defined(__GNUC__)
|
||||
#define MG_SIZE_T_SPECIFIER "%zu"
|
||||
#define MG_SSIZE_T_SPECIFIER "%zd"
|
||||
#define MG_PTRDIFF_T_SPECIFIER "%zd"
|
||||
#else
|
||||
// TODO figure out which to use.
|
||||
#if NUMBITS == 32
|
||||
#define MG_SIZE_T_SPECIFIER "%lu"
|
||||
#define MG_SSIZE_T_SPECIFIER "%ld"
|
||||
#define MG_PTRDIFF_T_SPECIFIER "%ld"
|
||||
#else
|
||||
#define MG_SIZE_T_SPECIFIER "%llu"
|
||||
#define MG_SSIZE_T_SPECIFIER "%lld"
|
||||
#define MG_PTRDIFF_T_SPECIFIER "%lld"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace Shared{ namespace Platform{
|
||||
|
||||
#ifndef WIN32
|
||||
|
|
|
@ -324,7 +324,7 @@ public:
|
|||
//if(info.line == 0) return;
|
||||
|
||||
MutexSafeWrapper safeMutexMasterList(mutex);
|
||||
//printf("ALLOCATE.\tfile: %s, line: %d, bytes: %zu, array: %d inuse: %d\n", info.file, info.line, info.bytes, info.array, info.inuse);
|
||||
//printf("ALLOCATE.\tfile: %s, line: %d, bytes: " MG_SIZE_T_SPECIFIER ", array: %d inuse: %d\n", info.file, info.line, info.bytes, info.array, info.inuse);
|
||||
|
||||
if(info.line > 0) {
|
||||
++allocCount;
|
||||
|
@ -339,7 +339,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
printf("ALLOCATE NOT MONITORED.\tfile: %s, line: %d, ptr [%p], bytes: %zu, array: %d inuse: %d, \n%s\n", info.file, info.line, info.ptr, info.bytes, info.array, info.inuse, info.stack.c_str());
|
||||
printf("ALLOCATE NOT MONITORED.\tfile: %s, line: %d, ptr [%p], bytes: " MG_SIZE_T_SPECIFIER ", array: %d inuse: %d, \n%s\n", info.file, info.line, info.ptr, info.bytes, info.array, info.inuse, info.stack.c_str());
|
||||
|
||||
++nonMonitoredCount;
|
||||
nonMonitoredBytes+= info.bytes;
|
||||
|
|
|
@ -411,7 +411,7 @@ void Mesh::loadV2(int meshIndex, const string &dir, FILE *f, TextureManager *tex
|
|||
size_t readBytes = fread(&meshHeader, sizeof(MeshHeaderV2), 1, f);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianMeshHeaderV2(meshHeader);
|
||||
|
@ -489,7 +489,7 @@ void Mesh::loadV2(int meshIndex, const string &dir, FILE *f, TextureManager *tex
|
|||
readBytes = fread(vertices, sizeof(Vec3f)*frameCount*vertexCount, 1, f);
|
||||
if(readBytes != 1 && (frameCount * vertexCount) != 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianVecArray<Vec3f>(vertices, frameCount*vertexCount);
|
||||
|
@ -497,7 +497,7 @@ void Mesh::loadV2(int meshIndex, const string &dir, FILE *f, TextureManager *tex
|
|||
readBytes = fread(normals, sizeof(Vec3f)*frameCount*vertexCount, 1, f);
|
||||
if(readBytes != 1 && (frameCount * vertexCount) != 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianVecArray<Vec3f>(normals, frameCount*vertexCount);
|
||||
|
@ -506,7 +506,7 @@ void Mesh::loadV2(int meshIndex, const string &dir, FILE *f, TextureManager *tex
|
|||
readBytes = fread(texCoords, sizeof(Vec2f)*vertexCount, 1, f);
|
||||
if(readBytes != 1 && vertexCount != 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianVecArray<Vec2f>(texCoords, vertexCount);
|
||||
|
@ -514,7 +514,7 @@ void Mesh::loadV2(int meshIndex, const string &dir, FILE *f, TextureManager *tex
|
|||
readBytes = fread(&diffuseColor, sizeof(Vec3f), 1, f);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianVecArray<Vec3f>(&diffuseColor, 1);
|
||||
|
@ -522,7 +522,7 @@ void Mesh::loadV2(int meshIndex, const string &dir, FILE *f, TextureManager *tex
|
|||
readBytes = fread(&opacity, sizeof(float32), 1, f);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
opacity = Shared::PlatformByteOrder::fromCommonEndian(opacity);
|
||||
|
@ -531,7 +531,7 @@ void Mesh::loadV2(int meshIndex, const string &dir, FILE *f, TextureManager *tex
|
|||
readBytes = fread(indices, sizeof(uint32)*indexCount, 1, f);
|
||||
if(readBytes != 1 && indexCount != 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu [%u] on line: %d.",readBytes,indexCount,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " [%u] on line: %d.",readBytes,indexCount,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
Shared::PlatformByteOrder::fromEndianTypeArray<uint32>(indices, indexCount);
|
||||
|
@ -548,7 +548,7 @@ void Mesh::loadV3(int meshIndex, const string &dir, FILE *f,
|
|||
size_t readBytes = fread(&meshHeader, sizeof(MeshHeaderV3), 1, f);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianMeshHeaderV3(meshHeader);
|
||||
|
@ -623,7 +623,7 @@ void Mesh::loadV3(int meshIndex, const string &dir, FILE *f,
|
|||
readBytes = fread(vertices, sizeof(Vec3f)*frameCount*vertexCount, 1, f);
|
||||
if(readBytes != 1 && (frameCount * vertexCount) != 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianVecArray<Vec3f>(vertices, frameCount*vertexCount);
|
||||
|
@ -631,7 +631,7 @@ void Mesh::loadV3(int meshIndex, const string &dir, FILE *f,
|
|||
readBytes = fread(normals, sizeof(Vec3f)*frameCount*vertexCount, 1, f);
|
||||
if(readBytes != 1 && (frameCount * vertexCount) != 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianVecArray<Vec3f>(normals, frameCount*vertexCount);
|
||||
|
@ -641,7 +641,7 @@ void Mesh::loadV3(int meshIndex, const string &dir, FILE *f,
|
|||
readBytes = fread(texCoords, sizeof(Vec2f)*vertexCount, 1, f);
|
||||
if(readBytes != 1 && vertexCount != 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianVecArray<Vec2f>(texCoords, vertexCount);
|
||||
|
@ -650,7 +650,7 @@ void Mesh::loadV3(int meshIndex, const string &dir, FILE *f,
|
|||
readBytes = fread(&diffuseColor, sizeof(Vec3f), 1, f);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianVecArray<Vec3f>(&diffuseColor, 1);
|
||||
|
@ -658,7 +658,7 @@ void Mesh::loadV3(int meshIndex, const string &dir, FILE *f,
|
|||
readBytes = fread(&opacity, sizeof(float32), 1, f);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
opacity = Shared::PlatformByteOrder::fromCommonEndian(opacity);
|
||||
|
@ -667,7 +667,7 @@ void Mesh::loadV3(int meshIndex, const string &dir, FILE *f,
|
|||
readBytes = fread(indices, sizeof(uint32)*indexCount, 1, f);
|
||||
if(readBytes != 1 && indexCount != 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu [%u] on line: %d.",readBytes,indexCount,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " [%u] on line: %d.",readBytes,indexCount,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
Shared::PlatformByteOrder::fromEndianTypeArray<uint32>(indices, indexCount);
|
||||
|
@ -735,7 +735,7 @@ void Mesh::load(int meshIndex, const string &dir, FILE *f, TextureManager *textu
|
|||
size_t readBytes = fread(&meshHeader, sizeof(MeshHeader), 1, f);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianMeshHeader(meshHeader);
|
||||
|
@ -774,7 +774,7 @@ void Mesh::load(int meshIndex, const string &dir, FILE *f, TextureManager *textu
|
|||
readBytes = fread(cMapPath, mapPathSize, 1, f);
|
||||
if(readBytes != 1 && mapPathSize != 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu [%u] on line: %d.",readBytes,mapPathSize,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " [%u] on line: %d.",readBytes,mapPathSize,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
Shared::PlatformByteOrder::fromEndianTypeArray<uint8>(cMapPath, mapPathSize);
|
||||
|
@ -800,7 +800,7 @@ void Mesh::load(int meshIndex, const string &dir, FILE *f, TextureManager *textu
|
|||
readBytes = fread(vertices, sizeof(Vec3f)*frameCount*vertexCount, 1, f);
|
||||
if(readBytes != 1 && (frameCount * vertexCount) != 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianVecArray<Vec3f>(vertices, frameCount*vertexCount);
|
||||
|
@ -808,7 +808,7 @@ void Mesh::load(int meshIndex, const string &dir, FILE *f, TextureManager *textu
|
|||
readBytes = fread(normals, sizeof(Vec3f)*frameCount*vertexCount, 1, f);
|
||||
if(readBytes != 1 && (frameCount * vertexCount) != 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianVecArray<Vec3f>(normals, frameCount*vertexCount);
|
||||
|
@ -817,7 +817,7 @@ void Mesh::load(int meshIndex, const string &dir, FILE *f, TextureManager *textu
|
|||
readBytes = fread(texCoords, sizeof(Vec2f)*vertexCount, 1, f);
|
||||
if(readBytes != 1 && vertexCount != 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " [%u][%u] on line: %d.",readBytes,frameCount,vertexCount,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianVecArray<Vec2f>(texCoords, vertexCount);
|
||||
|
@ -825,7 +825,7 @@ void Mesh::load(int meshIndex, const string &dir, FILE *f, TextureManager *textu
|
|||
readBytes = fread(indices, sizeof(uint32)*indexCount, 1, f);
|
||||
if(readBytes != 1 && indexCount != 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu [%u] on line: %d.",readBytes,indexCount,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " [%u] on line: %d.",readBytes,indexCount,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
Shared::PlatformByteOrder::fromEndianTypeArray<uint32>(indices, indexCount);
|
||||
|
@ -1168,7 +1168,7 @@ void Model::loadG3d(const string &path, bool deletePixMapAfterLoad,
|
|||
if(readBytes != 1) {
|
||||
fclose(f);
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianFileHeader(fileHeader);
|
||||
|
@ -1190,7 +1190,7 @@ void Model::loadG3d(const string &path, bool deletePixMapAfterLoad,
|
|||
readBytes = fread(&modelHeader, sizeof(ModelHeader), 1, f);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianModelHeader(modelHeader);
|
||||
|
@ -1224,7 +1224,7 @@ void Model::loadG3d(const string &path, bool deletePixMapAfterLoad,
|
|||
readBytes = fread(&meshCount, sizeof(meshCount), 1, f);
|
||||
if(readBytes != 1 && meshCount != 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu [%u] on line: %d.",readBytes,meshCount,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " [%u] on line: %d.",readBytes,meshCount,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
meshCount = Shared::PlatformByteOrder::fromCommonEndian(meshCount);
|
||||
|
@ -1251,7 +1251,7 @@ void Model::loadG3d(const string &path, bool deletePixMapAfterLoad,
|
|||
readBytes = fread(&meshCount, sizeof(meshCount), 1, f);
|
||||
if(readBytes != 1 && meshCount != 0) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu [%u] on line: %d.",readBytes,meshCount,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " [%u] on line: %d.",readBytes,meshCount,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
meshCount = Shared::PlatformByteOrder::fromCommonEndian(meshCount);
|
||||
|
|
|
@ -122,7 +122,7 @@ void PixmapIoTga::openRead(const string &path) {
|
|||
size_t readBytes = fread(&fileHeader, sizeof(TargaFileHeader), 1, file);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
static bool bigEndianSystem = Shared::PlatformByteOrder::isBigEndian();
|
||||
|
@ -171,7 +171,7 @@ void PixmapIoTga::read(uint8 *pixels, int components) {
|
|||
size_t readBytes = fread(&l, 1, 1, file);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
if(bigEndianSystem == true) {
|
||||
|
@ -186,7 +186,7 @@ void PixmapIoTga::read(uint8 *pixels, int components) {
|
|||
size_t readBytes = fread(&b, 1, 1, file);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
if(bigEndianSystem == true) {
|
||||
|
@ -196,7 +196,7 @@ void PixmapIoTga::read(uint8 *pixels, int components) {
|
|||
readBytes = fread(&g, 1, 1, file);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
if(bigEndianSystem == true) {
|
||||
|
@ -206,7 +206,7 @@ void PixmapIoTga::read(uint8 *pixels, int components) {
|
|||
readBytes = fread(&r, 1, 1, file);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
if(bigEndianSystem == true) {
|
||||
|
@ -217,7 +217,7 @@ void PixmapIoTga::read(uint8 *pixels, int components) {
|
|||
readBytes = fread(&a, 1, 1, file);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
if(bigEndianSystem == true) {
|
||||
|
@ -346,7 +346,7 @@ void PixmapIoBmp::openRead(const string &path){
|
|||
size_t readBytes = fread(&fileHeader, sizeof(BitmapFileHeader), 1, file);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
static bool bigEndianSystem = Shared::PlatformByteOrder::isBigEndian();
|
||||
|
@ -368,7 +368,7 @@ void PixmapIoBmp::openRead(const string &path){
|
|||
readBytes = fread(&infoHeader, sizeof(BitmapInfoHeader), 1, file);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
if(bigEndianSystem == true) {
|
||||
|
@ -405,7 +405,7 @@ void PixmapIoBmp::read(uint8 *pixels, int components) {
|
|||
size_t readBytes = fread(&b, 1, 1, file);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
if(bigEndianSystem == true) {
|
||||
|
@ -414,7 +414,7 @@ void PixmapIoBmp::read(uint8 *pixels, int components) {
|
|||
readBytes = fread(&g, 1, 1, file);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
if(bigEndianSystem == true) {
|
||||
|
@ -424,7 +424,7 @@ void PixmapIoBmp::read(uint8 *pixels, int components) {
|
|||
readBytes = fread(&r, 1, 1, file);
|
||||
if(readBytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",readBytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",readBytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
if(bigEndianSystem == true) {
|
||||
|
|
|
@ -795,7 +795,7 @@ void MapPreview::loadFromFile(const string &path) {
|
|||
size_t bytes = fread(&header, sizeof(MapFileHeader), 1, f1);
|
||||
if(bytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",bytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",bytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
fromEndianMapFileHeader(header);
|
||||
|
@ -820,7 +820,7 @@ void MapPreview::loadFromFile(const string &path) {
|
|||
bytes = fread(&startLocations[i].x, sizeof(int32), 1, f1);
|
||||
if(bytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",bytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",bytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
startLocations[i].x = Shared::PlatformByteOrder::fromCommonEndian(startLocations[i].x);
|
||||
|
@ -828,7 +828,7 @@ void MapPreview::loadFromFile(const string &path) {
|
|||
bytes = fread(&startLocations[i].y, sizeof(int32), 1, f1);
|
||||
if(bytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",bytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",bytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
startLocations[i].y = Shared::PlatformByteOrder::fromCommonEndian(startLocations[i].y);
|
||||
|
@ -841,7 +841,7 @@ void MapPreview::loadFromFile(const string &path) {
|
|||
bytes = fread(&cells[i][j].height, sizeof(float), 1, f1);
|
||||
if(bytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",bytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",bytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
cells[i][j].height = Shared::PlatformByteOrder::fromCommonEndian(cells[i][j].height);
|
||||
|
@ -854,7 +854,7 @@ void MapPreview::loadFromFile(const string &path) {
|
|||
bytes = fread(&cells[i][j].surface, sizeof(int8), 1, f1);
|
||||
if(bytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",bytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",bytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
cells[i][j].surface = Shared::PlatformByteOrder::fromCommonEndian(cells[i][j].surface);
|
||||
|
@ -868,7 +868,7 @@ void MapPreview::loadFromFile(const string &path) {
|
|||
bytes = fread(&obj, sizeof(int8), 1, f1);
|
||||
if(bytes != 1) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"fread returned wrong size = %zu on line: %d.",bytes,__LINE__);
|
||||
snprintf(szBuf,8096,"fread returned wrong size = " MG_SIZE_T_SPECIFIER " on line: %d.",bytes,__LINE__);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
obj = Shared::PlatformByteOrder::fromCommonEndian(obj);
|
||||
|
@ -1056,7 +1056,7 @@ bool MapPreview::loadMapInfo(string file, MapInfo *mapInfo, string i18nMaxMapPla
|
|||
|
||||
if(errorOnInvalidMap == true) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"In [%s::%s Line: %d]\nfile [%s]\nreadBytes != sizeof(MapFileHeader) [%zu] [%zu]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,file.c_str(),readBytes,sizeof(MapFileHeader));
|
||||
snprintf(szBuf,8096,"In [%s::%s Line: %d]\nfile [%s]\nreadBytes != sizeof(MapFileHeader) [" MG_SIZE_T_SPECIFIER "] [" MG_SIZE_T_SPECIFIER "]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,file.c_str(),readBytes,sizeof(MapFileHeader));
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"%s",szBuf);
|
||||
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
|
|
|
@ -108,9 +108,9 @@ static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) {
|
|||
|
||||
size_t result = fwrite(buffer, size, nmemb, out->stream);
|
||||
if(result != nmemb) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("===> FTP Client thread FAILED to write data chunk to file [%s] nmemb = %zu, result = %zu\n",fullFilePath.c_str(),nmemb,result);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"===> FTP Client thread FAILED to write data chunk to file [%s] nmemb = %zu, result = %zu\n",fullFilePath.c_str(),nmemb,result);
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"===> FTP Client thread FAILED to write data chunk to file [%s] nmemb = %zu, result = %zu\n",fullFilePath.c_str(),nmemb,result);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("===> FTP Client thread FAILED to write data chunk to file [%s] nmemb = " MG_SIZE_T_SPECIFIER ", result = " MG_SIZE_T_SPECIFIER "\n",fullFilePath.c_str(),nmemb,result);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"===> FTP Client thread FAILED to write data chunk to file [%s] nmemb = " MG_SIZE_T_SPECIFIER ", result = " MG_SIZE_T_SPECIFIER "\n",fullFilePath.c_str(),nmemb,result);
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"===> FTP Client thread FAILED to write data chunk to file [%s] nmemb = " MG_SIZE_T_SPECIFIER ", result = " MG_SIZE_T_SPECIFIER "\n",fullFilePath.c_str(),nmemb,result);
|
||||
//return -1; /* failure, can't open file to write */
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -1170,12 +1170,12 @@ int Socket::getDataToRead(bool wantImmediateReply) {
|
|||
break;
|
||||
}
|
||||
else if(hasDataToRead() == true) {
|
||||
//if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] WARNING PEEKING SOCKET DATA, (hasDataToRead() == true) err = %d, sock = %d, size = %zu, loopCount = %d\n",__FILE__,__FUNCTION__,__LINE__,err,sock,size,loopCount);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] WARNING PEEKING SOCKET DATA, (hasDataToRead() == true) err = %d, sock = %d, size = %zu\n",__FILE__,__FUNCTION__,__LINE__,err,sock,size);
|
||||
//if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] WARNING PEEKING SOCKET DATA, (hasDataToRead() == true) err = %d, sock = %d, size = " MG_SIZE_T_SPECIFIER ", loopCount = %d\n",__FILE__,__FUNCTION__,__LINE__,err,sock,size,loopCount);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] WARNING PEEKING SOCKET DATA, (hasDataToRead() == true) err = %d, sock = %d, size = " MG_SIZE_T_SPECIFIER "\n",__FILE__,__FUNCTION__,__LINE__,err,sock,size);
|
||||
}
|
||||
else {
|
||||
//if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] WARNING PEEKING SOCKET DATA, err = %d, sock = %d, size = %zu, loopCount = %d\n",__FILE__,__FUNCTION__,__LINE__,err,sock,size,loopCount);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] WARNING PEEKING SOCKET DATA, err = %d, sock = %d, size = %zu\n",__FILE__,__FUNCTION__,__LINE__,err,sock,size);
|
||||
//if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] WARNING PEEKING SOCKET DATA, err = %d, sock = %d, size = " MG_SIZE_T_SPECIFIER ", loopCount = %d\n",__FILE__,__FUNCTION__,__LINE__,err,sock,size,loopCount);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] WARNING PEEKING SOCKET DATA, err = %d, sock = %d, size = " MG_SIZE_T_SPECIFIER "\n",__FILE__,__FUNCTION__,__LINE__,err,sock,size);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -575,7 +575,7 @@ StaticSoundSource* SoundPlayerOpenAL::findStaticSoundSource() {
|
|||
}
|
||||
}
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSound).enabled) SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s %d] playingCount = %d, staticSources.size() = %zu, params.staticBufferCount = %u\n",__FILE__,__FUNCTION__,__LINE__,playingCount,(unsigned long)staticSources.size(),params.staticBufferCount);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSound).enabled) SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s %d] playingCount = %d, staticSources.size() = " MG_SIZE_T_SPECIFIER ", params.staticBufferCount = %u\n",__FILE__,__FUNCTION__,__LINE__,playingCount,(unsigned long)staticSources.size(),params.staticBufferCount);
|
||||
|
||||
// create a new source
|
||||
if(staticSources.size() >= params.staticBufferCount) {
|
||||
|
|
|
@ -227,7 +227,7 @@ void OggSoundFileLoader::open(const string &path, SoundInfo *soundInfo){
|
|||
|
||||
uint32 samples = static_cast<uint32>(ov_pcm_total(vf, -1));
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSound).enabled) SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s Line: %d] path = [%s] vi->version = %d, vi->channels = %d, vi->rate = %ld, vi->bitrate_upper = %ld, vi->bitrate_nominal = %ld, vi->bitrate_lower = %ld, vi->bitrate_window = %ld, samples = %zu\n",__FILE__,__FUNCTION__,__LINE__,path.c_str(),vi->version,vi->channels,vi->rate,vi->bitrate_upper,vi->bitrate_nominal,vi->bitrate_lower,vi->bitrate_window,samples);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSound).enabled) SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s Line: %d] path = [%s] vi->version = %d, vi->channels = %d, vi->rate = %ld, vi->bitrate_upper = %ld, vi->bitrate_nominal = %ld, vi->bitrate_lower = %ld, vi->bitrate_window = %ld, samples = " MG_SIZE_T_SPECIFIER "\n",__FILE__,__FUNCTION__,__LINE__,path.c_str(),vi->version,vi->channels,vi->rate,vi->bitrate_upper,vi->bitrate_nominal,vi->bitrate_lower,vi->bitrate_window,samples);
|
||||
|
||||
soundInfo->setChannels(vi->channels);
|
||||
soundInfo->setsamplesPerSecond(vi->rate);
|
||||
|
|
|
@ -54,21 +54,21 @@ void AllocRegistry::dump(const char *path) {
|
|||
leakBytes += info.bytes;
|
||||
|
||||
//allocs[i].stack = AllocInfo::getStackTrace();
|
||||
fprintf(f, "Leak #%d.\tfile: %s, line: %d, ptr [%p], bytes: %zu, array: %d, inuse: %d\n%s\n", ++leakCount, info.file, info.line, info.ptr, info.bytes, info.array,info.inuse,info.stack.c_str());
|
||||
fprintf(f, "Leak #%d.\tfile: %s, line: %d, ptr [%p], bytes: " MG_SIZE_T_SPECIFIER ", array: %d, inuse: %d\n%s\n", ++leakCount, info.file, info.line, info.ptr, info.bytes, info.array,info.inuse,info.stack.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(f, "\nTotal leaks: %d, %zu bytes\n", leakCount, leakBytes);
|
||||
fprintf(f, "Total allocations: %d, %zu bytes\n", allocCount, allocBytes);
|
||||
fprintf(f, "Not monitored allocations: %d, %zu bytes\n", nonMonitoredCount, nonMonitoredBytes);
|
||||
fprintf(f, "\nTotal leaks: %d, " MG_SIZE_T_SPECIFIER " bytes\n", leakCount, leakBytes);
|
||||
fprintf(f, "Total allocations: %d, " MG_SIZE_T_SPECIFIER " bytes\n", allocCount, allocBytes);
|
||||
fprintf(f, "Not monitored allocations: %d, " MG_SIZE_T_SPECIFIER " bytes\n", nonMonitoredCount, nonMonitoredBytes);
|
||||
|
||||
fclose(f);
|
||||
|
||||
printf("Memory leak dump summary at: %s\n",szBuf2);
|
||||
printf("Total leaks: %d, %zu bytes\n", leakCount, leakBytes);
|
||||
printf("Total allocations: %d, %zu bytes\n", allocCount, allocBytes);
|
||||
printf("Not monitored allocations: %d, %zu bytes\n", nonMonitoredCount, nonMonitoredBytes);
|
||||
printf("Total leaks: %d, " MG_SIZE_T_SPECIFIER " bytes\n", leakCount, leakBytes);
|
||||
printf("Total allocations: %d, " MG_SIZE_T_SPECIFIER " bytes\n", allocCount, allocBytes);
|
||||
printf("Not monitored allocations: %d, " MG_SIZE_T_SPECIFIER " bytes\n", nonMonitoredCount, nonMonitoredBytes);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue