summaryrefslogtreecommitdiff
path: root/src/simulation
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-12 21:32:57 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-12 21:32:57 (GMT)
commit8ca27520a437bf33fb374d5a88731605cd3739e7 (patch)
treef081511e0f26946016529382c68000d3c6ea5a3a /src/simulation
parentca7c0e7370542a97dd03210e13ec2c56679d5ca4 (diff)
downloadpowder-8ca27520a437bf33fb374d5a88731605cd3739e7.zip
powder-8ca27520a437bf33fb374d5a88731605cd3739e7.tar.gz
Use forward declarations more to avoid excessive includes
Diffstat (limited to 'src/simulation')
-rw-r--r--src/simulation/SaveRenderer.cpp3
-rw-r--r--src/simulation/SaveRenderer.h5
-rw-r--r--src/simulation/Simulation.h6
3 files changed, 9 insertions, 5 deletions
diff --git a/src/simulation/SaveRenderer.cpp b/src/simulation/SaveRenderer.cpp
index 8aef523..ce3161a 100644
--- a/src/simulation/SaveRenderer.cpp
+++ b/src/simulation/SaveRenderer.cpp
@@ -9,6 +9,7 @@
#include "graphics/Graphics.h"
#include "Simulation.h"
#include "graphics/Renderer.h"
+#include "search/Thumbnail.h"
SaveRenderer::SaveRenderer(){
@@ -124,7 +125,7 @@ Thumbnail * SaveRenderer::Render(unsigned char * saveData, int dataSize)
GameSave * tempSave;
try {
tempSave = new GameSave((char*)saveData, dataSize);
- } catch (exception & e) {
+ } catch (std::exception & e) {
//Todo: make this look a little less shit
VideoBuffer buffer(64, 64);
diff --git a/src/simulation/SaveRenderer.h b/src/simulation/SaveRenderer.h
index e858918..ee83b00 100644
--- a/src/simulation/SaveRenderer.h
+++ b/src/simulation/SaveRenderer.h
@@ -9,12 +9,13 @@
#define SAVERENDERER_H_
#include "Singleton.h"
-#include "search/Thumbnail.h"
-#include "client/GameSave.h"
+class GameSave;
+class Thumbnail;
class Graphics;
class Simulation;
class Renderer;
+
class SaveRenderer: public Singleton<SaveRenderer> {
Graphics * g;
Simulation * sim;
diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h
index 387d3b3..13da42f 100644
--- a/src/simulation/Simulation.h
+++ b/src/simulation/Simulation.h
@@ -9,6 +9,8 @@
#define SIMULATION_H_
#include <cstring>
#include <cstddef>
+#include <vector>
+
#include "Config.h"
#include "graphics/Renderer.h"
#include "graphics/Graphics.h"
@@ -45,9 +47,9 @@ public:
Gravity * grav;
Air * air;
- vector<sign> signs;
+ std::vector<sign> signs;
Element * elements;
- vector<SimTool*> tools;
+ std::vector<SimTool*> tools;
unsigned int * platent;
wall_type wtypes[UI_WALLCOUNT];
gol_menu gmenu[NGOL];