diff options
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() {} |
