diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-02-02 00:33:10 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-02-02 00:33:10 (GMT) |
| commit | f5dd32b284fd311dd58070b6f431ec535fa93387 (patch) | |
| tree | 73de79c18b3a91e72ebdb8520694ed7fd57c5999 /src/game/Tool.h | |
| parent | f86091d421989ead46940cc12b77e48cfb127608 (diff) | |
| download | powder-f5dd32b284fd311dd58070b6f431ec535fa93387.zip powder-f5dd32b284fd311dd58070b6f431ec535fa93387.tar.gz | |
Working GOL (No graphics
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_ */ |
