(svn r24170) -Add: Methods for translating between NewGRFClass spec indices and user interface indices.

This commit is contained in:
frosch
2012-04-22 16:28:32 +00:00
parent 34969178db
commit 00af887048
2 changed files with 50 additions and 0 deletions

View File

@@ -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);