src/openttd.h
author convert-repo
Mon, 07 Apr 2008 16:21:55 +0000
changeset 10076 dfd70e42c4ae
parent 9273 ca5e00698c01
child 10247 145d0458b685
permissions -rw-r--r--
update tags
2186
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2163
diff changeset
     1
/* $Id$ */
2536
8c4e298f4886 (svn r3065) -Codechange/Add: Modified the bridge drawing code so that the basic offset is read from the RailTypeInfo struct. This is (hopefully) the last DrawTile change on the way to electrified railways. While being at it, de-mystified the function a bit and added some asserts.
celestar
parents: 2526
diff changeset
     2
/** @file openttd.h */
2186
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2163
diff changeset
     3
2075
7f0ca01392db (svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents: 2055
diff changeset
     4
#ifndef OPENTTD_H
7f0ca01392db (svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents: 2055
diff changeset
     5
#define OPENTTD_H
0
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
#ifndef VARDEF
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     8
#define VARDEF extern
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     9
#endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    10
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    11
// Forward declarations of structs.
4401
9320726518bf (svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents: 4397
diff changeset
    12
typedef byte LandscapeID;
9320726518bf (svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents: 4397
diff changeset
    13
typedef uint16 UnitID;
7446
1c4d469f986e (svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
rubidium
parents: 7439
diff changeset
    14
8617
931e0970d509 (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents: 8615
diff changeset
    15
enum GameModes {
931e0970d509 (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents: 8615
diff changeset
    16
	GM_MENU,
931e0970d509 (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents: 8615
diff changeset
    17
	GM_NORMAL,
931e0970d509 (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents: 8615
diff changeset
    18
	GM_EDITOR
931e0970d509 (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents: 8615
diff changeset
    19
};
931e0970d509 (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents: 8615
diff changeset
    20
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    21
enum SwitchModes {
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 4330
diff changeset
    22
	SM_NONE            =  0,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 4330
diff changeset
    23
	SM_NEWGAME         =  1,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 4330
diff changeset
    24
	SM_EDITOR          =  2,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 4330
diff changeset
    25
	SM_LOAD            =  3,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 4330
diff changeset
    26
	SM_MENU            =  4,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 4330
diff changeset
    27
	SM_SAVE            =  5,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 4330
diff changeset
    28
	SM_GENRANDLAND     =  6,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 4330
diff changeset
    29
	SM_LOAD_SCENARIO   =  9,
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 4330
diff changeset
    30
	SM_START_SCENARIO  = 10,
4300
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents: 4297
diff changeset
    31
	SM_START_HEIGHTMAP = 11,
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 4330
diff changeset
    32
	SM_LOAD_HEIGHTMAP  = 12,
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    33
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    34
2828
996de8e891c7 (svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents: 2794
diff changeset
    35
996de8e891c7 (svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents: 2794
diff changeset
    36
/* Modes for GenerateWorld */
996de8e891c7 (svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents: 2794
diff changeset
    37
enum GenerateWorldModes {
4300
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents: 4297
diff changeset
    38
	GW_NEWGAME   = 0,    /* Generate a map for a new game */
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents: 4297
diff changeset
    39
	GW_EMPTY     = 1,    /* Generate an empty map (sea-level) */
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents: 4297
diff changeset
    40
	GW_RANDOM    = 2,    /* Generate a random map for SE */
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents: 4297
diff changeset
    41
	GW_HEIGHTMAP = 3,    /* Generate a newgame from a heightmap */
2828
996de8e891c7 (svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents: 2794
diff changeset
    42
};
996de8e891c7 (svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents: 2794
diff changeset
    43
996de8e891c7 (svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents: 2794
diff changeset
    44
/* Modes for InitializeGame, those are _bits_! */
996de8e891c7 (svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents: 2794
diff changeset
    45
enum InitializeGameModes {
996de8e891c7 (svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents: 2794
diff changeset
    46
	IG_NONE       = 0,  /* Don't do anything special */
996de8e891c7 (svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents: 2794
diff changeset
    47
	IG_DATE_RESET = 1,  /* Reset the date when initializing a game */
996de8e891c7 (svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents: 2794
diff changeset
    48
};
996de8e891c7 (svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents: 2794
diff changeset
    49
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6317
diff changeset
    50
enum TransportType {
159
139cf78bfb28 (svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents: 152
diff changeset
    51
	/* These constants are for now linked to the representation of bridges
3333
41f8abe65d1e (svn r4111) Fix/Remove some stale comments
tron
parents: 3173
diff changeset
    52
	 * and tunnels, so they can be used by GetTileTrackStatus_TunnelBridge.
41f8abe65d1e (svn r4111) Fix/Remove some stale comments
tron
parents: 3173
diff changeset
    53
	 * In an ideal world, these constants would be used everywhere when
41f8abe65d1e (svn r4111) Fix/Remove some stale comments
tron
parents: 3173
diff changeset
    54
	 * accessing tunnels and bridges. For now, you should just not change
41f8abe65d1e (svn r4111) Fix/Remove some stale comments
tron
parents: 3173
diff changeset
    55
	 * the values for road and rail.
159
139cf78bfb28 (svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents: 152
diff changeset
    56
	 */
5838
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    57
	TRANSPORT_BEGIN = 0,
3017
915fae59d5e0 (svn r3597) Miscellaneous (I like that word) changes: Fix some indentation, add consts, reduce indentation level by short-circuit logic, convert if cascades to switch, whitespace, bracing, plus some minor stuff
tron
parents: 2828
diff changeset
    58
	TRANSPORT_RAIL = 0,
159
139cf78bfb28 (svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents: 152
diff changeset
    59
	TRANSPORT_ROAD = 1,
4434
4175805666a5 (svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc.
rubidium
parents: 4401
diff changeset
    60
	TRANSPORT_WATER, // = 2
1967
c57192f4c121 (svn r2473) - Add: VehicleMayEnterTile(), which checks if the tile owner of a tile is correct for a vehicle to enter it. Based upon glx's code.
matthijs
parents: 1932
diff changeset
    61
	TRANSPORT_END,
c57192f4c121 (svn r2473) - Add: VehicleMayEnterTile(), which checks if the tile owner of a tile is correct for a vehicle to enter it. Based upon glx's code.
matthijs
parents: 1932
diff changeset
    62
	INVALID_TRANSPORT = 0xff,
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6317
diff changeset
    63
};
159
139cf78bfb28 (svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents: 152
diff changeset
    64
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    65
/* Display Options */
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    66
enum {
7087
b65f7298f106 (svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents: 7073
diff changeset
    67
	DO_SHOW_TOWN_NAMES    = 0,
b65f7298f106 (svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents: 7073
diff changeset
    68
	DO_SHOW_STATION_NAMES = 1,
b65f7298f106 (svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents: 7073
diff changeset
    69
	DO_SHOW_SIGNS         = 2,
b65f7298f106 (svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents: 7073
diff changeset
    70
	DO_FULL_ANIMATION     = 3,
b65f7298f106 (svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents: 7073
diff changeset
    71
	DO_FULL_DETAIL        = 5,
b65f7298f106 (svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents: 7073
diff changeset
    72
	DO_WAYPOINTS          = 6,
6923
6913c8a82cc0 (svn r9563) -Feature: Add more finer control to transparency options, including a new toolbar, accessible from the map menu or Ctrl X. Patch by Wolf01.
peter1138
parents: 6683
diff changeset
    73
};
6913c8a82cc0 (svn r9563) -Feature: Add more finer control to transparency options, including a new toolbar, accessible from the map menu or Ctrl X. Patch by Wolf01.
peter1138
parents: 6683
diff changeset
    74
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    75
/* Landscape types */
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    76
enum {
6683
7ec558346172 (svn r9400) -Codechange: Use some more representative enum names for landscape types.
belugas
parents: 6574
diff changeset
    77
	LT_TEMPERATE  = 0,
7ec558346172 (svn r9400) -Codechange: Use some more representative enum names for landscape types.
belugas
parents: 6574
diff changeset
    78
	LT_ARCTIC     = 1,
7ec558346172 (svn r9400) -Codechange: Use some more representative enum names for landscape types.
belugas
parents: 6574
diff changeset
    79
	LT_TROPIC     = 2,
7ec558346172 (svn r9400) -Codechange: Use some more representative enum names for landscape types.
belugas
parents: 6574
diff changeset
    80
	LT_TOYLAND    = 3,
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    81
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    82
	NUM_LANDSCAPE = 4,
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    83
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    84
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6317
diff changeset
    85
struct ViewportSign {
849
c6223dbdb202 (svn r1330) Increase size of some vars from int16 to int32 to guard against future overflows
tron
parents: 842
diff changeset
    86
	int32 left;
c6223dbdb202 (svn r1330) Increase size of some vars from int16 to int32 to guard against future overflows
tron
parents: 842
diff changeset
    87
	int32 top;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    88
	byte width_1, width_2;
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6317
diff changeset
    89
};
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    90
2526
cae4842086a9 (svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents: 2436
diff changeset
    91
enum {
cae4842086a9 (svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents: 2436
diff changeset
    92
	SORT_ASCENDING  = 0,
cae4842086a9 (svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents: 2436
diff changeset
    93
	SORT_DESCENDING = 1,
cae4842086a9 (svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents: 2436
diff changeset
    94
	SORT_BY_DATE    = 0,
cae4842086a9 (svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents: 2436
diff changeset
    95
	SORT_BY_NAME    = 2
cae4842086a9 (svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents: 2436
diff changeset
    96
};
cae4842086a9 (svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents: 2436
diff changeset
    97
8764
65746a5248ec (svn r11832) -Codechange: get rid of (quite) some VARDEFs.
rubidium
parents: 8760
diff changeset
    98
extern byte _savegame_sort_order;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    99
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   100
enum {
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 4330
diff changeset
   101
	MAX_SCREEN_WIDTH  = 2048,
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   102
	MAX_SCREEN_HEIGHT = 1200,
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   103
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   104
1397
b04402b901cd (svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents: 1363
diff changeset
   105
/* In certain windows you navigate with the arrow keys. Do not scroll the
b04402b901cd (svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents: 1363
diff changeset
   106
 * gameview when here. Bitencoded variable that only allows scrolling if all
b04402b901cd (svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents: 1363
diff changeset
   107
 * elements are zero */
b04402b901cd (svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents: 1363
diff changeset
   108
enum {
4344
5d0e40cd67b9 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 4330
diff changeset
   109
	SCROLL_CON  = 0,
1397
b04402b901cd (svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents: 1363
diff changeset
   110
	SCROLL_EDIT = 1,
b04402b901cd (svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents: 1363
diff changeset
   111
	SCROLL_SAVE = 2,
1843
733f83b6483a (svn r2348) - Fix: Do not scroll the game with the arrow keys when the chatbox is open
Darkvater
parents: 1802
diff changeset
   112
	SCROLL_CHAT = 4,
1397
b04402b901cd (svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents: 1363
diff changeset
   113
};
8764
65746a5248ec (svn r11832) -Codechange: get rid of (quite) some VARDEFs.
rubidium
parents: 8760
diff changeset
   114
extern byte _no_scroll;
1397
b04402b901cd (svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents: 1363
diff changeset
   115
2380
3b26659b4a9a (svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
Darkvater
parents: 2254
diff changeset
   116
/** To have a concurrently running thread interface with the main program, use
3b26659b4a9a (svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
Darkvater
parents: 2254
diff changeset
   117
 * the OTTD_SendThreadMessage() function. Actions to perform upon the message are handled
3b26659b4a9a (svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
Darkvater
parents: 2254
diff changeset
   118
 * in the ProcessSentMessage() function */
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6317
diff changeset
   119
enum ThreadMsg {
4323
78204e7c3100 (svn r5977) -Fix [FS#78]: never set I-am-a-thread bool to true IN the thread. Machines with
truelight
parents: 4312
diff changeset
   120
	MSG_OTTD_NO_MESSAGE,
78204e7c3100 (svn r5977) -Fix [FS#78]: never set I-am-a-thread bool to true IN the thread. Machines with
truelight
parents: 4312
diff changeset
   121
	MSG_OTTD_SAVETHREAD_DONE,
78204e7c3100 (svn r5977) -Fix [FS#78]: never set I-am-a-thread bool to true IN the thread. Machines with
truelight
parents: 4312
diff changeset
   122
	MSG_OTTD_SAVETHREAD_ERROR,
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6317
diff changeset
   123
};
2380
3b26659b4a9a (svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
Darkvater
parents: 2254
diff changeset
   124
3b26659b4a9a (svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
Darkvater
parents: 2254
diff changeset
   125
void OTTD_SendThreadMessage(ThreadMsg msg);
3b26659b4a9a (svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
Darkvater
parents: 2254
diff changeset
   126
8617
931e0970d509 (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents: 8615
diff changeset
   127
extern byte _game_mode;
931e0970d509 (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents: 8615
diff changeset
   128
extern bool _exit_game;
9166
b37d9f4017e5 (svn r12335) -Codechange: Don't stuff signed values into a unsigned variable when the variable can just be unsigned...
peter1138
parents: 8820
diff changeset
   129
extern int8 _pause_game;
8617
931e0970d509 (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents: 8615
diff changeset
   130
2075
7f0ca01392db (svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents: 2055
diff changeset
   131
#endif /* OPENTTD_H */