* added missing #include "leak_dumper.h" to new cpp files

* fix for map names not being formatted (and replaced explicit loops to do the same to tileSet & techTree)
 * fix exploration state for fog-of-war off & multiplayer (note: also turns off for AI, diff. behaviour to before)
 * added fogOfWar to GameSettings and added to cutom game menu/menu_state_custom_game.cpp
This commit is contained in:
James McCulloch
2010-03-27 07:09:34 +00:00
parent c1ec8f97df
commit a9026f8c20
26 changed files with 869 additions and 123 deletions

View File

@@ -14,6 +14,8 @@
#include "pixmap.h"
#include <stdexcept>
#include "leak_dumper.h"
using std::runtime_error;
namespace Shared{ namespace Graphics{

View File

@@ -10,6 +10,7 @@
// ==============================================================
#include "ImageReaders.h"
#include "leak_dumper.h"
namespace Shared{ namespace Graphics{

View File

@@ -18,6 +18,8 @@
#include <jpeglib.h>
#include <setjmp.h>
#include "leak_dumper.h"
using std::runtime_error;
using std::ios;

View File

@@ -17,6 +17,8 @@
#include <png.h>
#include <setjmp.h>
#include "leak_dumper.h"
using std::runtime_error;
using std::ios;

View File

@@ -15,6 +15,8 @@
#include <stdexcept>
#include <iostream>
#include "leak_dumper.h"
using std::runtime_error;
namespace Shared{ namespace Graphics{
@@ -146,6 +148,6 @@ Pixmap2D* TGAReader::read(ifstream& in, const string& path, Pixmap2D* ret) const
std::cout << " ";
}*/
return ret;
}
}
}} //end namespace

View File

@@ -18,13 +18,10 @@
#include "util.h"
#include "math_util.h"
#include "random.h"
#include "leak_dumper.h"
#include "FileReader.h"
//Readers
#include "ImageReaders.h"
#include "leak_dumper.h"
using namespace Shared::Util;
using namespace std;

View File

@@ -13,22 +13,12 @@
#ifdef SL_LEAK_DUMP
AllocInfo::AllocInfo(){
ptr= NULL;
file= "";
line= -1;
bytes= -1;
array= false;
free= true;
AllocInfo::AllocInfo()
: ptr(0), file(""), line(-1), bytes(-1), array(false), free(false) {
}
AllocInfo::AllocInfo(void* ptr, const char* file, int line, size_t bytes, bool array){
this->ptr= ptr;
this->file= file;
this->line= line;
this->bytes= bytes;
this->array= array;
free= false;
AllocInfo::AllocInfo(void* ptr, const char* file, int line, size_t bytes, bool array)
: ptr(ptr), file(file), line(line), bytes(bytes), array(array), free(false) {
}
// =====================================================
@@ -53,12 +43,7 @@ AllocRegistry &AllocRegistry::getInstance(){
AllocRegistry::~AllocRegistry(){
string leakLog = "leak_dump.log";
if(getGameReadWritePath() != "") {
leakLog = getGameReadWritePath() + leakLog;
}
dump(leakLog.c_str());
dump("leak_dump.log");
}
void AllocRegistry::allocate(AllocInfo info){

View File

@@ -14,6 +14,7 @@
#ifdef SL_PROFILE
#include <stdexcept>
#include "leak_dumper.h"
using namespace std;