OpenTTD Source
20240917-master-g9ab0a47812
|
Go to the documentation of this file.
27 static const uint HOUSE_NO_CLASS = 0;
30 static const HouseID INVALID_HOUSE_ID = 0xFFFF;
35 enum BuildingFlags : uint8_t {
37 TILE_SIZE_1x1 = 1U << 0,
38 TILE_NOT_SLOPED = 1U << 1,
39 TILE_SIZE_2x1 = 1U << 2,
40 TILE_SIZE_1x2 = 1U << 3,
41 TILE_SIZE_2x2 = 1U << 4,
42 BUILDING_IS_ANIMATED = 1U << 5,
43 BUILDING_IS_CHURCH = 1U << 6,
44 BUILDING_IS_STADIUM = 1U << 7,
45 BUILDING_HAS_1_TILE = TILE_SIZE_1x1 | TILE_SIZE_2x1 | TILE_SIZE_1x2 | TILE_SIZE_2x2,
46 BUILDING_HAS_2_TILES = TILE_SIZE_2x1 | TILE_SIZE_1x2 | TILE_SIZE_2x2,
47 BUILDING_2_TILES_X = TILE_SIZE_2x1 | TILE_SIZE_2x2,
48 BUILDING_2_TILES_Y = TILE_SIZE_1x2 | TILE_SIZE_2x2,
49 BUILDING_HAS_4_TILES = TILE_SIZE_2x2,
53 enum HouseZonesBits : uint8_t {
57 HZB_TOWN_OUTER_SUBURB,
58 HZB_TOWN_INNER_SUBURB,
62 static_assert(HZB_END == 5);
69 HZ_ZON2 = 1U << HZB_TOWN_OUTSKIRT,
70 HZ_ZON3 = 1U << HZB_TOWN_OUTER_SUBURB,
71 HZ_ZON4 = 1U << HZB_TOWN_INNER_SUBURB,
100 uint16_t remove_rating_decrease;
111 uint16_t callback_mask;
112 Colours random_colour[4];
122 Money GetRemovalCost()
const;
124 static std::vector<HouseSpec> &Specs();
139 void ShowBuildHousePicker(
struct Window *);
@ CALLBACK_1A_RANDOM_BITS
callback 1A needs random bits
@ HZ_ZON1
0..4 1,2,4,8,10 which town zones the building can be built in, Zone1 been the further suburb
@ HZ_CLIMALL
Bitmask of all climate bits.
uint8_t minimum_life
The minimum number of years this house will survive before the town rebuilds it.
TimerGameCalendar::Year max_year
last year it can be built
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
uint8_t processing_time
Periodic refresh multiplier.
bool enabled
the house is available to build (true by default, but can be disabled by newgrf)
Information about animation.
@ HZ_SUBARTC_BELOW
13 2000 can appear in sub-arctic climate below the snow line
StringID building_name
building name
uint8_t probability
Relative probability of appearing (16 is the standard value)
@ BUILDING_IS_PROTECTED
towns and AI will not remove this house, while human players will be able to
@ HZ_NOZNS
0 This is just to get rid of zeros, meaning none
static const HouseID NUM_HOUSES_PER_GRF
Number of supported houses per NewGRF; limited to 255 to allow extending Action3 with an extended byt...
uint8_t removal_cost
cost multiplier for removing it
HouseExtraFlags extra_flags
some more flags
#define DECLARE_POSTFIX_INCREMENT(enum_type)
Some enums need to have allowed incrementing (i.e.
uint16_t override
id of the entity been replaced by
@ HZ_TOYLND
15 8000 can appear in toyland climate
@ HZ_SUBTROPIC
14 4000 can appear in subtropical climate
static const HouseID NUM_HOUSES
Total number of houses.
static const HouseID NEW_HOUSE_OFFSET
Offset for new houses.
BuildingFlags building_flags
some flags that describe the house (size, stadium etc...)
Data related to the handling of grf files.
uint16_t HouseClassID
Classes of houses.
AnimationInfo animation
information about the animation.
static const uint HOUSE_NUM_ACCEPTS
Max number of cargoes accepted by a tile.
uint8_t population
population (Zero on other tiles in multi tile house.)
@ SYNCHRONISED_CALLBACK_1B
synchronized callback 1B will be performed, on multi tile houses
static const uint8_t TOWN_HOUSE_COMPLETED
Simple value that indicates the house has reached the final stage of construction.
uint8_t mail_generation
mail generation multiplier (tile based, as the acceptances below)
static const uint HOUSE_ORIGINAL_NUM_ACCEPTS
Original number of accepted cargo types.
@ BUILDING_IS_HISTORICAL
this house will only appear during town generation in random games, thus the historical
@ HZ_SUBARTC_ABOVE
11 800 can appear in sub-arctic climate above the snow line
static HouseSpec * Get(size_t house_id)
Get the spec for a house ID.
CargoTypes watched_cargoes
Cargo types watched for acceptance.
HouseClassID class_id
defines the class this house has (not grf file based)
HouseZones building_availability
where can it be built (climates, zones)
uint8_t CargoID
Cargo slots to indicate a cargo type within a game.
uint16_t HouseID
OpenTTD ID of house types.
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
@ HZ_TEMP
12 1000 can appear in temperate climate
Data structure for an opened window.
TimerGameCalendar::Year min_year
introduction year of the house
GRFFileProps grf_prop
Properties related the the grf file.
HouseID GetTranslatedHouseID(HouseID hid)
Do HouseID translation for NewGRFs.
@ HZ_ZONALL
1F This is just to englobe all above types at once