diff options
Diffstat (limited to 'src/game.c')
| -rw-r--r-- | src/game.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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); } |
