Changeset - r14011:dcc96468e905
[Not reviewed]
master
0 2 0
rubidium - 15 years ago 2009-12-20 13:45:43
rubidium@openttd.org
(svn r18563) -Document: some industry related functions
2 files changed with 12 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/industry_map.h
Show inline comments
 
@@ -116,12 +116,19 @@ static inline byte GetIndustryConstructi
 
static inline void SetIndustryConstructionStage(TileIndex tile, byte value)
 
{
 
	assert(IsTileType(tile, MP_INDUSTRY));
 
	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)
 
{
 
	assert(IsTileType(t, MP_INDUSTRY));
 
	return _m[t].m5 | (GB(_m[t].m6, 2, 1) << 8);
 
}
 

	
src/industrytype.h
Show inline comments
 
@@ -178,12 +178,17 @@ const IndustryTileSpec *GetIndustryTileS
 
void ResetIndustries();
 

	
 
/* writable arrays of specs */
 
extern IndustrySpec _industry_specs[NUM_INDUSTRYTYPES];
 
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)
 
{
 
	/* the 0xFF should be GFX_WATERTILE_SPECIALCHECK but for reasons of include mess,
 
	 * we'll simplify the writing.
 
	 * Basically, the first test is required since the GFX_WATERTILE_SPECIALCHECK value
 
	 * will never be assigned as a tile index and is only required in order to do some
0 comments (0 inline, 0 general)