OpenTTD Source
20240917-master-g9ab0a47812
|
Go to the documentation of this file.
41 #include "table/strings.h"
120 assert(o->
town !=
nullptr);
131 if (remove) RemoveDockingTile(t);
153 #define GetCompanyHQSize GetAnimationFrame
155 #define IncreaseCompanyHQSize IncreaseAnimationStage
167 if (score >= 170) val++;
168 if (score >= 350) val++;
169 if (score >= 520) val++;
170 if (score >= 720) val++;
186 if (owner != c->
index)
continue;
192 const Livery *l = c->livery;
212 if (type >= ObjectSpec::Count())
return CMD_ERROR;
224 int size_x =
GB(spec->
size,
HasBit(view, 0) ? 4 : 0, 4);
225 int size_y =
GB(spec->
size,
HasBit(view, 0) ? 0 : 4, 4);
286 if (ret.
Failed())
return ret;
304 if (cost.
Failed())
return cost;
316 uint build_object_size = 1;
355 build_object_size = size_x * size_y;
394 if (type >= ObjectSpec::Count())
return CMD_ERROR;
403 bool had_success =
false;
414 if (c !=
nullptr && limit-- <= 0)
break;
426 if (ret.
GetCost() > 0 && money < 0)
break;
432 return had_success ? cost : last_error;
437 static void DrawTile_Object(
TileInfo *ti)
456 dts = &_objects[type];
463 case SPR_FLAT_BARE_LAND: DrawClearLandTile(ti, 0);
break;
464 case SPR_FLAT_1_THIRD_GRASS_TILE: DrawClearLandTile(ti, 1);
break;
465 case SPR_FLAT_2_THIRD_GRASS_TILE: DrawClearLandTile(ti, 2);
break;
466 case SPR_FLAT_GRASS_TILE: DrawClearLandTile(ti, 3);
break;
477 dtss->image.
sprite, palette,
478 ti->
x + dtss->
delta_x, ti->
y + dtss->delta_y,
479 dtss->size_x, dtss->size_y,
480 dtss->size_z, ti->
z + dtss->
delta_z,
492 static int GetSlopePixelZ_Object(
TileIndex tile, uint x, uint y,
bool)
518 MakeWaterKeepingClass(tile_cur,
GetTileOwner(tile_cur));
523 std::vector<ClearedObjectArea> _cleared_object_areas;
535 if (coa.area.Intersects(ta))
return &coa;
564 }
else if (_game_mode == GM_EDITOR) {
613 _cleared_object_areas.push_back({tile, ta});
620 static void AddAcceptedCargo_Object(
TileIndex tile,
CargoArray &acceptance, CargoTypes &always_accepted)
634 acceptance[pass] += std::max(1U, level);
635 SetBit(always_accepted, pass);
642 CargoID mail = GetCargoIDByLabel(CT_MAIL);
644 acceptance[mail] += std::max(1U, level / 2);
645 SetBit(always_accepted, mail);
655 CargoID mail = GetCargoIDByLabel(CT_MAIL);
672 static void TileLoop_Object(
TileIndex tile)
698 uint amt =
GB(r, 0, 8) / 8 / 4 + 1;
712 CargoID mail = GetCargoIDByLabel(CT_MAIL);
714 uint amt =
GB(r, 8, 8) / 8 / 4 + 1;
732 static bool ClickTile_Object(
TileIndex tile)
740 static void AnimateTile_Object(
TileIndex tile)
766 int perimeter = (
GB(r, 16, 16) % (2 * (maxx + maxy))) - maxy;
768 for (dir =
DIAGDIR_NE; perimeter > 0; dir++) {
784 for (
int j = 0; j < 19; j++) {
815 void GenerateObjects()
821 uint num_water_tiles = 0;
827 for (uint y = 1; y <
Map::MaxY() - 1; y++) {
834 for (
const auto &spec : ObjectSpec::Specs()) {
855 switch (spec.
Index()) {
878 bool do_clear =
false;
947 GetSlopePixelZ_Object,
949 AddAcceptedCargo_Object,
951 GetTileTrackStatus_Object,
955 ChangeTileOwner_Object,
956 AddProducedCargo_Object,
958 GetFoundation_Object,
959 TerraformTile_Object,
static debug_inline uint TileY(TileIndex tile)
Get the Y component of a tile.
@ MP_CLEAR
A tile without any structures, i.e. grass, rocks, farm fields etc.
static const uint8_t OBJECT_SIZE_1X1
The value of a NewGRF's size property when the object is 1x1 tiles: low nibble for X,...
void DeleteNewGRFInspectWindow(GrfSpecFeature feature, uint index)
Delete inspect window for a given feature and index.
bool IsTileFlat(TileIndex tile, int *h)
Check if a given tile is flat.
const char * grf
newGRF used for the tile contents
@ OWNER_DEITY
The object is owned by a superuser / goal script.
@ CBID_OBJECT_COLOUR
Called to determine the colour of a town building.
@ DIAGDIR_NE
Northeast, upper right on your monitor.
Cheat magic_bulldozer
dynamite industries, objects
constexpr T SetBit(T &x, const uint8_t y)
Set a bit in a variable.
Structure contains cached list of stations nearby.
@ OAT_256_TICKS
Triggered every 256 ticks (for all tiles at the same time).
static Titem * Get(size_t index)
Returns Titem with given index.
@ OBJECT_FLAG_CANNOT_REMOVE
Object can not be removed.
@ OBJECT_FLAG_2CC_COLOUR
Object wants 2CC colour mapping.
@ CBID_OBJECT_LAND_SLOPE_CHECK
Callback done for each tile of an object to check the slope.
void SetWindowDirty(WindowClass cls, WindowNumber number)
Mark window as dirty (in need of repainting)
int GetTileMaxZ(TileIndex t)
Get top height of the tile inside the map.
ClearedObjectArea * FindClearedObject(TileIndex tile)
Find the entry in _cleared_object_areas which occupies a certain tile.
static uint16_t counts[NUM_OBJECTS]
Number of objects per type ingame.
Allow incrementing of ObjectClassID variables.
GRFFilePropsBase< 2 > grf_prop
Properties related the the grf file.
uint16_t GetObjectCallback(CallbackID callback, uint32_t param1, uint32_t param2, const ObjectSpec *spec, Object *o, TileIndex tile, uint8_t view)
Perform a callback for an object.
static Titem * GetIfValid(size_t index)
Returns Titem with given index.
static const CommandCost CMD_ERROR
Define a default return value for a failed command.
Foundation FlatteningFoundation(Slope s)
Returns the foundation needed to flatten a slope.
Tile information, used while rendering the tile.
WaterClass GetWaterClass(Tile t)
Get the water class at a tile.
CompanyMask statues
which companies have a statue?
static debug_inline uint MaxX()
Gets the maximum X coordinate within the map, including MP_VOID.
static bool HasTransmitter(TileIndex tile, void *)
Helper function for CircularTileSearch.
void BuildObject(ObjectType type, TileIndex tile, CompanyID owner, Town *town, uint8_t view)
Actually build the object.
void MakeObject(Tile t, Owner o, ObjectID index, WaterClass wc, uint8_t random)
Make an Object tile.
void MultiplyCost(int factor)
Multiplies the cost of the command by the given factor.
Owner owner[4]
Name of the owner(s)
Slope GetTileSlope(TileIndex tile)
Return the slope of a given tile inside the map.
static void InvalidateAllFrom(SourceType src_type, SourceID src)
Invalidates (sets source_id to INVALID_SOURCE) all cargo packets from given source.
@ INVALID_OWNER
An invalid owner.
TileArea location
Location of the object.
@ OBJECT_FLAG_SCALE_BY_WATER
Object count is roughly scaled by water amount at edges.
constexpr static debug_inline uint GB(const T x, const uint8_t s, const uint8_t n)
Fetch n bits from x, started at bit s.
@ OBJECT_FLAG_ALLOW_UNDER_BRIDGE
Object can built under a bridge.
static uint ScaleBySize1D(uint n)
Scales the given value by the maps circumference, where the given value is for a 256 by 256 map.
bool AutoslopeEnabled()
Tests if autoslope is enabled for _current_company.
Owner
Enum for all companies/owners.
bool IsTransparencySet(TransparencyOption to)
Check if the transparency option bit is set and if we aren't in the game menu (there's never transpar...
Tindex index
Index of this pool item.
Axis DiagDirToAxis(DiagDirection d)
Convert a DiagDirection to the axis.
static Object * GetByTile(TileIndex tile)
Get the object associated with a tile.
bool IsAvailable() const
Check whether the object is available at this time.
#define GetCompanyHQSize
We encode the company HQ size in the animation stage.
Class for storing amounts of cargo.
uint8_t generate_amount
Number of objects which are attempted to be generated per 256^2 map during world generation.
SpriteID sprite
The 'real' sprite.
int GetBridgeHeight(TileIndex t)
Get the height ('z') of a bridge.
constexpr TileIndex INVALID_TILE
The very nice invalid tile marker.
static bool TryBuildLightHouse()
Try to build a lighthouse.
static std::unique_ptr< TileIterator > Create(TileIndex corner1, TileIndex corner2, bool diagonal)
Create either an OrthogonalTileIterator or DiagonalTileIterator given the diagonal parameter.
void TriggerObjectTileAnimation(Object *o, TileIndex tile, ObjectAnimationTrigger trigger, const ObjectSpec *spec)
Trigger the update of animation on a single tile.
uint8_t height
The height of this structure, in heightlevels; max MAX_TILE_HEIGHT.
@ OBJECT_FLAG_ONLY_IN_GAME
Object can only be built in game.
static constexpr bool IsSteepSlope(Slope s)
Checks if a slope is steep.
static const ObjectType OBJECT_STATUE
Statue in towns.
static const ObjectType NUM_OBJECTS
Number of supported objects overall.
uint GetPartialPixelZ(int x, int y, Slope corners)
Determines height at given coordinate of a slope.
DiagDirection
Enumeration for diagonal directions.
void DrawBridgeMiddle(const TileInfo *ti)
Draw the middle bits of a bridge.
Wrapper class to abstract away the way the tiles are stored.
@ DC_NO_WATER
don't allow building on water
GRFConfig * GetGRFConfig(uint32_t grfid, uint32_t mask)
Retrieve a NewGRF from the current config by its grfid.
int y
Y position of the tile in unit coordinates.
void DrawNewObjectTile(TileInfo *ti, const ObjectSpec *spec)
Draw an object on the map.
@ WC_COMPANY
Company view; Window numbers:
bool IsWaterTile(Tile t)
Is it a water tile with plain water?
CommandCost CmdBuildObjectArea(DoCommandFlag flags, TileIndex tile, TileIndex start_tile, ObjectType type, uint8_t view, bool diagonal)
Construct multiple objects in an area.
static uint ScaleBySize(uint n)
Scales the given value by the map size, where the given value is for a 256 by 256 map.
Money CalculateCompanyValue(const Company *c, bool including_loan=true)
Calculate the value of the company.
@ DC_EXEC
execute the given command
static const ObjectSpec * Get(ObjectType index)
Get the specification associated with a specific ObjectType.
uint32_t PaletteID
The number of the palette.
Tile description for the 'land area information' tool.
DoCommandFlag
List of flags for a command.
Foundation
Enumeration for Foundations.
void TriggerObjectAnimation(Object *o, ObjectAnimationTrigger trigger, const ObjectSpec *spec)
Trigger the update of animation on a whole object.
uint16_t h
The height of the area.
CommandCost EnsureNoVehicleOnGround(TileIndex tile)
Ensure there is no vehicle at the ground at the given position.
static void IncTypeCount(ObjectType type)
Increment the count of objects for this type.
void IncreaseGeneratingWorldProgress(GenWorldProgress cls)
Increases the current stage of the world generation with one.
static void IncreaseAnimationStage(TileIndex tile)
Increase the animation stage of a whole structure.
Money GetClearCost() const
Get the cost for clearing a structure of this type.
bool Succeeded() const
Did this command succeed?
#define IncreaseCompanyHQSize
We encode the company HQ size in the animation stage.
uint16_t callback_mask
Bitmask of requested/allowed callbacks.
@ Headquarters
Source/destination are company headquarters.
Slope tileh
Slope of the tile.
static void ReallyClearObjectTile(Object *o)
Perform the actual removal of the object from the map.
void ChangeTileOwner(TileIndex tile, Owner old_owner, Owner new_owner)
Change the owner of a tile.
static const ObjectType NEW_OBJECT_OFFSET
Offset for new objects.
uint ScaleByCargoScale(uint num, bool town)
Scale a number by the cargo scale setting.
bool IsInvisibilitySet(TransparencyOption to)
Check if the invisibility option bit is set and if we aren't in the game menu (there's never transpar...
PalSpriteID ground
Palette and sprite for the ground.
TimerGameCalendar::Date build_date
Date of construction of tile contents.
bool IsObjectType(Tile t, ObjectType type)
Check whether the object on a tile is of a specific type.
TransportType
Available types of transport.
uint8_t size
The size of this objects; low nibble for X, high nibble for Y.
CommandCost CheckOwnership(Owner owner, TileIndex tile)
Check whether the current owner owns something.
#define return_cmd_error(errcode)
Returns from a function with a specific StringID as error.
Money GetAvailableMoneyForCommand()
This functions returns the money which can be used to execute a command.
Common return value for all commands.
uint8_t view
The view setting for this object.
bool CircularTileSearch(TileIndex *tile, uint size, TestTileOnSearchProc proc, void *user_data)
Function performing a search around a center tile and going outward, thus in circle.
@ WC_TOWN_AUTHORITY
Town authority; Window numbers:
@ OWNER_NONE
The tile has no ownership.
uint16_t ObjectType
Types of objects.
void DirtyCompanyInfrastructureWindows(CompanyID company)
Redraw all windows with company infrastructure counts.
static constexpr int GetSlopeMaxZ(Slope s)
Returns the height of the highest corner of a slope relative to TileZ (= minimal height)
Town * CalcClosestTownFromTile(TileIndex tile, uint threshold=UINT_MAX)
Return the town closest to the given tile within threshold.
bool WasEverAvailable() const
Check whether the object was available at some point in the past or present in this game with the cur...
std::tuple< Slope, int > GetTilePixelSlope(TileIndex tile)
Return the slope of a given tile.
@ OBJECT_FLAG_ANIMATION
Object has animated tiles.
@ OBJECT_FLAG_AUTOREMOVE
Object get automatically removed (like "owned land").
@ MP_OBJECT
Contains objects such as transmitters and owned land.
int8_t delta_z
0x80 identifies child sprites
Cheats _cheats
All the cheats.
@ WATER_CLASS_INVALID
Used for industry tiles on land (also for oilrig if newgrf says so).
bool Failed() const
Did this command fail?
An object, such as transmitter, on the map.
Represents the covered area of e.g.
bool IsEnabled() const
Test if this object is enabled.
#define foreach_draw_tile_seq(idx, list)
Iterate through all DrawTileSeqStructs in DrawTileSprites.
GameSettings _settings_game
Game settings of a running game or the scenario editor.
@ CBM_OBJ_COLOUR
decide the colour of the building
bool IsTileOnWater(Tile t)
Tests if the tile was built on water.
@ OBJECT_FLAG_CLEAR_INCOME
When object is cleared a positive income is generated instead of a cost.
ObjectType type
Type of the object.
@ GWP_OBJECT
Generate objects (radio tower, light houses)
bool freeform_edges
allow terraforming the tiles at the map edges
Money GetCost() const
The costs as made up to this moment.
int UpdateCompanyRatingAndValue(Company *c, bool update)
if update is set to true, the economy is updated with this score (also the house is updated,...
TileIndex location_of_HQ
Northern tile of HQ; INVALID_TILE when there is none.
uint8_t colour
Colour of the object, for display purpose.
#define RandomTile()
Get a valid random tile.
Ground palette sprite of a tile, together with its sprite layout.
@ DC_NO_TEST_TOWN_RATING
town rating does not disallow you from building
Owner GetTileOwner(Tile tile)
Returns the owner of a tile.
@ FOUNDATION_NONE
The tile has no foundation, the slope remains unchanged.
TileIndex GetSouthernBridgeEnd(TileIndex t)
Finds the southern end of a bridge starting at a middle tile.
CommandCost GetErrorMessageFromLocationCallbackResult(uint16_t cb_res, const GRFFile *grffile, StringID default_error)
Get the error message from a shape/location/slope check callback result.
void AddCost(const Money &cost)
Adds the given cost to the cost of the command.
Set of callback functions for performing tile operations of a given tile type.
void SetTileOwner(Tile tile, Owner owner)
Sets the owner of a tile.
bool value
tells if the bool cheat is active or not
void TileLoop_Water(TileIndex tile)
Let a water tile floods its diagonal adjoining tiles called from tunnelbridge_cmd,...
@ OWNER_TOWN
A town owns the tile, or a town is expanding.
@ OBJECT_FLAG_ONLY_IN_SCENEDIT
Object can only be constructed in the scenario editor.
@ CBID_OBJECT_AUTOSLOPE
Called to determine if one can alter the ground below an object tile.
void AddSortableSpriteToDraw(SpriteID image, PaletteID pal, int x, int y, int w, int h, int dz, int z, bool transparent, int bb_offset_x, int bb_offset_y, int bb_offset_z, const SubSprite *sub)
Draw a (transparent) sprite at given coordinates with a given bounding box.
bool IsValidTile(Tile tile)
Checks if a tile is valid.
@ OBJECT_FLAG_HAS_NO_FOUNDATION
Do not display foundations when on a slope.
bool ConvertBooleanCallback(const GRFFile *grffile, uint16_t cbid, uint16_t cb_res)
Converts a callback result into a boolean.
TileIndexDiff TileOffsByDiagDir(DiagDirection dir)
Convert a DiagDirection to a TileIndexDiff.
StringID name
The name for this object.
uint8_t GetAnimationFrame(Tile t)
Get the current animation frame.
void DrawFoundation(TileInfo *ti, Foundation f)
Draw foundation f at tile ti.
static const ObjectType OBJECT_OWNED_LAND
Owned land 'flag'.
bool _generating_world
Whether we are generating the map or not.
ObjectType GetObjectType(Tile t)
Gets the ObjectType of the given object tile.
static const uint CALLBACK_FAILED
Different values for Callback result evaluations.
uint Index() const
Gets the index of this spec.
CompanyID _current_company
Company currently doing an action.
@ OAT_BUILT
Triggered when the object is built (for all tiles at the same time).
static constexpr CargoLabel CT_PASSENGERS
Available types of cargo Labels may be re-used between different climates.
@ CBM_OBJ_SLOPE_CHECK
decides slope suitability
static Pool::IterateWrapper< Titem > Iterate(size_t from=0)
Returns an iterable ensemble of all valid Titem.
static uint MaxY()
Gets the maximum Y coordinate within the map, including MP_VOID.
Base class for all pools.
@ TO_STRUCTURES
other objects such as transmitters and lighthouses
@ OAT_TILELOOP
Triggered in the periodic tile loop.
@ WATER_CLASS_CANAL
Canal.
static size_t GetNumItems()
Returns number of valid items in the pool.
bool IsDockingTile(Tile t)
Checks whether the tile is marked as a dockling tile.
Slope
Enumeration for the slope-type.
static bool TryBuildTransmitter()
Try to build a transmitter.
static debug_inline uint Size()
Get the size of the map.
CommandCost CheckBuildableTile(TileIndex tile, uint invalid_dirs, int &allowed_z, bool allow_steep, bool check_bridge)
Checks if the given tile is buildable, flat and has a certain height.
void SetGeneratingWorldProgress(GenWorldProgress cls, uint total)
Set the total of a stage of the world generation.
TileIndex tile
The base tile of the area.
@ CBM_OBJ_AUTOSLOPE
decides allowance of autosloping
@ OWNER_WATER
The tile/execution is done by "water".
Colours colour1
First colour, for all vehicles.
void MarkTileDirtyByTile(TileIndex tile, int bridge_level_offset, int tile_height_override)
Mark a tile given by its index dirty for repaint.
static const ObjectSpec * GetByTile(TileIndex tile)
Get the specification associated with a tile.
bool IsObjectTypeTile(Tile t, ObjectType type)
Check whether a tile is a object tile of a specific type.
static bool CanAllocateItem(size_t n=1)
Helper functions so we can use PoolItem::Function() instead of _poolitem_pool.Function()
void InvalidateWaterRegion(TileIndex tile)
Marks the water region that tile is part of as invalid.
uint8_t CargoID
Cargo slots to indicate a cargo type within a game.
bool IsBridgeAbove(Tile t)
checks if a bridge is set above the ground of this tile
StringID str
Description of the tile.
@ DC_AUTO
don't allow building on structures
@ DC_NO_MODIFY_TOWN_RATING
do not change town rating
void InitializeObjects()
Initialize/reset the objects.
static void DecTypeCount(ObjectType type)
Decrement the count of objects for this type.
#define INSTANTIATE_POOL_METHODS(name)
Force instantiation of pool methods so we don't get linker errors.
uint16_t w
The width of the area.
void ErrorUnknownCallbackResult(uint32_t grfid, uint16_t cbid, uint16_t cb_res)
Record that a NewGRF returned an unknown/invalid callback result.
uint32_t RandomRange(uint32_t limit, const std::source_location location=std::source_location::current())
Pick a random number between 0 and limit - 1, inclusive.
OrthogonalTileArea TileArea
Shorthand for the much more common orthogonal tile area.
@ OBJECT_FLAG_BUILT_ON_WATER
Object can be built on water (not required).
static void ResetTypeCounts()
Resets object counts.
CommandCost CheckTileOwnership(TileIndex tile)
Check whether the current owner owns the stuff on the given tile.
const DrawTileSeqStruct * seq
Array of child sprites. Terminated with a terminator entry.
@ OBJECT_FLAG_NOT_ON_LAND
Object can not be on land, implicitly sets OBJECT_FLAG_BUILT_ON_WATER.
static debug_inline TileIndex TileXY(uint x, uint y)
Returns the TileIndex of a coordinate.
void UpdateCompanyHQ(TileIndex tile, uint score)
Update the CompanyHQ to the state associated with the given score.
int GetTileMaxPixelZ(TileIndex tile)
Get top height of the tile.
ObjectID GetObjectIndex(Tile t)
Get the index of which object this tile is attached to.
uint32_t build_object_limit
Amount of tiles we can (still) build objects on (times 65536). Also applies to buying land.
void AnimateNewObjectTile(TileIndex tile)
Handle the animation of the object tile.
bool IsValidCargoID(CargoID t)
Test whether cargo type is not INVALID_CARGO.
int x
X position of the tile in unit coordinates.
static Date date
Current date in days (day counter).
TileIndex tile
Tile index.
ConstructionSettings construction
construction of things in-game
TimerGameCalendar::Date build_date
Date of construction.
@ MAX_COMPANIES
Maximum number of companies.
static debug_inline bool IsTileType(Tile tile, TileType type)
Checks if a tile is a given tiletype.
bool EconomyIsInRecession()
Is the economy in recession?
Money GetBuildCost() const
Get the cost for building a structure of this type.
const struct GRFFile * grffile
grf file that introduced this entity
static debug_inline uint TileX(TileIndex tile)
Get the X component of a tile.
void SetAnimationFrame(Tile t, uint8_t frame)
Set a new animation frame.
int8_t delta_x
0x80 is sequence terminator
WaterClass
classes of water (for WATER_TILE_CLEAR water tile type).
static const ObjectType OBJECT_HQ
HeadQuarter of a player.
static const ObjectType OBJECT_TRANSMITTER
The large antenna.
static const ObjectType OBJECT_LIGHTHOUSE
The nice lighthouse.
void ShowCompany(CompanyID company)
Show the window with the overview of the company.
Keeps track of removed objects during execution/testruns of commands.
Colours colour2
Second colour, for vehicles with 2CC support.
constexpr T ClrBit(T &x, const uint8_t y)
Clears a bit in a variable.
bool IsTileOwner(Tile tile, Owner owner)
Checks if a tile belongs to the given owner.
bool HasTileWaterGround(Tile t)
Checks whether the tile has water at the ground.
Information about a particular livery.
Town * town
Town the object is built in.
std::tuple< Slope, int > GetTileSlopeZ(TileIndex tile)
Return the slope of a given tile inside the map.
constexpr T ToggleBit(T &x, const uint8_t y)
Toggles a bit in a variable.
void UpdateObjectColours(const Company *c)
Updates the colour of the object whenever a company changes.
void DrawGroundSprite(SpriteID image, PaletteID pal, const SubSprite *sub, int extra_offs_x, int extra_offs_y)
Draws a ground sprite for the current tile.
CommandCost CmdBuildObject(DoCommandFlag flags, TileIndex tile, ObjectType type, uint8_t view)
Build an object object.
const char * GetName() const
Get the name of this grf.
A tile child sprite and palette to draw for stations etc, with 3D bounding box.
ObjectFlags flags
Flags/settings related to the object.
@ EXPENSES_CONSTRUCTION
Construction costs.
uint8_t views
The number of views.
constexpr debug_inline bool HasBit(const T x, const uint8_t y)
Checks if a bit in a value is set.