author | tron |
Fri, 24 Mar 2006 13:31:17 +0000 | |
changeset 3320 | e9e284ab853a |
parent 3314 | 6aaeba4b92e8 |
child 3321 | 4061bfef1830 |
permissions | -rw-r--r-- |
3314
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
1 |
/* $Id$ */ |
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
2 |
|
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
3 |
#include "industry.h" |
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
4 |
#include "macros.h" |
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
5 |
#include "tile.h" |
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
6 |
|
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
7 |
|
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
8 |
static inline uint GetIndustryIndex(TileIndex t) |
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
9 |
{ |
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
10 |
return _m[t].m2; |
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
11 |
} |
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
12 |
|
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
13 |
static inline Industry* GetIndustryByTile(TileIndex t) |
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
14 |
{ |
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
15 |
return GetIndustry(GetIndustryIndex(t)); |
6aaeba4b92e8
(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile
tron
parents:
diff
changeset
|
16 |
} |
3320 | 17 |
|
18 |
||
19 |
static inline void MakeIndustry(TileIndex t, uint index, uint gfx) |
|
20 |
{ |
|
21 |
SetTileType(t, MP_INDUSTRY); |
|
22 |
_m[t].m1 = 0; |
|
23 |
_m[t].m2 = index; |
|
24 |
_m[t].m3 = 0; |
|
25 |
_m[t].m4 = 0; |
|
26 |
_m[t].m5 = gfx; |
|
27 |
} |