author | rubidium |
Wed, 19 Dec 2007 23:26:02 +0000 | |
changeset 8604 | 8afdd9877afd |
parent 7866 | src/tile.h@e19fda04e8d3 |
child 8634 | 5ffca02f9115 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
8604
8afdd9877afd
(svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h
rubidium
parents:
7866
diff
changeset
|
3 |
/** @file tile_type.h Types related to tiles. */ |
6918
5589c415e28f
(svn r9558) -Documentation: doxygen and comment changes: 'T' now. Almost done
belugas
parents:
6574
diff
changeset
|
4 |
|
8604
8afdd9877afd
(svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h
rubidium
parents:
7866
diff
changeset
|
5 |
#ifndef TILE_TYPE_H |
8afdd9877afd
(svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h
rubidium
parents:
7866
diff
changeset
|
6 |
#define TILE_TYPE_H |
926
bd4312619522
(svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
tron
parents:
909
diff
changeset
|
7 |
|
8604
8afdd9877afd
(svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h
rubidium
parents:
7866
diff
changeset
|
8 |
#include "core/enum_type.hpp" |
1035
0a170deb6e33
(svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn them into inline functions and add some asserts
tron
parents:
979
diff
changeset
|
9 |
|
7809
40156c450f13
(svn r10665) -Codechange: replace magic 15 with MAX_TILE_HEIGHT (bilbo)
truelight
parents:
6918
diff
changeset
|
10 |
/** Maximum allowed tile height */ |
40156c450f13
(svn r10665) -Codechange: replace magic 15 with MAX_TILE_HEIGHT (bilbo)
truelight
parents:
6918
diff
changeset
|
11 |
#define MAX_TILE_HEIGHT 15 |
40156c450f13
(svn r10665) -Codechange: replace magic 15 with MAX_TILE_HEIGHT (bilbo)
truelight
parents:
6918
diff
changeset
|
12 |
|
40156c450f13
(svn r10665) -Codechange: replace magic 15 with MAX_TILE_HEIGHT (bilbo)
truelight
parents:
6918
diff
changeset
|
13 |
/** Maximum allowed snowline height */ |
40156c450f13
(svn r10665) -Codechange: replace magic 15 with MAX_TILE_HEIGHT (bilbo)
truelight
parents:
6918
diff
changeset
|
14 |
#define MAX_SNOWLINE_HEIGHT (MAX_TILE_HEIGHT - 2) |
40156c450f13
(svn r10665) -Codechange: replace magic 15 with MAX_TILE_HEIGHT (bilbo)
truelight
parents:
6918
diff
changeset
|
15 |
|
7861
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
16 |
/** |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
17 |
* The different type of a tile. |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
18 |
* |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
19 |
* Each tile belongs to one type, according whatever is build on it. |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
20 |
* |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
21 |
* @note A railway with a crossing street is marked as MP_ROAD. |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
22 |
*/ |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5847
diff
changeset
|
23 |
enum TileType { |
7861
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
24 |
MP_CLEAR, ///< A tile without any structures, i.e. grass, rocks, farm fields etc. |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
25 |
MP_RAILWAY, ///< A railway |
7866
e19fda04e8d3
(svn r10733) -Codechange: change MP_STREET into MP_ROAD as we use the word "road" everywhere except in the tile type.
rubidium
parents:
7861
diff
changeset
|
26 |
MP_ROAD, ///< A tile with road (or tram tracks) |
7861
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
27 |
MP_HOUSE, ///< A house by a town |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
28 |
MP_TREES, ///< Tile got trees |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
29 |
MP_STATION, ///< A tile of a station |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
30 |
MP_WATER, ///< Water tile |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
31 |
MP_VOID, ///< Invisible tiles at the SW and SE border |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
32 |
MP_INDUSTRY, ///< Part of an industry |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
33 |
MP_TUNNELBRIDGE, ///< Tunnel entry/exit and bridge heads |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
34 |
MP_UNMOVABLE, ///< Contains an object with cannot be removed like transmitters |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5847
diff
changeset
|
35 |
}; |
1214
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
36 |
|
7861
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
37 |
/** |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
38 |
* Additional infos of a tile on a tropic game. |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
39 |
* |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
40 |
* Each non-water tile in a tropic game is either a rainforest tile or a |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
41 |
* desert one. |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
42 |
*/ |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5847
diff
changeset
|
43 |
enum TropicZone { |
7861
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
44 |
TROPICZONE_INVALID = 0, ///< Invalid tropiczone-type |
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
45 |
TROPICZONE_DESERT = 1, ///< Tile is desert |
7866
e19fda04e8d3
(svn r10733) -Codechange: change MP_STREET into MP_ROAD as we use the word "road" everywhere except in the tile type.
rubidium
parents:
7861
diff
changeset
|
46 |
TROPICZONE_RAINFOREST = 2, ///< Rainforest tile |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5847
diff
changeset
|
47 |
}; |
1211 | 48 |
|
7861
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
49 |
/** |
8604
8afdd9877afd
(svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h
rubidium
parents:
7866
diff
changeset
|
50 |
* The index/ID of a Tile. |
7861
e45fe49dbe58
(svn r10728) -Documentation [FS#1088]: of tile.h. Based on a patch by Progman.
rubidium
parents:
7809
diff
changeset
|
51 |
*/ |
8604
8afdd9877afd
(svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h
rubidium
parents:
7866
diff
changeset
|
52 |
typedef uint32 TileIndex; |
1330
8a67d04016ce
(svn r1834) - Fix: NPF does not check the owner of its target, busses try to enter other players' depots. TODO
matthijs
parents:
1214
diff
changeset
|
53 |
|
8604
8afdd9877afd
(svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h
rubidium
parents:
7866
diff
changeset
|
54 |
#endif /* TILE_TYPE_H */ |