author | rubidium |
Wed, 07 May 2008 21:45:27 +0000 | |
changeset 10457 | ea18877d8eba |
parent 10447 | a73b8ec66203 |
child 10770 | c1e1fb4bd561 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
10252
8d87c2f342cb
(svn r12784) -Codechange: handle the asynchronious save 'handlers' in saveload.cpp instead of openttd.cpp.
rubidium
parents:
10247
diff
changeset
|
2 |
|
10429
1b99254f9607
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
10397
diff
changeset
|
3 |
/** @file openttd.h Some generic types. */ |
2186 | 4 |
|
2075
7f0ca01392db
(svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents:
2055
diff
changeset
|
5 |
#ifndef OPENTTD_H |
7f0ca01392db
(svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents:
2055
diff
changeset
|
6 |
#define OPENTTD_H |
0 | 7 |
|
8 |
#ifndef VARDEF |
|
9 |
#define VARDEF extern |
|
10 |
#endif |
|
11 |
||
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
|
12 |
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
|
13 |
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
|
14 |
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
|
15 |
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
|
16 |
}; |
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 |
|
0 | 18 |
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
|
19 |
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
|
20 |
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
|
21 |
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
|
22 |
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
|
23 |
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
|
24 |
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
|
25 |
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
|
26 |
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
|
27 |
SM_START_SCENARIO = 10, |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
28 |
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
|
29 |
SM_LOAD_HEIGHTMAP = 12, |
0 | 30 |
}; |
31 |
||
2828
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
32 |
|
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
33 |
/* Modes for GenerateWorld */ |
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
34 |
enum GenerateWorldModes { |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
35 |
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
|
36 |
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
|
37 |
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
|
38 |
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
|
39 |
}; |
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
40 |
|
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
41 |
/* Modes for InitializeGame, those are _bits_! */ |
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
42 |
enum InitializeGameModes { |
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
43 |
IG_NONE = 0, /* Don't do anything special */ |
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
44 |
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
|
45 |
}; |
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
46 |
|
0 | 47 |
/* Display Options */ |
48 |
enum { |
|
7087
b65f7298f106
(svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents:
7073
diff
changeset
|
49 |
DO_SHOW_TOWN_NAMES = 0, |
b65f7298f106
(svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents:
7073
diff
changeset
|
50 |
DO_SHOW_STATION_NAMES = 1, |
b65f7298f106
(svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents:
7073
diff
changeset
|
51 |
DO_SHOW_SIGNS = 2, |
b65f7298f106
(svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents:
7073
diff
changeset
|
52 |
DO_FULL_ANIMATION = 3, |
b65f7298f106
(svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents:
7073
diff
changeset
|
53 |
DO_FULL_DETAIL = 5, |
b65f7298f106
(svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents:
7073
diff
changeset
|
54 |
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
|
55 |
}; |
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
|
56 |
|
2526
cae4842086a9
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
57 |
enum { |
cae4842086a9
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
58 |
SORT_ASCENDING = 0, |
cae4842086a9
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
59 |
SORT_DESCENDING = 1, |
cae4842086a9
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
60 |
SORT_BY_DATE = 0, |
cae4842086a9
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
61 |
SORT_BY_NAME = 2 |
cae4842086a9
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
62 |
}; |
cae4842086a9
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
63 |
|
8764
65746a5248ec
(svn r11832) -Codechange: get rid of (quite) some VARDEFs.
rubidium
parents:
8760
diff
changeset
|
64 |
extern byte _savegame_sort_order; |
0 | 65 |
|
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
|
66 |
/* 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
|
67 |
* 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
|
68 |
* 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
|
69 |
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
|
70 |
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
|
71 |
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
|
72 |
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
|
73 |
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
|
74 |
}; |
8764
65746a5248ec
(svn r11832) -Codechange: get rid of (quite) some VARDEFs.
rubidium
parents:
8760
diff
changeset
|
75 |
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
|
76 |
|
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
|
77 |
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
|
78 |
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
|
79 |
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
|
80 |
|
2075
7f0ca01392db
(svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents:
2055
diff
changeset
|
81 |
#endif /* OPENTTD_H */ |