author | KUDr |
Fri, 20 Apr 2007 19:43:06 +0000 | |
changeset 6513 | 454347ca3dfb |
parent 6453 | 226bcddeba32 |
child 6683 | b88ae30866ce |
permissions | -rw-r--r-- |
6343
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
1 |
/* $Id$ */ |
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
2 |
|
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
3 |
/** @file landscape.h */ |
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
4 |
|
6453
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
5 |
#ifndef LANDSCAPE_H |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
6 |
#define LANDSCAPE_H |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
7 |
|
6343
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
8 |
enum { |
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
9 |
SNOW_LINE_MONTHS = 12, |
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
10 |
SNOW_LINE_DAYS = 32, |
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
11 |
}; |
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
12 |
|
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
13 |
struct SnowLine { |
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
14 |
byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS]; |
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
15 |
byte highest_value; |
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
16 |
}; |
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
17 |
|
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
18 |
bool IsSnowLineSet(void); |
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
19 |
void SetSnowLine(byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS]); |
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
20 |
byte GetSnowLine(void); |
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
21 |
byte HighestSnowLine(void); |
76d17f784c13
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
diff
changeset
|
22 |
void ClearSnowLine(void); |
6453
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
23 |
|
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
24 |
bool IsValidTile(TileIndex tile); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
25 |
|
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
26 |
uint GetPartialZ(int x, int y, Slope corners); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
27 |
uint GetSlopeZ(int x, int y); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
28 |
|
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
29 |
static inline Point RemapCoords(int x, int y, int z) |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
30 |
{ |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
31 |
Point pt; |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
32 |
pt.x = (y - x) * 2; |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
33 |
pt.y = y + x - z; |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
34 |
return pt; |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
35 |
} |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
36 |
|
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
37 |
static inline Point RemapCoords2(int x, int y) |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
38 |
{ |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
39 |
return RemapCoords(x, y, GetSlopeZ(x, y)); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
40 |
} |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
41 |
|
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
42 |
void DrawFoundation(TileInfo *ti, uint f); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
43 |
|
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
44 |
void DoClearSquare(TileIndex tile); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
45 |
void RunTileLoop(); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
46 |
|
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
47 |
uint32 GetTileTrackStatus(TileIndex tile, TransportType mode); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
48 |
void GetAcceptedCargo(TileIndex tile, AcceptedCargo ac); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
49 |
void ChangeTileOwner(TileIndex tile, PlayerID old_player, PlayerID new_player); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
50 |
void AnimateTile(TileIndex tile); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
51 |
void ClickTile(TileIndex tile); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
52 |
void GetTileDesc(TileIndex tile, TileDesc *td); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
53 |
|
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
54 |
void InitializeLandscape(); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
55 |
void GenerateLandscape(byte mode); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
56 |
|
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
57 |
void ConvertGroundTilesIntoWaterTiles(); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
58 |
|
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
59 |
TileIndex AdjustTileCoordRandomly(TileIndex a, byte rng); |
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
60 |
|
226bcddeba32
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
maedhros
parents:
6343
diff
changeset
|
61 |
#endif /* LANDSCAPE_H */ |