diff options
| author | jacob1 <jfu614@gmail.com> | 2013-05-17 00:04:39 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-05-17 00:04:39 (GMT) |
| commit | 7b6ded50dca6df5dfe2b22eb47de966e02878284 (patch) | |
| tree | 1606c21a619b3da1cd21d08471f2a713660104ad /src/simulation/tools/PGrv.cpp | |
| parent | fd97e923f3f8409346723a9924761c9e21bb79d3 (diff) | |
| download | powder-7b6ded50dca6df5dfe2b22eb47de966e02878284.zip powder-7b6ded50dca6df5dfe2b22eb47de966e02878284.tar.gz | |
rename GRAV back to PGRV, fix formatting in generator, remove useless file
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() {} |
