diff options
author | belugas <belugas@openttd.org> | 2006-04-03 14:56:07 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2006-04-03 14:56:07 +0000 |
commit | f4bbce2c396fa31b60ac0924b465a063277ddb74 (patch) | |
tree | 6ddb7ceef46b215900935feabbb41a667d4cfa15 /town.h | |
parent | 5931b34aff7f774ec2a591e5658d25706fe01066 (diff) | |
download | openttd-f4bbce2c396fa31b60ac0924b465a063277ddb74.tar.xz |
(svn r4261) CodeChange : Add and Use Accessor for Houses Construction. And cleaning on town.flags12 too
Diffstat (limited to 'town.h')
-rw-r--r-- | town.h | 44 |
1 files changed, 34 insertions, 10 deletions
@@ -21,6 +21,9 @@ struct Town { ViewportSign sign; // Makes sure we don't build certain house types twice. + // bit 0 = Building funds received + // bit 1 = CHURCH + // bit 2 = STADIUM byte flags12; // Which players have a statue? @@ -92,15 +95,15 @@ enum { enum { // These refer to the maximums, so Appalling is -1000 to -400 // MAXIMUM RATINGS BOUNDARIES - RATING_MINIMUM = -1000, - RATING_APPALLING = -400, - RATING_VERYPOOR = -200, - RATING_POOR = 0, - RATING_MEDIOCRE = 200, - RATING_GOOD = 400, - RATING_VERYGOOD = 600, - RATING_EXCELLENT = 800, - RATING_OUTSTANDING= 1000, // OUTSTANDING + RATING_MINIMUM = -1000, + RATING_APPALLING = -400, + RATING_VERYPOOR = -200, + RATING_POOR = 0, + RATING_MEDIOCRE = 200, + RATING_GOOD = 400, + RATING_VERYGOOD = 600, + RATING_EXCELLENT = 800, + RATING_OUTSTANDING = 1000, // OUTSTANDING RATING_MAXIMUM = RATING_OUTSTANDING, @@ -122,7 +125,28 @@ enum { RATING_BRIBE_UP_STEP = 200, RATING_BRIBE_MAXIMUM = 800, - RATING_BRIBE_DOWN_TO = -50 // XXX SHOULD BE SOMETHING LOWER? + 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 enum is used in conjonction with town->flags12. + * IT simply states what bit is used for. + * It is pretty unrealistic (IMHO) to only have one church/stadium + * per town, NO MATTER the population of it. + * And there are 5 more bits available on flags12... + */ +enum { + TOWN_IS_FUNDED = 0, // Town has received some funds for + TOWN_HAS_CHURCH = 1, // There can be only one church by town. + TOWN_HAS_STADIUM = 2 // There can be only one stadium by town. }; bool CheckforTownRating(uint32 flags, Town *t, byte type); |