summaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
authorBoredGuy <osome3717@gmail.com>2025-09-11 22:10:05 +0300
committerBoredGuy <osome3717@gmail.com>2025-09-11 22:10:05 +0300
commitc326d6c5297667304cec5f78eede6e3c94163431 (patch)
tree1c33ee0ed87fdb0de436f7ba9020c95fc9660e77 /src/game.c
parentc2add3e23ee1b69f059d5b78e33c0a922dc1a22d (diff)
A lot of stuff tbh
- Added collision response to barrel - Transparency effects added
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/game.c b/src/game.c
index 6e72b97..a2516b7 100644
--- a/src/game.c
+++ b/src/game.c
@@ -60,6 +60,10 @@ void UpdateEntity(Entity* e, float deltaTime) {
UpdatePlayer(e, deltaTime);
break;
+ case Barrel_Entity:
+ UpdateBarrel(e, deltaTime);
+ break;
+
default:
break;
}
@@ -147,7 +151,11 @@ void DrawEntitySprite(const Entity* e, int spriteIndex) {
if (drawnSprite->flipY)
srcRect.height = -srcRect.height;
- DrawTexturePro(drawnSprite->texture, srcRect, destRect, origin, rotation, WHITE);
+ Vector4 colorMaskV = ColorNormalize(WHITE);
+ colorMaskV.w = drawnSprite->alpha;
+ Color colorMask = ColorFromNormalized(colorMaskV);
+
+ DrawTexturePro(drawnSprite->texture, srcRect, destRect, origin, rotation, colorMask);
}