summaryrefslogtreecommitdiff
path: root/src/table
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2012-11-10 20:44:38 +0000
committeralberth <alberth@openttd.org>2012-11-10 20:44:38 +0000
commite087503fd6cf8a461fac7a11bbd9a96f7b4180e7 (patch)
tree6a7f33f3946faaa6419b068d939a2f0a8a0fb146 /src/table
parentf7352871fab18f1517df2c1e08abe13d3caacb96 (diff)
downloadopenttd-e087503fd6cf8a461fac7a11bbd9a96f7b4180e7.tar.xz
(svn r24690) -Codechange: Add resolver classes for industry tiles.
Diffstat (limited to 'src/table')
-rw-r--r--src/table/newgrf_debug_data.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h
index 12a26aebd..6ec8df40e 100644
--- a/src/table/newgrf_debug_data.h
+++ b/src/table/newgrf_debug_data.h
@@ -241,7 +241,12 @@ class NIHIndustryTile : public NIHelper {
const void *GetSpec(uint index) const { return GetIndustryTileSpec(GetIndustryGfx(index)); }
void SetStringParameters(uint index) const { this->SetObjectAtStringParameters(STR_INDUSTRY_NAME, GetIndustryIndex(index), index); }
uint32 GetGRFID(uint index) const { return (this->IsInspectable(index)) ? GetIndustryTileSpec(GetIndustryGfx(index))->grf_prop.grffile->grfid : 0; }
- void Resolve(ResolverObject *ro, uint32 index) const { extern void GetIndustryTileResolver(ResolverObject *ro, uint index); GetIndustryTileResolver(ro, index); }
+
+ /* virtual */ uint Resolve(uint index, uint var, uint param, bool *avail) const
+ {
+ IndustryTileResolverObject ro(GetIndustryGfx(index), index, Industry::GetByTile(index));
+ return ro.GetScope(ro.scope)->GetVariable(var, param, avail);
+ }
};
static const NIFeature _nif_industrytile = {