diff options
| author | jacob1 <jfu614@gmail.com> | 2013-05-17 16:44:25 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-05-17 16:44:25 (GMT) |
| commit | 981f6984c2c0f87d54a9c90f4518c69c9ef02ae0 (patch) | |
| tree | 757bd699a23c1fad61e60700265a25feb1a3042c /src/simulation/tools/PGrv.cpp | |
| parent | cbd402d8cb6aa699ffde83a1b5b3c2f4fc51baaf (diff) | |
| parent | 77bf649fb4482c86ac1fd9b3233f062b53226007 (diff) | |
| download | powder-981f6984c2c0f87d54a9c90f4518c69c9ef02ae0.zip powder-981f6984c2c0f87d54a9c90f4518c69c9ef02ae0.tar.gz | |
Merge branch 'HEAD' of git@github.com:FacialTurd/The-Powder-Toy.git
Diffstat (limited to 'src/simulation/tools/PGrv.cpp')
| -rw-r--r-- | src/simulation/tools/PGrv.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
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() {} |
