mirror of
https://github.com/kwsch/NHSE.git
synced 2026-04-17 06:06:10 -05:00
rewritten core side to include tons more metadata/structure need to rewrite renderer to output full map image rather than skipping sea
33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace NHSE.Core;
|
|
|
|
/// <summary>
|
|
/// Logic for interacting with a map's building layer.
|
|
/// </summary>
|
|
public interface ILayerBuilding
|
|
{
|
|
/// <summary>
|
|
/// Instantiated list of all buildings on the map.
|
|
/// </summary>
|
|
IReadOnlyList<Building> Buildings { get; init; }
|
|
|
|
/// <summary>
|
|
/// Converts relative building coordinates to absolute coordinates in the map grid.
|
|
/// </summary>
|
|
/// <param name="relX">Relative building X coordinate</param>
|
|
/// <param name="relY">Relative building Y coordinate</param>
|
|
/// <returns>Map absolute X/Y coordinates</returns>
|
|
(int X, int Y) GetCoordinatesAbsolute(ushort relX, ushort relY);
|
|
|
|
/// <summary>
|
|
/// Converts absolute map grid coordinates to relative building coordinates.
|
|
/// </summary>
|
|
/// <param name="absX">Map absolute X coordinate</param>
|
|
/// <param name="absY">Map absolute Y coordinate</param>
|
|
/// <returns>Relative building X/Y coordinates</returns>
|
|
(int X, int Y) GetCoordinatesRelative(int absX, int absY);
|
|
|
|
Building this[int i] { get; }
|
|
int Count { get; }
|
|
} |