1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

* fixed crash when there was no hero available to hire for some player

* pregmae wont crash if user gives wrong resolution number
* fixed 1024x600 screen resolution
* selection dialog (eg. for treasure chests) can be closed with enter key
* orientation of hero can't be change if movement points are exhausted
* numerous improvements for Tavern window (hover tips for buttons, button will be inactive if player has 8 heroes or there is a visiting hero in the town garrison)
* campfire, borderguard, bordergate, questguard will be accessible from the top
* spells not known by hero can't be casted
* restored checking mana points before casting spell
This commit is contained in:
Michał W. Urbańczyk
2009-02-09 16:18:48 +00:00
parent 445653c880
commit c83404a375
15 changed files with 167 additions and 59 deletions

View File

@ -290,9 +290,13 @@ void processCommand(const std::string &message, CClient *&client)
std::cin >> i;
if(!i)
return;
else if(i < 0 || i >= conf.guiOptions.size())
{
tlog1 << "Invalid resolution ID! Not a number between 0 and " << conf.guiOptions.size() << ". No settings changed.\n";
}
else
{
for(j=conf.guiOptions.begin(); j!=conf.guiOptions.end() && hlp++<i; j++);
for(j=conf.guiOptions.begin(); j!=conf.guiOptions.end() && hlp++<i; j++); //move j to the i-th resolution info
conf.cc.resx = j->first.first;
conf.cc.resy = j->first.second;
tlog0 << "Screen resolution set to " << conf.cc.resx << " x " << conf.cc.resy <<". It will be aplied when the game starts.\n";