#include "simulation/ToolCommon.h" static int perform(Simulation * sim, Particle * cpart, int x, int y, int brushX, int brushY, float strength); void SimTool::Tool_HEAT() { Identifier = "DEFAULT_TOOL_HEAT"; Name = "HEAT"; Colour = PIXPACK(0xFFDD00); Description = "Heats the targeted element."; Perform = &perform; } static int perform(Simulation * sim, Particle * cpart, int x, int y, int brushX, int brushY, float strength) { if(!cpart) return 0; if (cpart->type == PT_PUMP || cpart->type == PT_GPMP) cpart->temp += strength*.1f; else cpart->temp += strength*2.0f; if (cpart->temp > MAX_TEMP) cpart->temp = MAX_TEMP; else if (cpart->temp < 0) cpart->temp = 0; return 1; }