OpenTTD Source: src/map_func.h Source File

OpenTTD Source 15.0-RC2

map_func.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
10#ifndef MAP_FUNC_H
11#define MAP_FUNC_H
12
13#include "core/math_func.hpp"
14#include "tile_type.h"
15#include "map_type.h"
16#include "direction_func.h"
17
25 class Tile {
26private:
27 friend struct Map;
32 struct TileBase {
33 uint8_t type = 0;
34 uint8_t height = 0;
35 uint16_t m2 = 0;
36 uint8_t m1 = 0;
37 uint8_t m3 = 0;
38 uint8_t m4 = 0;
39 uint8_t m5 = 0;
40 };
41
42 static_assert(sizeof(TileBase) == 8);
43
48 struct TileExtended {
49 uint8_t m6 = 0;
50 uint8_t m7 = 0;
51 uint16_t m8 = 0;
52 };
53
54 static std::unique_ptr<TileBase[]> base_tiles;
55 static std::unique_ptr<TileExtended[]> extended_tiles;
56
57 TileIndex tile;
58
59public:
64 [[debug_inline]] inline Tile(TileIndex tile) : tile(tile) {}
65
70 Tile(uint tile) : tile(tile) {}
71
75 [[debug_inline]] inline constexpr operator TileIndex() const { return this->tile; }
76
80 [[debug_inline]] inline constexpr operator uint() const { return this->tile.base(); }
81
89 [[debug_inline]] inline uint8_t &type()
90 {
91 return base_tiles[this->tile.base()].type;
92 }
93
101 [[debug_inline]] inline uint8_t &height()
102 {
103 return base_tiles[this->tile.base()].height;
104 }
105
113 [[debug_inline]] inline uint8_t &m1()
114 {
115 return base_tiles[this->tile.base()].m1;
116 }
117
125 [[debug_inline]] inline uint16_t &m2()
126 {
127 return base_tiles[this->tile.base()].m2;
128 }
129
137 [[debug_inline]] inline uint8_t &m3()
138 {
139 return base_tiles[this->tile.base()].m3;
140 }
141
149 [[debug_inline]] inline uint8_t &m4()
150 {
151 return base_tiles[this->tile.base()].m4;
152 }
153
161 [[debug_inline]] inline uint8_t &m5()
162 {
163 return base_tiles[this->tile.base()].m5;
164 }
165
173 [[debug_inline]] inline uint8_t &m6()
174 {
175 return extended_tiles[this->tile.base()].m6;
176 }
177
185 [[debug_inline]] inline uint8_t &m7()
186 {
187 return extended_tiles[this->tile.base()].m7;
188 }
189
197 [[debug_inline]] inline uint16_t &m8()
198 {
199 return extended_tiles[this->tile.base()].m8;
200 }
201};
202
206 struct Map {
207private:
211 struct Iterator {
212 typedef Tile value_type;
213 typedef Tile *pointer;
214 typedef Tile &reference;
215 typedef size_t difference_type;
216 typedef std::forward_iterator_tag iterator_category;
217
218 explicit Iterator(TileIndex index) : index(index) {}
219 bool operator==(const Iterator &other) const { return this->index == other.index; }
220 Tile operator*() const { return this->index; }
221 Iterator & operator++() { this->index++; return *this; }
222 private:
223 TileIndex index;
224 };
225
226 /*
227 * Iterable ensemble of all Tiles
228 */
229 struct IterateWrapper {
230 Iterator begin() { return Iterator(TileIndex{}); }
231 Iterator end() { return Iterator(TileIndex{Map::Size()}); }
232 bool empty() { return false; }
233 };
234
235 static uint log_x;
236 static uint log_y;
237 static uint size_x;
238 static uint size_y;
239 static uint size;
240 static uint tile_mask;
241
242 static uint initial_land_count;
243
244public:
245 static void Allocate(uint size_x, uint size_y);
246 static void CountLandTiles();
247
253 [[debug_inline]] inline static uint LogX()
254 {
255 return Map::log_x;
256 }
257
263 static inline uint LogY()
264 {
265 return Map::log_y;
266 }
267
272 [[debug_inline]] inline static uint SizeX()
273 {
274 return Map::size_x;
275 }
276
281 static inline uint SizeY()
282 {
283 return Map::size_y;
284 }
285
290 [[debug_inline]] inline static uint Size()
291 {
292 return Map::size;
293 }
294
299 [[debug_inline]] inline static uint MaxX()
300 {
301 return Map::SizeX() - 1;
302 }
303
308 static inline uint MaxY()
309 {
310 return Map::SizeY() - 1;
311 }
312
318 static inline uint ScaleByLandProportion(uint n)
319 {
320 /* Use 64-bit arithmetic to avoid overflow. */
321 return static_cast<uint>(static_cast<uint64_t>(n) * Map::initial_land_count / Map::size);
322 }
323
329 static inline TileIndex WrapToMap(TileIndex tile)
330 {
331 return TileIndex{tile.base() & Map::tile_mask};
332 }
333
340 static inline uint ScaleBySize(uint n)
341 {
342 /* Subtract 12 from shift in order to prevent integer overflow
343 * for large values of n. It's safe since the min mapsize is 64x64. */
344 return CeilDiv(n << (Map::LogX() + Map::LogY() - 12), 1 << 4);
345 }
346
353 static inline uint ScaleBySize1D(uint n)
354 {
355 /* Normal circumference for the X+Y is 256+256 = 1<<9
356 * Note, not actually taking the full circumference into account,
357 * just half of it. */
358 return CeilDiv((n << Map::LogX()) + (n << Map::LogY()), 1 << 9);
359 }
360
366 static bool IsInitialized()
367 {
368 return Tile::base_tiles != nullptr;
369 }
370
375 static IterateWrapper Iterate() { return IterateWrapper(); }
376};
377
385[[debug_inline]] inline static TileIndex TileXY(uint x, uint y)
386{
387 return TileIndex{(y << Map::LogX()) + x};
388}
389
401 inline TileIndexDiff TileDiffXY(int x, int y)
402{
403 /* Multiplication gives much better optimization on MSVC than shifting.
404 * 0 << shift isn't optimized to 0 properly.
405 * Typically x and y are constants, and then this doesn't result
406 * in any actual multiplication in the assembly code.. */
407 return (y * Map::SizeX()) + x;
408}
409
416[[debug_inline]] inline static TileIndex TileVirtXY(uint x, uint y)
417{
418 return TileIndex{(y >> 4 << Map::LogX()) + (x >> 4)};
419}
420
421
427[[debug_inline]] inline static uint TileX(TileIndex tile)
428{
429 return tile.base() & Map::MaxX();
430}
431
437[[debug_inline]] inline static uint TileY(TileIndex tile)
438{
439 return tile.base() >> Map::LogX();
440}
441
452 inline TileIndexDiff ToTileIndexDiff(TileIndexDiffC tidc)
453{
454 return TileDiffXY(tidc.x, tidc.y);
455}
456
457/* Helper functions to provide explicit +=/-= operators for TileIndex and TileIndexDiff. */
458constexpr TileIndex &operator+=(TileIndex &tile, TileIndexDiff offset) { tile = tile + TileIndex(offset); return tile; }
459constexpr TileIndex &operator-=(TileIndex &tile, TileIndexDiff offset) { tile = tile - TileIndex(offset); return tile; }
460
468#ifndef _DEBUG
469 constexpr TileIndex TileAdd(TileIndex tile, TileIndexDiff offset) { return tile + offset; }
470#else
471 TileIndex TileAdd(TileIndex tile, TileIndexDiff offset);
472#endif
473
482 inline TileIndex TileAddXY(TileIndex tile, int x, int y)
483{
484 return TileAdd(tile, TileDiffXY(x, y));
485}
486
487 TileIndex TileAddWrap(TileIndex tile, int addx, int addy);
488
495 inline TileIndexDiffC TileIndexDiffCByDiagDir(DiagDirection dir)
496{
497 extern const TileIndexDiffC _tileoffs_by_diagdir[DIAGDIR_END];
498
499 assert(IsValidDiagDirection(dir));
500 return _tileoffs_by_diagdir[dir];
501}
502
509 inline TileIndexDiffC TileIndexDiffCByDir(Direction dir)
510{
511 extern const TileIndexDiffC _tileoffs_by_dir[DIR_END];
512
513 assert(IsValidDirection(dir));
514 return _tileoffs_by_dir[dir];
515}
516
527 inline TileIndex AddTileIndexDiffCWrap(TileIndex tile, TileIndexDiffC diff)
528{
529 int x = TileX(tile) + diff.x;
530 int y = TileY(tile) + diff.y;
531 /* Negative value will become big positive value after cast */
532 if ((uint)x >= Map::SizeX() || (uint)y >= Map::SizeY()) return INVALID_TILE;
533 return TileXY(x, y);
534}
535
543 inline TileIndexDiffC TileIndexToTileIndexDiffC(TileIndex tile_a, TileIndex tile_b)
544{
545 TileIndexDiffC difference;
546
547 difference.x = TileX(tile_a) - TileX(tile_b);
548 difference.y = TileY(tile_a) - TileY(tile_b);
549
550 return difference;
551}
552
553/* Functions to calculate distances */
554uint DistanceManhattan(TileIndex, TileIndex);
555uint DistanceSquare(TileIndex, TileIndex);
556uint DistanceMax(TileIndex, TileIndex);
557uint DistanceMaxPlusManhattan(TileIndex, TileIndex);
558uint DistanceFromEdge(TileIndex);
559uint DistanceFromEdgeDir(TileIndex, DiagDirection);
560
567 inline TileIndexDiff TileOffsByAxis(Axis axis)
568{
569 extern const TileIndexDiffC _tileoffs_by_axis[];
570
571 assert(IsValidAxis(axis));
572 return ToTileIndexDiff(_tileoffs_by_axis[axis]);
573}
574
582 inline TileIndexDiff TileOffsByDiagDir(DiagDirection dir)
583{
584 extern const TileIndexDiffC _tileoffs_by_diagdir[DIAGDIR_END];
585
586 assert(IsValidDiagDirection(dir));
587 return ToTileIndexDiff(_tileoffs_by_diagdir[dir]);
588}
589
596 inline TileIndexDiff TileOffsByDir(Direction dir)
597{
598 extern const TileIndexDiffC _tileoffs_by_dir[DIR_END];
599
600 assert(IsValidDirection(dir));
601 return ToTileIndexDiff(_tileoffs_by_dir[dir]);
602}
603
611 inline TileIndex TileAddByDir(TileIndex tile, Direction dir)
612{
613 return TileAdd(tile, TileOffsByDir(dir));
614}
615
623 inline TileIndex TileAddByDiagDir(TileIndex tile, DiagDirection dir)
624{
625 return TileAdd(tile, TileOffsByDiagDir(dir));
626}
627
635 inline DiagDirection DiagdirBetweenTiles(TileIndex tile_from, TileIndex tile_to)
636{
637 int dx = (int)TileX(tile_to) - (int)TileX(tile_from);
638 int dy = (int)TileY(tile_to) - (int)TileY(tile_from);
639 if (dx == 0) {
640 if (dy == 0) return INVALID_DIAGDIR;
641 return (dy < 0 ? DIAGDIR_NW : DIAGDIR_SE);
642 } else {
643 if (dy != 0) return INVALID_DIAGDIR;
644 return (dx < 0 ? DIAGDIR_NE : DIAGDIR_SW);
645 }
646}
647
653 inline TileIndex RandomTileSeed(uint32_t r)
654{
655 return Map::WrapToMap(TileIndex{r});
656}
657
664#define RandomTile() RandomTileSeed(Random())
665
666uint GetClosestWaterDistance(TileIndex tile, bool water);
667
668#endif /* MAP_FUNC_H */
Tile
Wrapper class to abstract away the way the tiles are stored.
Definition map_func.h:25
Tile::extended_tiles
static std::unique_ptr< TileExtended[]> extended_tiles
Pointer to the extended tile-array.
Definition map_func.h:55
Tile::Tile
Tile(TileIndex tile)
Create the tile wrapper for the given tile.
Definition map_func.h:64
Tile::m5
uint8_t & m5()
General purpose.
Definition map_func.h:161
Tile::m1
uint8_t & m1()
Primarily used for ownership information.
Definition map_func.h:113
Tile::base_tiles
static std::unique_ptr< TileBase[]> base_tiles
Pointer to the tile-array.
Definition map_func.h:54
Tile::height
uint8_t & height()
The height of the northern corner.
Definition map_func.h:101
Tile::m4
uint8_t & m4()
General purpose.
Definition map_func.h:149
Tile::Tile
Tile(uint tile)
Create the tile wrapper for the given tile.
Definition map_func.h:70
Tile::m6
uint8_t & m6()
General purpose.
Definition map_func.h:173
Tile::type
uint8_t & type()
The type (bits 4..7), bridges (2..3), rainforest/desert (0..1)
Definition map_func.h:89
Tile::m7
uint8_t & m7()
Primarily used for newgrf support.
Definition map_func.h:185
Tile::m3
uint8_t & m3()
General purpose.
Definition map_func.h:137
Tile::m8
uint16_t & m8()
General purpose.
Definition map_func.h:197
Tile::m2
uint16_t & m2()
Primarily used for indices to towns, industries and stations.
Definition map_func.h:125
Tile::tile
TileIndex tile
The tile to access the map data for.
Definition map_func.h:57
direction_func.h
Different functions related to conversions between directions.
IsValidAxis
bool IsValidAxis(Axis d)
Checks if an integer value is a valid Axis.
Definition direction_func.h:43
IsValidDiagDirection
bool IsValidDiagDirection(DiagDirection d)
Checks if an integer value is a valid DiagDirection.
Definition direction_func.h:21
IsValidDirection
bool IsValidDirection(Direction d)
Checks if an integer value is a valid Direction.
Definition direction_func.h:32
Direction
Direction
Defines the 8 directions on the map.
Definition direction_type.h:24
DIR_END
@ DIR_END
Used to iterate.
Definition direction_type.h:34
Axis
Axis
Allow incrementing of DiagDirDiff variables.
Definition direction_type.h:123
DiagDirection
DiagDirection
Enumeration for diagonal directions.
Definition direction_type.h:78
DIAGDIR_NE
@ DIAGDIR_NE
Northeast, upper right on your monitor.
Definition direction_type.h:80
DIAGDIR_NW
@ DIAGDIR_NW
Northwest.
Definition direction_type.h:83
DIAGDIR_SE
@ DIAGDIR_SE
Southeast.
Definition direction_type.h:81
DIAGDIR_END
@ DIAGDIR_END
Used for iterations.
Definition direction_type.h:84
INVALID_DIAGDIR
@ INVALID_DIAGDIR
Flag for an invalid DiagDirection.
Definition direction_type.h:85
DIAGDIR_SW
@ DIAGDIR_SW
Southwest.
Definition direction_type.h:82
_tileoffs_by_axis
const TileIndexDiffC _tileoffs_by_axis[]
'Lookup table' for tile offsets given an Axis
_tileoffs_by_dir
const TileIndexDiffC _tileoffs_by_dir[]
'Lookup table' for tile offsets given a Direction
_tileoffs_by_diagdir
const TileIndexDiffC _tileoffs_by_diagdir[]
'Lookup table' for tile offsets given a DiagDirection
DiagdirBetweenTiles
DiagDirection DiagdirBetweenTiles(TileIndex tile_from, TileIndex tile_to)
Determines the DiagDirection to get from one tile to another.
Definition map_func.h:635
TileAddXY
TileIndex TileAddXY(TileIndex tile, int x, int y)
Adds a given offset to a tile.
Definition map_func.h:482
TileVirtXY
static TileIndex TileVirtXY(uint x, uint y)
Get a tile from the virtual XY-coordinate.
Definition map_func.h:416
DistanceMaxPlusManhattan
uint DistanceMaxPlusManhattan(TileIndex, TileIndex)
Max + Manhattan.
Definition map.cpp:206
AddTileIndexDiffCWrap
TileIndex AddTileIndexDiffCWrap(TileIndex tile, TileIndexDiffC diff)
Add a TileIndexDiffC to a TileIndex and returns the new one.
Definition map_func.h:527
TileAddByDir
TileIndex TileAddByDir(TileIndex tile, Direction dir)
Adds a Direction to a tile.
Definition map_func.h:611
ToTileIndexDiff
TileIndexDiff ToTileIndexDiff(TileIndexDiffC tidc)
Return the offset between two tiles from a TileIndexDiffC struct.
Definition map_func.h:452
TileAddByDiagDir
TileIndex TileAddByDiagDir(TileIndex tile, DiagDirection dir)
Adds a DiagDir to a tile.
Definition map_func.h:623
DistanceMax
uint DistanceMax(TileIndex, TileIndex)
also known as L-Infinity-Norm
Definition map.cpp:190
RandomTileSeed
TileIndex RandomTileSeed(uint32_t r)
Get a random tile out of a given seed.
Definition map_func.h:653
TileDiffXY
TileIndexDiff TileDiffXY(int x, int y)
Calculates an offset for the given coordinate(-offset).
Definition map_func.h:401
TileOffsByAxis
TileIndexDiff TileOffsByAxis(Axis axis)
Convert an Axis to a TileIndexDiff.
Definition map_func.h:567
TileXY
static TileIndex TileXY(uint x, uint y)
Returns the TileIndex of a coordinate.
Definition map_func.h:385
DistanceFromEdgeDir
uint DistanceFromEdgeDir(TileIndex, DiagDirection)
distance from the map edge in given direction
Definition map.cpp:235
DistanceFromEdge
uint DistanceFromEdge(TileIndex)
shortest distance from any edge of the map
Definition map.cpp:218
TileY
static uint TileY(TileIndex tile)
Get the Y component of a tile.
Definition map_func.h:437
TileAddWrap
TileIndex TileAddWrap(TileIndex tile, int addx, int addy)
This function checks if we add addx/addy to tile, if we do wrap around the edges.
Definition map.cpp:109
DistanceSquare
uint DistanceSquare(TileIndex, TileIndex)
Euclidean- or L2-Norm squared.
Definition map.cpp:175
TileIndexDiffCByDiagDir
TileIndexDiffC TileIndexDiffCByDiagDir(DiagDirection dir)
Returns the TileIndexDiffC offset from a DiagDirection.
Definition map_func.h:495
GetClosestWaterDistance
uint GetClosestWaterDistance(TileIndex tile, bool water)
Finds the distance for the closest tile with water/land given a tile.
Definition map.cpp:252
TileX
static uint TileX(TileIndex tile)
Get the X component of a tile.
Definition map_func.h:427
DistanceManhattan
uint DistanceManhattan(TileIndex, TileIndex)
also known as L1-Norm. Is the shortest distance one could go over diagonal tracks (or roads)
Definition map.cpp:158
TileAdd
constexpr TileIndex TileAdd(TileIndex tile, TileIndexDiff offset)
Adds a given offset to a tile.
Definition map_func.h:469
TileIndexDiffCByDir
TileIndexDiffC TileIndexDiffCByDir(Direction dir)
Returns the TileIndexDiffC offset from a Direction.
Definition map_func.h:509
TileOffsByDir
TileIndexDiff TileOffsByDir(Direction dir)
Convert a Direction to a TileIndexDiff.
Definition map_func.h:596
TileOffsByDiagDir
TileIndexDiff TileOffsByDiagDir(DiagDirection dir)
Convert a DiagDirection to a TileIndexDiff.
Definition map_func.h:582
TileIndexToTileIndexDiffC
TileIndexDiffC TileIndexToTileIndexDiffC(TileIndex tile_a, TileIndex tile_b)
Returns the diff between two tiles.
Definition map_func.h:543
map_type.h
Types related to maps.
TileIndexDiff
int32_t TileIndexDiff
An offset value between two tiles.
Definition map_type.h:23
math_func.hpp
Integer math functions.
CeilDiv
constexpr uint CeilDiv(uint a, uint b)
Computes ceil(a / b) for non-negative a and b.
Definition math_func.hpp:310
Map::IterateWrapper
Definition map_func.h:229
Map::Iterator
Iterator to iterate all Tiles.
Definition map_func.h:211
Map
Size related data of the map.
Definition map_func.h:206
Map::SizeX
static uint SizeX()
Get the size of the map along the X.
Definition map_func.h:272
Map::WrapToMap
static TileIndex WrapToMap(TileIndex tile)
'Wraps' the given "tile" so it is within the map.
Definition map_func.h:329
Map::ScaleBySize
static uint ScaleBySize(uint n)
Scales the given value by the map size, where the given value is for a 256 by 256 map.
Definition map_func.h:340
Map::SizeY
static uint SizeY()
Get the size of the map along the Y.
Definition map_func.h:281
Map::Iterate
static IterateWrapper Iterate()
Returns an iterable ensemble of all Tiles.
Definition map_func.h:375
Map::size
static uint size
The number of tiles on the map.
Definition map_func.h:239
Map::LogX
static uint LogX()
Logarithm of the map size along the X side.
Definition map_func.h:253
Map::ScaleByLandProportion
static uint ScaleByLandProportion(uint n)
Scales the given value by the number of water tiles.
Definition map_func.h:318
Map::size_x
static uint size_x
Size of the map along the X.
Definition map_func.h:237
Map::tile_mask
static uint tile_mask
_map_size - 1 (to mask the mapsize)
Definition map_func.h:240
Map::size_y
static uint size_y
Size of the map along the Y.
Definition map_func.h:238
Map::ScaleBySize1D
static uint ScaleBySize1D(uint n)
Scales the given value by the maps circumference, where the given value is for a 256 by 256 map.
Definition map_func.h:353
Map::LogY
static uint LogY()
Logarithm of the map size along the y side.
Definition map_func.h:263
Map::IsInitialized
static bool IsInitialized()
Check whether the map has been initialized, as to not try to save the map during crashlog when the ma...
Definition map_func.h:366
Map::initial_land_count
static uint initial_land_count
Initial number of land tiles on the map.
Definition map_func.h:242
Map::MaxY
static uint MaxY()
Gets the maximum Y coordinate within the map, including MP_VOID.
Definition map_func.h:308
Map::MaxX
static uint MaxX()
Gets the maximum X coordinate within the map, including MP_VOID.
Definition map_func.h:299
Map::log_y
static uint log_y
2^_map_log_y == _map_size_y
Definition map_func.h:236
Map::log_x
static uint log_x
2^_map_log_x == _map_size_x
Definition map_func.h:235
Map::Allocate
static void Allocate(uint size_x, uint size_y)
(Re)allocates a map with the given dimension
Definition map.cpp:37
Map::Size
static uint Size()
Get the size of the map.
Definition map_func.h:290
StrongType::Typedef< uint32_t, struct TileIndexTag, StrongType::Compare, StrongType::Integer, StrongType::Compatible< int32_t >, StrongType::Compatible< int64_t > >
TileIndexDiffC
A pair-construct of a TileIndexDiff.
Definition map_type.h:31
TileIndexDiffC::x
int16_t x
The x value of the coordinate.
Definition map_type.h:32
TileIndexDiffC::y
int16_t y
The y value of the coordinate.
Definition map_type.h:33
Tile::TileBase
Data that is stored per tile.
Definition map_func.h:32
Tile::TileBase::m3
uint8_t m3
General purpose.
Definition map_func.h:37
Tile::TileBase::m4
uint8_t m4
General purpose.
Definition map_func.h:38
Tile::TileBase::type
uint8_t type
The type (bits 4..7), bridges (2..3), rainforest/desert (0..1)
Definition map_func.h:33
Tile::TileBase::m5
uint8_t m5
General purpose.
Definition map_func.h:39
Tile::TileBase::height
uint8_t height
The height of the northern corner.
Definition map_func.h:34
Tile::TileBase::m1
uint8_t m1
Primarily used for ownership information.
Definition map_func.h:36
Tile::TileBase::m2
uint16_t m2
Primarily used for indices to towns, industries and stations.
Definition map_func.h:35
Tile::TileExtended
Data that is stored per tile.
Definition map_func.h:48
Tile::TileExtended::m6
uint8_t m6
General purpose.
Definition map_func.h:49
Tile::TileExtended::m7
uint8_t m7
Primarily used for newgrf support.
Definition map_func.h:50
Tile::TileExtended::m8
uint16_t m8
General purpose.
Definition map_func.h:51
tile_type.h
Types related to tiles.
INVALID_TILE
constexpr TileIndex INVALID_TILE
The very nice invalid tile marker.
Definition tile_type.h:95
TileIndex
StrongType::Typedef< uint32_t, struct TileIndexTag, StrongType::Compare, StrongType::Integer, StrongType::Compatible< int32_t >, StrongType::Compatible< int64_t > > TileIndex
The index/ID of a Tile.
Definition tile_type.h:87