| 254 | } |
| 255 | |
| 256 | void Tile::updateBattlescapeUIDrawOrder() |
| 257 | { |
| 258 | if (map.ceaseUpdates) |
| 259 | { |
| 260 | return; |
| 261 | } |
| 262 | bool backFound = false; |
| 263 | bool targetFound = false; |
| 264 | |
| 265 | unsigned int object_count = (unsigned)drawnObjects[0].size(); |
| 266 | unsigned int obj_id; |
| 267 | for (obj_id = 0; obj_id < object_count; obj_id++) |
| 268 | { |
| 269 | auto &obj = drawnObjects[0][obj_id]; |
| 270 | if (!backFound && obj->getType() != TileObject::Type::Ground) |
| 271 | { |
| 272 | drawBattlescapeSelectionBackAt = obj_id; |
| 273 | backFound = true; |
| 274 | } |
| 275 | if (!targetFound && (int)obj->getType() > 3) |
| 276 | { |
| 277 | drawTargetLocationIconAt = obj_id; |
| 278 | targetFound = true; |
| 279 | } |
| 280 | } |
| 281 | if (!backFound) |
| 282 | { |
| 283 | drawBattlescapeSelectionBackAt = obj_id; |
| 284 | } |
| 285 | if (!targetFound) |
| 286 | { |
| 287 | drawTargetLocationIconAt = obj_id; |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | void Tile::updateBattlescapeUnitPresent() |
| 292 | { |
no test coverage detected