author | skidd13 |
Sun, 02 Dec 2007 21:43:16 +0000 | |
changeset 8004 | 1c54bc6f4bdf |
parent 7770 | 320d260ff1a1 |
child 8119 | 52b48108425a |
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); |
7728
68e794385dc9
(svn r11263) -Codechange: Reduce code duplication between DrawBridgePillars and HasFoundation{NW|NE}. Patch by frosch.
rubidium
parents:
7335
diff
changeset
|
28 |
void GetSlopeZOnEdge(Slope tileh, DiagDirection edge, int *z1, int *z2); |
7770
320d260ff1a1
(svn r11319) -Add: halftile- and anti-zig-zag-foundations. Patch by frosch.
rubidium
parents:
7728
diff
changeset
|
29 |
int GetSlopeZInCorner(Slope tileh, Corner corner); |
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
|
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 |
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
|
32 |
{ |
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 |
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
|
34 |
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
|
35 |
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
|
36 |
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
|
37 |
} |
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 |
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
|
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 |
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
|
42 |
} |
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 |
|
7335
141c6b86ec1f
(svn r10698) -Codechange [FS#1082]: simplify the code related to foundations. Primarily removal of (duplicated|magic) code and introduction of few helper functions to ease foundation determination. Patch by frosch.
rubidium
parents:
6683
diff
changeset
|
44 |
uint ApplyFoundationToSlope(Foundation f, Slope *s); |
141c6b86ec1f
(svn r10698) -Codechange [FS#1082]: simplify the code related to foundations. Primarily removal of (duplicated|magic) code and introduction of few helper functions to ease foundation determination. Patch by frosch.
rubidium
parents:
6683
diff
changeset
|
45 |
void DrawFoundation(TileInfo *ti, Foundation f); |
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
|
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 |
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
|
48 |
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
|
49 |
|
6683
b88ae30866ce
(svn r9914) -Codechange: prepare GTTS and the pathfinders to handle multiple road types on a single tile.
rubidium
parents:
6453
diff
changeset
|
50 |
uint32 GetTileTrackStatus(TileIndex tile, TransportType mode, uint sub_mode); |
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
|
51 |
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
|
52 |
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
|
53 |
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
|
54 |
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
|
55 |
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
|
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 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
|
58 |
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
|
59 |
|
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 |
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
|
61 |
|
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
|
62 |
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
|
63 |
|
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
|
64 |
#endif /* LANDSCAPE_H */ |