diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-19 16:49:40 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-19 16:49:40 (GMT) |
| commit | 4d961117bde4398ae4d72f2db96eef381371e2df (patch) | |
| tree | f11f5ceee26f9ab6a4d8de1ba4f9dcf9226701d7 /src/game/Tool.cpp | |
| parent | c2873180e224b93632daf01e40c6e6d0636bf86d (diff) | |
| download | powder-4d961117bde4398ae4d72f2db96eef381371e2df.zip powder-4d961117bde4398ae4d72f2db96eef381371e2df.tar.gz | |
Special ligh placement
Diffstat (limited to 'src/game/Tool.cpp')
| -rw-r--r-- | src/game/Tool.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/game/Tool.cpp b/src/game/Tool.cpp index 22d21ea..efe4831 100644 --- a/src/game/Tool.cpp +++ b/src/game/Tool.cpp @@ -92,5 +92,14 @@ void GolTool::DrawFill(Simulation * sim, Brush * brush, ui::Point position) { sim->FloodParts(position.X, position.Y, PT_LIFE|(toolID<<8), -1, -1, 0); } - - +void Element_LIGH_Tool::Draw(Simulation * sim, Brush * brush, ui::Point position) +{ + int p = sim->create_part(-2, position.X, position.Y, toolID); + if (p != -1) + { + sim->parts[p].life = brush->GetRadius().X+brush->GetRadius().Y; + if (sim->parts[p].life > 55) + sim->parts[p].life = 55; + sim->parts[p].temp = sim->parts[p].life*150; // temperature of the lighting shows the power of the lighting + } +}
\ No newline at end of file |
