mirror of https://github.com/OpenTTD/OpenTTD
(svn r18563) -Document: some industry related functions
parent
ca5a9ab995
commit
6803672c88
|
@ -119,6 +119,13 @@ static inline void SetIndustryConstructionStage(TileIndex tile, byte value)
|
||||||
SB(_m[tile].m1, 0, 2, value);
|
SB(_m[tile].m1, 0, 2, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the industry graphics ID for the given industry tile as
|
||||||
|
* stored in the without translation.
|
||||||
|
* @param t the tile to get the gfx for
|
||||||
|
* @pre IsTileType(t, MP_INDUSTRY)
|
||||||
|
* @return the gfx ID
|
||||||
|
*/
|
||||||
static inline IndustryGfx GetCleanIndustryGfx(TileIndex t)
|
static inline IndustryGfx GetCleanIndustryGfx(TileIndex t)
|
||||||
{
|
{
|
||||||
assert(IsTileType(t, MP_INDUSTRY));
|
assert(IsTileType(t, MP_INDUSTRY));
|
||||||
|
|
|
@ -181,6 +181,11 @@ void ResetIndustries();
|
||||||
extern IndustrySpec _industry_specs[NUM_INDUSTRYTYPES];
|
extern IndustrySpec _industry_specs[NUM_INDUSTRYTYPES];
|
||||||
extern IndustryTileSpec _industry_tile_specs[NUM_INDUSTRYTILES];
|
extern IndustryTileSpec _industry_tile_specs[NUM_INDUSTRYTILES];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Do industry gfx ID translation for NewGRFs.
|
||||||
|
* @param gfx the type to get the override for.
|
||||||
|
* @return the gfx to actually work with.
|
||||||
|
*/
|
||||||
static inline IndustryGfx GetTranslatedIndustryTileID(IndustryGfx gfx)
|
static inline IndustryGfx GetTranslatedIndustryTileID(IndustryGfx gfx)
|
||||||
{
|
{
|
||||||
/* the 0xFF should be GFX_WATERTILE_SPECIALCHECK but for reasons of include mess,
|
/* the 0xFF should be GFX_WATERTILE_SPECIALCHECK but for reasons of include mess,
|
||||||
|
|
Loading…
Reference in New Issue