tron@2186: /* $Id$ */ tron@2186: rubidium@8108: /** @file tile_type.h Types related to tiles. */ belugas@6422: rubidium@8108: #ifndef TILE_TYPE_H rubidium@8108: #define TILE_TYPE_H tron@926: rubidium@8108: #include "core/enum_type.hpp" tron@1035: rubidium@8138: enum { rubidium@8138: TILE_SIZE = 16, ///< Tiles are 16x16 "units" in size rubidium@8138: TILE_PIXELS = 32, ///< a tile is 32x32 pixels rubidium@8138: TILE_HEIGHT = 8, ///< The standard height-difference between tiles on two levels is 8 (z-diff 8) truelight@7313: rubidium@8138: MAX_TILE_HEIGHT = 15, ///< Maximum allowed tile height rubidium@8138: MAX_SNOWLINE_HEIGHT = (MAX_TILE_HEIGHT - 2), ///< Maximum allowed snowline height rubidium@8138: }; rubidium@8138: truelight@7313: rubidium@7365: /** rubidium@7365: * The different type of a tile. rubidium@7365: * rubidium@7365: * Each tile belongs to one type, according whatever is build on it. rubidium@7365: * rubidium@7365: * @note A railway with a crossing street is marked as MP_ROAD. rubidium@7365: */ rubidium@6248: enum TileType { rubidium@7365: MP_CLEAR, ///< A tile without any structures, i.e. grass, rocks, farm fields etc. rubidium@7365: MP_RAILWAY, ///< A railway rubidium@7370: MP_ROAD, ///< A tile with road (or tram tracks) rubidium@7365: MP_HOUSE, ///< A house by a town rubidium@7365: MP_TREES, ///< Tile got trees rubidium@7365: MP_STATION, ///< A tile of a station rubidium@7365: MP_WATER, ///< Water tile rubidium@7365: MP_VOID, ///< Invisible tiles at the SW and SE border rubidium@7365: MP_INDUSTRY, ///< Part of an industry rubidium@7365: MP_TUNNELBRIDGE, ///< Tunnel entry/exit and bridge heads rubidium@7365: MP_UNMOVABLE, ///< Contains an object with cannot be removed like transmitters rubidium@6248: }; tron@1214: rubidium@7365: /** rubidium@7365: * Additional infos of a tile on a tropic game. rubidium@7365: * frosch@8450: * The tropiczone is not modified during gameplay. It mainly affects tree growth. (desert tiles are visible though) frosch@8450: * frosch@8450: * In randomly generated maps: frosch@8450: * TROPICZONE_DESERT: Generated everywhere, if there is neither water nor mountains (TileHeight >= 4) in a certain distance from the tile. frosch@8450: * TROPICZONE_RAINFOREST: Genereated everywhere, if there is no desert in a certain distance from the tile. frosch@8450: * TROPICZONE_NORMAL: Everywhere else, i.e. between desert and rainforest and on sea (if you clear the water). frosch@8450: * frosch@8450: * In scenarios: frosch@8450: * TROPICZONE_NORMAL: Default value. frosch@8450: * TROPICZONE_DESERT: Placed manually. frosch@8450: * TROPICZONE_RAINFOREST: Placed if you plant certain rainforest-trees. rubidium@7365: */ rubidium@6248: enum TropicZone { frosch@8450: TROPICZONE_NORMAL = 0, ///< Normal tropiczone rubidium@7365: TROPICZONE_DESERT = 1, ///< Tile is desert rubidium@7370: TROPICZONE_RAINFOREST = 2, ///< Rainforest tile rubidium@6248: }; tron@1211: rubidium@7365: /** rubidium@8108: * The index/ID of a Tile. rubidium@7365: */ rubidium@8108: typedef uint32 TileIndex; matthijs@1330: rubidium@8138: /** rubidium@8138: * The very nice invalid tile marker rubidium@8138: */ rubidium@8138: static const TileIndex INVALID_TILE = (TileIndex)-1; rubidium@8138: rubidium@8108: #endif /* TILE_TYPE_H */