summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-05-17 00:04:39 (GMT)
committer jacob1 <jfu614@gmail.com>2013-05-17 00:04:39 (GMT)
commit7b6ded50dca6df5dfe2b22eb47de966e02878284 (patch)
tree1606c21a619b3da1cd21d08471f2a713660104ad /src
parentfd97e923f3f8409346723a9924761c9e21bb79d3 (diff)
downloadpowder-7b6ded50dca6df5dfe2b22eb47de966e02878284.zip
powder-7b6ded50dca6df5dfe2b22eb47de966e02878284.tar.gz
rename GRAV back to PGRV, fix formatting in generator, remove useless file
Diffstat (limited to 'src')
-rw-r--r--src/cat/LuaScriptInterface.cpp13
-rw-r--r--src/gui/game/GameModel.cpp2
-rw-r--r--src/simulation/Simulation.cpp2
-rw-r--r--src/simulation/Tools.h7
-rw-r--r--src/simulation/tools/AirTool.cpp2
-rw-r--r--src/simulation/tools/Cool.cpp2
-rw-r--r--src/simulation/tools/GravTool.cpp18
-rw-r--r--src/simulation/tools/Heat.cpp2
-rw-r--r--src/simulation/tools/NGrv.cpp2
-rw-r--r--src/simulation/tools/PGrv.cpp18
-rw-r--r--src/simulation/tools/SimTool.cpp2
-rw-r--r--src/simulation/tools/Vac.cpp4
12 files changed, 34 insertions, 40 deletions
diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp
index f257636..8cb01ee 100644
--- a/src/cat/LuaScriptInterface.cpp
+++ b/src/cat/LuaScriptInterface.cpp
@@ -15,6 +15,7 @@
#include "gui/dialogues/TextPrompt.h"
#include "gui/dialogues/ConfirmPrompt.h"
#include "simulation/Simulation.h"
+#include "ToolClasses.h"
#include "gui/game/GameModel.h"
#include "gui/game/Tool.h"
#include "LuaScriptHelper.h"
@@ -482,12 +483,12 @@ void LuaScriptInterface::initSimulationAPI()
lua_pushinteger(l, MAX_TEMP); lua_setfield(l, simulationAPI, "MAX_TEMP");
lua_pushinteger(l, MIN_TEMP); lua_setfield(l, simulationAPI, "MIN_TEMP");
- lua_pushinteger(l, 0); lua_setfield(l, simulationAPI, "TOOL_HEAT");
- lua_pushinteger(l, 1); lua_setfield(l, simulationAPI, "TOOL_COOL");
- lua_pushinteger(l, 2); lua_setfield(l, simulationAPI, "TOOL_VAC");
- lua_pushinteger(l, 3); lua_setfield(l, simulationAPI, "TOOL_AIR");
- lua_pushinteger(l, 4); lua_setfield(l, simulationAPI, "TOOL_PGRV");
- lua_pushinteger(l, 5); lua_setfield(l, simulationAPI, "TOOL_NGRV");
+ lua_pushinteger(l, TOOL_HEAT); lua_setfield(l, simulationAPI, "TOOL_HEAT");
+ lua_pushinteger(l, TOOL_COOL); lua_setfield(l, simulationAPI, "TOOL_COOL");
+ lua_pushinteger(l, TOOL_VAC); lua_setfield(l, simulationAPI, "TOOL_VAC");
+ lua_pushinteger(l, TOOL_AIR); lua_setfield(l, simulationAPI, "TOOL_AIR");
+ lua_pushinteger(l, TOOL_PGRV); lua_setfield(l, simulationAPI, "TOOL_PGRV");
+ lua_pushinteger(l, TOOL_NGRV); lua_setfield(l, simulationAPI, "TOOL_NGRV");
lua_pushinteger(l, DECO_DRAW); lua_setfield(l, simulationAPI, "DECO_DRAW");
lua_pushinteger(l, DECO_CLEAR); lua_setfield(l, simulationAPI, "DECO_CLEAR");
lua_pushinteger(l, DECO_ADD); lua_setfield(l, simulationAPI, "DECO_ADD");
diff --git a/src/gui/game/GameModel.cpp b/src/gui/game/GameModel.cpp
index b57a7cb..5925079 100644
--- a/src/gui/game/GameModel.cpp
+++ b/src/gui/game/GameModel.cpp
@@ -3,7 +3,7 @@
#include "GameView.h"
#include "simulation/Simulation.h"
#include "simulation/Air.h"
-#include "simulation/Tools.h"
+#include "ToolClasses.h"
#include "graphics/Renderer.h"
#include "gui/interface/Point.h"
#include "Brush.h"
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index 4289016..4c1a543 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -17,7 +17,7 @@
//#include "graphics/Renderer.h"
//#include "graphics/Graphics.h"
#include "Misc.h"
-#include "Tools.h"
+#include "ToolClasses.h"
#include "gui/game/Brush.h"
#include "client/GameSave.h"
#include "Sample.h"
diff --git a/src/simulation/Tools.h b/src/simulation/Tools.h
deleted file mode 100644
index 525701e..0000000
--- a/src/simulation/Tools.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef TOOLS_H_
-#define TOOLS_H_
-
-#include "ToolClasses.h"
-
-
-#endif
diff --git a/src/simulation/tools/AirTool.cpp b/src/simulation/tools/AirTool.cpp
index 23120a0..4e7ebde 100644
--- a/src/simulation/tools/AirTool.cpp
+++ b/src/simulation/tools/AirTool.cpp
@@ -1,4 +1,4 @@
-#include "simulation/Tools.h"
+#include "ToolClasses.h"
#include "simulation/Air.h"
//#TPT-Directive ToolClass Tool_Air TOOL_AIR 3
Tool_Air::Tool_Air()
diff --git a/src/simulation/tools/Cool.cpp b/src/simulation/tools/Cool.cpp
index 07c24f9..bc49634 100644
--- a/src/simulation/tools/Cool.cpp
+++ b/src/simulation/tools/Cool.cpp
@@ -1,4 +1,4 @@
-#include "simulation/Tools.h"
+#include "ToolClasses.h"
//#TPT-Directive ToolClass Tool_Cool TOOL_COOL 1
Tool_Cool::Tool_Cool()
{
diff --git a/src/simulation/tools/GravTool.cpp b/src/simulation/tools/GravTool.cpp
deleted file mode 100644
index 3ff30bd..0000000
--- a/src/simulation/tools/GravTool.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "simulation/Tools.h"
-#include "simulation/Simulation.h"
-//#TPT-Directive ToolClass Tool_Grav TOOL_GRAV 4
-Tool_Grav::Tool_Grav()
-{
- Identifier = "DEFAULT_TOOL_GRAV";
- Name = "GRAV";
- Colour = PIXPACK(0xCCCCFF);
- Description = "Creates a short-lasting gravity well";
-}
-
-int Tool_Grav::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
-{
- sim->gravmap[((y/CELL)*(XRES/CELL))+(x/CELL)] += 0.03f*strength;
- return 1;
-}
-
-Tool_Grav::~Tool_Grav() {}
diff --git a/src/simulation/tools/Heat.cpp b/src/simulation/tools/Heat.cpp
index 2d6510c..903efe3 100644
--- a/src/simulation/tools/Heat.cpp
+++ b/src/simulation/tools/Heat.cpp
@@ -1,4 +1,4 @@
-#include "simulation/Tools.h"
+#include "ToolClasses.h"
//#TPT-Directive ToolClass Tool_Heat TOOL_HEAT 0
Tool_Heat::Tool_Heat()
{
diff --git a/src/simulation/tools/NGrv.cpp b/src/simulation/tools/NGrv.cpp
index 5e339e6..65530c5 100644
--- a/src/simulation/tools/NGrv.cpp
+++ b/src/simulation/tools/NGrv.cpp
@@ -1,4 +1,4 @@
-#include "simulation/Tools.h"
+#include "ToolClasses.h"
#include "simulation/Simulation.h"
//#TPT-Directive ToolClass Tool_NGrv TOOL_NGRV 5
Tool_NGrv::Tool_NGrv()
diff --git a/src/simulation/tools/PGrv.cpp b/src/simulation/tools/PGrv.cpp
new file mode 100644
index 0000000..cfa381c
--- /dev/null
+++ b/src/simulation/tools/PGrv.cpp
@@ -0,0 +1,18 @@
+#include "ToolClasses.h"
+#include "simulation/Simulation.h"
+//#TPT-Directive ToolClass Tool_PGrv TOOL_PGRV 4
+Tool_PGrv::Tool_PGrv()
+{
+ Identifier = "DEFAULT_TOOL_PGRV";
+ Name = "PGRV";
+ Colour = PIXPACK(0xCCCCFF);
+ Description = "Creates a short-lasting gravity well";
+}
+
+int Tool_PGrv::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
+{
+ sim->gravmap[((y/CELL)*(XRES/CELL))+(x/CELL)] += 0.03f*strength;
+ return 1;
+}
+
+Tool_PGrv::~Tool_PGrv() {}
diff --git a/src/simulation/tools/SimTool.cpp b/src/simulation/tools/SimTool.cpp
index 4b3ddeb..0fdec2b 100644
--- a/src/simulation/tools/SimTool.cpp
+++ b/src/simulation/tools/SimTool.cpp
@@ -1,5 +1,5 @@
#include "simulation/Element.h"
-#include "simulation/Tools.h"
+#include "ToolClasses.h"
SimTool::SimTool():
Identifier("DEFAULT_TOOL_INVALID"),
diff --git a/src/simulation/tools/Vac.cpp b/src/simulation/tools/Vac.cpp
index aa319e2..fbf7e85 100644
--- a/src/simulation/tools/Vac.cpp
+++ b/src/simulation/tools/Vac.cpp
@@ -1,4 +1,4 @@
-#include "simulation/Tools.h"
+#include "ToolClasses.h"
#include "simulation/Air.h"
//#TPT-Directive ToolClass Tool_Vac TOOL_VAC 2
Tool_Vac::Tool_Vac()
@@ -6,7 +6,7 @@ Tool_Vac::Tool_Vac()
Identifier = "DEFAULT_TOOL_VAC";
Name = "VAC";
Colour = PIXPACK(0x303030);
- Description = "Removes air pressure";
+ Description = "Reduces air pressure";
}
int Tool_Vac::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)