diff options
author | alberth <alberth@openttd.org> | 2010-11-13 15:04:58 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-11-13 15:04:58 +0000 |
commit | e861487bcb050a74058ca8c2723541c029089dd2 (patch) | |
tree | e59d0328a183e1a138f8f916c2c66b006b3b738e /src/industry.h | |
parent | 1bf94674dfb507849bc5f6c7dffc112cdf89b308 (diff) | |
download | openttd-e861487bcb050a74058ca8c2723541c029089dd2.tar.xz |
(svn r21167) -Codechange: Use IndustryBuildData::builddata instead of a local variable.
Diffstat (limited to 'src/industry.h')
-rw-r--r-- | src/industry.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/industry.h b/src/industry.h index cdf9d0c78..1c1637946 100644 --- a/src/industry.h +++ b/src/industry.h @@ -143,10 +143,19 @@ void ReleaseDisastersTargetingIndustry(IndustryID); #define FOR_ALL_INDUSTRIES_FROM(var, start) FOR_ALL_ITEMS_FROM(Industry, industry_index, var, start) #define FOR_ALL_INDUSTRIES(var) FOR_ALL_INDUSTRIES_FROM(var, 0) +/** Data for managing the number of industries of a single industry type. */ +struct IndustryTypeBuildData { + uint32 probability; ///< Relative probability of building this industry. + + void GetIndustryTypeData(IndustryType it); +}; + /** * Data for managing the number and type of industries in the game. */ struct IndustryBuildData { + IndustryTypeBuildData builddata[NUM_INDUSTRYTYPES]; ///< Industry build data for every industry type. + void TryBuildNewIndustry(); }; |