1
0
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:
Michał W. Urbańczyk
2007-09-16 17:21:23 +00:00
parent 3ce6c4bf70
commit 7d4aa0c803
17 changed files with 119 additions and 8 deletions

View File

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