aboutsummaryrefslogtreecommitdiffstats
path: root/src/animation.c
diff options
context:
space:
mode:
authornathansmith117 <thenathansmithsmith@gmail.com>2024-02-21 19:29:29 +0000
committernathansmith117 <thenathansmithsmith@gmail.com>2024-02-21 19:29:29 +0000
commit1ce1a705c61064e44f83c772b70ee9b208a4c289 (patch)
treef5e593fc4ea11a2a3dd3a186679421086af4a01e /src/animation.c
parent1a677439d001e9ef481c6e932b6ca78c3733f531 (diff)
downloadPenguinYippies-1ce1a705c61064e44f83c772b70ee9b208a4c289.tar.gz
PenguinYippies-1ce1a705c61064e44f83c772b70ee9b208a4c289.tar.bz2
PenguinYippies-1ce1a705c61064e44f83c772b70ee9b208a4c289.zip
Working on pixal collision thingy
Diffstat (limited to 'src/animation.c')
-rw-r--r--src/animation.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/animation.c b/src/animation.c
index 95447b2..d2aeb70 100644
--- a/src/animation.c
+++ b/src/animation.c
@@ -45,9 +45,9 @@ void closeAnimation(Animation* animation)
void setAnimationFrame(Animation* animation, int frame)
{
animation->currentFrame = frame;
- unsigned int nextFrameDataOffset = animation->width * animation->height * 4 * frame;
+ unsigned int frameOffset = animation->width * animation->height * 4 * frame;
- UpdateTexture(animation->texture, ((unsigned char*)animation->asset->image.data) + nextFrameDataOffset);
+ UpdateTexture(animation->texture, ((unsigned char*)animation->asset->image.data) + frameOffset);
}
void runAnimation(Animation* animation)