Changeset - r26929:c5236161bc48
[Not reviewed]
master
0 3 0
Rubidium - 17 months ago 2023-01-21 14:16:28
rubidium@openttd.org
Codechange: rename Tile to TileBase to be able to introduce a new Tile class
3 files changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/map.cpp
Show inline comments
 
@@ -27,7 +27,7 @@ extern "C" _CRTIMP void __cdecl _assert(
 
/* static */ uint Map::size;      ///< The number of tiles on the map
 
/* static */ uint Map::tile_mask; ///< _map_size - 1 (to mask the mapsize)
 

	
 
Tile *_m = nullptr;          ///< Tiles of the map
 
TileBase *_m = nullptr;          ///< Tiles of the map
 
TileExtended *_me = nullptr; ///< Extended Tiles of the map
 

	
 

	
 
@@ -59,7 +59,7 @@ TileExtended *_me = nullptr; ///< Extend
 
	free(_m);
 
	free(_me);
 

	
 
	_m = CallocT<Tile>(Map::size);
 
	_m = CallocT<TileBase>(Map::size);
 
	_me = CallocT<TileExtended>(Map::size);
 
}
 

	
src/map_func.h
Show inline comments
 
@@ -21,7 +21,7 @@
 
 * This variable points to the tile-array which contains the tiles of
 
 * the map.
 
 */
 
extern Tile *_m;
 
extern TileBase *_m;
 

	
 
/**
 
 * Pointer to the extended tile-array.
src/map_type.h
Show inline comments
 
@@ -14,7 +14,7 @@
 
 * Data that is stored per tile. Also used TileExtended for this.
 
 * Look at docs/landscape.html for the exact meaning of the members.
 
 */
 
struct Tile {
 
struct TileBase {
 
	byte   type;        ///< The type (bits 4..7), bridges (2..3), rainforest/desert (0..1)
 
	byte   height;      ///< The height of the northern corner.
 
	uint16 m2;          ///< Primarily used for indices to towns, industries and stations
 
@@ -24,10 +24,10 @@ struct Tile {
 
	byte   m5;          ///< General purpose
 
};
 

	
 
static_assert(sizeof(Tile) == 8);
 
static_assert(sizeof(TileBase) == 8);
 

	
 
/**
 
 * Data that is stored per tile. Also used Tile for this.
 
 * Data that is stored per tile. Also used TileBase for this.
 
 * Look at docs/landscape.html for the exact meaning of the members.
 
 */
 
struct TileExtended {
0 comments (0 inline, 0 general)