diff options
author | rubidium <rubidium@openttd.org> | 2011-05-02 16:14:23 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-05-02 16:14:23 +0000 |
commit | 4d5dbf51707c42c24eeafdb65016b079c54adcf2 (patch) | |
tree | 0197dcc17f4a8411ecea2223f356019c902fe7b9 /src/newgrf_industries.cpp | |
parent | e9837ff1ec1326aec622366ae29ff1aa81581daf (diff) | |
download | openttd-4d5dbf51707c42c24eeafdb65016b079c54adcf2.tar.xz |
(svn r22410) -Document: some more bits ;)
Diffstat (limited to 'src/newgrf_industries.cpp')
-rw-r--r-- | src/newgrf_industries.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index de051ad24..4e9c38743 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -35,6 +35,12 @@ static uint32 _industry_creation_random_bits; IndustryOverrideManager _industry_mngr(NEW_INDUSTRYOFFSET, NUM_INDUSTRYTYPES, INVALID_INDUSTRYTYPE); IndustryTileOverrideManager _industile_mngr(NEW_INDUSTRYTILEOFFSET, NUM_INDUSTRYTILES, INVALID_INDUSTRYTILE); +/** + * Map the GRF local type to an industry type. + * @param grf_type The GRF local type. + * @param grf_id The GRF of the local type. + * @return The industry type in the global scope. + */ IndustryType MapNewGRFIndustryType(IndustryType grf_type, uint32 grf_id) { if (grf_type == IT_INVALID) return IT_INVALID; @@ -386,6 +392,16 @@ static void NewIndustryResolver(ResolverObject *res, TileIndex tile, Industry *i res->grffile = (indspec != NULL ? indspec->grf_prop.grffile : NULL); } +/** + * Perform an industry callback. + * @param callback The callback to perform. + * @param param1 The first parameter. + * @param param2 The second parameter. + * @param industry The industry to do the callback for. + * @param type The type of industry to do the callback for. + * @param tile The tile associated with the callback. + * @return The callback result. + */ uint16 GetIndustryCallback(CallbackID callback, uint32 param1, uint32 param2, Industry *industry, IndustryType type, TileIndex tile) { ResolverObject object; |