author | truebrain |
Thu, 12 Jun 2008 21:18:09 +0000 | |
branch | noai |
changeset 10944 | 588393239ac6 |
parent 9724 | b39bc69bb2f2 |
permissions | -rw-r--r-- |
9723 | 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 |
* |
|
9724
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
44 |
* The tropiczone is not modified during gameplay. It mainly affects tree growth. (desert tiles are visible though) |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
45 |
* |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
46 |
* In randomly generated maps: |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
47 |
* TROPICZONE_DESERT: Generated everywhere, if there is neither water nor mountains (TileHeight >= 4) in a certain distance from the tile. |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
48 |
* TROPICZONE_RAINFOREST: Genereated everywhere, if there is no desert in a certain distance from the tile. |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
49 |
* TROPICZONE_NORMAL: Everywhere else, i.e. between desert and rainforest and on sea (if you clear the water). |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
50 |
* |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
51 |
* In scenarios: |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
52 |
* TROPICZONE_NORMAL: Default value. |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
53 |
* TROPICZONE_DESERT: Placed manually. |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
54 |
* TROPICZONE_RAINFOREST: Placed if you plant certain rainforest-trees. |
9723 | 55 |
*/ |
56 |
enum TropicZone { |
|
9724
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
57 |
TROPICZONE_NORMAL = 0, ///< Normal tropiczone |
9723 | 58 |
TROPICZONE_DESERT = 1, ///< Tile is desert |
59 |
TROPICZONE_RAINFOREST = 2, ///< Rainforest tile |
|
60 |
}; |
|
61 |
||
62 |
/** |
|
63 |
* The index/ID of a Tile. |
|
64 |
*/ |
|
65 |
typedef uint32 TileIndex; |
|
66 |
||
67 |
/** |
|
68 |
* The very nice invalid tile marker |
|
69 |
*/ |
|
70 |
static const TileIndex INVALID_TILE = (TileIndex)-1; |
|
71 |
||
72 |
#endif /* TILE_TYPE_H */ |