src/tile_type.h
branchnoai
changeset 9723 eee46cb39750
child 6877 889301acc299
equal deleted inserted replaced
9722:ebf0ece7d8f6 9723:eee46cb39750
       
     1 /* $Id$ */
       
     2 
       
     3 /** @file tile_type.h Types related to tiles. */
       
     4 
       
     5 #ifndef TILE_TYPE_H
       
     6 #define TILE_TYPE_H
       
     7 
       
     8 #include "core/enum_type.hpp"
       
     9 
       
    10 enum {
       
    11 	TILE_SIZE   = 16,   ///< Tiles are 16x16 "units" in size
       
    12 	TILE_PIXELS = 32,   ///< a tile is 32x32 pixels
       
    13 	TILE_HEIGHT =  8,   ///< The standard height-difference between tiles on two levels is 8 (z-diff 8)
       
    14 
       
    15 	MAX_TILE_HEIGHT     = 15,                    ///< Maximum allowed tile height
       
    16 	MAX_SNOWLINE_HEIGHT = (MAX_TILE_HEIGHT - 2), ///< Maximum allowed snowline height
       
    17 };
       
    18 
       
    19 
       
    20 /**
       
    21  * The different type of a tile.
       
    22  *
       
    23  * Each tile belongs to one type, according whatever is build on it.
       
    24  *
       
    25  * @note A railway with a crossing street is marked as MP_ROAD.
       
    26  */
       
    27 enum TileType {
       
    28 	MP_CLEAR,               ///< A tile without any structures, i.e. grass, rocks, farm fields etc.
       
    29 	MP_RAILWAY,             ///< A railway
       
    30 	MP_ROAD,                ///< A tile with road (or tram tracks)
       
    31 	MP_HOUSE,               ///< A house by a town
       
    32 	MP_TREES,               ///< Tile got trees
       
    33 	MP_STATION,             ///< A tile of a station
       
    34 	MP_WATER,               ///< Water tile
       
    35 	MP_VOID,                ///< Invisible tiles at the SW and SE border
       
    36 	MP_INDUSTRY,            ///< Part of an industry
       
    37 	MP_TUNNELBRIDGE,        ///< Tunnel entry/exit and bridge heads
       
    38 	MP_UNMOVABLE,           ///< Contains an object with cannot be removed like transmitters
       
    39 };
       
    40 
       
    41 /**
       
    42  * Additional infos of a tile on a tropic game.
       
    43  *
       
    44  * Each non-water tile in a tropic game is either a rainforest tile or a
       
    45  * desert one.
       
    46  */
       
    47 enum TropicZone {
       
    48 	TROPICZONE_INVALID    = 0,      ///< Invalid tropiczone-type
       
    49 	TROPICZONE_DESERT     = 1,      ///< Tile is desert
       
    50 	TROPICZONE_RAINFOREST = 2,      ///< Rainforest tile
       
    51 };
       
    52 
       
    53 /**
       
    54  * The index/ID of a Tile.
       
    55  */
       
    56 typedef uint32 TileIndex;
       
    57 
       
    58 /**
       
    59  * The very nice invalid tile marker
       
    60  */
       
    61 static const TileIndex INVALID_TILE = (TileIndex)-1;
       
    62 
       
    63 #endif /* TILE_TYPE_H */