variables.h
changeset 4344 5d0e40cd67b9
parent 4300 687a17c9c557
child 4387 4899b8fc715e
equal deleted inserted replaced
4343:c5b7f4f03168 4344:5d0e40cd67b9
    80 VARDEF byte _saved_scrollpos_zoom;
    80 VARDEF byte _saved_scrollpos_zoom;
    81 
    81 
    82 // ********* END OF SAVE REGION
    82 // ********* END OF SAVE REGION
    83 
    83 
    84 typedef struct Patches {
    84 typedef struct Patches {
    85 	bool modified_catchment;	//different-size catchment areas
    85 	bool modified_catchment;            // different-size catchment areas
    86 	bool vehicle_speed;			// show vehicle speed
    86 	bool vehicle_speed;                 // show vehicle speed
    87 	bool build_on_slopes;		// allow building on slopes
    87 	bool build_on_slopes;               // allow building on slopes
    88 	bool mammoth_trains;		// allow very long trains
    88 	bool mammoth_trains;                // allow very long trains
    89 	bool join_stations;			// allow joining of train stations
    89 	bool join_stations;                 // allow joining of train stations
    90 	bool full_load_any;			// new full load calculation, any cargo must be full
    90 	bool full_load_any;                 // new full load calculation, any cargo must be full
    91 	bool improved_load;			// improved loading algorithm
    91 	bool improved_load;                 // improved loading algorithm
    92 	byte station_spread;		// amount a station may spread
    92 	byte station_spread;                // amount a station may spread
    93 	bool inflation;					// disable inflation
    93 	bool inflation;                     // disable inflation
    94 	bool selectgoods;       // only send the goods to station if a train has been there
    94 	bool selectgoods;                   // only send the goods to station if a train has been there
    95 	bool longbridges;				// allow 100 tile long bridges
    95 	bool longbridges;                   // allow 100 tile long bridges
    96 	bool gotodepot;					// allow goto depot in orders
    96 	bool gotodepot;                     // allow goto depot in orders
    97 	bool build_rawmaterial_ind;	 // allow building raw material industries
    97 	bool build_rawmaterial_ind;         // allow building raw material industries
    98 	bool multiple_industry_per_town;	// allow many industries of the same type per town
    98 	bool multiple_industry_per_town;    // allow many industries of the same type per town
    99 	bool same_industry_close;	// allow same type industries to be built close to each other
    99 	bool same_industry_close;           // allow same type industries to be built close to each other
   100 	uint16 lost_train_days;	// if a train doesn't switch order in this amount of days, a train is lost warning is shown
   100 	uint16 lost_train_days;             // if a train doesn't switch order in this amount of days, a train is lost warning is shown
   101 	uint8 order_review_system;
   101 	uint8 order_review_system;
   102 	bool train_income_warn; // if train is generating little income, show a warning
   102 	bool train_income_warn;             // if train is generating little income, show a warning
   103 	bool status_long_date;		// always show long date in status bar
   103 	bool status_long_date;              // always show long date in status bar
   104 	bool signal_side;				// show signals on right side
   104 	bool signal_side;                   // show signals on right side
   105 	bool show_finances;			// show finances at end of year
   105 	bool show_finances;                 // show finances at end of year
   106 	bool new_nonstop;				// ttdpatch compatible nonstop handling
   106 	bool new_nonstop;                   // ttdpatch compatible nonstop handling
   107 	bool roadveh_queue;			// buggy road vehicle queueing
   107 	bool roadveh_queue;                 // buggy road vehicle queueing
   108 	bool autoscroll;				// scroll when moving mouse to the edge.
   108 	bool autoscroll;                    // scroll when moving mouse to the edge.
   109 	byte errmsg_duration;		// duration of error message
   109 	byte errmsg_duration;               // duration of error message
   110 	byte land_generator;		// the landscape generator
   110 	byte land_generator;                // the landscape generator
   111 	byte oil_refinery_limit;	// distance oil refineries allowed from map edge
   111 	byte oil_refinery_limit;            // distance oil refineries allowed from map edge
   112 	byte snow_line_height;	// a number 0-15 that configured snow line height
   112 	byte snow_line_height;              // a number 0-15 that configured snow line height
   113 	byte tgen_smoothness;		// how rough is the terrain from 0-3
   113 	byte tgen_smoothness;               // how rough is the terrain from 0-3
   114 	uint32 generation_seed;	// noise seed for world generation
   114 	uint32 generation_seed;             // noise seed for world generation
   115 	byte tree_placer;				// the tree placer algorithm
   115 	byte tree_placer;                   // the tree placer algorithm
   116 	byte heightmap_rotation;// rotation director for the heightmap
   116 	byte heightmap_rotation;            // rotation director for the heightmap
   117 	uint16 progress_update_interval;// interval between two updates of the progress in hundreds of milliseconds
   117 	uint16 progress_update_interval;    // interval between two updates of the progress in hundreds of milliseconds
   118 	byte se_flat_world_height;	// land height a flat world gets in SE
   118 	byte se_flat_world_height;          // land height a flat world gets in SE
   119 	bool bribe;							// enable bribing the local authority
   119 	bool bribe;                         // enable bribing the local authority
   120 	bool nonuniform_stations;// allow nonuniform train stations
   120 	bool nonuniform_stations;           // allow nonuniform train stations
   121 	bool always_small_airport; // always allow small airports
   121 	bool always_small_airport;          // always allow small airports
   122 	bool realistic_acceleration; // realistic acceleration for trains
   122 	bool realistic_acceleration;        // realistic acceleration for trains
   123 	bool wagon_speed_limits; // enable wagon speed limits
   123 	bool wagon_speed_limits;            // enable wagon speed limits
   124 	bool forbid_90_deg; // forbid trains to make 90 deg turns
   124 	bool forbid_90_deg;                 // forbid trains to make 90 deg turns
   125 	bool invisible_trees; // don't show trees when buildings are transparent
   125 	bool invisible_trees;               // don't show trees when buildings are transparent
   126 	bool no_servicing_if_no_breakdowns; // dont send vehicles to depot when breakdowns are disabled
   126 	bool no_servicing_if_no_breakdowns; // dont send vehicles to depot when breakdowns are disabled
   127 	bool link_terraform_toolbar; // display terraform toolbar when displaying rail, road, water and airport toolbars
   127 	bool link_terraform_toolbar;        // display terraform toolbar when displaying rail, road, water and airport toolbars
   128 	bool reverse_scroll; // Right-Click-Scrolling scrolls in the opposite direction
   128 	bool reverse_scroll;                // Right-Click-Scrolling scrolls in the opposite direction
   129 
   129 
   130 	uint8 toolbar_pos;			// position of toolbars, 0=left, 1=center, 2=right
   130 	uint8 toolbar_pos;                  // position of toolbars, 0=left, 1=center, 2=right
   131 	uint8 window_snap_radius; // Windows snap at each other if closer than this
   131 	uint8 window_snap_radius;           // Windows snap at each other if closer than this
   132 
   132 
   133 	UnitID max_trains;				//max trains in game per player (these are 16bit because the unitnumber field can't hold more)
   133 	UnitID max_trains;                  // max trains in game per player (these are 16bit because the unitnumber field can't hold more)
   134 	UnitID max_roadveh;				//max trucks in game per player
   134 	UnitID max_roadveh;                 // max trucks in game per player
   135 	UnitID max_aircraft;			//max planes in game per player
   135 	UnitID max_aircraft;                // max planes in game per player
   136 	UnitID max_ships;					//max ships in game per player
   136 	UnitID max_ships;                   // max ships in game per player
   137 
   137 
   138 	bool servint_ispercent;	// service intervals are in percents
   138 	bool servint_ispercent;             // service intervals are in percents
   139 	uint16 servint_trains;	// service interval for trains
   139 	uint16 servint_trains;              // service interval for trains
   140 	uint16 servint_roadveh;	// service interval for road vehicles
   140 	uint16 servint_roadveh;             // service interval for road vehicles
   141 	uint16 servint_aircraft;// service interval for aircraft
   141 	uint16 servint_aircraft;            // service interval for aircraft
   142 	uint16 servint_ships;		// service interval for ships
   142 	uint16 servint_ships;               // service interval for ships
   143 
   143 
   144 	bool autorenew;
   144 	bool autorenew;
   145 	int16 autorenew_months;
   145 	int16 autorenew_months;
   146 	int32 autorenew_money;
   146 	int32 autorenew_money;
   147 
   147 
   148 	byte pf_maxdepth;				// maximum recursion depth when searching for a train route for new pathfinder
   148 	byte pf_maxdepth;                   // maximum recursion depth when searching for a train route for new pathfinder
   149 	uint16 pf_maxlength;		// maximum length when searching for a train route for new pathfinder
   149 	uint16 pf_maxlength;                // maximum length when searching for a train route for new pathfinder
   150 
   150 
   151 
   151 
   152 	bool bridge_pillars;		// show bridge pillars for high bridges
   152 	bool bridge_pillars;                // show bridge pillars for high bridges
   153 
   153 
   154 	bool ai_disable_veh_train;		// disable types for AI
   154 	bool ai_disable_veh_train;          // disable types for AI
   155 	bool ai_disable_veh_roadveh;		// disable types for AI
   155 	bool ai_disable_veh_roadveh;        // disable types for AI
   156 	bool ai_disable_veh_aircraft;		// disable types for AI
   156 	bool ai_disable_veh_aircraft;       // disable types for AI
   157 	bool ai_disable_veh_ship;		// disable types for AI
   157 	bool ai_disable_veh_ship;           // disable types for AI
   158 	Year starting_year;				// starting date
   158 	Year starting_year;                 // starting date
   159 	Year ending_year;					// end of the game (just show highscore)
   159 	Year ending_year;                   // end of the game (just show highscore)
   160 	Year colored_news_year;		// when does newspaper become colored?
   160 	Year colored_news_year;             // when does newspaper become colored?
   161 
   161 
   162 	bool keep_all_autosave;		// name the autosave in a different way.
   162 	bool keep_all_autosave;             // name the autosave in a different way.
   163 	bool autosave_on_exit;		// save an autosave when you quit the game, but do not ask "Do you really want to quit?"
   163 	bool autosave_on_exit;              // save an autosave when you quit the game, but do not ask "Do you really want to quit?"
   164 	byte max_num_autosaves;		// controls how many autosavegames are made before the game starts to overwrite (names them 0 to max_num_autosaves - 1)
   164 	byte max_num_autosaves;             // controls how many autosavegames are made before the game starts to overwrite (names them 0 to max_num_autosaves - 1)
   165 	bool extra_dynamite;			// extra dynamite
   165 	bool extra_dynamite;                // extra dynamite
   166 
   166 
   167 	bool never_expire_vehicles; // never expire vehicles
   167 	bool never_expire_vehicles;         // never expire vehicles
   168 	byte extend_vehicle_life;	// extend vehicle life by this many years
   168 	byte extend_vehicle_life;           // extend vehicle life by this many years
   169 
   169 
   170 	bool auto_euro;						// automatically switch to euro in 2002
   170 	bool auto_euro;                     // automatically switch to euro in 2002
   171 	bool serviceathelipad;	// service helicopters at helipads automatically (no need to send to depot)
   171 	bool serviceathelipad;              // service helicopters at helipads automatically (no need to send to depot)
   172 	bool smooth_economy;		// smooth economy
   172 	bool smooth_economy;                // smooth economy
   173 	bool allow_shares;			// allow the buying/selling of shares
   173 	bool allow_shares;                  // allow the buying/selling of shares
   174 	byte dist_local_authority;		// distance for town local authority, default 20
   174 	byte dist_local_authority;          // distance for town local authority, default 20
   175 
   175 
   176 	byte wait_oneway_signal;	//waitingtime in days before a oneway signal
   176 	byte wait_oneway_signal;            // waitingtime in days before a oneway signal
   177 	byte wait_twoway_signal;	//waitingtime in days before a twoway signal
   177 	byte wait_twoway_signal;            // waitingtime in days before a twoway signal
   178 
   178 
   179 	uint8 map_x; // Size of map
   179 	uint8 map_x;                        // Size of map
   180 	uint8 map_y;
   180 	uint8 map_y;
   181 
   181 
   182 	byte drag_signals_density; // many signals density
   182 	byte drag_signals_density;          // many signals density
   183 	bool ainew_active;  // Is the new AI active?
   183 	bool ainew_active;                  // Is the new AI active?
   184 	bool ai_in_multiplayer; // Do we allow AIs in multiplayer
   184 	bool ai_in_multiplayer;             // Do we allow AIs in multiplayer
   185 
   185 
   186 	/*
   186 	/*
   187 	 * New Path Finding
   187 		* New Path Finding
   188 	 */
   188 		*/
   189 	bool new_pathfinding_all; /* Use the newest pathfinding algorithm for all */
   189 	bool new_pathfinding_all; /* Use the newest pathfinding algorithm for all */
   190 
   190 
   191 	/**
   191 	/**
   192 	 * The maximum amount of search nodes a single NPF run should take. This
   192 		* The maximum amount of search nodes a single NPF run should take. This
   193 	 * limit should make sure performance stays at acceptable levels at the cost
   193 		* limit should make sure performance stays at acceptable levels at the cost
   194 	 * of not being perfect anymore. This will probably be fixed in a more
   194 		* of not being perfect anymore. This will probably be fixed in a more
   195 	 * sophisticated way sometime soon
   195 		* sophisticated way sometime soon
   196 	 */
   196 		*/
   197 	uint32 npf_max_search_nodes;
   197 	uint32 npf_max_search_nodes;
   198 
   198 
   199 	uint32 npf_rail_firstred_penalty; /* The penalty for when the first signal is red (and it is not an exit or combo signal) */
   199 	uint32 npf_rail_firstred_penalty;      /* The penalty for when the first signal is red (and it is not an exit or combo signal) */
   200 	uint32 npf_rail_firstred_exit_penalty; /* The penalty for when the first signal is red (and it is an exit or combo signal) */
   200 	uint32 npf_rail_firstred_exit_penalty; /* The penalty for when the first signal is red (and it is an exit or combo signal) */
   201 	uint32 npf_rail_lastred_penalty; /* The penalty for when the last signal is red */
   201 	uint32 npf_rail_lastred_penalty;       /* The penalty for when the last signal is red */
   202 	uint32 npf_rail_station_penalty; /* The penalty for station tiles */
   202 	uint32 npf_rail_station_penalty;       /* The penalty for station tiles */
   203 	uint32 npf_rail_slope_penalty; /* The penalty for sloping upwards */
   203 	uint32 npf_rail_slope_penalty;         /* The penalty for sloping upwards */
   204 	uint32 npf_rail_curve_penalty; /* The penalty for curves */
   204 	uint32 npf_rail_curve_penalty;         /* The penalty for curves */
   205 	uint32 npf_rail_depot_reverse_penalty; /* The penalty for reversing in depots */
   205 	uint32 npf_rail_depot_reverse_penalty; /* The penalty for reversing in depots */
   206 	uint32 npf_buoy_penalty; /* The penalty for going over (through) a buoy */
   206 	uint32 npf_buoy_penalty;               /* The penalty for going over (through) a buoy */
   207 	uint32 npf_water_curve_penalty; /* The penalty for curves */
   207 	uint32 npf_water_curve_penalty;        /* The penalty for curves */
   208 	uint32 npf_road_curve_penalty; /* The penalty for curves */
   208 	uint32 npf_road_curve_penalty;         /* The penalty for curves */
   209 	uint32 npf_crossing_penalty; /* The penalty for level crossings */
   209 	uint32 npf_crossing_penalty;           /* The penalty for level crossings */
   210 
   210 
   211 	bool population_in_label; // Show the population of a town in his label?
   211 	bool population_in_label; // Show the population of a town in his label?
   212 
   212 
   213 	/** YAPF settings */
   213 	/** YAPF settings */
   214 	YapfSettings  yapf;
   214 	YapfSettings  yapf;
   227 // WARNING! Do _not_ remove entries in Cheats struct or change the order
   227 // WARNING! Do _not_ remove entries in Cheats struct or change the order
   228 // of the existing ones! Would break downward compatibility.
   228 // of the existing ones! Would break downward compatibility.
   229 // Only add new entries at the end of the struct!
   229 // Only add new entries at the end of the struct!
   230 
   230 
   231 typedef struct Cheats {
   231 typedef struct Cheats {
   232 	Cheat magic_bulldozer;		// dynamite industries, unmovables
   232 	Cheat magic_bulldozer;  // dynamite industries, unmovables
   233 	Cheat switch_player;			// change to another player
   233 	Cheat switch_player;    // change to another player
   234 	Cheat money;							// get rich
   234 	Cheat money;            // get rich
   235 	Cheat crossing_tunnels;		// allow tunnels that cross each other
   235 	Cheat crossing_tunnels; // allow tunnels that cross each other
   236 	Cheat build_in_pause;			// build while in pause mode
   236 	Cheat build_in_pause;   // build while in pause mode
   237 	Cheat no_jetcrash;				// no jet will crash on small airports anymore
   237 	Cheat no_jetcrash;      // no jet will crash on small airports anymore
   238 	Cheat switch_climate;
   238 	Cheat switch_climate;
   239 	Cheat change_date;				//changes date ingame
   239 	Cheat change_date;      // changes date ingame
   240 	Cheat setup_prod;				//setup raw-material production in game
   240 	Cheat setup_prod;       // setup raw-material production in game
   241 	Cheat elrail;                   //allow electric engines to be powered on conventional rail
   241 	Cheat elrail;           // allow electric engines to be powered on conventional rail
   242 } Cheats;
   242 } Cheats;
   243 
   243 
   244 VARDEF Cheats _cheats;
   244 VARDEF Cheats _cheats;
   245 
   245 
   246 typedef struct Paths {
   246 typedef struct Paths {
   279 VARDEF StringID _error_message;
   279 VARDEF StringID _error_message;
   280 VARDEF int32 _additional_cash_required;
   280 VARDEF int32 _additional_cash_required;
   281 
   281 
   282 VARDEF uint32 _decode_parameters[20];
   282 VARDEF uint32 _decode_parameters[20];
   283 
   283 
   284 VARDEF uint32 _pressed_key; // Low 8 bits = ASCII, High 16 bits = keycode
   284 VARDEF uint32 _pressed_key;  // Low 8 bits = ASCII, High 16 bits = keycode
   285 VARDEF bool _ctrl_pressed;  // Is Ctrl pressed?
   285 VARDEF bool _ctrl_pressed;   // Is Ctrl pressed?
   286 VARDEF bool _shift_pressed;  // Is Alt pressed?
   286 VARDEF bool _shift_pressed;  // Is Alt pressed?
   287 VARDEF byte _dirkeys;				// 1=left, 2=up, 4=right, 8=down
   287 VARDEF byte _dirkeys;        // 1 = left, 2 = up, 4 = right, 8 = down
   288 
   288 
   289 VARDEF bool _fullscreen;
   289 VARDEF bool _fullscreen;
   290 VARDEF bool _fast_forward;
   290 VARDEF bool _fast_forward;
   291 VARDEF bool _rightclick_emulate;
   291 VARDEF bool _rightclick_emulate;
   292 
   292