1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

Made speed of most of battle animations time-based

- speed of creature-related animation no longer depends on framerate
- most of values from cranim.txt are now used correctly
- removed BMPPalette struct in favor of SDL_Color
- animation group "DEAD" that is used to display dead stacks, by default consists from last frame of "DEATH" group

Notes:
- animation speed may still need some adjustments
- range of config property "battle/animationSpeed" has been changed. This may result in extremely fast animation. To fix - change animation speed via options.
This commit is contained in:
Ivan Savenko
2013-07-06 16:10:20 +00:00
parent 68603245c4
commit 146a5e5ef8
21 changed files with 845 additions and 827 deletions

View File

@ -546,12 +546,14 @@ CHighlightableButtonsGroup::~CHighlightableButtonsGroup()
void CHighlightableButtonsGroup::select(int id, bool mode)
{
CHighlightableButton *bt = nullptr;
assert(!buttons.empty());
CHighlightableButton *bt = buttons.front();
if(mode)
{
for(size_t i=0;i<buttons.size() && !bt; ++i)
if (buttons[i]->ID == id)
bt = buttons[i];
for(auto btn : buttons)
if (btn->ID == id)
bt = btn;
}
else
{