Add map pan

This commit is contained in:
Jan Mrna
2025-10-05 12:11:06 +02:00
committed by Mrna
parent 75eeac06df
commit f458468644
11 changed files with 219 additions and 33 deletions

View File

@@ -28,8 +28,7 @@ TilePos Map::WorldToTile(WorldPos p) const {
return TilePos{static_cast<int32_t>(p.x() / TILE_SIZE), static_cast<int32_t>(p.y() / TILE_SIZE)};
}
// TODO this should probably use something like WorldSize or WorldVec to make the distinction clear
WorldPos Map::GetTileSize() const { return WorldPos{TILE_SIZE, TILE_SIZE}; }
WorldSize Map::GetTileSize() const { return WorldSize{TILE_SIZE, TILE_SIZE}; }
const Tile *Map::GetTileAt(TilePos p) const {
assert(IsTilePosValid(p));