diff options
author | maedhros <maedhros@openttd.org> | 2007-04-12 13:07:15 +0000 |
---|---|---|
committer | maedhros <maedhros@openttd.org> | 2007-04-12 13:07:15 +0000 |
commit | ccaaa7d33ac92f91ebddcf4d1f6537639a38a13c (patch) | |
tree | 46c4e0e10e8944f926e6b4ccf3df95badd5ec51e /src/landscape.h | |
parent | 8cdec9a2ab9e58cf6bba3845f1f8c317ff32ecd4 (diff) | |
download | openttd-ccaaa7d33ac92f91ebddcf4d1f6537639a38a13c.tar.xz |
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
Diffstat (limited to 'src/landscape.h')
-rw-r--r-- | src/landscape.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/landscape.h b/src/landscape.h index 5cfe80edf..8d39e8d31 100644 --- a/src/landscape.h +++ b/src/landscape.h @@ -2,6 +2,9 @@ /** @file landscape.h */ +#ifndef LANDSCAPE_H +#define LANDSCAPE_H + enum { SNOW_LINE_MONTHS = 12, SNOW_LINE_DAYS = 32, @@ -17,3 +20,42 @@ void SetSnowLine(byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS]); byte GetSnowLine(void); byte HighestSnowLine(void); void ClearSnowLine(void); + +bool IsValidTile(TileIndex tile); + +uint GetPartialZ(int x, int y, Slope corners); +uint GetSlopeZ(int x, int y); + +static inline Point RemapCoords(int x, int y, int z) +{ + Point pt; + pt.x = (y - x) * 2; + pt.y = y + x - z; + return pt; +} + +static inline Point RemapCoords2(int x, int y) +{ + return RemapCoords(x, y, GetSlopeZ(x, y)); +} + +void DrawFoundation(TileInfo *ti, uint f); + +void DoClearSquare(TileIndex tile); +void RunTileLoop(); + +uint32 GetTileTrackStatus(TileIndex tile, TransportType mode); +void GetAcceptedCargo(TileIndex tile, AcceptedCargo ac); +void ChangeTileOwner(TileIndex tile, PlayerID old_player, PlayerID new_player); +void AnimateTile(TileIndex tile); +void ClickTile(TileIndex tile); +void GetTileDesc(TileIndex tile, TileDesc *td); + +void InitializeLandscape(); +void GenerateLandscape(byte mode); + +void ConvertGroundTilesIntoWaterTiles(); + +TileIndex AdjustTileCoordRandomly(TileIndex a, byte rng); + +#endif /* LANDSCAPE_H */ |