diff options
author | terkhen <terkhen@openttd.org> | 2011-06-12 20:42:23 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2011-06-12 20:42:23 +0000 |
commit | 9f55abf51aac0f408e60d905fb2ac1b8a1405bb9 (patch) | |
tree | dd934740de768e32320cd9f0605627e1d478c5dc /src/newgrf_commons.cpp | |
parent | 281bed03f4c7e7021a0b7c079cefe246f56e3fb9 (diff) | |
download | openttd-9f55abf51aac0f408e60d905fb2ac1b8a1405bb9.tar.xz |
(svn r22566) -Codechange: Define and use OverrideManagerBase::GetGRFID function.
Diffstat (limited to 'src/newgrf_commons.cpp')
-rw-r--r-- | src/newgrf_commons.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp index d0d1c1c5f..59118a6ff 100644 --- a/src/newgrf_commons.cpp +++ b/src/newgrf_commons.cpp @@ -142,6 +142,16 @@ uint16 OverrideManagerBase::AddEntityID(byte grf_local_id, uint32 grfid, byte su } /** + * Gives the GRFID of the file the entity belongs to. + * @param entity_id ID of the entity being queried. + * @return GRFID. + */ +uint16 OverrideManagerBase::GetGRFID(uint16 entity_id) const +{ + return mapping_ID[entity_id].grfid; +} + +/** * Gives the substitute of the entity, as specified by the grf file * @param entity_id of the entity being queried * @return mapped id |