author | peter1138 |
Tue, 22 Jan 2008 07:27:06 +0000 | |
changeset 8374 | 7a1b6c89cb89 |
parent 8324 | a7c29425b7f0 |
child 8670 | 4f8e4590be7f |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2536
634914d741b4
(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 | 3 |
|
2075
21d2986569d1
(svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents:
2055
diff
changeset
|
4 |
#ifndef OPENTTD_H |
21d2986569d1
(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 | 6 |
|
7 |
#ifndef VARDEF |
|
8 |
#define VARDEF extern |
|
9 |
#endif |
|
10 |
||
11 |
// Forward declarations of structs. |
|
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5991
diff
changeset
|
12 |
struct Depot; |
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5991
diff
changeset
|
13 |
struct Waypoint; |
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5991
diff
changeset
|
14 |
struct Station; |
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5991
diff
changeset
|
15 |
struct ViewPort; |
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5991
diff
changeset
|
16 |
struct NewsItem; |
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5991
diff
changeset
|
17 |
struct DrawPixelInfo; |
6643
f81bee57bc09
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
rubidium
parents:
6591
diff
changeset
|
18 |
struct Group; |
4401
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
19 |
typedef byte VehicleOrderID; ///< The index of an order within its current vehicle (not pool related) |
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
20 |
typedef byte LandscapeID; |
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
21 |
typedef uint16 EngineID; |
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
22 |
typedef uint16 UnitID; |
6950
14ecb0acdfb4
(svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
rubidium
parents:
6943
diff
changeset
|
23 |
|
5187
12dc9dfa6af6
(svn r7299) -CodeChange: Train and Aircraft Build window GUI code simplified a bit:
KUDr
parents:
5108
diff
changeset
|
24 |
typedef EngineID *EngineList; ///< engine list type placeholder acceptable for C code (see helpers.cpp) |
4401
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
25 |
|
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
26 |
/* IDs used in Pools */ |
3347
0ddacd451b81
(svn r4131) - CodeChange: Add proper semantics for StationID for such variables instead of using the general uint16-type. StationID was added for depots, waypoints and stations where necessary. We probably need to change GetDepot(), IsDepotIndex(), IsStationIndex(), GetWaypoint() and IsWaypointIndex() as well to use StationID.
Darkvater
parents:
3346
diff
changeset
|
27 |
typedef uint16 StationID; |
7010
6f0d9f03180d
(svn r10266) -Codechange: keep track of the origin, time of travel and accumulated feeder share (transfers) of individual pieces of cargo. This means that cargo isn't thrown on a big pile when it's put in a station or unloaded at a station, however the GUI does not reflect these changes yet so you will not actually see it.
rubidium
parents:
7002
diff
changeset
|
28 |
static const StationID INVALID_STATION = 0xFFFF; |
4397
4160539a3062
(svn r6150) -Codechange: introduced and used RoadStopID where needed
truelight
parents:
4394
diff
changeset
|
29 |
typedef uint16 RoadStopID; |
4388
c8a66d26e146
(svn r6141) -Codechange: introduced DepotID and used it as much as possible
truelight
parents:
4349
diff
changeset
|
30 |
typedef uint16 DepotID; |
4389
18d6ccfb5335
(svn r6142) -Codechange: added WaypointID (sorry DV, couldn't splits it anymore)
truelight
parents:
4388
diff
changeset
|
31 |
typedef uint16 WaypointID; |
4392
68ca7ef4f600
(svn r6145) -Codechange: added OrderID to indicate Order indexes out of the pool
truelight
parents:
4391
diff
changeset
|
32 |
typedef uint16 OrderID; |
4401
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
33 |
typedef uint16 SignID; |
6643
f81bee57bc09
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
rubidium
parents:
6591
diff
changeset
|
34 |
typedef uint16 GroupID; |
4348
d9ddb0558a48
(svn r6049) -Codechange: forgot EngineRenew in r6047
truelight
parents:
4344
diff
changeset
|
35 |
typedef uint16 EngineRenewID; |
4527
fa30d19685c2
(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
tron
parents:
4434
diff
changeset
|
36 |
typedef uint16 DestinationID; |
7763
342e5357b592
(svn r11312) -Codechange: implement a overflow safe integer and use that for money and don't misuses CommandCost to have a overflow safe integer. Based on a patch by Noldo.
rubidium
parents:
7742
diff
changeset
|
37 |
|
4527
fa30d19685c2
(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
tron
parents:
4434
diff
changeset
|
38 |
/* DestinationID must be at least as large as every these below, because it can |
fa30d19685c2
(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
tron
parents:
4434
diff
changeset
|
39 |
* be any of them |
fa30d19685c2
(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
tron
parents:
4434
diff
changeset
|
40 |
*/ |
8324
a7c29425b7f0
(svn r11889) -Change: small inconsistency between documentation and code. Patch by Yexo.
rubidium
parents:
8268
diff
changeset
|
41 |
assert_compile(sizeof(DestinationID) >= sizeof(DepotID)); |
a7c29425b7f0
(svn r11889) -Change: small inconsistency between documentation and code. Patch by Yexo.
rubidium
parents:
8268
diff
changeset
|
42 |
assert_compile(sizeof(DestinationID) >= sizeof(WaypointID)); |
a7c29425b7f0
(svn r11889) -Change: small inconsistency between documentation and code. Patch by Yexo.
rubidium
parents:
8268
diff
changeset
|
43 |
assert_compile(sizeof(DestinationID) >= sizeof(StationID)); |
0 | 44 |
|
8121
3bc6351e7369
(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:
8119
diff
changeset
|
45 |
enum GameModes { |
3bc6351e7369
(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:
8119
diff
changeset
|
46 |
GM_MENU, |
3bc6351e7369
(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:
8119
diff
changeset
|
47 |
GM_NORMAL, |
3bc6351e7369
(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:
8119
diff
changeset
|
48 |
GM_EDITOR |
3bc6351e7369
(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:
8119
diff
changeset
|
49 |
}; |
3bc6351e7369
(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:
8119
diff
changeset
|
50 |
|
0 | 51 |
enum SwitchModes { |
4344
7e123fec5b0b
(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
|
52 |
SM_NONE = 0, |
7e123fec5b0b
(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
|
53 |
SM_NEWGAME = 1, |
7e123fec5b0b
(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
|
54 |
SM_EDITOR = 2, |
7e123fec5b0b
(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
|
55 |
SM_LOAD = 3, |
7e123fec5b0b
(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
|
56 |
SM_MENU = 4, |
7e123fec5b0b
(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
|
57 |
SM_SAVE = 5, |
7e123fec5b0b
(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
|
58 |
SM_GENRANDLAND = 6, |
7e123fec5b0b
(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
|
59 |
SM_LOAD_SCENARIO = 9, |
7e123fec5b0b
(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
|
60 |
SM_START_SCENARIO = 10, |
4300
c7e43c47a2b9
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
61 |
SM_START_HEIGHTMAP = 11, |
4344
7e123fec5b0b
(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
|
62 |
SM_LOAD_HEIGHTMAP = 12, |
0 | 63 |
}; |
64 |
||
2828
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
65 |
|
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
66 |
/* Modes for GenerateWorld */ |
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
67 |
enum GenerateWorldModes { |
4300
c7e43c47a2b9
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
68 |
GW_NEWGAME = 0, /* Generate a map for a new game */ |
c7e43c47a2b9
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
69 |
GW_EMPTY = 1, /* Generate an empty map (sea-level) */ |
c7e43c47a2b9
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
70 |
GW_RANDOM = 2, /* Generate a random map for SE */ |
c7e43c47a2b9
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
71 |
GW_HEIGHTMAP = 3, /* Generate a newgame from a heightmap */ |
2828
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
72 |
}; |
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
73 |
|
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
74 |
/* Modes for InitializeGame, those are _bits_! */ |
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
75 |
enum InitializeGameModes { |
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
76 |
IG_NONE = 0, /* Don't do anything special */ |
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
77 |
IG_DATE_RESET = 1, /* Reset the date when initializing a game */ |
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
78 |
}; |
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
79 |
|
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5991
diff
changeset
|
80 |
enum TransportType { |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
81 |
/* These constants are for now linked to the representation of bridges |
3333 | 82 |
* and tunnels, so they can be used by GetTileTrackStatus_TunnelBridge. |
83 |
* In an ideal world, these constants would be used everywhere when |
|
84 |
* accessing tunnels and bridges. For now, you should just not change |
|
85 |
* the values for road and rail. |
|
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
86 |
*/ |
5587
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
87 |
TRANSPORT_BEGIN = 0, |
3017
a75caf4efa2d
(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
|
88 |
TRANSPORT_RAIL = 0, |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
89 |
TRANSPORT_ROAD = 1, |
4434
a08cb4b5c179
(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc.
rubidium
parents:
4401
diff
changeset
|
90 |
TRANSPORT_WATER, // = 2 |
1967
a01f4d5dd957
(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
|
91 |
TRANSPORT_END, |
a01f4d5dd957
(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
|
92 |
INVALID_TRANSPORT = 0xff, |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5991
diff
changeset
|
93 |
}; |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
94 |
|
0 | 95 |
/* Display Options */ |
96 |
enum { |
|
6591
514c1a22e10e
(svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents:
6577
diff
changeset
|
97 |
DO_SHOW_TOWN_NAMES = 0, |
514c1a22e10e
(svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents:
6577
diff
changeset
|
98 |
DO_SHOW_STATION_NAMES = 1, |
514c1a22e10e
(svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents:
6577
diff
changeset
|
99 |
DO_SHOW_SIGNS = 2, |
514c1a22e10e
(svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents:
6577
diff
changeset
|
100 |
DO_FULL_ANIMATION = 3, |
514c1a22e10e
(svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents:
6577
diff
changeset
|
101 |
DO_FULL_DETAIL = 5, |
514c1a22e10e
(svn r9805) -Codechange: Use HASBIT() et al for display options bits.
peter1138
parents:
6577
diff
changeset
|
102 |
DO_WAYPOINTS = 6, |
6427
7dc1012757d8
(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:
6357
diff
changeset
|
103 |
}; |
7dc1012757d8
(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:
6357
diff
changeset
|
104 |
|
0 | 105 |
/* Landscape types */ |
106 |
enum { |
|
6357
f0f5e7d1713c
(svn r9400) -Codechange: Use some more representative enum names for landscape types.
belugas
parents:
6248
diff
changeset
|
107 |
LT_TEMPERATE = 0, |
f0f5e7d1713c
(svn r9400) -Codechange: Use some more representative enum names for landscape types.
belugas
parents:
6248
diff
changeset
|
108 |
LT_ARCTIC = 1, |
f0f5e7d1713c
(svn r9400) -Codechange: Use some more representative enum names for landscape types.
belugas
parents:
6248
diff
changeset
|
109 |
LT_TROPIC = 2, |
f0f5e7d1713c
(svn r9400) -Codechange: Use some more representative enum names for landscape types.
belugas
parents:
6248
diff
changeset
|
110 |
LT_TOYLAND = 3, |
0 | 111 |
|
112 |
NUM_LANDSCAPE = 4, |
|
113 |
}; |
|
114 |
||
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5991
diff
changeset
|
115 |
struct ViewportSign { |
849
c3407041774f
(svn r1330) Increase size of some vars from int16 to int32 to guard against future overflows
tron
parents:
842
diff
changeset
|
116 |
int32 left; |
c3407041774f
(svn r1330) Increase size of some vars from int16 to int32 to guard against future overflows
tron
parents:
842
diff
changeset
|
117 |
int32 top; |
0 | 118 |
byte width_1, width_2; |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5991
diff
changeset
|
119 |
}; |
0 | 120 |
|
2526
29eef390cabb
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
121 |
enum { |
29eef390cabb
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
122 |
SORT_ASCENDING = 0, |
29eef390cabb
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
123 |
SORT_DESCENDING = 1, |
29eef390cabb
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
124 |
SORT_BY_DATE = 0, |
29eef390cabb
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
125 |
SORT_BY_NAME = 2 |
29eef390cabb
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
126 |
}; |
29eef390cabb
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
127 |
|
8268
5027ad5e70a0
(svn r11832) -Codechange: get rid of (quite) some VARDEFs.
rubidium
parents:
8264
diff
changeset
|
128 |
extern byte _savegame_sort_order; |
0 | 129 |
|
130 |
enum { |
|
4344
7e123fec5b0b
(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
|
131 |
MAX_SCREEN_WIDTH = 2048, |
0 | 132 |
MAX_SCREEN_HEIGHT = 1200, |
133 |
}; |
|
134 |
||
1397
fa8539dcab46
(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
|
135 |
/* In certain windows you navigate with the arrow keys. Do not scroll the |
fa8539dcab46
(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
|
136 |
* gameview when here. Bitencoded variable that only allows scrolling if all |
fa8539dcab46
(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
|
137 |
* elements are zero */ |
fa8539dcab46
(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
|
138 |
enum { |
4344
7e123fec5b0b
(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
|
139 |
SCROLL_CON = 0, |
1397
fa8539dcab46
(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
|
140 |
SCROLL_EDIT = 1, |
fa8539dcab46
(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
|
141 |
SCROLL_SAVE = 2, |
1843
8e2628948b01
(svn r2348) - Fix: Do not scroll the game with the arrow keys when the chatbox is open
Darkvater
parents:
1802
diff
changeset
|
142 |
SCROLL_CHAT = 4, |
1397
fa8539dcab46
(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
|
143 |
}; |
8268
5027ad5e70a0
(svn r11832) -Codechange: get rid of (quite) some VARDEFs.
rubidium
parents:
8264
diff
changeset
|
144 |
extern byte _no_scroll; |
1397
fa8539dcab46
(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
|
145 |
|
2380
392bba57462d
(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
|
146 |
/** To have a concurrently running thread interface with the main program, use |
392bba57462d
(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
|
147 |
* the OTTD_SendThreadMessage() function. Actions to perform upon the message are handled |
392bba57462d
(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
|
148 |
* in the ProcessSentMessage() function */ |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5991
diff
changeset
|
149 |
enum ThreadMsg { |
4323
ae32c5fab67b
(svn r5977) -Fix [FS#78]: never set I-am-a-thread bool to true IN the thread. Machines with
truelight
parents:
4312
diff
changeset
|
150 |
MSG_OTTD_NO_MESSAGE, |
ae32c5fab67b
(svn r5977) -Fix [FS#78]: never set I-am-a-thread bool to true IN the thread. Machines with
truelight
parents:
4312
diff
changeset
|
151 |
MSG_OTTD_SAVETHREAD_DONE, |
ae32c5fab67b
(svn r5977) -Fix [FS#78]: never set I-am-a-thread bool to true IN the thread. Machines with
truelight
parents:
4312
diff
changeset
|
152 |
MSG_OTTD_SAVETHREAD_ERROR, |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5991
diff
changeset
|
153 |
}; |
2380
392bba57462d
(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
|
154 |
|
392bba57462d
(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
|
155 |
void OTTD_SendThreadMessage(ThreadMsg msg); |
392bba57462d
(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
|
156 |
|
8121
3bc6351e7369
(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:
8119
diff
changeset
|
157 |
extern byte _game_mode; |
3bc6351e7369
(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:
8119
diff
changeset
|
158 |
extern bool _exit_game; |
3bc6351e7369
(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:
8119
diff
changeset
|
159 |
extern byte _pause_game; |
3bc6351e7369
(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:
8119
diff
changeset
|
160 |
|
2075
21d2986569d1
(svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents:
2055
diff
changeset
|
161 |
#endif /* OPENTTD_H */ |