author | rubidium |
Thu, 27 Dec 2007 13:35:39 +0000 | |
changeset 8640 | 1e93b81e96d2 |
parent 8638 | d997e3a75b36 |
child 8645 | 83500ad80b08 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
6505
abcb0580d976
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5919
diff
changeset
|
3 |
/** @file functions.h */ |
abcb0580d976
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5919
diff
changeset
|
4 |
|
0 | 5 |
#ifndef FUNCTIONS_H |
6 |
#define FUNCTIONS_H |
|
7 |
||
8431
68fb2ccbce06
(svn r11488) -Codechange: Spilt the random functions out to seperate file
skidd13
parents:
8385
diff
changeset
|
8 |
#include "core/random_func.hpp" |
8615
6b91ca653bad
(svn r11680) -Codechange: refactor more out of openttd.h and functions.h.
rubidium
parents:
8467
diff
changeset
|
9 |
#include "command_type.h" |
8634
5ffca02f9115
(svn r11700) -Codechange: reduce the amount of unnecessary includes.
rubidium
parents:
8627
diff
changeset
|
10 |
#include "tile_cmd.h" |
5887
063ca43b682c
(svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents:
5838
diff
changeset
|
11 |
|
6505
abcb0580d976
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5919
diff
changeset
|
12 |
/* clear_land.cpp */ |
2436
177cb6a8339f
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2380
diff
changeset
|
13 |
void DrawHillyLandTile(const TileInfo *ti); |
177cb6a8339f
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2380
diff
changeset
|
14 |
void DrawClearLandTile(const TileInfo *ti, byte set); |
2220 | 15 |
void DrawClearLandFence(const TileInfo *ti); |
1420
5308b177b5b3
(svn r1924) Use same type names in declaration and implementation
tron
parents:
1377
diff
changeset
|
16 |
void TileLoopClearHelper(TileIndex tile); |
0 | 17 |
|
6505
abcb0580d976
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5919
diff
changeset
|
18 |
/* players.cpp */ |
7439
0c0e2945c890
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
rubidium
parents:
7375
diff
changeset
|
19 |
bool CheckPlayerHasMoney(CommandCost cost); |
0c0e2945c890
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
rubidium
parents:
7375
diff
changeset
|
20 |
void SubtractMoneyFromPlayer(CommandCost cost); |
0c0e2945c890
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
rubidium
parents:
7375
diff
changeset
|
21 |
void SubtractMoneyFromPlayerFract(PlayerID player, CommandCost cost); |
4849
9a3c3ae7f62f
(svn r6775) -Codechange: Use some more proper types, especially Owner and PlayerID as
Darkvater
parents:
4833
diff
changeset
|
22 |
bool CheckOwnership(Owner owner); |
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1935
diff
changeset
|
23 |
bool CheckTileOwnership(TileIndex tile); |
0 | 24 |
|
6505
abcb0580d976
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5919
diff
changeset
|
25 |
/* texteff.cpp */ |
8190
efd1f3b110a2
(svn r11228) -Codechange: implement the "moreanimation" feature of TTDP, so we can properly support newindustries.
rubidium
parents:
8177
diff
changeset
|
26 |
void AddAnimatedTile(TileIndex tile); |
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1935
diff
changeset
|
27 |
void DeleteAnimatedTile(TileIndex tile); |
6573 | 28 |
void AnimateAnimatedTiles(); |
29 |
void InitializeAnimatedTiles(); |
|
0 | 30 |
|
6505
abcb0580d976
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5919
diff
changeset
|
31 |
/* misc_cmd.cpp */ |
6573 | 32 |
void PlaceTreesRandomly(); |
0 | 33 |
|
34 |
void InitializeLandscapeVariables(bool only_constants); |
|
35 |
||
6505
abcb0580d976
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5919
diff
changeset
|
36 |
/* misc.cpp */ |
4862
b45c1e638e7f
(svn r6788) - Codechange: Add and use a function to test if a string ID is a custom name.
peter1138
parents:
4849
diff
changeset
|
37 |
bool IsCustomName(StringID id); |
0 | 38 |
void DeleteName(StringID id); |
7814
fe643468ad64
(svn r10673) -Cleanup: some assorted style cleanups. Primarily type* var -> type *var.
rubidium
parents:
7593
diff
changeset
|
39 |
char *GetName(char *buff, StringID id, const char *last); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
40 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
536
diff
changeset
|
41 |
#define AllocateName(name, skip) RealAllocateName(name, skip, false) |
1328
e069d2db0e4c
(svn r1832) Next byte -> char iteration: custom names
tron
parents:
1317
diff
changeset
|
42 |
StringID RealAllocateName(const char *name, byte skip, bool check_double); |
6573 | 43 |
void ConvertNameArray(); |
0 | 44 |
|
45 |
/* misc functions */ |
|
8041
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
46 |
/** |
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
47 |
* Mark a tile given by its coordinate dirty for repaint. |
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
48 |
* |
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
49 |
* @ingroup dirty |
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
50 |
*/ |
0 | 51 |
void MarkTileDirty(int x, int y); |
8041
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
52 |
|
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
53 |
/** |
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
54 |
* Mark a tile given by its index dirty for repaint. |
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
55 |
* |
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
56 |
* @ingroup dirty |
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
57 |
*/ |
0 | 58 |
void MarkTileDirtyByTile(TileIndex tile); |
8041
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
59 |
|
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
60 |
/** |
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
61 |
* Mark all viewports dirty for repaint. |
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
62 |
* |
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
63 |
* @ingroup dirty |
63e760418a15
(svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents:
8012
diff
changeset
|
64 |
*/ |
0 | 65 |
void MarkAllViewportsDirty(int left, int top, int right, int bottom); |
7486
d130c10f4dab
(svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch.
rubidium
parents:
7439
diff
changeset
|
66 |
void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost); |
d130c10f4dab
(svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch.
rubidium
parents:
7439
diff
changeset
|
67 |
void ShowFeederIncomeAnimation(int x, int y, int z, Money cost); |
0 | 68 |
|
7375
e8639f73a615
(svn r10122) -Codechange: Add a CountBitsSet function and use it to replace some less efficient loops.
maedhros
parents:
7226
diff
changeset
|
69 |
void ShowHighscoreTable(int difficulty, int8 rank); |
e8639f73a615
(svn r10122) -Codechange: Add a CountBitsSet function and use it to replace some less efficient loops.
maedhros
parents:
7226
diff
changeset
|
70 |
|
6573 | 71 |
void AskExitGame(); |
72 |
void AskExitToGameMenu(); |
|
0 | 73 |
|
6573 | 74 |
void RedrawAutosave(); |
0 | 75 |
|
76 |
StringID RemapOldStringID(StringID s); |
|
77 |
||
78 |
void UpdateViewportSignPos(ViewportSign *sign, int left, int top, StringID str); |
|
79 |
||
80 |
enum { |
|
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4261
diff
changeset
|
81 |
SLD_LOAD_GAME, |
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4261
diff
changeset
|
82 |
SLD_LOAD_SCENARIO, |
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4261
diff
changeset
|
83 |
SLD_SAVE_GAME, |
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4261
diff
changeset
|
84 |
SLD_SAVE_SCENARIO, |
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4261
diff
changeset
|
85 |
SLD_LOAD_HEIGHTMAP, |
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4261
diff
changeset
|
86 |
SLD_NEW_GAME, |
0 | 87 |
}; |
88 |
void ShowSaveLoadDialog(int mode); |
|
89 |
||
6505
abcb0580d976
(svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5919
diff
changeset
|
90 |
/* callback from drivers that is called if the game size changes dynamically */ |
6573 | 91 |
void GameSizeChanged(); |
3329
992d1f7cb747
(svn r4105) - Feature: Add proper ISO-8859-15 <> LOCALCODE conversion. As the mess that is makefile can't properly support it at the moment, it is only available for MACOSX. Windows doesn't need FS conversion and I have no idea about OS/2 so it's disabled for them.
Darkvater
parents:
3297
diff
changeset
|
92 |
const char *GetCurrentLocale(const char *param); |
0 | 93 |
|
94 |
int ttd_main(int argc, char* argv[]); |
|
6573 | 95 |
void HandleExitGameRequest(); |
0 | 96 |
|
97 |
#endif /* FUNCTIONS_H */ |