| 179 | } |
| 180 | |
| 181 | static void Map_InvalidateSelection(uint16 packed, bool enable) |
| 182 | { |
| 183 | uint16 x, y; |
| 184 | |
| 185 | if (packed == 0xFFFF) return; |
| 186 | |
| 187 | for (y = 0; y < g_selectionHeight; y++) { |
| 188 | for (x = 0; x < g_selectionWidth; x++) { |
| 189 | uint16 curPacked; |
| 190 | |
| 191 | curPacked = packed + Tile_PackXY(x, y); |
| 192 | |
| 193 | Map_Update(curPacked, 0, false); |
| 194 | |
| 195 | if (enable) { |
| 196 | BitArray_Set(g_displayedViewport, curPacked); |
| 197 | } else { |
| 198 | BitArray_Clear(g_displayedViewport, curPacked); |
| 199 | } |
| 200 | } |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | /** |
| 205 | * Sets the selection object to the given position. |
no test coverage detected