variables.h
author truelight
Fri, 04 Feb 2005 13:23:29 +0000
changeset 1279 bc761aad52b3
parent 1247 3851739bfd09
child 1282 ea2ae881814c
permissions -rw-r--r--
(svn r1783) -Add: Dynamic vehicles (now up to 64k of vehicles)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     1
#ifndef VARIABLES_H
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     2
#define VARIABLES_H
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     3
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     4
#include "player.h"
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     5
//enum { DPARAM_SIZE = 32 };
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     6
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     7
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     8
// ********* START OF SAVE REGION
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     9
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    10
#if !defined(MAX_PATH)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    11
# define MAX_PATH 260
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    12
#endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    13
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    14
// Prices and also the fractional part.
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    15
VARDEF Prices _price;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    16
VARDEF uint16 _price_frac[NUM_PRICES];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    17
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    18
VARDEF uint32 _cargo_payment_rates[NUM_CARGO];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    19
VARDEF uint16 _cargo_payment_rates_frac[NUM_CARGO];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    20
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    21
typedef struct {
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    22
	GameDifficulty diff;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    23
	byte diff_level;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    24
	byte currency;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    25
	bool kilometers;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    26
	byte town_name;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    27
	byte landscape;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    28
	byte snow_line;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    29
	byte autosave;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    30
	byte road_side;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    31
} GameOptions;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    32
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    33
// These are the options for the current game
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    34
VARDEF GameOptions _opt;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    35
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    36
// These are the options for the new game
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    37
VARDEF GameOptions _new_opt;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    38
759
a445474d7c21 (svn r1215) Feature: You can now make a custom currency by chosing "Custom..."
dominik
parents: 708
diff changeset
    39
enum {
a445474d7c21 (svn r1215) Feature: You can now make a custom currency by chosing "Custom..."
dominik
parents: 708
diff changeset
    40
	CF_NOEURO = 0,
a445474d7c21 (svn r1215) Feature: You can now make a custom currency by chosing "Custom..."
dominik
parents: 708
diff changeset
    41
	CF_ISEURO = 1,
a445474d7c21 (svn r1215) Feature: You can now make a custom currency by chosing "Custom..."
dominik
parents: 708
diff changeset
    42
};
a445474d7c21 (svn r1215) Feature: You can now make a custom currency by chosing "Custom..."
dominik
parents: 708
diff changeset
    43
a445474d7c21 (svn r1215) Feature: You can now make a custom currency by chosing "Custom..."
dominik
parents: 708
diff changeset
    44
typedef struct {
a445474d7c21 (svn r1215) Feature: You can now make a custom currency by chosing "Custom..."
dominik
parents: 708
diff changeset
    45
	uint16 rate;
a445474d7c21 (svn r1215) Feature: You can now make a custom currency by chosing "Custom..."
dominik
parents: 708
diff changeset
    46
	char separator;
a445474d7c21 (svn r1215) Feature: You can now make a custom currency by chosing "Custom..."
dominik
parents: 708
diff changeset
    47
	uint16 to_euro;
788
951b52443d48 (svn r1255) Renamed "postfix" to "suffix", for strings and variable names
dominik
parents: 761
diff changeset
    48
	char prefix[16];
951b52443d48 (svn r1255) Renamed "postfix" to "suffix", for strings and variable names
dominik
parents: 761
diff changeset
    49
	char suffix[16];
759
a445474d7c21 (svn r1215) Feature: You can now make a custom currency by chosing "Custom..."
dominik
parents: 708
diff changeset
    50
} CurrencySpec;
a445474d7c21 (svn r1215) Feature: You can now make a custom currency by chosing "Custom..."
dominik
parents: 708
diff changeset
    51
761
9bfb58cb3a69 (svn r1219) -Fix: compilation for windows release build (forgotten VARDEF)
darkvater
parents: 759
diff changeset
    52
VARDEF CurrencySpec _currency_specs[24];
759
a445474d7c21 (svn r1215) Feature: You can now make a custom currency by chosing "Custom..."
dominik
parents: 708
diff changeset
    53
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    54
// Current date
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    55
VARDEF uint16 _date;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    56
VARDEF uint16 _date_fract;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    57
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    58
// Amount of game ticks
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    59
VARDEF uint16 _tick_counter;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    60
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    61
// Used when calling OnNewDay
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    62
VARDEF VehicleID _vehicle_id_ctr_day;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    63
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    64
// Skip aging of cargo?
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    65
VARDEF byte _age_cargo_skip_counter;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    66
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    67
// Available aircraft types
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    68
VARDEF byte _avail_aircraft;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    69
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    70
// Position in tile loop
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    71
VARDEF TileIndex _cur_tileloop_tile;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    72
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    73
// Also save scrollpos_x, scrollpos_y and zoom
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    74
VARDEF uint16 _disaster_delay;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    75
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    76
// Determines what station to operate on in the
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    77
//  tick handler.
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    78
VARDEF uint16 _station_tick_ctr;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    79
206
7f8c26d8526b (svn r207) -Codechange: randomizer handling
signde
parents: 193
diff changeset
    80
VARDEF uint32 _random_seeds[2][2];
7f8c26d8526b (svn r207) -Codechange: randomizer handling
signde
parents: 193
diff changeset
    81
VARDEF uint32 _player_seeds[MAX_PLAYERS][2];
7f8c26d8526b (svn r207) -Codechange: randomizer handling
signde
parents: 193
diff changeset
    82
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    83
// Iterator through all towns in OnTick_Town
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    84
VARDEF byte _cur_town_ctr;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    85
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    86
VARDEF uint _cur_player_tick_index;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    87
VARDEF uint _next_competitor_start;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    88
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    89
// Determines how often to run the tree loop
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    90
VARDEF byte _trees_tick_ctr;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    91
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    92
// Keep track of current game position
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    93
VARDEF int _saved_scrollpos_x;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    94
VARDEF int _saved_scrollpos_y;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    95
VARDEF byte _saved_scrollpos_zoom;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    96
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    97
// ********* END OF SAVE REGION
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    98
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    99
typedef struct Patches {
568
b0d0df062880 (svn r979) Allow more realistically sized catchment areas
Celestar
parents: 561
diff changeset
   100
	bool modified_catchment;	//different-size catchment areas
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   101
	bool vehicle_speed;			// show vehicle speed
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   102
	bool build_on_slopes;		// allow building on slopes
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   103
	bool mammoth_trains;		// allow very long trains
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   104
	bool join_stations;			// allow joining of train stations
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   105
	bool full_load_any;			// new full load calculation, any cargo must be full
523
8871819c9afd (svn r853) -Feature: Implement improved vehicle loading algorithm
tron
parents: 485
diff changeset
   106
	bool improved_load;			// improved loading algorithm
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   107
	byte station_spread;		// amount a station may spread
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   108
	bool inflation;					// disable inflation
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   109
	bool selectgoods;       // only send the goods to station if a train has been there
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   110
	bool longbridges;				// allow 100 tile long bridges
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   111
	bool gotodepot;					// allow goto depot in orders
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   112
	bool build_rawmaterial_ind;	 // allow building raw material industries
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   113
	bool multiple_industry_per_town;	// allow many industries of the same type per town
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   114
	bool same_industry_close;	// allow same type industries to be built close to each other
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   115
	uint16 lost_train_days;	// if a train doesn't switch order in this amount of days, a train is lost warning is shown
55
73fae6c6568e (svn r56) Improved order checker + patch setting for it (celestar)
dominik
parents: 26
diff changeset
   116
	uint8 order_review_system;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   117
	bool train_income_warn; // if train is generating little income, show a warning
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   118
	bool status_long_date;		// always show long date in status bar
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   119
	bool signal_side;				// show signals on right side
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   120
	bool show_finances;			// show finances at end of year
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   121
	bool new_nonstop;				// ttdpatch compatible nonstop handling
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   122
	bool roadveh_queue;			// buggy road vehicle queueing
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   123
	bool autoscroll;				// scroll when moving mouse to the edge.
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   124
	byte errmsg_duration;		// duration of error message
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   125
	byte snow_line_height;	// a number 0-15 that configured snow line height
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   126
	bool bribe;							// enable bribing the local authority
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   127
	bool new_depot_finding;	// use new algorithm to find a depot.
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   128
	bool nonuniform_stations;// allow nonuniform train stations
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   129
	bool always_small_airport; // always allow small airports
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   130
	bool realistic_acceleration; // realistic acceleration for trains
1247
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1233
diff changeset
   131
	bool forbid_90_deg; // forbid trains to make 90 deg turns
91
6477ea0c240d (svn r92) Feature: invisible trees when in transparent mode (patch entry)
dominik
parents: 84
diff changeset
   132
	bool invisible_trees; // don't show trees when buildings are transparent
1037
4fbbb01cf87b (svn r1538) -Feature: [988816] Disable servicing when breakdowns set to none (jaguar7)
darkvater
parents: 998
diff changeset
   133
	bool no_servicing_if_no_breakdowns; // dont send vehicles to depot when breakdowns are disabled
193
0a7025304867 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents: 188
diff changeset
   134
68
4051f3c8efa2 (svn r69) -Feature: align toolbar left/center/right patch (TrueLight)
darkvater
parents: 67
diff changeset
   135
	uint8 toolbar_pos;			// position of toolbars, 0=left, 1=center, 2=right
350
36f4ee00d0b6 (svn r538) -Feature: Windows snap at each other
tron
parents: 220
diff changeset
   136
	uint8 window_snap_radius; // Windows snap at each other if closer than this
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   137
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   138
	byte max_trains;				//max trains in game per player (these are 8bit because the unitnumber field can't hold more)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   139
	byte max_roadveh;				//max trucks in game per player
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   140
	byte max_aircraft;			//max planes in game per player
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   141
	byte max_ships;					//max ships in game per player
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   142
156
8fef5e5752d6 (svn r157) -Feature: [1009708] Percent-based service intervals. Send a vehicle to depot after it has lost X% of its reliability (mivlad)
darkvater
parents: 108
diff changeset
   143
	bool servint_ispercent;	// service intervals are in percents
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   144
	uint16 servint_trains;	// service interval for trains
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   145
	uint16 servint_roadveh;	// service interval for road vehicles
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   146
	uint16 servint_aircraft;// service interval for aircraft
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   147
	uint16 servint_ships;		// service interval for ships
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   148
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   149
	bool autorenew;
26
4c08274a29dc (svn r27) -Fix: [1006715] Autorenew issues
truelight
parents: 20
diff changeset
   150
	int16 autorenew_months;
4c08274a29dc (svn r27) -Fix: [1006715] Autorenew issues
truelight
parents: 20
diff changeset
   151
	int32 autorenew_money;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   152
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   153
	bool new_pathfinding;		// use optimized pathfinding algoritm for trains
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   154
	byte pf_maxdepth;				// maximum recursion depth when searching for a train route for new pathfinder
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   155
	uint16 pf_maxlength;		// maximum length when searching for a train route for new pathfinder
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   156
193
0a7025304867 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents: 188
diff changeset
   157
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   158
	bool bridge_pillars;		// show bridge pillars for high bridges
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   159
20
13a47054d81e (svn r21) Remove: PE_BYTE (bit-bools) in favour of PE_BOOL
truelight
parents: 11
diff changeset
   160
	bool ai_disable_veh_train;		// disable types for AI
13a47054d81e (svn r21) Remove: PE_BYTE (bit-bools) in favour of PE_BOOL
truelight
parents: 11
diff changeset
   161
	bool ai_disable_veh_roadveh;		// disable types for AI
13a47054d81e (svn r21) Remove: PE_BYTE (bit-bools) in favour of PE_BOOL
truelight
parents: 11
diff changeset
   162
	bool ai_disable_veh_aircraft;		// disable types for AI
13a47054d81e (svn r21) Remove: PE_BYTE (bit-bools) in favour of PE_BOOL
truelight
parents: 11
diff changeset
   163
	bool ai_disable_veh_ship;		// disable types for AI
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   164
	uint32 starting_date;		// starting date
998
c90459c24842 (svn r1496) -Fix: highscore no longer crashes in network games with a dedicated server. At the end of the game (can only be set by the server) the highscore is shown for the top5 companies of that game
darkvater
parents: 988
diff changeset
   165
	uint32 ending_date;		// end of the game (just show highscore)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   166
	uint32 colored_news_date; // when does newspaper become colored?
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   167
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   168
	bool keep_all_autosave;		// name the autosave in a different way.
643
a9c84d04eacb (svn r1076) Feature: Patch setting to autosave the game on exit
dominik
parents: 614
diff changeset
   169
	bool autosave_on_exit;		// save an autosave when you quit the game, but do not ask "Do you really want to quit?"
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   170
	bool extra_dynamite;			// extra dynamite
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   171
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   172
	bool never_expire_vehicles; // never expire vehicles
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   173
	byte extend_vehicle_life;	// extend vehicle life by this many years
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   174
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   175
	bool auto_euro;						// automatically switch to euro in 2002
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   176
	bool serviceathelipad;	// service helicopters at helipads automatically (no need to send to depot)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   177
	bool smooth_economy;		// smooth economy
930
ab42e283749d (svn r1418) -Feature: [1098254] (dis)Allow Shares. Add patch options to allow buying/selling of shares (Hackykid)
darkvater
parents: 900
diff changeset
   178
	bool allow_shares;			// allow the buying/selling of shares
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   179
	byte dist_local_authority;		// distance for town local authority, default 20
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   180
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   181
	byte wait_oneway_signal;	//waitingtime in days before a oneway signal
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   182
	byte wait_twoway_signal;	//waitingtime in days before a twoway signal
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   183
1218
c6a624956ac6 (svn r1722) -Feature: Bigger maps - anyone?
tron
parents: 1178
diff changeset
   184
	uint map_x; // Size of map
c6a624956ac6 (svn r1722) -Feature: Bigger maps - anyone?
tron
parents: 1178
diff changeset
   185
	uint map_y;
c6a624956ac6 (svn r1722) -Feature: Bigger maps - anyone?
tron
parents: 1178
diff changeset
   186
58
b9fdcc9b5c90 (svn r59) -Feature: Added Autosignals, just like Autorail. Can copy signal style, convert signal<->semaphore, etc. Big thanks to betatesters Dribbel and Testman57 (Darkvater)
darkvater
parents: 55
diff changeset
   187
	byte drag_signals_density; // many signals density
84
1e0721c29bad (svn r85) -Add: initial commit of new AI (enable in Patch menu)
truelight
parents: 70
diff changeset
   188
	bool ainew_active;  // Is the new AI active?
835
f6a341f541d7 (svn r1312) -Add: Patch which is on by default: population in label of the town
truelight
parents: 788
diff changeset
   189
1247
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1233
diff changeset
   190
	/* New Path Finding */
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1233
diff changeset
   191
	bool new_pathfinding_all; /* Use the newest pathfinding algorithm for all */
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1233
diff changeset
   192
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1233
diff changeset
   193
	uint32 npf_rail_firstred_penalty; /* The penalty for when the first signal is red */
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1233
diff changeset
   194
	uint32 npf_rail_station_penalty; /* The penalty for station tiles */
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1233
diff changeset
   195
	uint32 npf_rail_slope_penalty; /* The penalty for sloping upwards */
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1233
diff changeset
   196
835
f6a341f541d7 (svn r1312) -Add: Patch which is on by default: population in label of the town
truelight
parents: 788
diff changeset
   197
	bool population_in_label; // Show the population of a town in his label?
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   198
} Patches;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   199
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   200
VARDEF Patches _patches;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   201
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   202
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   203
typedef struct Cheat {
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   204
	bool been_used;	// has this cheat been used before?
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   205
	byte value;			// active?
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   206
} Cheat;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   207
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   208
193
0a7025304867 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents: 188
diff changeset
   209
// WARNING! Do _not_ remove entries in Cheats struct or change the order
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   210
// of the existing ones! Would break downward compatibility.
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   211
// Only add new entries at the end of the struct!
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   212
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   213
typedef struct Cheats {
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   214
	Cheat magic_bulldozer;		// dynamite industries, unmovables
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   215
	Cheat switch_player;			// change to another player
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   216
	Cheat money;							// get rich
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   217
	Cheat crossing_tunnels;		// allow tunnels that cross each other
100
8e87945f6bcb (svn r101) New cheat: switch climate
dominik
parents: 91
diff changeset
   218
	Cheat build_in_pause;			// build while in pause mode
8e87945f6bcb (svn r101) New cheat: switch climate
dominik
parents: 91
diff changeset
   219
	Cheat no_jetcrash;				// no jet will crash on small airports anymore
8e87945f6bcb (svn r101) New cheat: switch climate
dominik
parents: 91
diff changeset
   220
	Cheat switch_climate;
108
8e2e584a9500 (svn r109) added/heavily modified patch by truesatan: cheat change date
dominik
parents: 105
diff changeset
   221
	Cheat change_date;				//changes date ingame
1176
cc9d8618620d (svn r1678) Added cheat option for setting production of raw-material product industries in game
miham
parents: 1128
diff changeset
   222
	Cheat setup_prod;				//setup raw-material production in game
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   223
} Cheats;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   224
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   225
VARDEF Cheats _cheats;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   226
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   227
typedef struct Paths {
193
0a7025304867 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents: 188
diff changeset
   228
	char *personal_dir;  // includes cfg file and save folder
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   229
	char *game_data_dir; // includes data, gm, lang
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   230
	char *data_dir;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   231
	char *gm_dir;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   232
	char *lang_dir;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   233
	char *save_dir;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   234
	char *autosave_dir;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   235
	char *scenario_dir;
561
9a0c469a251c (svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents: 543
diff changeset
   236
	char *second_data_dir;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   237
} Paths;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   238
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   239
VARDEF Paths _path;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   240
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   241
// Which options struct does options modify?
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   242
VARDEF GameOptions *_opt_mod_ptr;
543
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 534
diff changeset
   243
VARDEF GameOptions _opt_mod_temp;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   244
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   245
// NOSAVE: Used in palette animations only, not really important.
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   246
VARDEF int _timer_counter;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   247
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   248
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   249
// NOSAVE: can be determined from _date
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   250
VARDEF byte _cur_year;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   251
VARDEF byte _cur_month;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   252
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   253
// NOSAVE: can be determined from player structs
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   254
VARDEF byte _player_colors[MAX_PLAYERS];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   255
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   256
VARDEF bool _in_state_game_loop;
206
7f8c26d8526b (svn r207) -Codechange: randomizer handling
signde
parents: 193
diff changeset
   257
VARDEF uint32 _frame_counter;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   258
84
1e0721c29bad (svn r85) -Add: initial commit of new AI (enable in Patch menu)
truelight
parents: 70
diff changeset
   259
VARDEF bool _is_ai_player; // current player is an AI player? - Can be removed if new AI is done
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   260
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   261
VARDEF bool _do_autosave;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   262
VARDEF int _autosave_ctr;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   263
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   264
VARDEF byte _local_player;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   265
VARDEF byte _display_opt;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   266
VARDEF byte _pause;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   267
VARDEF int _caret_timer;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   268
VARDEF uint16 _news_display_opt;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   269
VARDEF byte _game_mode;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   270
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   271
VARDEF StringID _error_message;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   272
VARDEF StringID _error_message_2;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   273
VARDEF int32 _additional_cash_required;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   274
472
ba697666956e (svn r723) Increase size of dparam so more parameters can be passed to string output
tron
parents: 350
diff changeset
   275
VARDEF uint32 _decode_parameters[20];
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   276
VARDEF byte _current_player;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   277
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   278
VARDEF int _docommand_recursive;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   279
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   280
VARDEF uint32 _pressed_key; // Low 8 bits = ASCII, High 16 bits = keycode
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   281
VARDEF bool _ctrl_pressed;  // Is Ctrl pressed?
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   282
VARDEF bool _shift_pressed;  // Is Alt pressed?
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   283
VARDEF byte _dirkeys;				// 1=left, 2=up, 4=right, 8=down
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   284
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   285
VARDEF bool _fullscreen;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   286
VARDEF bool _double_size;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   287
VARDEF uint _display_hz;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   288
VARDEF bool _force_full_redraw;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   289
VARDEF uint _fullscreen_bpp;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   290
VARDEF bool _fast_forward;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   291
VARDEF bool _rightclick_emulate;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   292
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   293
// IN/OUT parameters to commands
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   294
VARDEF byte _yearly_expenses_type;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   295
VARDEF TileIndex _terraform_err_tile;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   296
VARDEF uint _build_tunnel_endtile;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   297
VARDEF bool _generating_world;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   298
VARDEF int _new_town_size;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   299
VARDEF uint _returned_refit_amount;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   300
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   301
// Deals with the type of the savegame, independent of extension
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   302
typedef struct {
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   303
	int mode;						// savegame/scenario type (old, new)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   304
	byte name[MAX_PATH];	// name
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   305
} SmallFiosItem;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   306
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   307
// Used when switching from the intro menu.
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   308
VARDEF byte _switch_mode;
172
8d8b3383470d (svn r173) -Network: [1023231] Debug Code + ErrorBoxes + Load Game/Scenario. Added some more desync debug code and replaced some of the error() calls with some better error boxes. Hopefully find desyncs easier (sign_de)
darkvater
parents: 156
diff changeset
   309
VARDEF StringID _switch_mode_errorstr;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   310
VARDEF bool _exit_game;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   311
VARDEF SmallFiosItem _file_to_saveload;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   312
VARDEF byte _make_screenshot;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   313
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   314
VARDEF byte _get_z_hint; // used as a hint to getslopez to return the right height at a bridge.
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   315
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   316
VARDEF char *_newgrf_files[32];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   317
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   318
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   319
VARDEF Vehicle *_place_clicked_vehicle;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   320
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   321
VARDEF char _ini_videodriver[16], _ini_musicdriver[16], _ini_sounddriver[16];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   322
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   323
VARDEF bool _cache_sprites;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   324
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   325
// debug features
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   326
VARDEF char _savedump_path[64];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   327
VARDEF uint _savedump_first, _savedump_freq, _savedump_last;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   328
// end of debug features
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   329
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   330
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   331
typedef struct {
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   332
	char *name;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   333
	char *file;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   334
} DynLangEnt;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   335
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   336
// Used for dynamic language support
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   337
typedef struct {
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   338
	int num; // number of languages
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   339
	int curr; // currently selected language index
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   340
	char curr_file[32]; // currently selected language file
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   341
	StringID dropdown[32 + 1]; // used in settings dialog
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   342
	DynLangEnt ent[32];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   343
} DynamicLanguages;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   344
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   345
VARDEF DynamicLanguages _dynlang;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   346
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   347
VARDEF int _num_resolutions;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   348
VARDEF uint16 _resolutions[32][2];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   349
VARDEF uint16 _cur_resolution[2];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   350
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   351
VARDEF char _screenshot_format_name[8];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   352
VARDEF int _num_screenshot_formats, _cur_screenshot_format;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   353
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   354
VARDEF char _savegame_format[8];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   355
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   356
VARDEF char *_config_file;
983
4765bf636f6b (svn r1479) -Added highscore chart (accessible from the difficulty window) with top5 companies for a given difficulty (select the difficulty in the menu)
darkvater
parents: 930
diff changeset
   357
VARDEF char *_highscore_file;
704
e843dd369938 (svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents: 679
diff changeset
   358
VARDEF char *_log_file;
e843dd369938 (svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents: 679
diff changeset
   359
VARDEF FILE *_log_file_fd;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   360
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   361
// NOSAVE: These can be recalculated from InitializeLandscapeVariables
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   362
typedef struct {
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   363
	StringID names_s[NUM_CARGO];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   364
	StringID names_p[NUM_CARGO];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   365
	StringID names_long_s[NUM_CARGO];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   366
	StringID names_long_p[NUM_CARGO];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   367
	StringID names_short[NUM_CARGO];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   368
	byte weights[NUM_CARGO];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   369
	SpriteID sprites[NUM_CARGO];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   370
	byte transit_days_1[NUM_CARGO];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   371
	byte transit_days_2[NUM_CARGO];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   372
	byte ai_railwagon[3][NUM_CARGO];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   373
	byte ai_roadveh_start[NUM_CARGO];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   374
	byte ai_roadveh_count[NUM_CARGO];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   375
} CargoConst;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   376
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   377
VARDEF CargoConst _cargoc;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   378
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   379
typedef byte TownNameGenerator(byte *buf, uint32 seed);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   380
extern TownNameGenerator * const _town_name_generators[];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   381
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   382
534
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   383
static inline void SetDParamX(uint32 *s, uint n, uint32 v)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   384
{
534
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   385
	s[n] = v;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   386
}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   387
534
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   388
static inline uint32 GetDParamX(const uint32 *s, uint n)
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   389
{
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   390
	return s[n];
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   391
}
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   392
534
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   393
static inline void SetDParam(uint n, uint32 v)
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   394
{
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   395
	assert(n < lengthof(_decode_parameters));
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   396
	_decode_parameters[n] = v;
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   397
}
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   398
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   399
static inline void SetDParam64(uint n, uint64 v)
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   400
{
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   401
	assert(n + 1 < lengthof(_decode_parameters));
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   402
	_decode_parameters[n + 0] = v & 0xffffffff;
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   403
	_decode_parameters[n + 1] = v >> 32;
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   404
}
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   405
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   406
static inline uint32 GetDParam(uint n)
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   407
{
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   408
	assert(n < lengthof(_decode_parameters));
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   409
	return _decode_parameters[n];
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   410
}
306bc86eb23e (svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents: 523
diff changeset
   411
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   412
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   413
#define COPY_IN_DPARAM(offs,src,num) memcpy(_decode_parameters + offs, src, sizeof(uint32) * (num))
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   414
#define COPY_OUT_DPARAM(dst,offs,num) memcpy(dst,_decode_parameters + offs, sizeof(uint32) * (num))
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   415
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   416
#define INJECT_DPARAM(n) InjectDparam(n);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   417
889
64d2f7d5f02b (svn r1375) -Fix: [1050990] Buying trains sometimes accounted for incorrectly. Was the result of the cost getting reset in a recursive call of docommand. That is fixed. In addition all cost-commands are typed explicitely. Please do not forget to do so or your costs will be credited to construction if you are unlucky.
darkvater
parents: 842
diff changeset
   418
#define SET_EXPENSES_TYPE(x) _yearly_expenses_type = x;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   419
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   420
/* landscape.c */
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   421
extern const byte _tileh_to_sprite[32];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   422
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   423
static const byte _inclined_tileh[] = {
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   424
	3,9,3,6,12,6,12,9,
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   425
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   426
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   427
extern const TileTypeProcs * const _tile_type_procs[16];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   428
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   429
/* station_cmd.c */
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   430
// there are 5 types of airport (Country (3x4) , City(6x6), Metropolitan(6x6), International(7x7), Heliport(1x1)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   431
// will become obsolete once airports are loaded from seperate file
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   432
extern const byte _airport_size_x[5];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   433
extern const byte _airport_size_y[5];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   434
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   435
/* misc */
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   436
VARDEF byte str_buffr[512];
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   437
VARDEF char _screenshot_name[128];
485
7a7484b85037 (svn r767) Introduce USERSTRING_LEN (128) and try to make sure we don't overflow it anywhere (as long as we keep USERSTRING_LEN above 7 or so).
pasky
parents: 472
diff changeset
   438
#define USERSTRING_LEN 128
7a7484b85037 (svn r767) Introduce USERSTRING_LEN (128) and try to make sure we don't overflow it anywhere (as long as we keep USERSTRING_LEN above 7 or so).
pasky
parents: 472
diff changeset
   439
VARDEF char _userstring[USERSTRING_LEN];
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   440
VARDEF byte _vehicle_design_names;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   441
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   442
/* tunnelbridge */
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   443
#define MAX_BRIDGES 13
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   444
1247
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1233
diff changeset
   445
/* For new pathfinding. Define here so it is globally available */
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1233
diff changeset
   446
#define NPF_TILE_LENGTH 100
3851739bfd09 (svn r1751) - Feature: New PathFinder (NPF).
matthijs
parents: 1233
diff changeset
   447
842
efc3546bc313 (svn r1323) Adding autoreplace feature
bjarni
parents: 835
diff changeset
   448
/* Autoreplace vehicle stuff*/
1128
ca7f860db7ac (svn r1629) added a counter to tell how many engines you have of each type to the autoreplace vehicle windows and made them show only the vehicles you actually have in the left list.
bjarni
parents: 1037
diff changeset
   449
VARDEF byte _autoreplace_array[256];
ca7f860db7ac (svn r1629) added a counter to tell how many engines you have of each type to the autoreplace vehicle windows and made them show only the vehicles you actually have in the left list.
bjarni
parents: 1037
diff changeset
   450
VARDEF uint16 _player_num_engines[256];
1178
7c39a741eafb (svn r1680) Feature: Replace train GUI now remembers the railtype selected in the dropdown menu
bjarni
parents: 1176
diff changeset
   451
VARDEF byte _railtype_selected_in_replace_gui;
842
efc3546bc313 (svn r1323) Adding autoreplace feature
bjarni
parents: 835
diff changeset
   452
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   453
/* Debugging levels */
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   454
VARDEF int _debug_spritecache_level;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   455
VARDEF int _debug_misc_level;
65
f9f866bc609c (svn r66) -Fix Station list updated on station deletion/station rename
darkvater
parents: 58
diff changeset
   456
VARDEF int _debug_grf_level;
84
1e0721c29bad (svn r85) -Add: initial commit of new AI (enable in Patch menu)
truelight
parents: 70
diff changeset
   457
VARDEF int _debug_ai_level;
185
646403e35006 (svn r186) -Add: debug 'net' for network debug (sign_de)
truelight
parents: 172
diff changeset
   458
VARDEF int _debug_net_level;
1233
3c020872c8b9 (svn r1737) Add DEBUG category "map" and use it to print the map size when allocating the map
tron
parents: 1218
diff changeset
   459
VARDEF int _debug_map_level;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   460
704
e843dd369938 (svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents: 679
diff changeset
   461
/* Forking stuff */
e843dd369938 (svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents: 679
diff changeset
   462
VARDEF bool _dedicated_forks;
e843dd369938 (svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents: 679
diff changeset
   463
VARDEF bool _dedicated_enabled;
708
c456ebed2d8a (svn r1160) -Fix: redid revision 1159. pid_t should not be defined under windows.
truelight
parents: 707
diff changeset
   464
#ifdef UNIX
c456ebed2d8a (svn r1160) -Fix: redid revision 1159. pid_t should not be defined under windows.
truelight
parents: 707
diff changeset
   465
	VARDEF pid_t _dedicated_pid;
c456ebed2d8a (svn r1160) -Fix: redid revision 1159. pid_t should not be defined under windows.
truelight
parents: 707
diff changeset
   466
#endif
704
e843dd369938 (svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents: 679
diff changeset
   467
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   468
void CDECL debug(const char *s, ...);
66
d0f669221657 (svn r67) -Forget to change debug message for grfspecial.c
darkvater
parents: 65
diff changeset
   469
#ifdef NO_DEBUG_MESSAGES
d0f669221657 (svn r67) -Forget to change debug message for grfspecial.c
darkvater
parents: 65
diff changeset
   470
	#define DEBUG(name, level)
d0f669221657 (svn r67) -Forget to change debug message for grfspecial.c
darkvater
parents: 65
diff changeset
   471
#else
d0f669221657 (svn r67) -Forget to change debug message for grfspecial.c
darkvater
parents: 65
diff changeset
   472
	#define DEBUG(name, level) if (level == 0 || _debug_ ## name ## _level >= level) debug
d0f669221657 (svn r67) -Forget to change debug message for grfspecial.c
darkvater
parents: 65
diff changeset
   473
#endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   474
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   475
#endif /* VARIABLES_H */