29 static const uint HOUSE_NO_CLASS = 0;
32 static const HouseID INVALID_HOUSE_ID = 0xFFFF;
42 TILE_SIZE_1x1 = 1U << 0,
43 TILE_NOT_SLOPED = 1U << 1,
44 TILE_SIZE_2x1 = 1U << 2,
45 TILE_SIZE_1x2 = 1U << 3,
46 TILE_SIZE_2x2 = 1U << 4,
47 BUILDING_IS_ANIMATED = 1U << 5,
48 BUILDING_IS_CHURCH = 1U << 6,
49 BUILDING_IS_STADIUM = 1U << 7,
50 BUILDING_HAS_1_TILE = TILE_SIZE_1x1 | TILE_SIZE_2x1 | TILE_SIZE_1x2 | TILE_SIZE_2x2,
51 BUILDING_HAS_2_TILES = TILE_SIZE_2x1 | TILE_SIZE_1x2 | TILE_SIZE_2x2,
52 BUILDING_2_TILES_X = TILE_SIZE_2x1 | TILE_SIZE_2x2,
53 BUILDING_2_TILES_Y = TILE_SIZE_1x2 | TILE_SIZE_2x2,
54 BUILDING_HAS_4_TILES = TILE_SIZE_2x2,
62 HZB_TOWN_OUTER_SUBURB,
63 HZB_TOWN_INNER_SUBURB,
67 assert_compile(HZB_END == 5);
74 HZ_ZON2 = 1U << HZB_TOWN_OUTSKIRT,
75 HZ_ZON3 = 1U << HZB_TOWN_OUTER_SUBURB,
76 HZ_ZON4 = 1U << HZB_TOWN_INNER_SUBURB,
107 byte cargo_acceptance[3];
116 byte random_colour[4];
125 Money GetRemovalCost()
const;
127 static inline HouseSpec *Get(
size_t house_id)
130 extern HouseSpec _house_specs[];
131 return &_house_specs[house_id];
142 const HouseSpec *hs = HouseSpec::Get(hid);
bool enabled
the house is available to build (true by default, but can be disabled by newgrf)
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
byte probability
Relative probability of appearing (16 is the standard value)
static const byte TOWN_HOUSE_COMPLETED
Simple value that indicates the house has reached the final stage of construction.
synchronized callback 1B will be performed, on multi tile houses
declaration of basic house types and enums
uint16 HouseClassID
Classes of houses.
Definitions related to NewGRF animation.
byte removal_cost
cost multiplier for removing it
static HouseID GetTranslatedHouseID(HouseID hid)
Do HouseID translation for NewGRFs.
int32 Year
Type for the year, note: 0 based, i.e. starts at the year 0.
uint16 callback_mask
Bitmask of house callbacks that have to be called.
uint16 HouseID
OpenTTD ID of house types.
Types related to cargoes...
static const HouseID NUM_HOUSES
Total number of houses.
this house will only appear during town generation in random games, thus the historical ...
HouseZones building_availability
where can it be built (climates, zones)
byte population
population (Zero on other tiles in multi tile house.)
static const HouseID NUM_HOUSES_PER_GRF
Number of supported houses per NewGRF; limited to 255 to allow extending Action3 with an extended byt...
byte mail_generation
mail generation multiplier (tile based, as the acceptances below)
HouseClassID class_id
defines the class this house has (not grf file based)
Data related to the handling of grf files.
byte processing_time
Periodic refresh multiplier.
StringID building_name
building name
Year max_year
last year it can be built
Bitmask of all climate bits.
uint32 StringID
Numeric value that represents a string, independent of the selected language.
12 1000 can appear in temperate climate
BuildingFlags building_flags
some flags that describe the house (size, stadium etc...)
uint32 watched_cargoes
Cargo types watched for acceptance.
uint16 override
id of the entity been replaced by
14 4000 can appear in subtropical climate
13 2000 can appear in sub-arctic climate below the snow line
1F This is just to englobe all above types at once
15 8000 can appear in toyland climate
HouseExtraFlags extra_flags
some more flags
byte minimum_life
The minimum number of years this house will survive before the town rebuilds it.
static const uint HOUSE_CLASS_MAX
There can only be as many classes as there are new houses, plus one for NO_CLASS, as the original hou...
uint16 remove_rating_decrease
rating decrease if removed
Year min_year
introduction year of the house
0..4 1,2,4,8,10 which town zones the building can be built in, Zone1 been the further suburb ...
towns and AI will not remove this house, while human players will be able to
callback 1A needs random bits
static const HouseID NEW_HOUSE_OFFSET
Offset for new houses.
AnimationInfo animation
information about the animation.
Types related to the dates in OpenTTD.
This file simplyfies and embeds a common mechanism of loading/saving and mapping of grf entities...
Information about animation.
GRFFileProps grf_prop
Properties related the the grf file.
byte CargoID
Cargo slots to indicate a cargo type within a game.
#define DECLARE_POSTFIX_INCREMENT(type)
Some enums need to have allowed incrementing (i.e.
11 800 can appear in sub-arctic climate above the snow line