* Check and connect a new zone around the border. * @param xMap X coordinate of top-left tile. * @param yMap Y coordinate of top-left tile. * @param sizeX Horizontal size of the new zone. * @param sizeY Vertical size of the new zone. * @param effects Storage of the effects. */
| 565 | * @param effects Storage of the effects. |
| 566 | */ |
| 567 | void Micropolis::checkBorder(short xMap, short yMap, int sizeX, int sizeY, |
| 568 | ToolEffects *effects) |
| 569 | { |
| 570 | short cnt; |
| 571 | |
| 572 | /* this will do the upper bordering row */ |
| 573 | for (cnt = 0; cnt < sizeX; cnt++) { |
| 574 | connectTile(xMap + cnt, yMap - 1, CONNECT_TILE_FIX, effects); |
| 575 | } |
| 576 | |
| 577 | /* this will do the left bordering row */ |
| 578 | for (cnt = 0; cnt < sizeY; cnt++) { |
| 579 | connectTile(xMap - 1, yMap + cnt, CONNECT_TILE_FIX, effects); |
| 580 | } |
| 581 | |
| 582 | /* this will do the bottom bordering row */ |
| 583 | for (cnt = 0; cnt < sizeX; cnt++) { |
| 584 | connectTile(xMap + cnt, yMap + sizeY, CONNECT_TILE_FIX, effects); |
| 585 | } |
| 586 | |
| 587 | /* this will do the right bordering row */ |
| 588 | for (cnt = 0; cnt < sizeY; cnt++) { |
| 589 | connectTile(xMap + sizeX, yMap + cnt, CONNECT_TILE_FIX, effects); |
| 590 | } |
| 591 | } |
| 592 | |
| 593 | /** |
| 594 | * Put down a building, starting at (\a leftX, \a topY) with size |
nothing calls this directly
no outgoing calls
no test coverage detected