Add CMake build and cross-platform cleanup

This commit is contained in:
Bram Verhulst
2026-04-12 23:15:20 +02:00
parent 81746db9ae
commit 1ba1c1f2cc
25 changed files with 350 additions and 56 deletions

View File

@@ -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;