summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-13 14:43:57 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-13 14:43:57 (GMT)
commit074dcd0b42ad1924751e432232ccc8b933cedff1 (patch)
treed5933f30c7fc9df29d75f9596a79626d46704134 /src
parente6feb6f1011ec83991172b80cd9473741b6ec909 (diff)
downloadpowder-074dcd0b42ad1924751e432232ccc8b933cedff1.zip
powder-074dcd0b42ad1924751e432232ccc8b933cedff1.tar.gz
Precompile some headers. Fix sconscript to prevent recompiling everything
Diffstat (limited to 'src')
-rw-r--r--src/PowderToySDL.cpp2
-rw-r--r--src/client/GameSave.cpp2
-rw-r--r--src/game/GameController.cpp1
-rw-r--r--src/game/GameModel.cpp2
-rw-r--r--src/game/GameView.h1
-rw-r--r--src/game/Tool.cpp1
-rw-r--r--src/simulation/SaveRenderer.cpp1
-rw-r--r--src/simulation/Simulation.cpp9
-rw-r--r--src/simulation/Simulation.h18
-rw-r--r--src/simulation/SimulationData.cpp1
-rw-r--r--src/simulation/SimulationData.h2
-rw-r--r--src/simulation/WallType.h3
12 files changed, 32 insertions, 11 deletions
diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp
index 8d7903b..5ef26f1 100644
--- a/src/PowderToySDL.cpp
+++ b/src/PowderToySDL.cpp
@@ -30,6 +30,7 @@
#include "interface/Label.h"
#include "interface/Keys.h"
+#include "client/GameSave.h"
#include "simulation/SaveRenderer.h"
#include "client/Client.h"
#include "Misc.h"
@@ -43,6 +44,7 @@
using namespace std;
+
#ifdef WIN
extern "C" IMAGE_DOS_HEADER __ImageBase;
#endif
diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp
index 3cb3c29..002d955 100644
--- a/src/client/GameSave.cpp
+++ b/src/client/GameSave.cpp
@@ -8,11 +8,13 @@
#include <iostream>
#include <sstream>
+#include <cmath>
#include <bzlib.h>
#include "Config.h"
#include "bson/BSON.h"
#include "GameSave.h"
#include "simulation/SimulationData.h"
+#include "ElementClasses.h"
extern "C"
{
#include "hmap.h"
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index 1533852..32e6754 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -6,6 +6,7 @@
#include "GameController.h"
#include "GameModel.h"
#include "client/SaveInfo.h"
+#include "client/GameSave.h"
#include "search/SearchController.h"
#include "render/RenderController.h"
#include "login/LoginController.h"
diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp
index e88a1aa..c897877 100644
--- a/src/game/GameModel.cpp
+++ b/src/game/GameModel.cpp
@@ -3,12 +3,14 @@
#include "GameView.h"
#include "simulation/Simulation.h"
#include "simulation/Air.h"
+#include "simulation/Tools.h"
#include "graphics/Renderer.h"
#include "interface/Point.h"
#include "Brush.h"
#include "EllipseBrush.h"
#include "TriangleBrush.h"
#include "client/Client.h"
+#include "client/GameSave.h"
#include "game/DecorationTool.h"
#include "GameModelException.h"
#include "QuickOptions.h"
diff --git a/src/game/GameView.h b/src/game/GameView.h
index de84e1e..b392bd1 100644
--- a/src/game/GameView.h
+++ b/src/game/GameView.h
@@ -15,6 +15,7 @@
#include "ToolButton.h"
#include "RenderPreset.h"
#include "Brush.h"
+#include "simulation/Sample.h"
using namespace std;
diff --git a/src/game/Tool.cpp b/src/game/Tool.cpp
index ad98712..639808d 100644
--- a/src/game/Tool.cpp
+++ b/src/game/Tool.cpp
@@ -7,6 +7,7 @@
#include <string>
#include "Tool.h"
+#include "game/Brush.h"
#include "simulation/Simulation.h"
diff --git a/src/simulation/SaveRenderer.cpp b/src/simulation/SaveRenderer.cpp
index ce3161a..f581452 100644
--- a/src/simulation/SaveRenderer.cpp
+++ b/src/simulation/SaveRenderer.cpp
@@ -6,6 +6,7 @@
*/
#include "SaveRenderer.h"
+#include "client/GameSave.h"
#include "graphics/Graphics.h"
#include "Simulation.h"
#include "graphics/Renderer.h"
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index f70560a..29b7eb4 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -8,6 +8,15 @@
#include "Gravity.h"
#include "elements/Element.h"
+//#include "graphics/Renderer.h"
+//#include "graphics/Graphics.h"
+#include "Misc.h"
+#include "Tools.h"
+#include "game/Brush.h"
+#include "client/GameSave.h"
+#include "Sample.h"
+//#include "StorageClasses.h"
+
#undef LUACONSOLE
//#include "cat/LuaScriptHelper.h"
diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h
index 13da42f..b9401de 100644
--- a/src/simulation/Simulation.h
+++ b/src/simulation/Simulation.h
@@ -12,26 +12,24 @@
#include <vector>
#include "Config.h"
-#include "graphics/Renderer.h"
-#include "graphics/Graphics.h"
-//#include "Elements.h"
-#include "Tools.h"
-#include "Misc.h"
-#include "game/Brush.h"
-#include "Gravity.h"
+#include "Elements.h"
#include "SimulationData.h"
#include "Sign.h"
#include "Particle.h"
-#include "StorageClasses.h"
#include "Player.h"
#include "WallType.h"
#include "GOLMenu.h"
#include "MenuSection.h"
-#include "client/GameSave.h"
-#include "Sample.h"
#define CHANNELS ((int)(MAX_TEMP-73)/100+2)
+class Element;
+class SimTool;
+class Brush;
+struct SimulationSample;
+struct matrix2d;
+struct vector2d;
+
class Simulation;
class Renderer;
class Gravity;
diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp
index 763ffa5..a6a2d91 100644
--- a/src/simulation/SimulationData.cpp
+++ b/src/simulation/SimulationData.cpp
@@ -7,6 +7,7 @@
#include "SimulationData.h"
//#include "ElementFunctions.h"
#include "ElementGraphics.h"
+#include "Elements.h"
gol_menu * LoadGOLMenu(int & golMenuCount)
{
diff --git a/src/simulation/SimulationData.h b/src/simulation/SimulationData.h
index 5dd7ac9..fabb62c 100644
--- a/src/simulation/SimulationData.h
+++ b/src/simulation/SimulationData.h
@@ -140,7 +140,7 @@
#define SIMULATIONDATA_H_
//#include "elements/NULLElement.h"
-#include "Simulation.h"
+//#include "Simulation.h"
/*class Simulation;
class Renderer;
diff --git a/src/simulation/WallType.h b/src/simulation/WallType.h
index 06d71ce..bfbd3f2 100644
--- a/src/simulation/WallType.h
+++ b/src/simulation/WallType.h
@@ -9,6 +9,9 @@
#ifndef The_Powder_Toy_WallType_h
#define The_Powder_Toy_WallType_h
+#include "graphics/Graphics.h"
+class VideoBuffer;
+
struct wall_type
{
pixel colour;