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 #include <set>
00021 #include <string>
00022
00023 typedef std::set<std::string> TownNames;
00024
00029 struct TownNameParams {
00030 uint32 grfid;
00031 uint16 type;
00032
00037 TownNameParams(byte town_name)
00038 {
00039 extern int _nb_orig_names;
00040 bool grf = town_name >= _nb_orig_names;
00041 this->grfid = grf ? GetGRFTownNameId(town_name - _nb_orig_names) : 0;
00042 this->type = grf ? GetGRFTownNameType(town_name - _nb_orig_names) : SPECSTR_TOWNNAME_START + town_name;
00043 }
00044
00045 TownNameParams(const Town *t);
00046 };
00047
00048 #endif