mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-18 14:11:16 +02:00
Tools implemented in a similar way to elements
This commit is contained in:
153
generator.py
153
generator.py
@@ -4,20 +4,21 @@ if os.path.isdir("generated/"):
|
|||||||
shutil.rmtree("generated/")
|
shutil.rmtree("generated/")
|
||||||
os.mkdir("generated")
|
os.mkdir("generated")
|
||||||
|
|
||||||
elementClasses = dict()
|
def generateElements():
|
||||||
|
elementClasses = dict()
|
||||||
|
|
||||||
elementHeader = """#ifndef ELEMENTCLASSES_H
|
elementHeader = """#ifndef ELEMENTCLASSES_H
|
||||||
#define ELEMENTCLASSES_H
|
#define ELEMENTCLASSES_H
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "simulation/Element.h"
|
#include "simulation/Element.h"
|
||||||
#include "simulation/elements/Element.h"
|
#include "simulation/elements/Element.h"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
directives = []
|
directives = []
|
||||||
|
|
||||||
elementFiles = os.listdir("src/simulation/Elements")
|
elementFiles = os.listdir("src/simulation/elements")
|
||||||
for elementFile in elementFiles:
|
for elementFile in elementFiles:
|
||||||
f = open("src/simulation/Elements/"+elementFile, "r")
|
f = open("src/simulation/elements/"+elementFile, "r")
|
||||||
fileData = f.read()
|
fileData = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
@@ -28,51 +29,129 @@ for elementFile in elementFiles:
|
|||||||
for match in directiveMatches:
|
for match in directiveMatches:
|
||||||
directives.append(match.split(" "))
|
directives.append(match.split(" "))
|
||||||
|
|
||||||
classDirectives = []
|
classDirectives = []
|
||||||
for d in directives:
|
for d in directives:
|
||||||
if d[0] == "ElementClass":
|
if d[0] == "ElementClass":
|
||||||
elementClasses[d[1]] = []
|
elementClasses[d[1]] = []
|
||||||
elementHeader += "#define %s %s\n" % (d[2], d[3])
|
elementHeader += "#define %s %s\n" % (d[2], d[3])
|
||||||
d[3] = string.atoi(d[3])
|
d[3] = string.atoi(d[3])
|
||||||
classDirectives.append(d)
|
classDirectives.append(d)
|
||||||
|
|
||||||
for d in directives:
|
for d in directives:
|
||||||
if d[0] == "ElementHeader":
|
if d[0] == "ElementHeader":
|
||||||
elementClasses[d[1]].append(string.join(d[2:], " ")+";")
|
elementClasses[d[1]].append(string.join(d[2:], " ")+";")
|
||||||
|
|
||||||
for className, classMembers in elementClasses.items():
|
for className, classMembers in elementClasses.items():
|
||||||
elementHeader += """class {0}: public Element
|
elementHeader += """class {0}: public Element
|
||||||
{{
|
{{
|
||||||
public:
|
public:
|
||||||
{0}();
|
{0}();
|
||||||
virtual ~{0}();
|
virtual ~{0}();
|
||||||
{1}
|
{1}
|
||||||
}};
|
}};
|
||||||
""".format(className, string.join(classMembers, "\n"))
|
""".format(className, string.join(classMembers, "\n"))
|
||||||
|
|
||||||
elementHeader += """std::vector<Element> GetElements();
|
elementHeader += """std::vector<Element> GetElements();
|
||||||
#endif
|
#endif
|
||||||
"""
|
"""
|
||||||
|
|
||||||
elementContent = """#include "ElementClasses.h"
|
elementContent = """#include "ElementClasses.h"
|
||||||
std::vector<Element> GetElements()
|
std::vector<Element> GetElements()
|
||||||
{
|
{
|
||||||
std::vector<Element> elements;
|
std::vector<Element> elements;
|
||||||
""";
|
""";
|
||||||
|
|
||||||
elementIDs = sorted(classDirectives, key=lambda directive: directive[3])
|
elementIDs = sorted(classDirectives, key=lambda directive: directive[3])
|
||||||
for d in elementIDs:
|
for d in elementIDs:
|
||||||
elementContent += """ elements.push_back(%s());
|
elementContent += """ elements.push_back(%s());
|
||||||
""" % (d[1])
|
""" % (d[1])
|
||||||
|
|
||||||
elementContent += """ return elements;
|
elementContent += """ return elements;
|
||||||
}
|
}
|
||||||
""";
|
""";
|
||||||
|
|
||||||
f = open("generated/ElementClasses.h", "w")
|
f = open("generated/ElementClasses.h", "w")
|
||||||
f.write(elementHeader)
|
f.write(elementHeader)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
f = open("generated/ElementClasses.cpp", "w")
|
f = open("generated/ElementClasses.cpp", "w")
|
||||||
f.write(elementContent)
|
f.write(elementContent)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
def generateTools():
|
||||||
|
toolClasses = dict()
|
||||||
|
|
||||||
|
toolHeader = """#ifndef TOOLCLASSES_H
|
||||||
|
#define TOOLCLASSES_H
|
||||||
|
#include <vector>
|
||||||
|
#include "simulation/Tools.h"
|
||||||
|
#include "simulation/tools/SimTool.h"
|
||||||
|
"""
|
||||||
|
|
||||||
|
directives = []
|
||||||
|
|
||||||
|
toolFiles = os.listdir("src/simulation/tools")
|
||||||
|
for toolFile in toolFiles:
|
||||||
|
f = open("src/simulation/tools/"+toolFile, "r")
|
||||||
|
fileData = f.read()
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
directiveMatcher = '//#TPT-Directive\s+([^\r\n]+)'
|
||||||
|
matcher = re.compile(directiveMatcher)
|
||||||
|
directiveMatches = matcher.findall(fileData)
|
||||||
|
|
||||||
|
for match in directiveMatches:
|
||||||
|
directives.append(match.split(" "))
|
||||||
|
|
||||||
|
classDirectives = []
|
||||||
|
for d in directives:
|
||||||
|
if d[0] == "ToolClass":
|
||||||
|
toolClasses[d[1]] = []
|
||||||
|
toolHeader += "#define %s %s\n" % (d[2], d[3])
|
||||||
|
d[3] = string.atoi(d[3])
|
||||||
|
classDirectives.append(d)
|
||||||
|
|
||||||
|
for d in directives:
|
||||||
|
if d[0] == "ToolHeader":
|
||||||
|
toolClasses[d[1]].append(string.join(d[2:], " ")+";")
|
||||||
|
|
||||||
|
for className, classMembers in toolClasses.items():
|
||||||
|
toolHeader += """class {0}: public SimTool
|
||||||
|
{{
|
||||||
|
public:
|
||||||
|
{0}();
|
||||||
|
virtual ~{0}();
|
||||||
|
virtual int Perform(Simulation * sim, Particle * cpart, int x, int y, float strength);
|
||||||
|
{1}
|
||||||
|
}};
|
||||||
|
""".format(className, string.join(classMembers, "\n"))
|
||||||
|
|
||||||
|
toolHeader += """std::vector<SimTool*> GetTools();
|
||||||
|
#endif
|
||||||
|
"""
|
||||||
|
|
||||||
|
toolContent = """#include "ToolClasses.h"
|
||||||
|
std::vector<SimTool*> GetTools()
|
||||||
|
{
|
||||||
|
std::vector<SimTool*> tools;
|
||||||
|
""";
|
||||||
|
|
||||||
|
toolIDs = sorted(classDirectives, key=lambda directive: directive[3])
|
||||||
|
for d in toolIDs:
|
||||||
|
toolContent += """ tools.push_back(new %s());
|
||||||
|
""" % (d[1])
|
||||||
|
|
||||||
|
toolContent += """ return tools;
|
||||||
|
}
|
||||||
|
""";
|
||||||
|
|
||||||
|
f = open("generated/ToolClasses.h", "w")
|
||||||
|
f.write(toolHeader)
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
f = open("generated/ToolClasses.cpp", "w")
|
||||||
|
f.write(toolContent)
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
generateElements()
|
||||||
|
generateTools()
|
@@ -93,6 +93,13 @@ GameModel::GameModel():
|
|||||||
//sim->wtypes[i]
|
//sim->wtypes[i]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Build menu for simtools
|
||||||
|
for(int i = 0; i < sim->tools.size(); i++)
|
||||||
|
{
|
||||||
|
Tool * tempTool = new Tool(i, sim->tools[i]->Name, PIXR(sim->tools[i]->Colour), PIXG(sim->tools[i]->Colour), PIXB(sim->tools[i]->Colour));
|
||||||
|
menuList[SC_TOOL]->AddTool(tempTool);
|
||||||
|
}
|
||||||
|
|
||||||
//Add decoration tools to menu
|
//Add decoration tools to menu
|
||||||
menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendAdd, "ADD", 0, 0, 0));
|
menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendAdd, "ADD", 0, 0, 0));
|
||||||
menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendRemove, "SUB", 0, 0, 0));
|
menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendRemove, "SUB", 0, 0, 0));
|
||||||
|
@@ -28,9 +28,15 @@ public:
|
|||||||
}
|
}
|
||||||
string GetName() { return toolName; }
|
string GetName() { return toolName; }
|
||||||
virtual ~Tool() {}
|
virtual ~Tool() {}
|
||||||
virtual void Draw(Simulation * sim, Brush * brush, ui::Point position) {}
|
virtual void Draw(Simulation * sim, Brush * brush, ui::Point position) {
|
||||||
virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {}
|
sim->ToolBrush(position.X, position.Y, toolID, brush);
|
||||||
virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {}
|
}
|
||||||
|
virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {
|
||||||
|
sim->ToolLine(position1.X, position1.Y, position2.X, position2.Y, toolID, brush);
|
||||||
|
}
|
||||||
|
virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {
|
||||||
|
sim->ToolBox(position1.X, position1.Y, position2.X, position2.Y, toolID, brush);
|
||||||
|
}
|
||||||
virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) {};
|
virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) {};
|
||||||
int colRed, colBlue, colGreen;
|
int colRed, colBlue, colGreen;
|
||||||
};
|
};
|
||||||
|
@@ -608,6 +608,113 @@ void Simulation::ApplyDecorationLine(int x1, int y1, int x2, int y2, int rx, int
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Simulation::Tool(int x, int y, int tool, float strength)
|
||||||
|
{
|
||||||
|
if(tools[tool])
|
||||||
|
{
|
||||||
|
Particle * cpart = NULL;
|
||||||
|
int r;
|
||||||
|
if(r = pmap[y][x])
|
||||||
|
cpart = &(parts[r>>8]);
|
||||||
|
else if(r = photons[y][x])
|
||||||
|
cpart = &(parts[r>>8]);
|
||||||
|
return tools[tool]->Perform(this, cpart, x, y, strength);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Simulation::ToolBrush(int x, int y, int tool, Brush * cBrush)
|
||||||
|
{
|
||||||
|
int rx, ry, j, i;
|
||||||
|
if(!cBrush)
|
||||||
|
return 0;
|
||||||
|
rx = cBrush->GetRadius().X;
|
||||||
|
ry = cBrush->GetRadius().Y;
|
||||||
|
unsigned char *bitmap = cBrush->GetBitmap();
|
||||||
|
for (j=-ry; j<=ry; j++)
|
||||||
|
for (i=-rx; i<=rx; i++)
|
||||||
|
if(bitmap[(j+ry)*((rx*2)+1)+(i+rx+1)])
|
||||||
|
{
|
||||||
|
if ( x+i<0 || y+j<0 || x+i>=XRES || y+j>=YRES)
|
||||||
|
continue;
|
||||||
|
Tool(x+i, y+j, tool, 1.0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Simulation::ToolLine(int x1, int y1, int x2, int y2, int tool, Brush * cBrush)
|
||||||
|
{
|
||||||
|
int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy, rx, ry;
|
||||||
|
float e, de;
|
||||||
|
rx = cBrush->GetRadius().X;
|
||||||
|
ry = cBrush->GetRadius().Y;
|
||||||
|
if (cp)
|
||||||
|
{
|
||||||
|
y = x1;
|
||||||
|
x1 = y1;
|
||||||
|
y1 = y;
|
||||||
|
y = x2;
|
||||||
|
x2 = y2;
|
||||||
|
y2 = y;
|
||||||
|
}
|
||||||
|
if (x1 > x2)
|
||||||
|
{
|
||||||
|
y = x1;
|
||||||
|
x1 = x2;
|
||||||
|
x2 = y;
|
||||||
|
y = y1;
|
||||||
|
y1 = y2;
|
||||||
|
y2 = y;
|
||||||
|
}
|
||||||
|
dx = x2 - x1;
|
||||||
|
dy = abs(y2 - y1);
|
||||||
|
e = 0.0f;
|
||||||
|
if (dx)
|
||||||
|
de = dy/(float)dx;
|
||||||
|
else
|
||||||
|
de = 0.0f;
|
||||||
|
y = y1;
|
||||||
|
sy = (y1<y2) ? 1 : -1;
|
||||||
|
for (x=x1; x<=x2; x++)
|
||||||
|
{
|
||||||
|
if (cp)
|
||||||
|
ToolBrush(y, x, tool, cBrush);
|
||||||
|
else
|
||||||
|
ToolBrush(x, y, tool, cBrush);
|
||||||
|
e += de;
|
||||||
|
if (e >= 0.5f)
|
||||||
|
{
|
||||||
|
y += sy;
|
||||||
|
if ((!(rx+ry)) && ((y1<y2) ? (y<=y2) : (y>=y2)))
|
||||||
|
{
|
||||||
|
if (cp)
|
||||||
|
ToolBrush(y, x, tool, cBrush);
|
||||||
|
else
|
||||||
|
ToolBrush(x, y, tool, cBrush);
|
||||||
|
}
|
||||||
|
e -= 1.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void Simulation::ToolBox(int x1, int y1, int x2, int y2, int tool, Brush * cBrush)
|
||||||
|
{
|
||||||
|
int i, j;
|
||||||
|
if (x1>x2)
|
||||||
|
{
|
||||||
|
i = x2;
|
||||||
|
x2 = x1;
|
||||||
|
x1 = i;
|
||||||
|
}
|
||||||
|
if (y1>y2)
|
||||||
|
{
|
||||||
|
j = y2;
|
||||||
|
y2 = y1;
|
||||||
|
y1 = j;
|
||||||
|
}
|
||||||
|
for (j=y1; j<=y2; j++)
|
||||||
|
for (i=x1; i<=x2; i++)
|
||||||
|
ToolBrush(i, j, tool, cBrush);
|
||||||
|
}
|
||||||
|
|
||||||
//this creates particles from a brush, don't use if you want to create one particle
|
//this creates particles from a brush, don't use if you want to create one particle
|
||||||
int Simulation::CreateParts(int x, int y, int rx, int ry, int c, int flags, Brush * cBrush)
|
int Simulation::CreateParts(int x, int y, int rx, int ry, int c, int flags, Brush * cBrush)
|
||||||
{
|
{
|
||||||
@@ -3763,6 +3870,8 @@ Simulation::Simulation():
|
|||||||
elements[i] = elementList[i];
|
elements[i] = elementList[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tools = GetTools();
|
||||||
|
|
||||||
int golRulesCount;
|
int golRulesCount;
|
||||||
int * golRulesT = LoadGOLRules(golRulesCount);
|
int * golRulesT = LoadGOLRules(golRulesCount);
|
||||||
memcpy(grule, golRulesT, sizeof(int) * (golRulesCount*10));
|
memcpy(grule, golRulesT, sizeof(int) * (golRulesCount*10));
|
||||||
|
@@ -12,11 +12,11 @@
|
|||||||
#include "Renderer.h"
|
#include "Renderer.h"
|
||||||
#include "Graphics.h"
|
#include "Graphics.h"
|
||||||
#include "Elements.h"
|
#include "Elements.h"
|
||||||
|
#include "Tools.h"
|
||||||
#include "Misc.h"
|
#include "Misc.h"
|
||||||
#include "game/Brush.h"
|
#include "game/Brush.h"
|
||||||
#include "Gravity.h"
|
#include "Gravity.h"
|
||||||
#include "SimulationData.h"
|
#include "SimulationData.h"
|
||||||
//#include "ElementFunctions.h"
|
|
||||||
|
|
||||||
#define CHANNELS ((int)(MAX_TEMP-73)/100+2)
|
#define CHANNELS ((int)(MAX_TEMP-73)/100+2)
|
||||||
|
|
||||||
@@ -140,6 +140,7 @@ public:
|
|||||||
Air * air;
|
Air * air;
|
||||||
|
|
||||||
Element * elements;
|
Element * elements;
|
||||||
|
vector<SimTool*> tools;
|
||||||
unsigned int * platent;
|
unsigned int * platent;
|
||||||
wall_type wtypes[UI_WALLCOUNT];
|
wall_type wtypes[UI_WALLCOUNT];
|
||||||
gol_menu gmenu[NGOL];
|
gol_menu gmenu[NGOL];
|
||||||
@@ -245,6 +246,11 @@ public:
|
|||||||
void rotate_area(int area_x, int area_y, int area_w, int area_h, int invert);
|
void rotate_area(int area_x, int area_y, int area_w, int area_h, int invert);
|
||||||
void clear_area(int area_x, int area_y, int area_w, int area_h);
|
void clear_area(int area_x, int area_y, int area_w, int area_h);
|
||||||
|
|
||||||
|
int Tool(int x, int y, int tool, float strength);
|
||||||
|
int ToolBrush(int x, int y, int tool, Brush * cBrush);
|
||||||
|
void ToolLine(int x1, int y1, int x2, int y2, int tool, Brush * cBrush);
|
||||||
|
void ToolBox(int x1, int y1, int x2, int y2, int tool, Brush * cBrush);
|
||||||
|
|
||||||
void CreateBox(int x1, int y1, int x2, int y2, int c, int flags);
|
void CreateBox(int x1, int y1, int x2, int y2, int c, int flags);
|
||||||
int FloodParts(int x, int y, int c, int cm, int bm, int flags);
|
int FloodParts(int x, int y, int c, int cm, int bm, int flags);
|
||||||
int CreateParts(int x, int y, int rx, int ry, int c, int flags, Brush * cBrush = NULL);
|
int CreateParts(int x, int y, int rx, int ry, int c, int flags, Brush * cBrush = NULL);
|
||||||
|
@@ -156,7 +156,10 @@ struct menu_section;
|
|||||||
|
|
||||||
struct wall_type;
|
struct wall_type;
|
||||||
|
|
||||||
|
class SimTool;
|
||||||
|
|
||||||
class Element;
|
class Element;
|
||||||
|
|
||||||
std::vector<Element*> GetDefaultElements();
|
std::vector<Element*> GetDefaultElements();
|
||||||
|
|
||||||
gol_menu * LoadGOLMenu(int & golMenuCount);
|
gol_menu * LoadGOLMenu(int & golMenuCount);
|
||||||
|
7
src/simulation/Tools.h
Normal file
7
src/simulation/Tools.h
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#ifndef TOOLS_H_
|
||||||
|
#define TOOLS_H_
|
||||||
|
|
||||||
|
#include "ToolClasses.h"
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
19
src/simulation/tools/Cool.cpp
Normal file
19
src/simulation/tools/Cool.cpp
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#include "simulation/Tools.h"
|
||||||
|
//#TPT-Directive ToolClass Tool_Cool TOOL_COOL 1
|
||||||
|
Tool_Cool::Tool_Cool()
|
||||||
|
{
|
||||||
|
Identifier = "DEFAULT_TOOL_COOL";
|
||||||
|
Name = "COOL";
|
||||||
|
Colour = PIXPACK(0x00DDFF);
|
||||||
|
Description = "Cools particles";
|
||||||
|
}
|
||||||
|
|
||||||
|
int Tool_Cool::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
|
||||||
|
{
|
||||||
|
if(!cpart)
|
||||||
|
return 0;
|
||||||
|
cpart->temp -= strength;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tool_Cool::~Tool_Cool() {}
|
19
src/simulation/tools/Heat.cpp
Normal file
19
src/simulation/tools/Heat.cpp
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#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;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tool_Heat::~Tool_Heat() {}
|
10
src/simulation/tools/SimTool.cpp
Normal file
10
src/simulation/tools/SimTool.cpp
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#include "simulation/Element.h"
|
||||||
|
#include "simulation/Tools.h"
|
||||||
|
|
||||||
|
SimTool::SimTool():
|
||||||
|
Identifier("DEFAULT_TOOL_INVALID"),
|
||||||
|
Name(""),
|
||||||
|
Colour(PIXPACK(0xFFFFFF)),
|
||||||
|
Description("NULL Tool, does NOTHING")
|
||||||
|
{
|
||||||
|
}
|
23
src/simulation/tools/SimTool.h
Normal file
23
src/simulation/tools/SimTool.h
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#ifndef SIMTOOL_H
|
||||||
|
#define SIMTOOL_H
|
||||||
|
|
||||||
|
#include "simulation/Simulation.h"
|
||||||
|
#include "Renderer.h"
|
||||||
|
#include "simulation/Elements.h"
|
||||||
|
|
||||||
|
class Simulation;
|
||||||
|
struct Particle;
|
||||||
|
class SimTool
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
char *Identifier;
|
||||||
|
char *Name;
|
||||||
|
pixel Colour;
|
||||||
|
char *Description;
|
||||||
|
|
||||||
|
SimTool();
|
||||||
|
virtual ~SimTool() {}
|
||||||
|
virtual int Perform(Simulation * sim, Particle * cpart, int x, int y, float strength) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
Reference in New Issue
Block a user