diff options
| author | Simon 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) |
| commit | 201d3140967c291e8c331a3eda8215cdf7347c47 (patch) | |
| tree | 0a867ba0dbd55c072a677a28aae22f11f2ea57ce /src/game/GameController.cpp | |
| parent | 558888ac25cf503bcbf996d839a0d5f028b15f7c (diff) | |
| download | powder-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/GameController.cpp')
| -rw-r--r-- | src/game/GameController.cpp | 8 |
1 files changed, 8 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(); } |
