summaryrefslogtreecommitdiff
path: root/src/town.h
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-04-18 14:23:30 +0000
committermaedhros <maedhros@openttd.org>2007-04-18 14:23:30 +0000
commit16a948a463feb420d0a1fee654b54a4a7acf165e (patch)
treeb3ab848eec6066ba38410f4d1640c44100aa40fc /src/town.h
parent4b7c59fce15d7e861b6f3115a3117eee1a38d778 (diff)
downloadopenttd-16a948a463feb420d0a1fee654b54a4a7acf165e.tar.xz
(svn r9667) -Feature: Add the concept of cities. A (configurable) proportion of towns can
start off larger, and will grow twice as quickly as other towns. They can also be placed specifically in the scenario editor. Thanks to TheJosh for the initial patch and the idea.
Diffstat (limited to 'src/town.h')
-rw-r--r--src/town.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/town.h b/src/town.h
index c181f1b25..0924938c1 100644
--- a/src/town.h
+++ b/src/town.h
@@ -141,6 +141,9 @@ struct Town {
/* Index in town array */
TownID index;
+ /* If this is a larger town, and should grow more quickly. */
+ bool larger_town;
+
/* NOSAVE: UpdateTownRadius updates this given the house count. */
uint16 radius[5];
@@ -181,6 +184,12 @@ struct HouseSpec {
const struct GRFFile *grffile; ///< grf file that introduced this house
};
+enum TownSizeMode {
+ TSM_RANDOM,
+ TSM_FIXED,
+ TSM_CITY
+};
+
VARDEF HouseSpec _house_specs[HOUSE_MAX];
uint32 GetWorldPopulation();
@@ -189,7 +198,7 @@ void UpdateTownVirtCoord(Town *t);
void InitializeTown();
void ShowTownViewWindow(TownID town);
void ExpandTown(Town *t);
-Town *CreateRandomTown(uint attempts, uint size_mode);
+Town *CreateRandomTown(uint attempts, TownSizeMode mode, uint size);
enum {
ROAD_REMOVE = 0,