summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-09-04 11:16:40 +0000
committeralberth <alberth@openttd.org>2010-09-04 11:16:40 +0000
commit03f7733f8351f8ad7079b2d46e6a695453bbca35 (patch)
treeb6b8c23069db968242ba1651032661f36f378c3c /src
parent2d30613c3ae3111d5297bb1d8a28aae5587ddd0d (diff)
downloadopenttd-03f7733f8351f8ad7079b2d46e6a695453bbca35.tar.xz
(svn r20734) -Codechange: Rename GetScaledIndustryProbability() to GetScaledIndustryGenerationProbability().
Diffstat (limited to 'src')
-rw-r--r--src/industry_cmd.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 7d0321aaf..3343f14a2 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1840,11 +1840,11 @@ static Industry *CreateNewIndustry(TileIndex tile, IndustryType type)
/**
* Compute the appearance probability for an industry during map creation.
- * @param it Industrytype to compute for
- * @param force_at_least_one Returns whether at least one instance should be forced on map creation
- * @return relative probability for the industry to appear
+ * @param it Industry type to compute.
+ * @param [out] force_at_least_one Returns whether at least one instance should be forced on map creation.
+ * @return Relative probability for the industry to appear.
*/
-static uint32 GetScaledIndustryProbability(IndustryType it, bool *force_at_least_one)
+static uint32 GetScaledIndustryGenerationProbability(IndustryType it, bool *force_at_least_one)
{
const IndustrySpec *ind_spc = GetIndustrySpec(it);
uint32 chance = ind_spc->appear_creation[_settings_game.game_creation.landscape] * 16; // * 16 to increase precision
@@ -1909,7 +1909,7 @@ void GenerateIndustries()
uint num_forced = 0;
for (IndustryType it = 0; it < NUM_INDUSTRYTYPES; it++) {
- industry_probs[it] = GetScaledIndustryProbability(it, force_at_least_one + it);
+ industry_probs[it] = GetScaledIndustryGenerationProbability(it, force_at_least_one + it);
total_prob += industry_probs[it];
if (force_at_least_one[it]) num_forced++;
}