diff options
| author | jacob1 <jfu614@gmail.com> | 2013-03-09 01:56:54 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-03-09 01:56:54 (GMT) |
| commit | f9c219da93983ca0a3c5fc7e2f0579c4a44bca40 (patch) | |
| tree | 401ba98898cc475eb5a29f927f9919dbb48c04c1 /src/game/Tool.cpp | |
| parent | 89c784fcfa80900c7925da258e91feeee2a2ab96 (diff) | |
| download | powder-f9c219da93983ca0a3c5fc7e2f0579c4a44bca40.zip powder-f9c219da93983ca0a3c5fc7e2f0579c4a44bca40.tar.gz | |
a few more memory leak fixes
Diffstat (limited to 'src/game/Tool.cpp')
| -rw-r--r-- | src/game/Tool.cpp | 7 |
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); |
