summaryrefslogtreecommitdiff
path: root/src/town.h
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-04-12 17:24:34 +0000
committermaedhros <maedhros@openttd.org>2007-04-12 17:24:34 +0000
commit61fe35688046b7ef36305ebd92b79bfcc535783f (patch)
tree5610013827e8a819441d28bafece386e0ad98632 /src/town.h
parentccaaa7d33ac92f91ebddcf4d1f6537639a38a13c (diff)
downloadopenttd-61fe35688046b7ef36305ebd92b79bfcc535783f.tar.xz
(svn r9613) -Feature: Make it possible to have some control over the town growth. The
default rate is TTD's original rate, and to approximate OpenTTD's previous behaviour the rate should be set to "Fast" or "Very Fast". Town growth can be switched off entirely, and if so, buildings will not be rebuilt. It is also possible to specify a proportion of towns that grow twice as fast as the others.
Diffstat (limited to 'src/town.h')
-rw-r--r--src/town.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/town.h b/src/town.h
index 832fd913b..75157bde3 100644
--- a/src/town.h
+++ b/src/town.h
@@ -126,11 +126,11 @@ struct Town {
uint16 new_act_water;
/* Time until we rebuild a house. */
- byte time_until_rebuild;
+ uint16 time_until_rebuild;
/* When to grow town next time. */
- byte grow_counter;
- byte growth_rate;
+ uint16 grow_counter;
+ int16 growth_rate;
/* Fund buildings program in action? */
byte fund_buildings_months;
@@ -234,14 +234,14 @@ enum {
RATING_BRIBE_DOWN_TO = -50 // XXX SHOULD BE SOMETHING LOWER?
};
-enum {
-/* This is the base "normal" number of towns on the 8x8 map, when
- * one town should get grown per tick. The other numbers of towns
- * are then scaled based on that. */
- TOWN_GROWTH_FREQUENCY = 23,
-/* Simple value that indicates the house has reached final stage of construction*/
- TOWN_HOUSE_COMPLETED = 3,
-};
+/** This is the number of ticks between towns being processed for building new
+ * houses or roads. This value originally came from the size of the town array
+ * in TTD. */
+static const byte TOWN_GROWTH_FREQUENCY = 70;
+
+/** Simple value that indicates the house has reached the final stage of
+ * construction. */
+static const byte TOWN_HOUSE_COMPLETED = 3;
/** This enum is used in conjonction with town->flags12.
* IT simply states what bit is used for.