Remove Point2f, replace with Vector2f

This commit is contained in:
Bram Verhulst
2024-04-17 13:54:48 +02:00
parent 64e96ab209
commit db83ae5e13
42 changed files with 494 additions and 634 deletions

View File

@@ -19,11 +19,11 @@ void Animation::Update(float elapsedSec) {
}
}
}
void Animation::Draw(const Point2f& pos) const {
void Animation::Draw(const Vector2f& pos) const {
Draw(pos, Rectf{ pos.x, pos.y, m_SrcRect.width, m_SrcRect.height });
}
void Animation::Draw(const Point2f& pos, const Rectf& dst) const {
void Animation::Draw(const Vector2f& pos, const Rectf& dst) const {
Rectf src = m_SrcRect;
src.left += m_CurrentFrame * src.width;

View File

@@ -8,8 +8,8 @@ public:
~Animation();
void Update(float elapsedSec);
void Draw(const Point2f& pos) const;
void Draw(const Point2f& pos, const Rectf& dst) const;
void Draw(const Vector2f& pos) const;
void Draw(const Vector2f& pos, const Rectf& dst) const;
void SetPlaying(bool isPlaying) {
m_isPlaying = isPlaying;