From c326d6c5297667304cec5f78eede6e3c94163431 Mon Sep 17 00:00:00 2001 From: BoredGuy Date: Thu, 11 Sep 2025 22:10:05 +0300 Subject: A lot of stuff tbh - Added collision response to barrel - Transparency effects added --- src/game.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/game.c') 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); } -- cgit v1.2.3