diff options
| author | jacob1 <jfu614@gmail.com> | 2013-07-12 02:43:36 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-07-12 02:43:36 (GMT) |
| commit | a06202c78f392db833733d621974af1edcdb1cec (patch) | |
| tree | 14448710c9699662ca0ca72acb187c18dd1dc6ee /src/gui/game/Tool.cpp | |
| parent | 4f5c4536439dc546c6ea0a7aadbeb9e481cf8031 (diff) | |
| download | powder-a06202c78f392db833733d621974af1edcdb1cec.zip powder-a06202c78f392db833733d621974af1edcdb1cec.tar.gz | |
fixes to wall and particle floodfill. Wall fill ignores particles and always goes to the edges, while particle fill will only ignore walls it can't exist in, and flood particle erase won't check for walls / edges at all
Diffstat (limited to 'src/gui/game/Tool.cpp')
| -rw-r--r-- | src/gui/game/Tool.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/game/Tool.cpp b/src/gui/game/Tool.cpp index bdc1801..97ab634 100644 --- a/src/gui/game/Tool.cpp +++ b/src/gui/game/Tool.cpp @@ -65,7 +65,7 @@ void ElementTool::DrawRect(Simulation * sim, Brush * brush, ui::Point position1, sim->CreateBox(position1.X, position1.Y, position2.X, position2.Y, toolID); } void ElementTool::DrawFill(Simulation * sim, Brush * brush, ui::Point position) { - sim->FloodParts(position.X, position.Y, toolID, -1, -1); + sim->FloodParts(position.X, position.Y, toolID, -1); } @@ -87,7 +87,7 @@ void WallTool::DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui newFanVelX *= strength; float newFanVelY = (position2.Y-position1.Y)*0.005f; newFanVelY *= strength; - sim->FloodWalls(position1.X, position1.Y, WL_FLOODHELPER, -1, WL_FAN, 0); + sim->FloodWalls(position1.X, position1.Y, WL_FLOODHELPER, WL_FAN, 0); for (int j = 0; j < YRES/CELL; j++) for (int i = 0; i < XRES/CELL; i++) if (sim->bmap[j][i] == WL_FLOODHELPER) @@ -107,7 +107,7 @@ void WallTool::DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui } void WallTool::DrawFill(Simulation * sim, Brush * brush, ui::Point position) { if (toolID != WL_STREAM) - sim->FloodWalls(position.X, position.Y, toolID, -1, -1); + sim->FloodWalls(position.X, position.Y, toolID, -1); } WindTool::WindTool(int id, string name, string description, int r, int g, int b, std::string identifier, VideoBuffer * (*textureGen)(int, int, int)): @@ -185,7 +185,7 @@ void Element_TESC_Tool::DrawRect(Simulation * sim, Brush * brush, ui::Point posi } void Element_TESC_Tool::DrawFill(Simulation * sim, Brush * brush, ui::Point position) { int radiusInfo = brush->GetRadius().X*4+brush->GetRadius().Y*4+7; - sim->FloodParts(position.X, position.Y, toolID | (radiusInfo << 8), -1, -1); + sim->FloodParts(position.X, position.Y, toolID | (radiusInfo << 8), -1); } |
