diff options
author | rubidium <rubidium@openttd.org> | 2010-08-28 19:48:46 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-08-28 19:48:46 +0000 |
commit | a8b992f4fd93429dad018ac77056bf5672c97528 (patch) | |
tree | 420d9c9a1d5410a55d4dcf4f14cac3e3802d33ce /src/newgrf_object.cpp | |
parent | 60655522ca6f97d0de3476b3d79e5b9d77e3812f (diff) | |
download | openttd-a8b992f4fd93429dad018ac77056bf5672c97528.tar.xz |
(svn r20673) -Codechange: add support for inspecting objects
Diffstat (limited to 'src/newgrf_object.cpp')
-rw-r--r-- | src/newgrf_object.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/newgrf_object.cpp b/src/newgrf_object.cpp index 2fe37db8e..3fca86dda 100644 --- a/src/newgrf_object.cpp +++ b/src/newgrf_object.cpp @@ -529,3 +529,13 @@ void TriggerObjectAnimation(const Object *o, ObjectAnimationTrigger trigger, con TriggerObjectTileAnimation(o, tile, trigger, spec); } } + +/** + * Resolve an object's spec and such so we can get a variable. + * @param ro The resolver object to fill. + * @param index The object tile to get the data from. + */ +void GetObjectResolver(ResolverObject *ro, uint index) +{ + NewObjectResolver(ro, ObjectSpec::GetByTile(index), Object::GetByTile(index), index); +} |