town_type.h

Go to the documentation of this file.
00001 /* $Id: town_type.h 18281 2009-11-24 21:18:11Z smatz $ */
00002 
00003 /*
00004  * This file is part of OpenTTD.
00005  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
00006  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00007  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
00008  */
00009 
00012 #ifndef TOWN_TYPE_H
00013 #define TOWN_TYPE_H
00014 
00015 #include "core/enum_type.hpp"
00016 
00017 typedef uint16 TownID;
00018 struct Town;
00019 
00021 enum TownSize {
00022   TS_SMALL,  
00023   TS_MEDIUM, 
00024   TS_LARGE,  
00025   TS_RANDOM, 
00026 };
00027 
00028 enum {
00029   /* These refer to the maximums, so Appalling is -1000 to -400
00030    * MAXIMUM RATINGS BOUNDARIES */
00031   RATING_MINIMUM     = -1000,
00032   RATING_APPALLING   =  -400,
00033   RATING_VERYPOOR    =  -200,
00034   RATING_POOR        =     0,
00035   RATING_MEDIOCRE    =   200,
00036   RATING_GOOD        =   400,
00037   RATING_VERYGOOD    =   600,
00038   RATING_EXCELLENT   =   800,
00039   RATING_OUTSTANDING =  1000,         
00040 
00041   RATING_MAXIMUM = RATING_OUTSTANDING,
00042 
00043   RATING_INITIAL = 500, 
00044 
00045   /* RATINGS AFFECTING NUMBERS */
00046   RATING_TREE_DOWN_STEP = -35,
00047   RATING_TREE_MINIMUM   = RATING_MINIMUM,
00048   RATING_TREE_UP_STEP   = 7,
00049   RATING_TREE_MAXIMUM   = 220,
00050 
00051   RATING_GROWTH_UP_STEP    =   5, 
00052   RATING_GROWTH_MAXIMUM    = RATING_MEDIOCRE, 
00053   RATING_STATION_UP_STEP   =  12, 
00054   RATING_STATION_DOWN_STEP = -15, 
00055 
00056   RATING_TUNNEL_BRIDGE_DOWN_STEP = -250, 
00057   RATING_TUNNEL_BRIDGE_MINIMUM   =    0, 
00058   RATING_TUNNEL_BRIDGE_NEEDED_PERMISSIVE = 144, 
00059   RATING_TUNNEL_BRIDGE_NEEDED_NEUTRAL    = 208, 
00060   RATING_TUNNEL_BRIDGE_NEEDED_HOSTILE    = 400, 
00061 
00062   RATING_ROAD_DOWN_STEP_INNER =  -50, 
00063   RATING_ROAD_DOWN_STEP_EDGE  =  -18, 
00064   RATING_ROAD_MINIMUM         = -100, 
00065   RATING_ROAD_NEEDED_PERMISSIVE =  16, 
00066   RATING_ROAD_NEEDED_NEUTRAL    =  64, 
00067   RATING_ROAD_NEEDED_HOSTILE    = 112, 
00068 
00069   RATING_HOUSE_MINIMUM  = RATING_MINIMUM,
00070 
00071   RATING_BRIBE_UP_STEP = 200,
00072   RATING_BRIBE_MAXIMUM = 800,
00073   RATING_BRIBE_DOWN_TO = -50        // XXX SHOULD BE SOMETHING LOWER?
00074 };
00075 
00079 enum TownLayout {
00080   TL_BEGIN = 0,
00081   TL_ORIGINAL = 0,     
00082   TL_BETTER_ROADS,     
00083   TL_2X2_GRID,         
00084   TL_3X3_GRID,         
00085 
00086   TL_RANDOM,           
00087 
00088   NUM_TLS,             
00089 };
00091 typedef SimpleTinyEnumT<TownLayout, byte> TownLayoutByte; // typedefing-enumification of TownLayout
00092 
00094 enum TownFounding {
00095   TF_BEGIN = 0,     
00096   TF_FORBIDDEN = 0, 
00097   TF_ALLOWED,       
00098   TF_CUSTOM_LAYOUT, 
00099   TF_END,           
00100 };
00102 typedef SimpleTinyEnumT<TownFounding, byte> TownFoundingByte;
00103 
00104 enum {
00105   MAX_LENGTH_TOWN_NAME_BYTES  =  31, 
00106   MAX_LENGTH_TOWN_NAME_PIXELS = 130, 
00107 };
00108 
00109 #endif /* TOWN_TYPE_H */

Generated on Wed Dec 23 23:27:56 2009 for OpenTTD by  doxygen 1.5.6