* Put down a land tile. * @param mapH X coordinate of the tile. * @param mapV Y coordinate of the tile. * @return Tool result. * @todo Auto-bulldoze deducts always 1. * @todo Auto-bulldoze costs should be pulled from a table/constant. */
| 323 | * @todo Auto-bulldoze costs should be pulled from a table/constant. |
| 324 | */ |
| 325 | ToolResult Micropolis::putDownLand(short mapH, short mapV, ToolEffects *effects) |
| 326 | { |
| 327 | int tile = effects->getMapTile(mapH, mapV); |
| 328 | // static short dx[8] = { -1, 0, 1, -1, 1, -1, 0, 1, }; |
| 329 | // static short dy[8] = { -1, -1, -1, 0, 0, 1, 1, 1, }; |
| 330 | |
| 331 | |
| 332 | if (tile == DIRT) return TOOLRESULT_FAILED; |
| 333 | |
| 334 | effects->setMapValue(mapH, mapV, DIRT); |
| 335 | |
| 336 | // int i; |
| 337 | // for (i = 0; i < 8; i++) { |
| 338 | // int xx = mapH + dx[i]; |
| 339 | // int yy = mapV + dy[i]; |
| 340 | // if (testBounds(xx, yy)) { |
| 341 | // //smoothTreesAt(xx, yy, true); |
| 342 | // } |
| 343 | // } |
| 344 | |
| 345 | effects->addCost(gCostOf[TOOL_LAND]); |
| 346 | |
| 347 | return TOOLRESULT_OK; |
| 348 | } |
| 349 | |
| 350 | |
| 351 | /** |
nothing calls this directly
no test coverage detected