src/landscape.h
branchgamebalance
changeset 9908 0fa543611bbe
parent 9906 6f41b8713b65
child 7179 3e123c2b7c93
equal deleted inserted replaced
9907:3b068c3a1c74 9908:0fa543611bbe
     1 /* $Id$ */
     1 /* $Id$ */
     2 
     2 
     3 /** @file landscape.h */
     3 /** @file landscape.h */
       
     4 
       
     5 #ifndef LANDSCAPE_H
       
     6 #define LANDSCAPE_H
     4 
     7 
     5 enum {
     8 enum {
     6 	SNOW_LINE_MONTHS = 12,
     9 	SNOW_LINE_MONTHS = 12,
     7 	SNOW_LINE_DAYS   = 32,
    10 	SNOW_LINE_DAYS   = 32,
     8 };
    11 };
    15 bool IsSnowLineSet(void);
    18 bool IsSnowLineSet(void);
    16 void SetSnowLine(byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS]);
    19 void SetSnowLine(byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS]);
    17 byte GetSnowLine(void);
    20 byte GetSnowLine(void);
    18 byte HighestSnowLine(void);
    21 byte HighestSnowLine(void);
    19 void ClearSnowLine(void);
    22 void ClearSnowLine(void);
       
    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 */