summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-12-15 15:57:57 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-12-15 15:57:57 (GMT)
commit201d3140967c291e8c331a3eda8215cdf7347c47 (patch)
tree0a867ba0dbd55c072a677a28aae22f11f2ea57ce /src/game
parent558888ac25cf503bcbf996d839a0d5f028b15f7c (diff)
downloadpowder-201d3140967c291e8c331a3eda8215cdf7347c47.zip
powder-201d3140967c291e8c331a3eda8215cdf7347c47.tar.gz
Element population histogram debug info display - has to be enabled by adding debugInfo.push_back(new ElementPopulationDebug(gameModel->GetSimulation())); somewhere in GameController
Diffstat (limited to 'src/game')
-rw-r--r--src/game/GameController.cpp8
-rw-r--r--src/game/GameController.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index efaf112..f7e1dd9 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -25,6 +25,8 @@
#include "save/ServerSaveActivity.h"
#include "interface/Keys.h"
#include "simulation/Snapshot.h"
+#include "debug/DebugInfo.h"
+//#include "debug/ElementPopulation.h"
using namespace std;
@@ -145,6 +147,8 @@ GameController::GameController():
//sim = new Simulation();
Client::Ref().AddListener(this);
+
+ //debugInfo.push_back(new ElementPopulationDebug(gameModel->GetSimulation()));
}
GameController::~GameController()
@@ -677,6 +681,10 @@ void GameController::Tick()
((LuaScriptInterface*)commandInterface)->Init();
firstTick = false;
}
+ for(std::vector<DebugInfo*>::iterator iter = debugInfo.begin(), end = debugInfo.end(); iter != end; iter++)
+ {
+ (*iter)->Draw(ui::Point(10, 10));
+ }
commandInterface->OnTick();
}
diff --git a/src/game/GameController.h b/src/game/GameController.h
index d44a295..2e02b25 100644
--- a/src/game/GameController.h
+++ b/src/game/GameController.h
@@ -22,6 +22,7 @@
using namespace std;
+class DebugInfo;
class Notification;
class GameModel;
class GameView;
@@ -44,6 +45,7 @@ private:
LocalBrowserController * localBrowser;
OptionsController * options;
CommandInterface * commandInterface;
+ vector<DebugInfo*> debugInfo;
public:
bool HasDone;
class SearchCallback;