diff options
Diffstat (limited to 'src/game/Tool.h')
| -rw-r--r-- | src/game/Tool.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/game/Tool.h b/src/game/Tool.h index 440ee62..bffa967 100644 --- a/src/game/Tool.h +++ b/src/game/Tool.h @@ -53,4 +53,23 @@ public: } }; +class GolTool: public Tool +{ +public: + GolTool(int id, string name, int r, int g, int b): + Tool(id, name, r, g, b) + { + } + virtual ~GolTool() {} + virtual void Draw(Simulation * sim, Brush * brush, ui::Point position){ + sim->create_parts(position.X, position.Y, 1, 1, PT_LIFE|(toolID<<8), 0, brush); + } + virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { + sim->create_line(position1.X, position1.Y, position2.X, position2.Y, 1, 1, PT_LIFE|(toolID<<8), 0, brush); + } + virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { + sim->create_box(position1.X, position1.Y, position2.X, position2.Y, PT_LIFE|(toolID<<8), 0); + } +}; + #endif /* TOOL_H_ */ |
