mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
* resource bar
* function in CCallback for getting onfo about res * giving resources at the beginning of game * moved several txt files to /config subfolder * minor changes
This commit is contained in:
@ -14,12 +14,19 @@ CTownHandler::~CTownHandler()
|
||||
}
|
||||
void CTownHandler::loadNames()
|
||||
{
|
||||
std::istringstream ins;
|
||||
std::istringstream ins, names;
|
||||
ins.str(CGI->bitmaph->getTextFile("TOWNTYPE.TXT"));
|
||||
names.str(CGI->bitmaph->getTextFile("TOWNNAME.TXT"));
|
||||
while (!ins.eof())
|
||||
{
|
||||
CTown town;
|
||||
ins >> town.name;
|
||||
char bufname[50];
|
||||
for (int i=0; i<NAMES_PER_TOWN; i++)
|
||||
{
|
||||
names.getline(bufname,50);
|
||||
town.names.push_back(std::string(bufname));
|
||||
}
|
||||
town.bonus=towns.size();
|
||||
if (town.bonus==8) town.bonus=3;
|
||||
if (town.name.length())
|
||||
|
Reference in New Issue
Block a user