* Checks wether a packed tile is visible in the viewport. * * @param packed The packed tile. * @return True if the tile is visible. */
| 568 | * @return True if the tile is visible. |
| 569 | */ |
| 570 | static bool Map_IsTileVisible(uint16 packed) |
| 571 | { |
| 572 | uint8 x, y; |
| 573 | uint8 x2, y2; |
| 574 | |
| 575 | x = Tile_GetPackedX(packed); |
| 576 | y = Tile_GetPackedY(packed); |
| 577 | x2 = Tile_GetPackedX(g_minimapPosition); |
| 578 | y2 = Tile_GetPackedY(g_minimapPosition); |
| 579 | |
| 580 | return x >= x2 && x < x2 + 15 && y >= y2 && y < y2 + 10; |
| 581 | } |
| 582 | |
| 583 | /** |
| 584 | * Updates ??. |
no outgoing calls
no test coverage detected