summaryrefslogtreecommitdiff
path: root/src/table
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2012-11-10 20:40:46 +0000
committeralberth <alberth@openttd.org>2012-11-10 20:40:46 +0000
commita9b8b22daf38be899b5fd13e8028b7a9e5f5bcfc (patch)
tree924c06fb0f02c86ec2544e95b9ae365640f2d329 /src/table
parentd7b62da87b5123907df008fffa8f21377c394358 (diff)
downloadopenttd-a9b8b22daf38be899b5fd13e8028b7a9e5f5bcfc.tar.xz
(svn r24683) -Codechange: Add resolver classes for objects.
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 c7f936587..8a669fee5 100644
--- a/src/table/newgrf_debug_data.h
+++ b/src/table/newgrf_debug_data.h
@@ -361,7 +361,12 @@ class NIHObject : public NIHelper {
const void *GetSpec(uint index) const { return ObjectSpec::GetByTile(index); }
void SetStringParameters(uint index) const { this->SetObjectAtStringParameters(STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_OBJECT, INVALID_STRING_ID, index); }
uint32 GetGRFID(uint index) const { return (this->IsInspectable(index)) ? ObjectSpec::GetByTile(index)->grf_prop.grffile->grfid : 0; }
- void Resolve(ResolverObject *ro, uint32 index) const { extern void GetObjectResolver(ResolverObject *ro, uint index); GetObjectResolver(ro, index); }
+
+ /* virtual */ uint Resolve(uint index, uint var, uint param, bool *avail) const
+ {
+ ObjectResolverObject ro(ObjectSpec::GetByTile(index), Object::GetByTile(index), index);
+ return ro.GetScope(ro.scope)->GetVariable(var, param, avail);
+ }
};
static const NIFeature _nif_object = {