diff options
author | BoredGuy <osome3717@gmail.com> | 2025-08-26 12:33:32 +0300 |
---|---|---|
committer | BoredGuy <osome3717@gmail.com> | 2025-08-26 12:33:32 +0300 |
commit | 87d07175058ee4ae18fce608de81c68d7d9bb178 (patch) | |
tree | 1eb459ff40aded29f6433bcd413d47ff870fd4e0 /include/utils.h | |
parent | 978c543891af8dbe9e95b27c4e2c46645d45138c (diff) |
Player Improvements
Diffstat (limited to 'include/utils.h')
-rw-r--r-- | include/utils.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/utils.h b/include/utils.h index 0ba8c32..3381828 100644 --- a/include/utils.h +++ b/include/utils.h @@ -16,10 +16,12 @@ static inline bool SameEntity(const Entity* a, const Entity* b) { return a->id == b->id; } -static inline void AddSpriteToEntity(Entity* e, Sprite s) { +static inline int AddSpriteToEntity(Entity* e, Sprite s) { if (e->numSprites < MAX_SPRITE_COUNT) { e->sprites[e->numSprites++] = s; } + + return e->numSprites - 1; } static inline bool IsAnimated(const Sprite* s) { |