diff options
Diffstat (limited to 'Week1-Pacman/src/animation.h')
-rw-r--r-- | Week1-Pacman/src/animation.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Week1-Pacman/src/animation.h b/Week1-Pacman/src/animation.h index 795b6c7..f225142 100644 --- a/Week1-Pacman/src/animation.h +++ b/Week1-Pacman/src/animation.h @@ -1,10 +1,13 @@ #ifndef ANIMATION_H_ #define ANIMATION_H_ -#include <SDL2/SDL_rect.h> +#include <SDL2/SDL.h> #include <stdbool.h> +#include "demo.h" struct animation_init { + SDL_Renderer* ren; + const char* spritesheet; int initial_frame_count; float* initial_frame_times; @@ -12,6 +15,7 @@ struct animation_init { }; struct animation { + SDL_Texture* texture; int num_frames; int current_frame; @@ -25,5 +29,8 @@ void init_animation(struct animation* animation, struct animation_init* init); void update_animation(struct animation* animation, float dt); void free_animation(struct animation* animation); +void draw_animation(struct demo* demo, + struct animation* animation, + SDL_Rect* d_rect); #endif // ANIMATION_H_ |