* Make a \a size by \a size tiles square of rubble * @param x Horizontal position of the left-most tile * @param y Vertical position of the left-most tile * @param size Size of the rubble square */
| 908 | * @param size Size of the rubble square |
| 909 | */ |
| 910 | void Micropolis::putRubble(int x, int y, int size, ToolEffects *effects) |
| 911 | { |
| 912 | for (int xx = x; xx < x + size; xx++) { |
| 913 | for (int yy = y; yy < y + size; yy++) { |
| 914 | |
| 915 | if (testBounds(xx, yy)) { |
| 916 | int tile = effects->getMapTile(xx, yy); |
| 917 | |
| 918 | if (tile != RADTILE && tile != DIRT) { |
| 919 | tile = (doAnimation ? (TINYEXP + getRandom(2)) : SOMETINYEXP); |
| 920 | effects->setMapValue(xx, yy, tile | ANIMBIT | BULLBIT); |
| 921 | } |
| 922 | } |
| 923 | } |
| 924 | } |
| 925 | } |
| 926 | |
| 927 | |
| 928 | /** |
nothing calls this directly
no test coverage detected