settings_type.h

Go to the documentation of this file.
00001 /* $Id: settings_type.h 15428 2009-02-09 02:57:15Z rubidium $ */
00002 
00005 #ifndef SETTINGS_TYPE_H
00006 #define SETTINGS_TYPE_H
00007 
00008 #include "date_type.h"
00009 #include "town_type.h"
00010 #include "transport_type.h"
00011 #include "network/core/config.h"
00012 #include "company_type.h"
00013 
00015 struct DifficultySettings {
00016   byte   max_no_competitors;               
00017   byte   number_towns;                     
00018   byte   number_industries;                
00019   uint32 max_loan;                         
00020   byte   initial_interest;                 
00021   byte   vehicle_costs;                    
00022   byte   competitor_speed;                 
00023   byte   vehicle_breakdowns;               
00024   byte   subsidy_multiplier;               
00025   byte   construction_cost;                
00026   byte   terrain_type;                     
00027   byte   quantity_sea_lakes;               
00028   byte   economy;                          
00029   byte   line_reverse_mode;                
00030   byte   disasters;                        
00031   byte   town_council_tolerance;           
00032   byte   diff_level;                       
00033 };
00034 
00036 struct GUISettings {
00037   bool   vehicle_speed;                    
00038   bool   sg_full_load_any;                 
00039   bool   lost_train_warn;                  
00040   uint8  order_review_system;              
00041   bool   vehicle_income_warn;              
00042   bool   status_long_date;                 
00043   bool   show_finances;                    
00044   bool   sg_new_nonstop;                   
00045   bool   new_nonstop;                      
00046   bool   autoscroll;                       
00047   byte   errmsg_duration;                  
00048   bool   link_terraform_toolbar;           
00049   bool   reverse_scroll;                   
00050   bool   smooth_scroll;                    
00051   bool   measure_tooltip;                  
00052   byte   liveries;                         
00053   bool   prefer_teamchat;                  
00054   uint8  advanced_vehicle_list;            
00055   uint8  loading_indicators;               
00056   uint8  default_rail_type;                
00057   uint8  toolbar_pos;                      
00058   uint8  window_snap_radius;               
00059   uint8  window_soft_limit;                
00060   bool   always_build_infrastructure;      
00061   byte   autosave;                         
00062   bool   keep_all_autosave;                
00063   bool   autosave_on_exit;                 
00064   uint8  date_format_in_default_names;     
00065   byte   max_num_autosaves;                
00066   bool   population_in_label;              
00067   uint8  right_mouse_btn_emulation;        
00068   uint8  scrollwheel_scrolling;            
00069   uint8  scrollwheel_multiplier;           
00070   bool   left_mouse_btn_scrolling;         
00071   bool   pause_on_newgame;                 
00072   bool   enable_signal_gui;                
00073   Year   coloured_news_year;               
00074   bool   timetable_in_ticks;               
00075   bool   quick_goto;                       
00076   bool   bridge_pillars;                   
00077   bool   auto_euro;                        
00078   byte   drag_signals_density;             
00079   Year   semaphore_build_before;           
00080   bool   autorenew;                        
00081   int16  autorenew_months;                 
00082   int32  autorenew_money;                  
00083   byte   news_message_timeout;             
00084   bool   show_track_reservation;           
00085   uint8  default_signal_type;              
00086   uint8  cycle_signal_types;               
00087   byte   station_numtracks;                
00088   byte   station_platlength;               
00089   bool   station_dragdrop;                 
00090   bool   station_show_coverage;            
00091   bool   persistent_buildingtools;         
00092   uint8  expenses_layout;                  
00093 
00094   uint16 console_backlog_timeout;          
00095   uint16 console_backlog_length;           
00096 #ifdef ENABLE_NETWORK
00097   uint16 network_chat_box_width;           
00098   uint8  network_chat_box_height;          
00099 #endif
00100 };
00101 
00103 struct LocaleSettings {
00104   byte   currency;                         
00105   byte   units;                            
00106 };
00107 
00109 struct NetworkSettings {
00110 #ifdef ENABLE_NETWORK
00111   uint16 sync_freq;                                     
00112   uint8  frame_freq;                                    
00113   uint16 max_join_time;                                 
00114   bool   pause_on_join;                                 
00115   char   server_bind_ip[NETWORK_HOSTNAME_LENGTH];       
00116   uint16 server_port;                                   
00117   char   server_name[NETWORK_NAME_LENGTH];              
00118   char   server_password[NETWORK_PASSWORD_LENGTH];      
00119   char   rcon_password[NETWORK_PASSWORD_LENGTH];        
00120   bool   server_advertise;                              
00121   uint8  lan_internet;                                  
00122   char   client_name[NETWORK_NAME_LENGTH];              
00123   char   default_company_pass[NETWORK_PASSWORD_LENGTH]; 
00124   char   connect_to_ip[NETWORK_HOSTNAME_LENGTH];        
00125   char   network_id[NETWORK_UNIQUE_ID_LENGTH];          
00126   bool   autoclean_companies;                           
00127   uint8  autoclean_unprotected;                         
00128   uint8  autoclean_protected;                           
00129   uint8  max_companies;                                 
00130   uint8  max_clients;                                   
00131   uint8  max_spectators;                                
00132   Year   restart_game_year;                             
00133   uint8  min_active_clients;                            
00134   uint8  server_lang;                                   
00135   bool   reload_cfg;                                    
00136   char   last_host[NETWORK_HOSTNAME_LENGTH];            
00137   uint16 last_port;                                     
00138 #else /* ENABLE_NETWORK */
00139 #endif
00140 };
00141 
00143 struct GameCreationSettings {
00144   uint32 generation_seed;                  
00145   Year   starting_year;                    
00146   uint8  map_x;                            
00147   uint8  map_y;                            
00148   byte   land_generator;                   
00149   byte   oil_refinery_limit;               
00150   byte   snow_line_height;                 
00151   byte   tgen_smoothness;                  
00152   byte   tree_placer;                      
00153   byte   heightmap_rotation;               
00154   byte   se_flat_world_height;             
00155   byte   town_name;                        
00156   byte   landscape;                        
00157   byte   snow_line;                        
00158   byte   water_borders;                    
00159 };
00160 
00162 struct ConstructionSettings {
00163   bool   build_on_slopes;                  
00164   bool   autoslope;                        
00165   bool   longbridges;                      
00166   bool   signal_side;                      
00167   bool   extra_dynamite;                   
00168   bool   road_stop_on_town_road;           
00169   uint8  raw_industry_construction;        
00170   bool   freeform_edges;                   
00171 };
00172 
00174 struct AISettings {
00175   bool   ai_in_multiplayer;                
00176   bool   ai_disable_veh_train;             
00177   bool   ai_disable_veh_roadveh;           
00178   bool   ai_disable_veh_aircraft;          
00179   bool   ai_disable_veh_ship;              
00180   uint32 ai_max_opcode_till_suspend;       
00181 };
00182 
00184 struct OPFSettings {
00185   uint16 pf_maxlength;                     
00186   byte   pf_maxdepth;                      
00187 };
00188 
00190 struct NPFSettings {
00196   uint32 npf_max_search_nodes;
00197 
00198   uint32 npf_rail_firstred_penalty;        
00199   uint32 npf_rail_firstred_exit_penalty;   
00200   uint32 npf_rail_lastred_penalty;         
00201   uint32 npf_rail_station_penalty;         
00202   uint32 npf_rail_slope_penalty;           
00203   uint32 npf_rail_curve_penalty;           
00204   uint32 npf_rail_depot_reverse_penalty;   
00205   uint32 npf_rail_pbs_cross_penalty;       
00206   uint32 npf_rail_pbs_signal_back_penalty; 
00207   uint32 npf_buoy_penalty;                 
00208   uint32 npf_water_curve_penalty;          
00209   uint32 npf_road_curve_penalty;           
00210   uint32 npf_crossing_penalty;             
00211   uint32 npf_road_drive_through_penalty;   
00212 };
00213 
00215 struct YAPFSettings {
00216   bool   disable_node_optimization;        
00217   uint32 max_search_nodes;                 
00218   bool   ship_use_yapf;                    
00219   bool   road_use_yapf;                    
00220   bool   rail_use_yapf;                    
00221   uint32 road_slope_penalty;               
00222   uint32 road_curve_penalty;               
00223   uint32 road_crossing_penalty;            
00224   uint32 road_stop_penalty;                
00225   bool   rail_firstred_twoway_eol;         
00226   uint32 rail_firstred_penalty;            
00227   uint32 rail_firstred_exit_penalty;       
00228   uint32 rail_lastred_penalty;             
00229   uint32 rail_lastred_exit_penalty;        
00230   uint32 rail_station_penalty;             
00231   uint32 rail_slope_penalty;               
00232   uint32 rail_curve45_penalty;             
00233   uint32 rail_curve90_penalty;             
00234   uint32 rail_depot_reverse_penalty;       
00235   uint32 rail_crossing_penalty;            
00236   uint32 rail_look_ahead_max_signals;      
00237   int32  rail_look_ahead_signal_p0;        
00238   int32  rail_look_ahead_signal_p1;        
00239   int32  rail_look_ahead_signal_p2;        
00240   uint32 rail_pbs_cross_penalty;           
00241   uint32 rail_pbs_station_penalty;         
00242   uint32 rail_pbs_signal_back_penalty;     
00243   uint32 rail_doubleslip_penalty;          
00244 
00245   uint32 rail_longer_platform_penalty;           
00246   uint32 rail_longer_platform_per_tile_penalty;  
00247   uint32 rail_shorter_platform_penalty;          
00248   uint32 rail_shorter_platform_per_tile_penalty; 
00249 };
00250 
00252 struct PathfinderSettings {
00253   uint8  pathfinder_for_trains;            
00254   uint8  pathfinder_for_roadvehs;          
00255   uint8  pathfinder_for_ships;             
00256   bool   new_pathfinding_all;              
00257 
00258   bool   roadveh_queue;                    
00259   bool   forbid_90_deg;                    
00260 
00261   byte   wait_oneway_signal;               
00262   byte   wait_twoway_signal;               
00263 
00264   bool   reserve_paths;                    
00265   byte   wait_for_pbs_path;                
00266   byte   path_backoff_interval;            
00267 
00268   OPFSettings  opf;                        
00269   NPFSettings  npf;                        
00270   YAPFSettings yapf;                       
00271 };
00272 
00274 struct OrderSettings {
00275   bool   improved_load;                    
00276   bool   gradual_loading;                  
00277   bool   selectgoods;                      
00278   bool   gotodepot;                        
00279   bool   no_servicing_if_no_breakdowns;    
00280   bool   timetabling;                      
00281   bool   serviceathelipad;                 
00282 };
00283 
00285 struct VehicleSettings {
00286   bool   mammoth_trains;                   
00287   uint8  train_acceleration_model;         
00288   bool   wagon_speed_limits;               
00289   bool   disable_elrails;                  
00290   UnitID max_trains;                       
00291   UnitID max_roadveh;                      
00292   UnitID max_aircraft;                     
00293   UnitID max_ships;                        
00294   bool   servint_ispercent;                
00295   uint16 servint_trains;                   
00296   uint16 servint_roadveh;                  
00297   uint16 servint_aircraft;                 
00298   uint16 servint_ships;                    
00299   uint8  plane_speed;                      
00300   uint8  freight_trains;                   
00301   bool   dynamic_engines;                  
00302   bool   never_expire_vehicles;            
00303   byte   extend_vehicle_life;              
00304   byte   road_side;                        
00305 };
00306 
00308 struct EconomySettings {
00309   bool   inflation;                        
00310   bool   bribe;                            
00311   bool   smooth_economy;                   
00312   bool   allow_shares;                     
00313   byte   dist_local_authority;             
00314   bool   exclusive_rights;                 
00315   bool   give_money;                       
00316   bool   mod_road_rebuild;                 
00317   bool   multiple_industry_per_town;       
00318   bool   same_industry_close;              
00319   uint8  town_growth_rate;                 
00320   uint8  larger_towns;                     
00321   uint8  initial_city_size;                
00322   TownLayoutByte town_layout;              
00323   bool   allow_town_roads;                 
00324   bool   station_noise_level;              
00325   uint16 town_noise_population[3];         
00326 };
00327 
00329 struct StationSettings {
00330   bool   modified_catchment;               
00331   bool   join_stations;                    
00332   bool   nonuniform_stations;              
00333   bool   adjacent_stations;                
00334   bool   distant_join_stations;            
00335   bool   always_small_airport;             
00336   byte   station_spread;                   
00337 };
00338 
00340 struct GameSettings {
00341   DifficultySettings   difficulty;         
00342   GameCreationSettings game_creation;      
00343   ConstructionSettings construction;       
00344   AISettings           ai;                 
00345   class AIConfig      *ai_config[MAX_COMPANIES]; 
00346   PathfinderSettings   pf;                 
00347   OrderSettings        order;              
00348   VehicleSettings      vehicle;            
00349   EconomySettings      economy;            
00350   StationSettings      station;            
00351   LocaleSettings       locale;             
00352 };
00353 
00355 struct ClientSettings {
00356   GUISettings          gui;                
00357   NetworkSettings      network;            
00358 };
00359 
00361 extern ClientSettings _settings_client;
00362 
00364 extern GameSettings _settings_game;
00365 
00367 extern GameSettings _settings_newgame;
00368 
00369 #endif /* SETTINGS_TYPE_H */

Generated on Mon Feb 16 23:12:10 2009 for openttd by  doxygen 1.5.6