Mercurial > hg > openttd
changeset 14021:53eee9df97d5 draft
(svn r18563) -Document: some industry related functions
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 20 Dec 2009 13:45:43 +0000 |
parents | 3bf69facb7be |
children | 9f643c6d1e45 |
files | src/industry_map.h src/industrytype.h |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/industry_map.h +++ b/src/industry_map.h @@ -119,6 +119,13 @@ 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));
--- a/src/industrytype.h +++ b/src/industrytype.h @@ -181,6 +181,11 @@ 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,