* Check whether a sprite is still entirely on-map. * @param sprite Sprite to check. * @return Sprite is at least partly off-map. */
| 452 | * @return Sprite is at least partly off-map. |
| 453 | */ |
| 454 | bool Micropolis::spriteNotInBounds(SimSprite *sprite) |
| 455 | { |
| 456 | int x = sprite->x + sprite->xHot; |
| 457 | int y = sprite->y + sprite->yHot; |
| 458 | |
| 459 | return x < 0 || y < 0 || x >= (WORLD_W <<4) || y >= (WORLD_H <<4); |
| 460 | } |
| 461 | |
| 462 | /** |
| 463 | * Get direction (0..8?) to get from starting point to destination point. |
nothing calls this directly
no outgoing calls
no test coverage detected