From 6f7d1bb16ff266f4126a46c6acb132dd9f80cd86 Mon Sep 17 00:00:00 2001 From: BoredGuy Date: Mon, 30 Dec 2024 18:46:31 +0300 Subject: Smoother Movement Tis all --- Week1-Pacman/src/animation.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Week1-Pacman/src/animation.c') diff --git a/Week1-Pacman/src/animation.c b/Week1-Pacman/src/animation.c index 0747ba1..7e4bb57 100644 --- a/Week1-Pacman/src/animation.c +++ b/Week1-Pacman/src/animation.c @@ -64,3 +64,8 @@ void draw_animation(struct demo* demo, NULL, SDL_FLIP_NONE); } + +void reset_animation(struct animation* animation) { + animation->current_frame = 0; + animation->current_time = 0; +} -- cgit v1.2.3