# town_type.h

Go to the documentation of this file.

    00001 /* $Id: town_type.h 11776 2008-01-07 14:02:26Z 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
    00017 enum TownSizeMode {
    00018   TSM_RANDOM,
    00019   TSM_FIXED,
    00020   TSM_CITY
    00021 };
    00022
    00023 enum {
    00024   /* These refer to the maximums, so Appalling is -1000 to -400
    00025    * MAXIMUM RATINGS BOUNDARIES */
    00026   RATING_MINIMUM     = -1000,
    00027   RATING_APPALLING   =  -400,
    00028   RATING_VERYPOOR    =  -200,
    00029   RATING_POOR        =     0,
    00030   RATING_MEDIOCRE    =   200,
    00031   RATING_GOOD        =   400,
    00032   RATING_VERYGOOD    =   600,
    00033   RATING_EXCELLENT   =   800,
    00034   RATING_OUTSTANDING =  1000,
    00035
    00036   RATING_MAXIMUM = RATING_OUTSTANDING,
    00037
    00038   /* RATINGS AFFECTING NUMBERS */
    00039   RATING_TREE_DOWN_STEP = -35,
    00040   RATING_TREE_MINIMUM   = RATING_MINIMUM,
    00041   RATING_TREE_UP_STEP   = 7,
    00042   RATING_TREE_MAXIMUM   = 220,
    00043
    00044   RATING_TUNNEL_BRIDGE_DOWN_STEP = -250,
    00045   RATING_TUNNEL_BRIDGE_MINIMUM   = 0,
    00046
    00047   RATING_INDUSTRY_DOWN_STEP = -1500,
    00048   RATING_INDUSTRY_MINIMUM   = RATING_MINIMUM,
    00049
    00050   RATING_ROAD_DOWN_STEP = -50,
    00051   RATING_ROAD_MINIMUM   = -100,
    00052   RATING_HOUSE_MINIMUM  = RATING_MINIMUM,
    00053
    00054   RATING_BRIBE_UP_STEP = 200,
    00055   RATING_BRIBE_MAXIMUM = 800,
    00056   RATING_BRIBE_DOWN_TO = -50        // XXX SHOULD BE SOMETHING LOWER?
    00057 };
    00058
    00062 enum TownLayout {
    00063   TL_NO_ROADS     = 0,
    00064   TL_ORIGINAL,
    00065   TL_BETTER_ROADS,
    00066   TL_2X2_GRID,
    00067   TL_3X3_GRID,
    00068
    00069   NUM_TLS,
    00070 };
    00071
    00072 /* It needs to be 8bits, because we save and load it as such */
    00074 template <> struct EnumPropsT<TownLayout> : MakeEnumPropsT<TownLayout, byte, TL_NO_ROADS, NUM_TLS, NUM_TLS> {};
    00075 typedef TinyEnumT<TownLayout> TownLayoutByte; //typedefing-enumification of TownLayout
    00076
    00077 #endif /* TOWN_TYPE_H */