/// <summary> /// Recalculate FOV information based upon player location and lighit radius /// </summary> /// <param name="playerX">Player x coord</param> /// <param name="playerY">Player y coor</param> /// <param name="radius">Radius of sight. 0 means unlimited sight radius</param> /// <param name="lightwalls">Include walls in result?</param> /// <param name="algo">Algorithm to use when calculating FOV</param> public void CalculateFOV(int playerX, int playerY, int radius, bool lightwalls, FovAlgorithm algo) { TCOD_map_compute_fov(m_mapPtr, playerX, playerY, radius, lightwalls, algo); }
private extern static void TCOD_map_compute_fov(IntPtr map, int player_x, int player_y, int max_radius, bool light_walls, FovAlgorithm algo);
public void Calculate(Point center, int radius, bool lightwalls, FovAlgorithm algo) { TCOD_map_compute_fov(Handle, center.X, center.Y, radius, lightwalls, algo); }
private static extern void TCOD_map_compute_fov(IntPtr map, int player_x, int player_y, int max_radius, bool light_walls, FovAlgorithm algo);