diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-05-17 21:10:17 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-05-17 21:10:17 (GMT) |
| commit | 8efd07a849261220b1c500101790af459c06f805 (patch) | |
| tree | d7bed6cbf4440d9a13ecbf6ae66ad2a74eed93af /src/simulation/tools/Air.cpp | |
| parent | bbf7851596988467632e4d3497cc4df224fa53b1 (diff) | |
| download | powder-8efd07a849261220b1c500101790af459c06f805.zip powder-8efd07a849261220b1c500101790af459c06f805.tar.gz | |
Air tool
Diffstat (limited to 'src/simulation/tools/Air.cpp')
| -rw-r--r-- | src/simulation/tools/Air.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/simulation/tools/Air.cpp b/src/simulation/tools/Air.cpp new file mode 100644 index 0000000..b7b1351 --- /dev/null +++ b/src/simulation/tools/Air.cpp @@ -0,0 +1,18 @@ +#include "simulation/Tools.h" +#include "simulation/Air.h" +//#TPT-Directive ToolClass Tool_Air TOOL_AIR 3 +Tool_Air::Tool_Air() +{ + Identifier = "DEFAULT_TOOL_AIR"; + Name = "AIR"; + Colour = PIXPACK(0xFFFFFF); + Description = "Creates air pressure"; +} + +int Tool_Air::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength) +{ + sim->air->pv[y/CELL][x/CELL] += 0.03f*strength; + return 1; +} + +Tool_Air::~Tool_Air() {}
\ No newline at end of file |
