summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBoredGuy <osome3717@gmail.com>2025-08-23 08:58:57 +0300
committerBoredGuy <osome3717@gmail.com>2025-08-23 08:58:57 +0300
commit0f25d9fb178e9fb32793331aa1ed724d9747702d (patch)
treec781e8cb0a9f6765b535d708a5c237fa0d5ac11f /include
parent8a8ed6d3fa7059dbb2a95072bbae4bf4618349a0 (diff)
Animation System Complete
Diffstat (limited to 'include')
-rw-r--r--include/game.h2
-rw-r--r--include/utils.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/include/game.h b/include/game.h
index 530ae73..ec44b3e 100644
--- a/include/game.h
+++ b/include/game.h
@@ -85,7 +85,7 @@ void UpdateGame(float deltaTime);
void DrawGame();
void UpdateCurrentSpriteAnimation(Sprite* sprite, float dt);
-void DrawEntitySprite(const Sprite* sprite, int spriteIndex);
+void DrawEntitySprite(const Entity* e, int spriteIndex);
#ifdef BEATEMUP_DEBUG
void DebugHighlights(const Entity* e);
diff --git a/include/utils.h b/include/utils.h
index 59c1bc4..0ba8c32 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -52,4 +52,8 @@ static inline Animation* GetCurrentAnimation(Sprite* s) {
return &s->animations[s->currentAnimation];
}
+static inline Rectangle GetCurrentSourceRectangle(const Animation* animation) {
+ return animation->srcRects[animation->currentFrame];
+}
+
#endif // UTILS_H_