This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
The-Powder-Toy/src/simulation/tools/Heat.cpp
2012-08-14 16:29:07 +01:00

23 lines
496 B
C++

#include "simulation/Tools.h"
//#TPT-Directive ToolClass Tool_Heat TOOL_HEAT 0
Tool_Heat::Tool_Heat()
{
Identifier = "DEFAULT_TOOL_HEAT";
Name = "HEAT";
Colour = PIXPACK(0xFFDD00);
Description = "Heats particles";
}
int Tool_Heat::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
{
if(!cpart)
return 0;
cpart->temp += strength;
if(cpart->temp > MAX_TEMP)
cpart->temp = MAX_TEMP;
if(cpart->temp < 0)
cpart->temp = 0;
return 1;
}
Tool_Heat::~Tool_Heat() {}