summaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
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);
}