MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Map_IsTileVisible

Function Map_IsTileVisible

src/map.c:570–581  ·  view source on GitHub ↗

* Checks wether a packed tile is visible in the viewport. * * @param packed The packed tile. * @return True if the tile is visible. */

Source from the content-addressed store, hash-verified

568 * @return True if the tile is visible.
569 */
570static 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 ??.

Callers 2

Map_UpdateFunction · 0.85
Map_SelectNextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected