* Start a fire at a single tile. * @param x X coordinate in map coordinate. * @param y Y coordinate in map coordinate. */
| 1798 | * @param y Y coordinate in map coordinate. |
| 1799 | */ |
| 1800 | void Micropolis::startFire(int x, int y) |
| 1801 | { |
| 1802 | int t, z; |
| 1803 | |
| 1804 | x >>= 4; |
| 1805 | y >>= 4; |
| 1806 | |
| 1807 | if (!testBounds(x, y)) { |
| 1808 | return; |
| 1809 | } |
| 1810 | |
| 1811 | z = map[x][y]; |
| 1812 | t = z & LOMASK; |
| 1813 | |
| 1814 | if (!(z & BURNBIT) && t != DIRT) { |
| 1815 | return; |
| 1816 | } |
| 1817 | |
| 1818 | if (z & ZONEBIT) { |
| 1819 | return; |
| 1820 | } |
| 1821 | |
| 1822 | map[x][y] = randomFire(); |
| 1823 | } |
| 1824 | |
| 1825 | |
| 1826 | /** |
nothing calls this directly
no test coverage detected