# town_type.h

Go to the documentation of this file.

    00001 /* $Id: town_type.h 15718 2009-03-15 00:32:18Z rubidium $ */
    00002
    00005 #ifndef TOWN_TYPE_H
    00006 #define TOWN_TYPE_H
    00007
    00008 #include "core/enum_type.hpp"
    00009
    00010 typedef uint16 TownID;
    00011 typedef uint16 HouseID;
    00012 typedef uint16 HouseClassID;
    00013
    00014 struct Town;
    00015 struct HouseSpec;
    00016
    00018 enum TownSize {
    00019   TS_SMALL,
    00020   TS_MEDIUM,
    00021   TS_LARGE,
    00022   TS_RANDOM,
    00023 };
    00024
    00025 enum {
    00026   /* These refer to the maximums, so Appalling is -1000 to -400
    00027    * MAXIMUM RATINGS BOUNDARIES */
    00028   RATING_MINIMUM     = -1000,
    00029   RATING_APPALLING   =  -400,
    00030   RATING_VERYPOOR    =  -200,
    00031   RATING_POOR        =     0,
    00032   RATING_MEDIOCRE    =   200,
    00033   RATING_GOOD        =   400,
    00034   RATING_VERYGOOD    =   600,
    00035   RATING_EXCELLENT   =   800,
    00036   RATING_OUTSTANDING =  1000,
    00037
    00038   RATING_MAXIMUM = RATING_OUTSTANDING,
    00039
    00040   RATING_INITIAL = 500,
    00041
    00042   /* RATINGS AFFECTING NUMBERS */
    00043   RATING_TREE_DOWN_STEP = -35,
    00044   RATING_TREE_MINIMUM   = RATING_MINIMUM,
    00045   RATING_TREE_UP_STEP   = 7,
    00046   RATING_TREE_MAXIMUM   = 220,
    00047
    00048   RATING_GROWTH_UP_STEP    =   5,
    00049   RATING_GROWTH_MAXIMUM    = RATING_MEDIOCRE,
    00050   RATING_STATION_UP_STEP   =  12,
    00051   RATING_STATION_DOWN_STEP = -15,
    00052
    00053   RATING_TUNNEL_BRIDGE_DOWN_STEP = -250,
    00054   RATING_TUNNEL_BRIDGE_MINIMUM   = 0,
    00055
    00056   RATING_ROAD_DOWN_STEP_INNER = -50,
    00057   RATING_ROAD_DOWN_STEP_EDGE  = -18,
    00058   RATING_ROAD_MINIMUM   = -100,
    00059   RATING_HOUSE_MINIMUM  = RATING_MINIMUM,
    00060
    00061   RATING_BRIBE_UP_STEP = 200,
    00062   RATING_BRIBE_MAXIMUM = 800,
    00063   RATING_BRIBE_DOWN_TO = -50        // XXX SHOULD BE SOMETHING LOWER?
    00064 };
    00065
    00069 enum TownLayout {
    00070   TL_BEGIN = 0,
    00071   TL_ORIGINAL = 0,
    00072   TL_BETTER_ROADS,
    00073   TL_2X2_GRID,
    00074   TL_3X3_GRID,
    00075
    00076   TL_RANDOM,
    00077
    00078   NUM_TLS,
    00079 };
    00080
    00083 template <> struct EnumPropsT<TownLayout> : MakeEnumPropsT<TownLayout, byte, TL_BEGIN, NUM_TLS, NUM_TLS> {};
    00084 typedef TinyEnumT<TownLayout> TownLayoutByte; // typedefing-enumification of TownLayout
    00085
    00086 enum {
    00087   MAX_LENGTH_TOWN_NAME_BYTES  =  31,
    00088   MAX_LENGTH_TOWN_NAME_PIXELS = 130,
    00089 };
    00090
    00091 #endif /* TOWN_TYPE_H */