diff options
| author | jacob1 <jfu614@gmail.com> | 2013-05-16 23:33:30 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-05-16 23:33:30 (GMT) |
| commit | 027649e85894b688d271d9b736d5ca204304de29 (patch) | |
| tree | 881e5ae7d289546fb100d9b4c926e9e33d61e40a /src/gui/game/Tool.cpp | |
| parent | 6f8e2c03456552bdd54355606b8b8389f884c06d (diff) | |
| download | powder-027649e85894b688d271d9b736d5ca204304de29.zip powder-027649e85894b688d271d9b736d5ca204304de29.tar.gz | |
lua simulation api functions for drawing with tools / deco
Diffstat (limited to 'src/gui/game/Tool.cpp')
| -rw-r--r-- | src/gui/game/Tool.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/gui/game/Tool.cpp b/src/gui/game/Tool.cpp index e33b0ce..df99e57 100644 --- a/src/gui/game/Tool.cpp +++ b/src/gui/game/Tool.cpp @@ -45,7 +45,7 @@ void Tool::DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Po sim->ToolLine(position1.X, position1.Y, position2.X, position2.Y, toolID, brush, strength); } void Tool::DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { - sim->ToolBox(position1.X, position1.Y, position2.X, position2.Y, toolID, brush, strength); + sim->ToolBox(position1.X, position1.Y, position2.X, position2.Y, toolID, strength); } void Tool::DrawFill(Simulation * sim, Brush * brush, ui::Point position) {}; @@ -110,26 +110,6 @@ void WallTool::DrawFill(Simulation * sim, Brush * brush, ui::Point position) { sim->FloodWalls(position.X, position.Y, toolID, -1, -1, 0); } - -GolTool::GolTool(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) -{ -} -GolTool::~GolTool() {} -void GolTool::Draw(Simulation * sim, Brush * brush, ui::Point position){ - sim->CreateParts(position.X, position.Y, toolID, brush); -} -void GolTool::DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2, bool dragging) { - sim->CreateLine(position1.X, position1.Y, position2.X, position2.Y, toolID, brush); -} -void GolTool::DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { - sim->CreateBox(position1.X, position1.Y, position2.X, position2.Y, toolID, 0); -} -void GolTool::DrawFill(Simulation * sim, Brush * brush, ui::Point position) { - sim->FloodParts(position.X, position.Y, toolID, -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) { |
