Codechange: rename Tile to TileBase to be able to introduce a new Tile class

pull/491/head
Rubidium 1 year ago committed by rubidium42
parent 0fb0469e47
commit 7a1816a6cd

@ -27,7 +27,7 @@ extern "C" _CRTIMP void __cdecl _assert(void *, void *, unsigned);
/* 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; ///< Extended Tiles of the map
free(_m);
free(_me);
_m = CallocT<Tile>(Map::size);
_m = CallocT<TileBase>(Map::size);
_me = CallocT<TileExtended>(Map::size);
}

@ -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.

@ -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 {

Loading…
Cancel
Save