author | Darkvater |
Sun, 26 Mar 2006 21:07:56 +0000 | |
changeset 3339 | d594e7ac4758 |
parent 3319 | 7d04847e4689 |
child 3369 | 00c2ca209a89 |
permissions | -rw-r--r-- |
3319
7d04847e4689
(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile
tron
parents:
diff
changeset
|
1 |
/* $Id$ */ |
7d04847e4689
(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile
tron
parents:
diff
changeset
|
2 |
|
7d04847e4689
(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile
tron
parents:
diff
changeset
|
3 |
#include "town.h" |
7d04847e4689
(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile
tron
parents:
diff
changeset
|
4 |
|
7d04847e4689
(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile
tron
parents:
diff
changeset
|
5 |
|
7d04847e4689
(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile
tron
parents:
diff
changeset
|
6 |
static inline uint GetTownIndex(TileIndex t) |
7d04847e4689
(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile
tron
parents:
diff
changeset
|
7 |
{ |
7d04847e4689
(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile
tron
parents:
diff
changeset
|
8 |
return _m[t].m2; |
7d04847e4689
(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile
tron
parents:
diff
changeset
|
9 |
} |
7d04847e4689
(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile
tron
parents:
diff
changeset
|
10 |
|
7d04847e4689
(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile
tron
parents:
diff
changeset
|
11 |
static inline Town* GetTownByTile(TileIndex t) |
7d04847e4689
(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile
tron
parents:
diff
changeset
|
12 |
{ |
7d04847e4689
(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile
tron
parents:
diff
changeset
|
13 |
return GetTown(GetTownIndex(t)); |
7d04847e4689
(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile
tron
parents:
diff
changeset
|
14 |
} |