1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +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

@ -92,7 +92,7 @@ BOOST_AUTO_TEST_CASE(CMapEditManager_DrawTerrain_View)
CRandomGenerator gen;
const JsonNode viewNode(ResourceID("test/terrainViewMappings", EResType::TEXT));
const auto & mappingsNode = viewNode["mappings"].Vector();
BOOST_FOREACH(const auto & node, mappingsNode)
for (const auto & node : mappingsNode)
{
// Get terrain group and id
const auto & patternStr = node["pattern"].String();
@ -108,7 +108,7 @@ BOOST_AUTO_TEST_CASE(CMapEditManager_DrawTerrain_View)
const auto & mapping = (*pattern).mapping;
const auto & positionsNode = node["pos"].Vector();
BOOST_FOREACH(const auto & posNode, positionsNode)
for (const auto & posNode : positionsNode)
{
const auto & posVector = posNode.Vector();
if(posVector.size() != 3) throw std::runtime_error("A position should consist of three values x,y,z. Continue with next position.");
@ -119,7 +119,7 @@ BOOST_AUTO_TEST_CASE(CMapEditManager_DrawTerrain_View)
editManager->drawTerrain(originalTile.terType, &gen);
const auto & tile = map->getTile(pos);
bool isInRange = false;
BOOST_FOREACH(const auto & range, mapping)
for(const auto & range : mapping)
{
if(tile.terView >= range.first && tile.terView <= range.second)
{