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

Function Map_IsPositionUnveiled

src/map.c:341–353  ·  view source on GitHub ↗

* Check if a position is unveiled (the fog is removed). * * @param position For which position to check. * @return True if and only if the position is unveiled. */

Source from the content-addressed store, hash-verified

339 * @return True if and only if the position is unveiled.
340 */
341bool Map_IsPositionUnveiled(uint16 position)
342{
343 Tile *t;
344
345 if (g_debugScenario) return true;
346
347 t = &g_map[position];
348
349 if (!t->isUnveiled) return false;
350 if (!Tile_IsUnveiled(t->overlayTileID)) return false;
351
352 return true;
353}
354
355/**
356 * Check if a position is in the viewport.

Callers 9

Structure_PlaceFunction · 0.85
Animation_Func_StopFunction · 0.85
Map_UpdateWallFunction · 0.85
Unit_UpdateMapFunction · 0.85

Calls 1

Tile_IsUnveiledFunction · 0.85

Tested by

no test coverage detected