(svn r4077) Add GetIndustry{Index,ByTile}() to get the industry index resp. the industry from a tile

This commit is contained in:
tron
2006-03-24 08:00:45 +00:00
parent 742e806d73
commit 4b0e8947d5
3 changed files with 33 additions and 13 deletions

16
industry_map.h Normal file
View File

@@ -0,0 +1,16 @@
/* $Id$ */
#include "industry.h"
#include "macros.h"
#include "tile.h"
static inline uint GetIndustryIndex(TileIndex t)
{
return _m[t].m2;
}
static inline Industry* GetIndustryByTile(TileIndex t)
{
return GetIndustry(GetIndustryIndex(t));
}