summaryrefslogtreecommitdiff
path: root/src/player.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/player.c')
-rw-r--r--src/player.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/player.c b/src/player.c
index 7d41b57..2404bd5 100644
--- a/src/player.c
+++ b/src/player.c
@@ -162,6 +162,7 @@ static void AddPlayerSprites(Entity* player) {
.texture = shadowTexture->texture,
.layer = Foreground_Layer,
.destRect = shadowDestRect,
+ .alpha = 1.0,
.srcRect = {
0,
@@ -179,6 +180,7 @@ static void AddPlayerSprites(Entity* player) {
Sprite bodySprite = (Sprite) {
.texture = bodyTexture->texture,
.layer = Foreground_Layer,
+ .alpha = 1.0,
.destRect = bodyDestRect,
.numAnimations = 0
@@ -227,7 +229,7 @@ static void AddPlayerSprites(Entity* player) {
.frameTimes = (float[]) {0.05f, 0.05f, 0.05f, 0.05f}
});
bodySprite.animations[PLAYER_ATTACK] = punchAnimation;
-
bodySprite.numAnimations = 2;
+
player->bodySpriteIndex = AddSpriteToEntity(player, bodySprite);
}