diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/game.h | 2 | ||||
-rw-r--r-- | include/utils.h | 4 |
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_ |