summaryrefslogtreecommitdiff
path: root/src/table
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2012-11-10 20:45:59 +0000
committeralberth <alberth@openttd.org>2012-11-10 20:45:59 +0000
commit4c9bea2a714da675217522c39113ba2c2c5bbee4 (patch)
treef04d63a5864e01eef76f74f0a09692a0baa880e1 /src/table
parent69e07c3e00180053cc087ceb1dfeb89845b79857 (diff)
downloadopenttd-4c9bea2a714da675217522c39113ba2c2c5bbee4.tar.xz
(svn r24692) -Cleanup: Cleanup final parts of the old resolver code.
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 3cd9501d2..4446d7605 100644
--- a/src/table/newgrf_debug_data.h
+++ b/src/table/newgrf_debug_data.h
@@ -491,10 +491,15 @@ class NIHTown : public NIHelper {
const void *GetSpec(uint index) const { return NULL; }
void SetStringParameters(uint index) const { this->SetSimpleStringParameters(STR_TOWN_NAME, index); }
uint32 GetGRFID(uint index) const { return 0; }
- uint Resolve(uint index, uint var, uint param, bool *avail) const { return TownGetVariable(var, param, avail, Town::Get(index), NULL); }
bool PSAWithParameter() const { return true; }
uint GetPSASize(uint index, uint32 grfid) const { return cpp_lengthof(PersistentStorage, storage); }
+ /* virtual */ uint Resolve(uint index, uint var, uint param, bool *avail) const
+ {
+ TownResolverObject ro(NULL, Town::Get(index), true);
+ return ro.GetScope(ro.scope)->GetVariable(var, param, avail);
+ }
+
const int32 *GetPSAFirstPosition(uint index, uint32 grfid) const
{
Town *t = Town::Get(index);