diff options
author | frosch <frosch@openttd.org> | 2012-04-22 16:28:32 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-04-22 16:28:32 +0000 |
commit | 00af887048a1b6d3d424dcf237843838ba31e2da (patch) | |
tree | bfa9d3d953ada5b5552e8178a7d504e687a1ee18 /src/newgrf_class.h | |
parent | 34969178db5433cbe8e198d420976c899e72ae2a (diff) | |
download | openttd-00af887048a1b6d3d424dcf237843838ba31e2da.tar.xz |
(svn r24170) -Add: Methods for translating between NewGRFClass spec indices and user interface indices.
Diffstat (limited to 'src/newgrf_class.h')
-rw-r--r-- | src/newgrf_class.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/newgrf_class.h b/src/newgrf_class.h index 2dfeceba3..71b5608d8 100644 --- a/src/newgrf_class.h +++ b/src/newgrf_class.h @@ -46,6 +46,8 @@ public: uint GetSpecCount() const { return this->count; } /** Get the number of potentially user-available specs within the class. */ uint GetUISpecCount() const { return this->ui_count; } + int GetUIFromIndex(int index) const; + int GetIndexFromUI(int ui_index) const; const Tspec *GetSpec(uint index) const; @@ -57,6 +59,7 @@ public: static void Assign(Tspec *spec); static uint GetClassCount(); static uint GetUIClassCount(); + static Tid GetUIClass(uint index); static NewGRFClass *Get(Tid cls_id); static const Tspec *GetByGrf(uint32 grfid, byte local_id, int *index); |