summaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
authorBoredGuy <osome3717@gmail.com>2025-08-26 19:54:09 +0300
committerBoredGuy <osome3717@gmail.com>2025-08-26 19:54:09 +0300
commitf95068d73410aa6d01e8ba91b430ca05d404a57b (patch)
tree84de322f972182510e48aaa374ae8a62ac3ee2b5 /src/game.c
parent87d07175058ee4ae18fce608de81c68d7d9bb178 (diff)
Added barrel, next up sprite Z-sorting(ugh)
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/game.c b/src/game.c
index d6e8ce3..59747c6 100644
--- a/src/game.c
+++ b/src/game.c
@@ -56,7 +56,6 @@ void UpdateGame(float deltaTime) {
game.enableDebugOverlay = !game.enableDebugOverlay;
}
#endif
-
for (int i = 0; i < MAX_ENTITY_COUNT; i++) {
Entity* e = &game.entities[i];
@@ -70,12 +69,7 @@ void DrawEntitySprite(const Entity* e, int spriteIndex) {
Rectangle srcRect;
if (!IsAnimated(drawnSprite)) {
- srcRect = (Rectangle) {
- .x = 0,
- .y = 0,
- .width = drawnSprite->texture.width,
- .height = drawnSprite->texture.height
- };
+ srcRect = drawnSprite->srcRect;
} else {
const Animation* currentAnimation =
&drawnSprite->animations[drawnSprite->currentAnimation];