20extern ObjectPool _object_pool;
23struct Object : ObjectPool::PoolItem<&_object_pool> {
79 static std::array<uint16_t, NUM_OBJECTS>
counts;
91extern std::vector<ClearedObjectArea> _cleared_object_areas;
ClearedObjectArea * FindClearedObject(TileIndex tile)
Find the entry in _cleared_object_areas which occupies a certain tile.
Types related to object tiles.
uint16_t ObjectType
Types of objects.
PoolID< uint32_t, struct ObjectIDTag, 0xFF0000, 0xFFFFFFFF > ObjectID
Unique identifier for an object.
static const ObjectType INVALID_OBJECT_TYPE
An invalid object.
static const ObjectType NUM_OBJECTS
Number of supported objects overall.
Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle,...
Keeps track of removed objects during execution/testruns of commands.
TileArea area
The area of the object.
TileIndex first_tile
The first tile being cleared, which then causes the whole object to be cleared.
An object, such as transmitter, on the map.
ObjectType type
Type of the object.
Town * town
Town the object is built in.
static std::array< uint16_t, NUM_OBJECTS > counts
Number of objects per type ingame.
static uint16_t GetTypeCount(ObjectType type)
Get the count of objects for this type.
static Object * GetByTile(TileIndex tile)
Get the object associated with a tile.
static void IncTypeCount(ObjectType type)
Increment the count of objects for this type.
TimerGameCalendar::Date build_date
Date of construction.
uint8_t view
The view setting for this object.
TileArea location
Location of the object.
uint8_t colour
Colour of the object, for display purpose.
static void DecTypeCount(ObjectType type)
Decrement the count of objects for this type.
static void ResetTypeCounts()
Resets object counts.
~Object()
Make sure the right destructor is called as well!
Base class for all pools.
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.
constexpr TileIndex INVALID_TILE
The very nice invalid tile marker.
Type for storing the 'area' of something uses on the map.
OrthogonalTileArea TileArea
Shorthand for the much more common orthogonal tile area.
Definition of the game-calendar-timer.