1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-05 00:49:09 +02:00

Various fixes. Subtitles for choosen hero/town/bonus in pregame. Fixed arrows behavior. Really fixed shortcuts. Fixed map scrolling. Fixed disappearing battle interface.

This commit is contained in:
Michał W. Urbańczyk
2009-08-18 08:22:56 +00:00
parent a3b6bb4892
commit 3915b71869
8 changed files with 151 additions and 27 deletions

View File

@ -1299,19 +1299,51 @@ unsigned char CMapHandler::getHeroFrameNum(unsigned char dir, bool isMoving) con
{
if(isMoving)
{
std::map<int, unsigned char> dirToFrame = boost::assign::map_list_of(1, 10)(2, 5)(3, 6)(4, 7)(5, 8)(6, 9)(7, 12)(8, 11);
if(dir >= 1 && dir <= 10)
return dirToFrame[dir];
throw std::string("Something very wrong1.");
switch(dir)
{
case 1:
return 10;
case 2:
return 5;
case 3:
return 6;
case 4:
return 7;
case 5:
return 8;
case 6:
return 9;
case 7:
return 12;
case 8:
return 11;
default:
throw std::string("Something very wrong1.");
}
}
else //if(isMoving)
{
std::map<int, unsigned char> dirToFrame = boost::assign::map_list_of(1, 13)(2, 0)(3, 1)(4, 2)(5, 3)(6, 4)(7, 15)(8, 14);
if(dir >= 1 && dir <= 10)
return dirToFrame[dir];
throw std::string("Something very wrong1.");
switch(dir)
{
case 1:
return 13;
case 2:
return 0;
case 3:
return 1;
case 4:
return 2;
case 5:
return 3;
case 6:
return 4;
case 7:
return 15;
case 8:
return 14;
default:
throw std::string("Something very wrong2.");
}
}
}