6303
|
1 |
/* $Id$ */
|
|
2 |
|
|
3 |
/** @file landscape.h */
|
|
4 |
|
6307
|
5 |
#ifndef LANDSCAPE_H
|
|
6 |
#define LANDSCAPE_H
|
|
7 |
|
6303
|
8 |
enum {
|
|
9 |
SNOW_LINE_MONTHS = 12,
|
|
10 |
SNOW_LINE_DAYS = 32,
|
|
11 |
};
|
|
12 |
|
|
13 |
struct SnowLine {
|
|
14 |
byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS];
|
|
15 |
byte highest_value;
|
|
16 |
};
|
|
17 |
|
|
18 |
bool IsSnowLineSet(void);
|
|
19 |
void SetSnowLine(byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS]);
|
|
20 |
byte GetSnowLine(void);
|
|
21 |
byte HighestSnowLine(void);
|
|
22 |
void ClearSnowLine(void);
|
6307
|
23 |
|
|
24 |
bool IsValidTile(TileIndex tile);
|
|
25 |
|
|
26 |
uint GetPartialZ(int x, int y, Slope corners);
|
|
27 |
uint GetSlopeZ(int x, int y);
|
|
28 |
|
|
29 |
static inline Point RemapCoords(int x, int y, int z)
|
|
30 |
{
|
|
31 |
Point pt;
|
|
32 |
pt.x = (y - x) * 2;
|
|
33 |
pt.y = y + x - z;
|
|
34 |
return pt;
|
|
35 |
}
|
|
36 |
|
|
37 |
static inline Point RemapCoords2(int x, int y)
|
|
38 |
{
|
|
39 |
return RemapCoords(x, y, GetSlopeZ(x, y));
|
|
40 |
}
|
|
41 |
|
|
42 |
void DrawFoundation(TileInfo *ti, uint f);
|
|
43 |
|
|
44 |
void DoClearSquare(TileIndex tile);
|
|
45 |
void RunTileLoop();
|
|
46 |
|
|
47 |
uint32 GetTileTrackStatus(TileIndex tile, TransportType mode);
|
|
48 |
void GetAcceptedCargo(TileIndex tile, AcceptedCargo ac);
|
|
49 |
void ChangeTileOwner(TileIndex tile, PlayerID old_player, PlayerID new_player);
|
|
50 |
void AnimateTile(TileIndex tile);
|
|
51 |
void ClickTile(TileIndex tile);
|
|
52 |
void GetTileDesc(TileIndex tile, TileDesc *td);
|
|
53 |
|
|
54 |
void InitializeLandscape();
|
|
55 |
void GenerateLandscape(byte mode);
|
|
56 |
|
|
57 |
void ConvertGroundTilesIntoWaterTiles();
|
|
58 |
|
|
59 |
TileIndex AdjustTileCoordRandomly(TileIndex a, byte rng);
|
|
60 |
|
|
61 |
#endif /* LANDSCAPE_H */
|