1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Code cleanup

This commit is contained in:
Ivan Savenko
2023-01-31 15:00:46 +02:00
parent bf343126c4
commit c3a2dee45a
4 changed files with 12 additions and 3 deletions

View File

@@ -260,7 +260,7 @@ void CursorHandler::centerCursor()
void CursorHandler::updateSpellcastCursor()
{
static const float frameDisplayDuration = 5.f / 60.f; // H3 uses ~83 ms per image = 5 / 60 second
static const float frameDisplayDuration = 0.1f; // H3 uses 100 ms per frame
frameTime += GH.mainFPSmng->getElapsedMilliseconds() / 1000.f;
size_t newFrame = frame;

View File

@@ -125,8 +125,10 @@ protected:
size_t first, last; //animation range
/// how long (in milliseconds) should
/// total time on scren for each frame in animation
ui32 frameTimeTotal;
/// how long was current frame visible on screen
ui32 frameTimePassed;
ui8 flags;//Flags from EFlags enum

View File

@@ -90,6 +90,13 @@ public:
h & idleAnimationTime;
h & walkAnimationTime;
h & attackAnimationTime;
if (version < 814)
{
float unused = 0.f;
h & unused;
}
h & upperRightMissleOffsetX;
h & rightMissleOffsetX;
h & lowerRightMissleOffsetX;

View File

@@ -14,7 +14,7 @@
VCMI_LIB_NAMESPACE_BEGIN
const ui32 SERIALIZATION_VERSION = 813;
const ui32 SERIALIZATION_VERSION = 814;
const ui32 MINIMAL_SERIALIZATION_VERSION = 813;
const std::string SAVEGAME_MAGIC = "VCMISVG";