mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Remove PartOfSubsidyByte
parent
5d66d8fd7d
commit
0a53ee8cfe
|
@ -62,7 +62,7 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> {
|
||||||
Year last_prod_year; ///< last year of production
|
Year last_prod_year; ///< last year of production
|
||||||
byte was_cargo_delivered; ///< flag that indicate this has been the closest industry chosen for cargo delivery by a station. see DeliverGoodsToIndustry
|
byte was_cargo_delivered; ///< flag that indicate this has been the closest industry chosen for cargo delivery by a station. see DeliverGoodsToIndustry
|
||||||
|
|
||||||
PartOfSubsidyByte part_of_subsidy; ///< NOSAVE: is this industry a source/destination of a subsidy?
|
PartOfSubsidy part_of_subsidy; ///< NOSAVE: is this industry a source/destination of a subsidy?
|
||||||
StationList stations_near; ///< NOSAVE: List of nearby stations.
|
StationList stations_near; ///< NOSAVE: List of nearby stations.
|
||||||
|
|
||||||
Owner founder; ///< Founder of the industry
|
Owner founder; ///< Founder of the industry
|
||||||
|
|
|
@ -15,14 +15,11 @@
|
||||||
#include "core/enum_type.hpp"
|
#include "core/enum_type.hpp"
|
||||||
|
|
||||||
/** What part of a subsidy is something? */
|
/** What part of a subsidy is something? */
|
||||||
enum PartOfSubsidy {
|
enum PartOfSubsidy : byte {
|
||||||
POS_NONE = 0, ///< nothing
|
POS_NONE = 0, ///< nothing
|
||||||
POS_SRC = 1 << 0, ///< bit 0 set -> town/industry is source of subsidised path
|
POS_SRC = 1 << 0, ///< bit 0 set -> town/industry is source of subsidised path
|
||||||
POS_DST = 1 << 1, ///< bit 1 set -> town/industry is destination of subsidised path
|
POS_DST = 1 << 1, ///< bit 1 set -> town/industry is destination of subsidised path
|
||||||
};
|
};
|
||||||
/** Helper to store the PartOfSubsidy data in a single byte. */
|
|
||||||
typedef SimpleTinyEnumT<PartOfSubsidy, byte> PartOfSubsidyByte;
|
|
||||||
|
|
||||||
DECLARE_ENUM_AS_BIT_SET(PartOfSubsidy)
|
DECLARE_ENUM_AS_BIT_SET(PartOfSubsidy)
|
||||||
|
|
||||||
typedef uint16 SubsidyID; ///< ID of a subsidy
|
typedef uint16 SubsidyID; ///< ID of a subsidy
|
||||||
|
|
|
@ -46,7 +46,7 @@ struct TownCache {
|
||||||
uint32 num_houses; ///< Amount of houses
|
uint32 num_houses; ///< Amount of houses
|
||||||
uint32 population; ///< Current population of people
|
uint32 population; ///< Current population of people
|
||||||
ViewportSign sign; ///< Location of name sign, UpdateVirtCoord updates this
|
ViewportSign sign; ///< Location of name sign, UpdateVirtCoord updates this
|
||||||
PartOfSubsidyByte part_of_subsidy; ///< Is this town a source/destination of a subsidy?
|
PartOfSubsidy part_of_subsidy; ///< Is this town a source/destination of a subsidy?
|
||||||
uint32 squared_town_zone_radius[HZB_END]; ///< UpdateTownRadius updates this given the house count
|
uint32 squared_town_zone_radius[HZB_END]; ///< UpdateTownRadius updates this given the house count
|
||||||
BuildingCounts<uint16> building_counts; ///< The number of each type of building in the town
|
BuildingCounts<uint16> building_counts; ///< The number of each type of building in the town
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue