settings_type.h

Go to the documentation of this file.
00001 /* $Id: settings_type.h 15695 2009-03-12 23:54:20Z belugas $ */
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   uint16 custom_town_number;               
00160 };
00161 
00163 struct ConstructionSettings {
00164   bool   build_on_slopes;                  
00165   bool   autoslope;                        
00166   bool   longbridges;                      
00167   bool   signal_side;                      
00168   bool   extra_dynamite;                   
00169   bool   road_stop_on_town_road;           
00170   bool   road_stop_on_competitor_road;     
00171   uint8  raw_industry_construction;        
00172   bool   freeform_edges;                   
00173 };
00174 
00176 struct AISettings {
00177   bool   ai_in_multiplayer;                
00178   bool   ai_disable_veh_train;             
00179   bool   ai_disable_veh_roadveh;           
00180   bool   ai_disable_veh_aircraft;          
00181   bool   ai_disable_veh_ship;              
00182   uint32 ai_max_opcode_till_suspend;       
00183 };
00184 
00186 struct OPFSettings {
00187   uint16 pf_maxlength;                     
00188   byte   pf_maxdepth;                      
00189 };
00190 
00192 struct NPFSettings {
00198   uint32 npf_max_search_nodes;
00199 
00200   uint32 npf_rail_firstred_penalty;        
00201   uint32 npf_rail_firstred_exit_penalty;   
00202   uint32 npf_rail_lastred_penalty;         
00203   uint32 npf_rail_station_penalty;         
00204   uint32 npf_rail_slope_penalty;           
00205   uint32 npf_rail_curve_penalty;           
00206   uint32 npf_rail_depot_reverse_penalty;   
00207   uint32 npf_rail_pbs_cross_penalty;       
00208   uint32 npf_rail_pbs_signal_back_penalty; 
00209   uint32 npf_buoy_penalty;                 
00210   uint32 npf_water_curve_penalty;          
00211   uint32 npf_road_curve_penalty;           
00212   uint32 npf_crossing_penalty;             
00213   uint32 npf_road_drive_through_penalty;   
00214 };
00215 
00217 struct YAPFSettings {
00218   bool   disable_node_optimization;        
00219   uint32 max_search_nodes;                 
00220   bool   ship_use_yapf;                    
00221   bool   road_use_yapf;                    
00222   bool   rail_use_yapf;                    
00223   uint32 road_slope_penalty;               
00224   uint32 road_curve_penalty;               
00225   uint32 road_crossing_penalty;            
00226   uint32 road_stop_penalty;                
00227   bool   rail_firstred_twoway_eol;         
00228   uint32 rail_firstred_penalty;            
00229   uint32 rail_firstred_exit_penalty;       
00230   uint32 rail_lastred_penalty;             
00231   uint32 rail_lastred_exit_penalty;        
00232   uint32 rail_station_penalty;             
00233   uint32 rail_slope_penalty;               
00234   uint32 rail_curve45_penalty;             
00235   uint32 rail_curve90_penalty;             
00236   uint32 rail_depot_reverse_penalty;       
00237   uint32 rail_crossing_penalty;            
00238   uint32 rail_look_ahead_max_signals;      
00239   int32  rail_look_ahead_signal_p0;        
00240   int32  rail_look_ahead_signal_p1;        
00241   int32  rail_look_ahead_signal_p2;        
00242   uint32 rail_pbs_cross_penalty;           
00243   uint32 rail_pbs_station_penalty;         
00244   uint32 rail_pbs_signal_back_penalty;     
00245   uint32 rail_doubleslip_penalty;          
00246 
00247   uint32 rail_longer_platform_penalty;           
00248   uint32 rail_longer_platform_per_tile_penalty;  
00249   uint32 rail_shorter_platform_penalty;          
00250   uint32 rail_shorter_platform_per_tile_penalty; 
00251 };
00252 
00254 struct PathfinderSettings {
00255   uint8  pathfinder_for_trains;            
00256   uint8  pathfinder_for_roadvehs;          
00257   uint8  pathfinder_for_ships;             
00258   bool   new_pathfinding_all;              
00259 
00260   bool   roadveh_queue;                    
00261   bool   forbid_90_deg;                    
00262 
00263   byte   wait_oneway_signal;               
00264   byte   wait_twoway_signal;               
00265 
00266   bool   reserve_paths;                    
00267   byte   wait_for_pbs_path;                
00268   byte   path_backoff_interval;            
00269 
00270   OPFSettings  opf;                        
00271   NPFSettings  npf;                        
00272   YAPFSettings yapf;                       
00273 };
00274 
00276 struct OrderSettings {
00277   bool   improved_load;                    
00278   bool   gradual_loading;                  
00279   bool   selectgoods;                      
00280   bool   gotodepot;                        
00281   bool   no_servicing_if_no_breakdowns;    
00282   bool   timetabling;                      
00283   bool   serviceathelipad;                 
00284 };
00285 
00287 struct VehicleSettings {
00288   bool   mammoth_trains;                   
00289   uint8  train_acceleration_model;         
00290   bool   wagon_speed_limits;               
00291   bool   disable_elrails;                  
00292   UnitID max_trains;                       
00293   UnitID max_roadveh;                      
00294   UnitID max_aircraft;                     
00295   UnitID max_ships;                        
00296   bool   servint_ispercent;                
00297   uint16 servint_trains;                   
00298   uint16 servint_roadveh;                  
00299   uint16 servint_aircraft;                 
00300   uint16 servint_ships;                    
00301   uint8  plane_speed;                      
00302   uint8  freight_trains;                   
00303   bool   dynamic_engines;                  
00304   bool   never_expire_vehicles;            
00305   byte   extend_vehicle_life;              
00306   byte   road_side;                        
00307 };
00308 
00310 struct EconomySettings {
00311   bool   inflation;                        
00312   bool   bribe;                            
00313   bool   smooth_economy;                   
00314   bool   allow_shares;                     
00315   byte   dist_local_authority;             
00316   bool   exclusive_rights;                 
00317   bool   give_money;                       
00318   bool   mod_road_rebuild;                 
00319   bool   multiple_industry_per_town;       
00320   bool   same_industry_close;              
00321   uint8  town_growth_rate;                 
00322   uint8  larger_towns;                     
00323   uint8  initial_city_size;                
00324   TownLayoutByte town_layout;              
00325   bool   allow_town_roads;                 
00326   bool   station_noise_level;              
00327   uint16 town_noise_population[3];         
00328 };
00329 
00331 struct StationSettings {
00332   bool   modified_catchment;               
00333   bool   join_stations;                    
00334   bool   nonuniform_stations;              
00335   bool   adjacent_stations;                
00336   bool   distant_join_stations;            
00337   bool   always_small_airport;             
00338   byte   station_spread;                   
00339 };
00340 
00342 struct GameSettings {
00343   DifficultySettings   difficulty;         
00344   GameCreationSettings game_creation;      
00345   ConstructionSettings construction;       
00346   AISettings           ai;                 
00347   class AIConfig      *ai_config[MAX_COMPANIES]; 
00348   PathfinderSettings   pf;                 
00349   OrderSettings        order;              
00350   VehicleSettings      vehicle;            
00351   EconomySettings      economy;            
00352   StationSettings      station;            
00353   LocaleSettings       locale;             
00354 };
00355 
00357 struct ClientSettings {
00358   GUISettings          gui;                
00359   NetworkSettings      network;            
00360 };
00361 
00363 extern ClientSettings _settings_client;
00364 
00366 extern GameSettings _settings_game;
00367 
00369 extern GameSettings _settings_newgame;
00370 
00371 #endif /* SETTINGS_TYPE_H */

Generated on Sun Mar 15 22:49:50 2009 for openttd by  doxygen 1.5.6