author | tron |
Sun, 06 Feb 2005 22:25:27 +0000 | |
changeset 1329 | a8a0d60b0a8e |
parent 1328 | e069d2db0e4c |
child 1335 | a635854c23b6 |
permissions | -rw-r--r-- |
0 | 1 |
#ifndef FUNCTIONS_H |
2 |
#define FUNCTIONS_H |
|
3 |
||
4 |
/* vehicle.c */ |
|
5 |
||
6 |
/* window.c */ |
|
7 |
||
8 |
||
9 |
/* landscape.c */ |
|
10 |
void FindLandscapeHeight(TileInfo *ti, uint x, uint y); |
|
11 |
void FindLandscapeHeightByTile(TileInfo *ti, uint tile); |
|
12 |
uint GetTileSlope(uint tile, int *h); |
|
13 |
int GetTileZ(uint tile); |
|
14 |
||
15 |
void DoClearSquare(uint tile); |
|
16 |
void CDECL ModifyTile(uint tile, uint flags, ...); |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
17 |
void RunTileLoop(void); |
0 | 18 |
|
19 |
uint GetPartialZ(int x, int y, int corners); |
|
20 |
uint GetSlopeZ(int x, int y); |
|
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
21 |
uint32 GetTileTrackStatus(uint tile, TransportType mode); |
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
430
diff
changeset
|
22 |
void GetAcceptedCargo(uint tile, AcceptedCargo ac); |
0 | 23 |
void ChangeTileOwner(uint tile, byte old_player, byte new_player); |
24 |
void AnimateTile(uint tile); |
|
25 |
void ClickTile(uint tile); |
|
26 |
void GetTileDesc(uint tile, TileDesc *td); |
|
27 |
void DrawTile(TileInfo *ti); |
|
28 |
||
29 |
bool IsValidTile(uint tile); |
|
30 |
||
536 | 31 |
static inline Point RemapCoords(int x, int y, int z) |
32 |
{ |
|
0 | 33 |
#if !defined(NEW_ROTATION) |
781
9717ff353c17
(svn r1248) -Add: initial OS/2 support (read docs/ReadMe_OS2.txt) (orudge)
truelight
parents:
738
diff
changeset
|
34 |
Point pt; |
9717ff353c17
(svn r1248) -Add: initial OS/2 support (read docs/ReadMe_OS2.txt) (orudge)
truelight
parents:
738
diff
changeset
|
35 |
pt.x = (y - x) * 2; |
9717ff353c17
(svn r1248) -Add: initial OS/2 support (read docs/ReadMe_OS2.txt) (orudge)
truelight
parents:
738
diff
changeset
|
36 |
pt.y = y + x - z; |
0 | 37 |
#else |
781
9717ff353c17
(svn r1248) -Add: initial OS/2 support (read docs/ReadMe_OS2.txt) (orudge)
truelight
parents:
738
diff
changeset
|
38 |
Point pt; |
9717ff353c17
(svn r1248) -Add: initial OS/2 support (read docs/ReadMe_OS2.txt) (orudge)
truelight
parents:
738
diff
changeset
|
39 |
pt.x = (x + y) * 2; |
9717ff353c17
(svn r1248) -Add: initial OS/2 support (read docs/ReadMe_OS2.txt) (orudge)
truelight
parents:
738
diff
changeset
|
40 |
pt.y = x - y - z; |
0 | 41 |
#endif |
536 | 42 |
return pt; |
43 |
} |
|
0 | 44 |
|
536 | 45 |
static inline Point RemapCoords2(int x, int y) |
46 |
{ |
|
47 |
return RemapCoords(x, y, GetSlopeZ(x, y)); |
|
48 |
} |
|
0 | 49 |
|
50 |
||
51 |
/* clear_land.c */ |
|
52 |
void DrawHillyLandTile(TileInfo *ti); |
|
53 |
void DrawClearLandTile(TileInfo *ti, byte set); |
|
54 |
void DrawClearLandFence(TileInfo *ti, byte img); |
|
55 |
void TileLoopClearHelper(uint tile); |
|
56 |
||
57 |
/* station_land.c */ |
|
58 |
void StationPickerDrawSprite(int x, int y, int railtype, int image); |
|
59 |
||
60 |
/* track_land.c */ |
|
61 |
void DrawTrainDepotSprite(int x, int y, int image, int railtype); |
|
415
423de36034b8
(svn r612) [newgrf] Fix: custom waypoints on monorail/maglev are displayed correctly
dominik
parents:
395
diff
changeset
|
62 |
void DrawWaypointSprite(int x, int y, int image, int railtype); |
0 | 63 |
|
64 |
/* road_land.c */ |
|
65 |
void DrawRoadDepotSprite(int x, int y, int image); |
|
66 |
||
67 |
/* water_land.c */ |
|
68 |
void DrawShipDepotSprite(int x, int y, int image); |
|
69 |
void TileLoop_Water(uint tile); |
|
70 |
||
71 |
/* players.c */ |
|
72 |
bool CheckPlayerHasMoney(int32 cost); |
|
73 |
void SubtractMoneyFromPlayer(int32 cost); |
|
74 |
void SubtractMoneyFromPlayerFract(byte player, int32 cost); |
|
75 |
bool CheckOwnership(byte owner); |
|
76 |
bool CheckTileOwnership(uint tile); |
|
2
104b2984cd3e
(svn r3) -[1005611] Player Window patch: When looking in dropdownlist for player stuff, it will say
darkvater
parents:
1
diff
changeset
|
77 |
StringID GetPlayerNameString(byte player, byte index); |
0 | 78 |
|
79 |
/* standard */ |
|
80 |
void ShowInfo(const char *str); |
|
81 |
void CDECL ShowInfoF(const char *str, ...); |
|
82 |
void NORETURN CDECL error(const char *str, ...); |
|
83 |
||
84 |
/* ttd.c */ |
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
85 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
86 |
// ************** |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
87 |
// * Warning: DO NOT enable this unless you understand what it does |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
88 |
// * |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
89 |
// * If enabled, in a network game all randoms will be dumped to the |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
90 |
// * stdout if the first client joins (or if you are a client). This |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
91 |
// * is to help finding desync problems. |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
92 |
// * |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
93 |
// * Warning: DO NOT enable this unless you understand what it does |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
94 |
// ************** |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
95 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
96 |
//#define RANDOM_DEBUG |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
97 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
98 |
#ifdef RANDOM_DEBUG |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
99 |
#define Random() DoRandom(__LINE__, __FILE__) |
1120
ea3bf8bc6678
(svn r1621) -Fix: fixed some compiler warnings for the random-debug-switch
truelight
parents:
1115
diff
changeset
|
100 |
uint32 DoRandom(int line, const char *file); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
101 |
#define RandomRange(max) DoRandomRange(max, __LINE__, __FILE__) |
1120
ea3bf8bc6678
(svn r1621) -Fix: fixed some compiler warnings for the random-debug-switch
truelight
parents:
1115
diff
changeset
|
102 |
uint DoRandomRange(uint max, int line, const char *file); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
103 |
#else |
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
104 |
uint32 Random(void); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
105 |
uint RandomRange(uint max); |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
106 |
#endif |
0 | 107 |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
108 |
void InitPlayerRandoms(void); |
206 | 109 |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
110 |
uint32 InteractiveRandom(void); /* Used for random sequences that are not the same on the other end of the multiplayer link */ |
239 | 111 |
uint InteractiveRandomRange(uint max); |
112 |
||
0 | 113 |
void SetDate(uint date); |
114 |
/* facedraw.c */ |
|
115 |
void DrawPlayerFace(uint32 face, int color, int x, int y); |
|
116 |
||
117 |
/* texteff.c */ |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
118 |
void MoveAllTextEffects(void); |
0 | 119 |
void AddTextEffect(StringID msg, int x, int y, uint16 duration); |
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
120 |
void InitTextEffects(void); |
0 | 121 |
void DrawTextEffects(DrawPixelInfo *dpi); |
122 |
||
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
123 |
void InitTextMessage(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
124 |
void DrawTextMessage(void); |
619
2a8675eeeb3f
(svn r1045) -Fix: OpenTTD compiles again under VC6 (sign_de)
truelight
parents:
543
diff
changeset
|
125 |
void CDECL AddTextMessage(uint16 color, uint8 duration, const char *message, ...); |
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
126 |
void UndrawTextMessage(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
127 |
void TextMessageDailyLoop(void); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
128 |
|
0 | 129 |
bool AddAnimatedTile(uint tile); |
130 |
void DeleteAnimatedTile(uint tile); |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
131 |
void AnimateAnimatedTiles(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
132 |
void InitializeAnimatedTiles(void); |
0 | 133 |
|
134 |
/* tunnelbridge_cmd.c */ |
|
135 |
bool CheckTunnelInWay(uint tile, int z); |
|
136 |
bool CheckBridge_Stuff(byte bridge_type, int bridge_len); |
|
137 |
uint32 GetBridgeLength(TileIndex begin, TileIndex end); |
|
138 |
int CalcBridgeLenCostFactor(int x); |
|
139 |
||
140 |
typedef void CommandCallback(bool success, uint tile, uint32 p1, uint32 p2); |
|
141 |
bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback, uint32 cmd); |
|
142 |
||
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
143 |
/* network.c */ |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
144 |
void NetworkUDPClose(void); |
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
145 |
void NetworkStartUp(void); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
146 |
void NetworkShutDown(void); |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
147 |
void NetworkGameLoop(void); |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
148 |
void NetworkUDPGameLoop(void); |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
149 |
bool NetworkServerStart(void); |
1329 | 150 |
bool NetworkClientConnectGame(const char* host, unsigned short port); |
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
151 |
void NetworkReboot(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
152 |
void NetworkDisconnect(void); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
153 |
void NetworkSend_Command(uint32 tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback); |
0 | 154 |
|
155 |
/* misc_cmd.c */ |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
156 |
void PlaceTreesRandomly(void); |
0 | 157 |
|
158 |
void InitializeLandscapeVariables(bool only_constants); |
|
159 |
||
160 |
/* misc.c */ |
|
161 |
void DeleteName(StringID id); |
|
1328
e069d2db0e4c
(svn r1832) Next byte -> char iteration: custom names
tron
parents:
1317
diff
changeset
|
162 |
char *GetName(int id, char *buff); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
163 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
164 |
// AllocateNameUnique also tests if the name used is not used anywere else |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
165 |
// and if it is used, it returns an error. |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
166 |
#define AllocateNameUnique(name, skip) RealAllocateName(name, skip, true) |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
167 |
#define AllocateName(name, skip) RealAllocateName(name, skip, false) |
1328
e069d2db0e4c
(svn r1832) Next byte -> char iteration: custom names
tron
parents:
1317
diff
changeset
|
168 |
StringID RealAllocateName(const char *name, byte skip, bool check_double); |
0 | 169 |
void ConvertDayToYMD(YearMonthDay *ymd, uint16 date); |
170 |
uint ConvertYMDToDay(uint year, uint month, uint day); |
|
171 |
uint ConvertIntDate(uint date); |
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
172 |
void CSleep(int milliseconds); |
0 | 173 |
|
174 |
||
175 |
/* misc functions */ |
|
176 |
void MarkTileDirty(int x, int y); |
|
177 |
void MarkTileDirtyByTile(TileIndex tile); |
|
178 |
void InvalidateWindow(byte cls, WindowNumber number); |
|
179 |
void InvalidateWindowWidget(byte cls, WindowNumber number, byte widget_index); |
|
180 |
void InvalidateWindowClasses(byte cls); |
|
181 |
void DeleteWindowById(WindowClass cls, WindowNumber number); |
|
999
8b2a34061963
(svn r1497) -Fix: [1101179] Crash if generating land while industry window is open. This also happened for towns and the land information window
darkvater
parents:
998
diff
changeset
|
182 |
void DeleteWindowByClass(WindowClass cls); |
0 | 183 |
|
184 |
void SetObjectToPlaceWnd(int icon, byte mode, Window *w); |
|
873
46e892485be3
(svn r1354) Use WindowClass/WindowNumber to store/pass window class/number, not some arbitrary data types
tron
parents:
781
diff
changeset
|
185 |
void SetObjectToPlace(int icon, byte mode, WindowClass window_class, WindowNumber window_num); |
0 | 186 |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
187 |
void ResetObjectToPlace(void); |
152
c3964b43943e
(svn r153) -Feature: [1009710] Extra Viewport. In the minimap dropdown menu, open a new viewport to have a quick look at your favorite map-positions. Independent zoom and quick jump to/from viewport (Dribbel)
darkvater
parents:
131
diff
changeset
|
188 |
|
c3964b43943e
(svn r153) -Feature: [1009710] Extra Viewport. In the minimap dropdown menu, open a new viewport to have a quick look at your favorite map-positions. Independent zoom and quick jump to/from viewport (Dribbel)
darkvater
parents:
131
diff
changeset
|
189 |
bool ScrollWindowToTile(TileIndex tile, Window * w); |
c3964b43943e
(svn r153) -Feature: [1009710] Extra Viewport. In the minimap dropdown menu, open a new viewport to have a quick look at your favorite map-positions. Independent zoom and quick jump to/from viewport (Dribbel)
darkvater
parents:
131
diff
changeset
|
190 |
bool ScrollWindowTo(int x, int y, Window * w); |
c3964b43943e
(svn r153) -Feature: [1009710] Extra Viewport. In the minimap dropdown menu, open a new viewport to have a quick look at your favorite map-positions. Independent zoom and quick jump to/from viewport (Dribbel)
darkvater
parents:
131
diff
changeset
|
191 |
|
0 | 192 |
bool ScrollMainWindowToTile(TileIndex tile); |
193 |
bool ScrollMainWindowTo(int x, int y); |
|
194 |
void DrawSprite(uint32 img, int x, int y); |
|
1082
56a4c048c5c3
(svn r1583) -Fix: You should no longer be able to delete bridges on any type of underground when there is a vehicle on it
darkvater
parents:
1009
diff
changeset
|
195 |
uint GetCorrectTileHeight(TileIndex tile); |
0 | 196 |
bool EnsureNoVehicle(TileIndex tile); |
197 |
bool EnsureNoVehicleZ(TileIndex tile, byte z); |
|
198 |
void MarkAllViewportsDirty(int left, int top, int right, int bottom); |
|
199 |
void ShowCostOrIncomeAnimation(int x, int y, int z, int32 cost); |
|
200 |
||
201 |
void DrawFoundation(TileInfo *ti, uint f); |
|
202 |
||
203 |
bool CheckIfAuthorityAllows(uint tile); |
|
204 |
Town *ClosestTownFromTile(uint tile, uint threshold); |
|
205 |
void ChangeTownRating(Town *t, int add, int max); |
|
206 |
||
207 |
uint GetRoadBitsByTile(TileIndex tile); |
|
208 |
int GetTownRadiusGroup(Town *t, uint tile); |
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
209 |
void ShowNetworkChatQueryWindow(byte desttype, byte dest); |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
210 |
void ShowNetworkGiveMoneyWindow(byte player); |
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
211 |
void ShowNetworkNeedGamePassword(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
212 |
void ShowNetworkNeedCompanyPassword(void); |
395
4c990f33dab7
(svn r587) -newgrf: Rename all /Checkpoint/i tokens to 'Waypoint's. The name actually makes some sense and is also compatible with TTDPatch (pasky).
darkvater
parents:
393
diff
changeset
|
213 |
void ShowRenameWaypointWindow(Waypoint *cp); |
0 | 214 |
int FindFirstBit(uint32 x); |
998
d9dc257b8949
(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
|
215 |
void ShowHighscoreTable(int difficulty, int8 rank); |
983
1be852dcdd4c
(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:
873
diff
changeset
|
216 |
void ShowEndGameChart(void); |
0 | 217 |
TileIndex AdjustTileCoordRandomly(TileIndex a, byte rng); |
218 |
||
219 |
enum SaveOrLoadResult { |
|
220 |
SL_OK = 0, // completed successfully |
|
221 |
SL_ERROR = 1, // error that was caught before internal structures were modified |
|
222 |
SL_REINIT = 2, // error that was caught in the middle of updating game state, need to clear it. (can only happen during load) |
|
223 |
}; |
|
224 |
enum SaveOrLoadMode { |
|
225 |
SL_INVALID = -1, |
|
226 |
SL_LOAD = 0, |
|
227 |
SL_SAVE = 1, |
|
228 |
SL_OLD_LOAD = 2, |
|
229 |
}; |
|
230 |
||
231 |
int SaveOrLoad(const char *filename, int mode); |
|
232 |
||
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
233 |
void AfterLoadTown(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
234 |
void AskExitGame(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
235 |
void AskExitToGameMenu(void); |
0 | 236 |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
237 |
void RedrawAutosave(void); |
0 | 238 |
|
239 |
StringID RemapOldStringID(StringID s); |
|
240 |
||
241 |
void UpdateViewportSignPos(ViewportSign *sign, int left, int top, StringID str); |
|
242 |
||
243 |
enum { |
|
244 |
SLD_LOAD_GAME = 0, |
|
245 |
SLD_LOAD_SCENARIO = 1, |
|
246 |
SLD_SAVE_GAME = 2, |
|
247 |
SLD_SAVE_SCENARIO = 3, |
|
248 |
SLD_NEW_GAME = 4, |
|
249 |
}; |
|
250 |
void ShowSaveLoadDialog(int mode); |
|
251 |
||
252 |
// callback from drivers that is called if the game size changes dynamically |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
253 |
void GameSizeChanged(void); |
0 | 254 |
bool FileExists(const char *filename); |
255 |
bool ReadLanguagePack(int index); |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
256 |
void InitializeLanguagePacks(void); |
1310
85cde2193afc
(svn r1814) Let ReadFileToMem() return void* (instead of byte*) because we don't know what the caller wants to do with the data
tron
parents:
1309
diff
changeset
|
257 |
void *ReadFileToMem(const char *filename, size_t *lenp, size_t maxsize); |
0 | 258 |
int GetLanguageList(char **languages, int max); |
259 |
||
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
260 |
void CheckSwitchToEuro(void); |
0 | 261 |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
262 |
void LoadFromConfig(void); |
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
263 |
void SaveToConfig(void); |
0 | 264 |
int ttd_main(int argc, char* argv[]); |
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
265 |
byte GetOSVersion(void); |
0 | 266 |
|
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1082
diff
changeset
|
267 |
void DeterminePaths(void); |
0 | 268 |
char * CDECL str_fmt(const char *str, ...); |
269 |
||
1217
ab9f02a224ab
(svn r1721) -Feature: It is now possible to build multiple road stations (up to 8) on
celestar
parents:
1211
diff
changeset
|
270 |
void bubblesort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *)); |
0 | 271 |
#endif /* FUNCTIONS_H */ |