summaryrefslogtreecommitdiff
path: root/industry_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-28 15:31:04 +0000
committertron <tron@openttd.org>2005-01-28 15:31:04 +0000
commit400f07fdb834dc99aa8a2a4695e20b36e5d23dc4 (patch)
treeefbaeb3426c01178731116a7fca722dc190ac78f /industry_cmd.c
parent6d410929b6fc96eda09a5060d6665cc5dc800f03 (diff)
downloadopenttd-400f07fdb834dc99aa8a2a4695e20b36e5d23dc4.tar.xz
(svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
These scale a number relative to the map size/circumference. Use them to scale the amount of map objects. Of course at the moment they return just the input, because there are no bigger/smaller maps yet.
Diffstat (limited to 'industry_cmd.c')
-rw-r--r--industry_cmd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/industry_cmd.c b/industry_cmd.c
index b22ab058e..9849e1321 100644
--- a/industry_cmd.c
+++ b/industry_cmd.c
@@ -1594,7 +1594,8 @@ static const byte _numof_industry_table[4][12] = {
static void PlaceInitialIndustry(byte type, int amount)
{
- int num = _numof_industry_table[_opt.diff.number_industries][amount];
+ int num =
+ ScaleByMapSize(_numof_industry_table[_opt.diff.number_industries][amount]);
if (_opt.diff.number_industries != 0)
{