diff options
author | rubidium <rubidium@openttd.org> | 2008-01-07 14:02:26 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-01-07 14:02:26 +0000 |
commit | 38115acf5adbcf66643d1f96e30b9abc6dec15a3 (patch) | |
tree | da6be8b1f4ec1cdb8a848d1ab9915d7dddf2ff8b /src/town_type.h | |
parent | a8a3a7e3f277c205900f5dde7441e612cd0114a8 (diff) | |
download | openttd-38115acf5adbcf66643d1f96e30b9abc6dec15a3.tar.xz |
(svn r11776) -Codechange: more header splittings to reduce the dependencies.
Diffstat (limited to 'src/town_type.h')
-rw-r--r-- | src/town_type.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/src/town_type.h b/src/town_type.h new file mode 100644 index 000000000..3491b68d7 --- /dev/null +++ b/src/town_type.h @@ -0,0 +1,77 @@ +/* $Id$ */ + +/** @file town_type.h Types related to towns. */ + +#ifndef TOWN_TYPE_H +#define TOWN_TYPE_H + +#include "core/enum_type.hpp" + +typedef uint16 TownID; +typedef uint16 HouseID; +typedef uint16 HouseClassID; + +struct Town; +struct HouseSpec; + +enum TownSizeMode { + TSM_RANDOM, + TSM_FIXED, + TSM_CITY +}; + +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_MAXIMUM = RATING_OUTSTANDING, + + /* RATINGS AFFECTING NUMBERS */ + RATING_TREE_DOWN_STEP = -35, + RATING_TREE_MINIMUM = RATING_MINIMUM, + RATING_TREE_UP_STEP = 7, + RATING_TREE_MAXIMUM = 220, + + RATING_TUNNEL_BRIDGE_DOWN_STEP = -250, + RATING_TUNNEL_BRIDGE_MINIMUM = 0, + + RATING_INDUSTRY_DOWN_STEP = -1500, + RATING_INDUSTRY_MINIMUM = RATING_MINIMUM, + + RATING_ROAD_DOWN_STEP = -50, + RATING_ROAD_MINIMUM = -100, + RATING_HOUSE_MINIMUM = RATING_MINIMUM, + + RATING_BRIBE_UP_STEP = 200, + RATING_BRIBE_MAXIMUM = 800, + RATING_BRIBE_DOWN_TO = -50 // XXX SHOULD BE SOMETHING LOWER? +}; + +/** + * Town Layouts + */ +enum TownLayout { + TL_NO_ROADS = 0, ///< Build no more roads, but still build houses + TL_ORIGINAL, ///< Original algorithm (min. 1 distance between roads) + TL_BETTER_ROADS, ///< Extended original algorithm (min. 2 distance between roads) + TL_2X2_GRID, ///< Geometric 2x2 grid algorithm + TL_3X3_GRID, ///< Geometric 3x3 grid algorithm + + NUM_TLS, ///< Number of town layouts +}; + +/* It needs to be 8bits, because we save and load it as such */ +/** Define basic enum properties */ +template <> struct EnumPropsT<TownLayout> : MakeEnumPropsT<TownLayout, byte, TL_NO_ROADS, NUM_TLS, NUM_TLS> {}; +typedef TinyEnumT<TownLayout> TownLayoutByte; //typedefing-enumification of TownLayout + +#endif /* TOWN_TYPE_H */ |