Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00015 #ifndef TOWNNAME_TYPE_H
00016 #define TOWNNAME_TYPE_H
00017
00018 #include "newgrf_townname.h"
00019 #include "town_type.h"
00020
00025 struct TownNameParams {
00026 uint32 grfid;
00027 uint16 type;
00028
00033 TownNameParams(byte town_name)
00034 {
00035 extern int _nb_orig_names;
00036 bool grf = town_name >= _nb_orig_names;
00037 this->grfid = grf ? GetGRFTownNameId(town_name - _nb_orig_names) : 0;
00038 this->type = grf ? GetGRFTownNameType(town_name - _nb_orig_names) : SPECSTR_TOWNNAME_START + town_name;
00039 }
00040
00041 TownNameParams(const Town *t);
00042 };
00043
00044 #endif