mirror of https://github.com/OpenRCT2/OpenRCT2.git
Change last usage of GetType() and remove the method
This commit is contained in:
parent
fc3ce3294c
commit
23c5988fb1
|
@ -2263,9 +2263,9 @@ uint16_t check_max_allowable_land_rights_for_tile(const CoordsXYZ& tileMapPos)
|
|||
auto tilePos = TileCoordsXYZ{ tileMapPos };
|
||||
do
|
||||
{
|
||||
int32_t type = tileElement->GetType();
|
||||
if (type == TILE_ELEMENT_TYPE_PATH
|
||||
|| (type == TILE_ELEMENT_TYPE_ENTRANCE
|
||||
auto type = tileElement->GetTypeN();
|
||||
if (type == TileElementTypeN::Path
|
||||
|| (type == TileElementTypeN::Entrance
|
||||
&& tileElement->AsEntrance()->GetEntranceType() == ENTRANCE_TYPE_PARK_ENTRANCE))
|
||||
{
|
||||
destOwnership = OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED;
|
||||
|
|
|
@ -36,18 +36,6 @@ constexpr const uint8_t OWNER_MASK = 0b00001111;
|
|||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
enum
|
||||
{
|
||||
TILE_ELEMENT_TYPE_SURFACE = (0 << 2),
|
||||
TILE_ELEMENT_TYPE_PATH = (1 << 2),
|
||||
TILE_ELEMENT_TYPE_TRACK = (2 << 2),
|
||||
TILE_ELEMENT_TYPE_SMALL_SCENERY = (3 << 2),
|
||||
TILE_ELEMENT_TYPE_ENTRANCE = (4 << 2),
|
||||
TILE_ELEMENT_TYPE_WALL = (5 << 2),
|
||||
TILE_ELEMENT_TYPE_LARGE_SCENERY = (6 << 2),
|
||||
TILE_ELEMENT_TYPE_BANNER = (7 << 2),
|
||||
};
|
||||
|
||||
enum class TileElementTypeN : uint8_t
|
||||
{
|
||||
Surface = 0,
|
||||
|
@ -80,8 +68,6 @@ struct TileElementBase
|
|||
|
||||
void Remove();
|
||||
|
||||
uint8_t GetType() const;
|
||||
|
||||
TileElementTypeN GetTypeN() const;
|
||||
void SetTypeN(TileElementTypeN newType);
|
||||
|
||||
|
|
|
@ -10,11 +10,6 @@
|
|||
#include "Map.h"
|
||||
#include "TileElement.h"
|
||||
|
||||
uint8_t TileElementBase::GetType() const
|
||||
{
|
||||
return this->type & TILE_ELEMENT_TYPE_MASK;
|
||||
}
|
||||
|
||||
TileElementTypeN TileElementBase::GetTypeN() const
|
||||
{
|
||||
return static_cast<TileElementTypeN>((this->type & TILE_ELEMENT_TYPE_MASK) >> 2);
|
||||
|
|
Loading…
Reference in New Issue