Add CMake build and cross-platform cleanup
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "utils.h"
|
||||
Animation::Animation(Texture* pTexture, int frames, float frameDuration, Rectf srcRect, bool isLooping): m_pTexture(pTexture), m_SrcRect(srcRect), m_Frames(frames),
|
||||
m_IsLooping(isLooping), m_FrameDuration(frameDuration) {
|
||||
m_FrameDuration(frameDuration), m_IsLooping(isLooping) {
|
||||
|
||||
}
|
||||
void Animation::Update(float elapsedSec) {
|
||||
@@ -28,7 +28,7 @@ void Animation::Draw(const Vector2f& pos) const {
|
||||
Draw(pos, Rectf { pos.x, pos.y, m_SrcRect.width, m_SrcRect.height });
|
||||
}
|
||||
|
||||
void Animation::Draw(const Vector2f& pos, const Rectf& dst) const {
|
||||
void Animation::Draw(const Vector2f&, const Rectf& dst) const {
|
||||
Rectf src = m_SrcRect;
|
||||
src.left += static_cast<float>(m_CurrentFrame) * src.width;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user