author | glx |
Sun, 08 Apr 2007 14:46:55 +0000 | |
branch | noai |
changeset 9574 | 698395509d12 |
parent 6574 | e1d1a12faaf7 |
child 6743 | cabfaa4a0295 |
child 7809 | 40156c450f13 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
9574 | 3 |
/** @file tile.h */ |
4 |
||
1209
a1ac96655b79
(svn r1713) Split off several functions which query/set information about a single tile from map.h and put them into a seperate file tile.h
tron
parents:
1202
diff
changeset
|
5 |
#ifndef TILE_H |
a1ac96655b79
(svn r1713) Split off several functions which query/set information about a single tile from map.h and put them into a seperate file tile.h
tron
parents:
1202
diff
changeset
|
6 |
#define TILE_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 |
|
1394
449e84bdc04e
(svn r1898) Remove some unused macros from macros.h and move some others to more appropriate headers
tron
parents:
1335
diff
changeset
|
8 |
#include "macros.h" |
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5726
diff
changeset
|
9 |
#include "openttd.h" |
1209
a1ac96655b79
(svn r1713) Split off several functions which query/set information about a single tile from map.h and put them into a seperate file tile.h
tron
parents:
1202
diff
changeset
|
10 |
#include "map.h" |
3636
d87b21df2944
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
tron
parents:
3379
diff
changeset
|
11 |
#include "slope.h" |
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
|
12 |
|
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5847
diff
changeset
|
13 |
enum TileType { |
1214
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
14 |
MP_CLEAR, |
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
15 |
MP_RAILWAY, |
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
16 |
MP_STREET, |
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
17 |
MP_HOUSE, |
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
18 |
MP_TREES, |
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
19 |
MP_STATION, |
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
20 |
MP_WATER, |
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
21 |
MP_VOID, // invisible tiles at the SW and SE border |
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
22 |
MP_INDUSTRY, |
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
23 |
MP_TUNNELBRIDGE, |
2125
3098398bf7ff
(svn r2635) Fix: [ntp/misc] Improve the old pathfinder. Changed it to A* instead of Dijkstra.
ludde
parents:
2085
diff
changeset
|
24 |
MP_UNMOVABLE, |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5847
diff
changeset
|
25 |
}; |
1214
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
26 |
|
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5847
diff
changeset
|
27 |
enum TropicZone { |
4344
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4077
diff
changeset
|
28 |
TROPICZONE_INVALID = 0, |
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4077
diff
changeset
|
29 |
TROPICZONE_DESERT = 1, |
3379
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
30 |
TROPICZONE_RAINFOREST = 2, |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5847
diff
changeset
|
31 |
}; |
1211 | 32 |
|
3636
d87b21df2944
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
tron
parents:
3379
diff
changeset
|
33 |
Slope GetTileSlope(TileIndex tile, uint *h); |
1335
a635854c23b6
(svn r1839) Move GetTileSlope() and GetTileZ() into tile.[ch] and use more explicit types as parameters
tron
parents:
1333
diff
changeset
|
34 |
uint GetTileZ(TileIndex tile); |
3773
996897ffc8ea
(svn r4765) Add GetTileMaxZ(), which returns the height of the highest corner of a tile, and use it to simplify the code in a few places
tron
parents:
3636
diff
changeset
|
35 |
uint GetTileMaxZ(TileIndex tile); |
1335
a635854c23b6
(svn r1839) Move GetTileSlope() and GetTileZ() into tile.[ch] and use more explicit types as parameters
tron
parents:
1333
diff
changeset
|
36 |
|
1044
9b73df700a7c
(svn r1545) Add TileHeight() which returns the height (not multiplied by 8)
tron
parents:
1041
diff
changeset
|
37 |
static inline uint TileHeight(TileIndex tile) |
9b73df700a7c
(svn r1545) Add TileHeight() which returns the height (not multiplied by 8)
tron
parents:
1041
diff
changeset
|
38 |
{ |
9b73df700a7c
(svn r1545) Add TileHeight() which returns the height (not multiplied by 8)
tron
parents:
1041
diff
changeset
|
39 |
assert(tile < MapSize()); |
2049
ad0d49c916d4
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
tron
parents:
1967
diff
changeset
|
40 |
return GB(_m[tile].type_height, 0, 4); |
1044
9b73df700a7c
(svn r1545) Add TileHeight() which returns the height (not multiplied by 8)
tron
parents:
1041
diff
changeset
|
41 |
} |
9b73df700a7c
(svn r1545) Add TileHeight() which returns the height (not multiplied by 8)
tron
parents:
1041
diff
changeset
|
42 |
|
1059
c28c6be74291
(svn r1560) Introduce SetTileType() and SetTileHeight()
tron
parents:
1044
diff
changeset
|
43 |
static inline void SetTileHeight(TileIndex tile, uint height) |
c28c6be74291
(svn r1560) Introduce SetTileType() and SetTileHeight()
tron
parents:
1044
diff
changeset
|
44 |
{ |
c28c6be74291
(svn r1560) Introduce SetTileType() and SetTileHeight()
tron
parents:
1044
diff
changeset
|
45 |
assert(tile < MapSize()); |
c28c6be74291
(svn r1560) Introduce SetTileType() and SetTileHeight()
tron
parents:
1044
diff
changeset
|
46 |
assert(height < 16); |
2049
ad0d49c916d4
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
tron
parents:
1967
diff
changeset
|
47 |
SB(_m[tile].type_height, 0, 4, height); |
1059
c28c6be74291
(svn r1560) Introduce SetTileType() and SetTileHeight()
tron
parents:
1044
diff
changeset
|
48 |
} |
c28c6be74291
(svn r1560) Introduce SetTileType() and SetTileHeight()
tron
parents:
1044
diff
changeset
|
49 |
|
1041
be151b7bc909
(svn r1542) Rename TileHeight to TilePixelHeight, because this is what it actually returns
tron
parents:
1035
diff
changeset
|
50 |
static inline uint TilePixelHeight(TileIndex tile) |
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
|
51 |
{ |
4077
d3022f976946
(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
tron
parents:
4067
diff
changeset
|
52 |
return TileHeight(tile) * TILE_HEIGHT; |
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
|
53 |
} |
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
|
54 |
|
1214
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
55 |
static inline TileType GetTileType(TileIndex tile) |
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
|
56 |
{ |
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
|
57 |
assert(tile < MapSize()); |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3794
diff
changeset
|
58 |
return (TileType)GB(_m[tile].type_height, 4, 4); |
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
|
59 |
} |
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
|
60 |
|
1214
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
61 |
static inline void SetTileType(TileIndex tile, TileType type) |
1059
c28c6be74291
(svn r1560) Introduce SetTileType() and SetTileHeight()
tron
parents:
1044
diff
changeset
|
62 |
{ |
c28c6be74291
(svn r1560) Introduce SetTileType() and SetTileHeight()
tron
parents:
1044
diff
changeset
|
63 |
assert(tile < MapSize()); |
4010
e1c717629783
(svn r5221) Make the assertion in SetTileType() more strict: "lower edge of map <=> VOID" instead of just "lower edge of map => VOID"
tron
parents:
3900
diff
changeset
|
64 |
/* VOID tiles (and no others) are exactly allowed at the lower left and right |
4077
d3022f976946
(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
tron
parents:
4067
diff
changeset
|
65 |
* edges of the map */ |
4010
e1c717629783
(svn r5221) Make the assertion in SetTileType() more strict: "lower edge of map <=> VOID" instead of just "lower edge of map => VOID"
tron
parents:
3900
diff
changeset
|
66 |
assert((TileX(tile) == MapMaxX() || TileY(tile) == MapMaxY()) == (type == MP_VOID)); |
2049
ad0d49c916d4
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
tron
parents:
1967
diff
changeset
|
67 |
SB(_m[tile].type_height, 4, 4, type); |
1059
c28c6be74291
(svn r1560) Introduce SetTileType() and SetTileHeight()
tron
parents:
1044
diff
changeset
|
68 |
} |
c28c6be74291
(svn r1560) Introduce SetTileType() and SetTileHeight()
tron
parents:
1044
diff
changeset
|
69 |
|
1214
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
70 |
static inline bool IsTileType(TileIndex tile, TileType type) |
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
|
71 |
{ |
1214
33e07bbb7779
(svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
tron
parents:
1211
diff
changeset
|
72 |
return GetTileType(tile) == type; |
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
|
73 |
} |
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
|
74 |
|
2125
3098398bf7ff
(svn r2635) Fix: [ntp/misc] Improve the old pathfinder. Changed it to A* instead of Dijkstra.
ludde
parents:
2085
diff
changeset
|
75 |
|
1333 | 76 |
static inline Owner GetTileOwner(TileIndex tile) |
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
|
77 |
{ |
1333 | 78 |
assert(tile < MapSize()); |
1898
b9fe2a5b7e13
(svn r2404) assert that GetTileOwner() isn't called for tiles, which don't store owner information
tron
parents:
1852
diff
changeset
|
79 |
assert(!IsTileType(tile, MP_HOUSE)); |
b9fe2a5b7e13
(svn r2404) assert that GetTileOwner() isn't called for tiles, which don't store owner information
tron
parents:
1852
diff
changeset
|
80 |
assert(!IsTileType(tile, MP_VOID)); |
b9fe2a5b7e13
(svn r2404) assert that GetTileOwner() isn't called for tiles, which don't store owner information
tron
parents:
1852
diff
changeset
|
81 |
assert(!IsTileType(tile, MP_INDUSTRY)); |
b9fe2a5b7e13
(svn r2404) assert that GetTileOwner() isn't called for tiles, which don't store owner information
tron
parents:
1852
diff
changeset
|
82 |
|
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3794
diff
changeset
|
83 |
return (Owner)_m[tile].m1; |
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
|
84 |
} |
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
|
85 |
|
1902 | 86 |
static inline void SetTileOwner(TileIndex tile, Owner owner) |
87 |
{ |
|
88 |
assert(tile < MapSize()); |
|
89 |
assert(!IsTileType(tile, MP_HOUSE)); |
|
90 |
assert(!IsTileType(tile, MP_VOID)); |
|
91 |
assert(!IsTileType(tile, MP_INDUSTRY)); |
|
92 |
||
2360
09e42e4ee139
(svn r2886) Rename the "owner" attribute to "m1", because when it stores an owner it is accessed by [GS]etOwner anyway and when it doesn't store an owner, but arbitrary data, accessing a field called "owner" is confusing.
tron
parents:
2186
diff
changeset
|
93 |
_m[tile].m1 = owner; |
1902 | 94 |
} |
95 |
||
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
|
96 |
static inline bool IsTileOwner(TileIndex tile, Owner owner) |
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
|
97 |
{ |
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
|
98 |
return GetTileOwner(tile) == owner; |
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
|
99 |
} |
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
|
100 |
|
3379
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
101 |
/** |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
102 |
* Set the tropic zone |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
103 |
* @param tile the tile to set the zone of |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
104 |
* @param type the new type |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
105 |
* @pre assert(tile < MapSize()); |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
106 |
*/ |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
107 |
static inline void SetTropicZone(TileIndex tile, TropicZone type) |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
108 |
{ |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
109 |
assert(tile < MapSize()); |
5847
9ce114e1d90d
(svn r8050) -Codechange: Rename map member extra to m6, since its usage has been widden.
belugas
parents:
5838
diff
changeset
|
110 |
SB(_m[tile].m6, 0, 2, type); |
3379
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
111 |
} |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
112 |
|
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
113 |
/** |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
114 |
* Get the tropic zone |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
115 |
* @param tile the tile to get the zone of |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
116 |
* @pre assert(tile < MapSize()); |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
117 |
* @return the zone type |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
118 |
*/ |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
119 |
static inline TropicZone GetTropicZone(TileIndex tile) |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
120 |
{ |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
121 |
assert(tile < MapSize()); |
5847
9ce114e1d90d
(svn r8050) -Codechange: Rename map member extra to m6, since its usage has been widden.
belugas
parents:
5838
diff
changeset
|
122 |
return (TropicZone)GB(_m[tile].m6, 0, 2); |
3379
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3279
diff
changeset
|
123 |
} |
2436
177cb6a8339f
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2360
diff
changeset
|
124 |
#endif /* TILE_H */ |