summaryrefslogtreecommitdiff
path: root/src/game/Tool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Tool.cpp')
-rw-r--r--src/game/Tool.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/Tool.cpp b/src/game/Tool.cpp
index b0ad67a..42f9b59 100644
--- a/src/game/Tool.cpp
+++ b/src/game/Tool.cpp
@@ -19,6 +19,7 @@ Tool::Tool(int id, string name, string description, int r, int g, int b, std::st
identifier(identifier)
{
}
+
VideoBuffer * Tool::GetTexture(int width, int height)
{
if(textureGen)
@@ -35,6 +36,7 @@ std::string Tool::GetIdentifier() { return identifier; }
string Tool::GetName() { return toolName; }
string Tool::GetDescription() { return toolDescription; }
Tool::~Tool() {}
+
void Tool::Click(Simulation * sim, Brush * brush, ui::Point position) { }
void Tool::Draw(Simulation * sim, Brush * brush, ui::Point position) {
sim->ToolBrush(position.X, position.Y, toolID, brush, strength);
@@ -47,6 +49,7 @@ void Tool::DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Po
}
void Tool::DrawFill(Simulation * sim, Brush * brush, ui::Point position) {};
+
ElementTool::ElementTool(int id, string name, string description, int r, int g, int b, std::string identifier, VideoBuffer * (*textureGen)(int, int, int)):
Tool(id, name, description, r, g, b, identifier, textureGen)
{
@@ -126,6 +129,7 @@ void GolTool::DrawFill(Simulation * sim, Brush * brush, ui::Point position) {
sim->FloodParts(position.X, position.Y, PT_LIFE|(toolID<<8), -1, -1, 0);
}
+
WindTool::WindTool(int id, string name, string description, int r, int g, int b, std::string identifier, VideoBuffer * (*textureGen)(int, int, int)):
Tool(id, name, description, r, g, b, identifier, textureGen)
{
@@ -163,7 +167,6 @@ void WindTool::DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui
}
}
void WindTool::DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {}
-
void WindTool::DrawFill(Simulation * sim, Brush * brush, ui::Point position) {}
@@ -183,6 +186,7 @@ void Element_LIGH_Tool::Draw(Simulation * sim, Brush * brush, ui::Point position
}
}
+
Element_TESC_Tool::Element_TESC_Tool(int id, string name, string description, int r, int g, int b, std::string identifier, VideoBuffer * (*textureGen)(int, int, int)):
ElementTool(id, name, description, r, g, b, identifier, textureGen)
{
@@ -204,6 +208,7 @@ void Element_TESC_Tool::DrawFill(Simulation * sim, Brush * brush, ui::Point posi
sim->FloodParts(position.X, position.Y, toolID | (radiusInfo << 8), -1, -1, 0);
}
+
void PlopTool::Click(Simulation * sim, Brush * brush, ui::Point position)
{
sim->create_part(-1, position.X, position.Y, toolID);