diff options
author | BoredGuy <osome3717@gmail.com> | 2024-12-14 09:06:45 +0300 |
---|---|---|
committer | BoredGuy <osome3717@gmail.com> | 2024-12-14 09:06:45 +0300 |
commit | 993f45cec7a08a5b980ef5a08ea7ce19b877b743 (patch) | |
tree | 0d9839e992672b9b92d72242051aca182d039ee4 /Week1-Pacman/src/demo.h | |
parent | 36144cc98ed6d96cc4f28e73d8da3434774c5d7a (diff) |
Animation system update continued
The previous one was a partial merge because demo.h and demo.c weren't added(I'm still learning git)
Diffstat (limited to 'Week1-Pacman/src/demo.h')
-rw-r--r-- | Week1-Pacman/src/demo.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Week1-Pacman/src/demo.h b/Week1-Pacman/src/demo.h new file mode 100644 index 0000000..b276027 --- /dev/null +++ b/Week1-Pacman/src/demo.h @@ -0,0 +1,24 @@ +#ifndef DEMO_H_ +#define DEMO_H_ + +#include <SDL2/SDL.h> + +/* + * An abstraction layer over the typical SDL_Renderer + * is meant to handle display scaling mostly +*/ +struct demo { + SDL_Window* win; + SDL_Renderer* ren; + + float display_scale_x; + float display_scale_y; +}; + +void update_demo(struct demo* demo); +void demo_rendercopy(struct demo* demo, + SDL_Texture* texture, + SDL_Rect* s_rect, + SDL_Rect* d_rect); + +#endif // DEMO_H_ |