Attempt this commit on Xcode.
This commit is contained in:
+3
-4
@@ -9,6 +9,7 @@
|
|||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "RageDisplay.h"
|
#include "RageDisplay.h"
|
||||||
#include "Foreach.h"
|
#include "Foreach.h"
|
||||||
|
#include <numeric>
|
||||||
|
|
||||||
#define MS_MAX_NAME 32
|
#define MS_MAX_NAME 32
|
||||||
|
|
||||||
@@ -148,10 +149,8 @@ void AnimatedTexture::SetState( int iState )
|
|||||||
|
|
||||||
float AnimatedTexture::GetAnimationLengthSeconds() const
|
float AnimatedTexture::GetAnimationLengthSeconds() const
|
||||||
{
|
{
|
||||||
float fTotalSeconds = 0;
|
return std::accumulate(vFrames.begin(), vFrames.end(), 0.f,
|
||||||
FOREACH_CONST( AnimatedTextureState, vFrames, ats )
|
[](float total, AnimatedTextureState state) { return total += state.fDelaySecs; });
|
||||||
fTotalSeconds += ats->fDelaySecs;
|
|
||||||
return fTotalSeconds;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimatedTexture::SetSecondsIntoAnimation( float fSeconds )
|
void AnimatedTexture::SetSecondsIntoAnimation( float fSeconds )
|
||||||
|
|||||||
Reference in New Issue
Block a user