diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-05-10 16:48:37 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-05-10 16:48:37 +0200 |
| commit | f23764a0ec0b946d9d0c0dd1a2537c0d22849086 (patch) | |
| tree | 81d0b4dc68e4f34d6e950d0f28f58ca5d3d1e07f /graphics.h | |
| parent | 6d9c284a24555a7df0b37661ff3c5491d6d0449a (diff) | |
| download | cardioid-f23764a0ec0b946d9d0c0dd1a2537c0d22849086.tar.gz cardioid-f23764a0ec0b946d9d0c0dd1a2537c0d22849086.tar.bz2 cardioid-f23764a0ec0b946d9d0c0dd1a2537c0d22849086.zip | |
Dynamic factor, everything to double, removed cardioid struct, window resize
Diffstat (limited to 'graphics.h')
| -rw-r--r-- | graphics.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/graphics.h b/graphics.h new file mode 100644 index 0000000..ca21a98 --- /dev/null +++ b/graphics.h @@ -0,0 +1,27 @@ +#ifndef GRAPHICS_H +# define GRAPHICS_H + +# include <stdbool.h> +# include <SDL2/SDL.h> +# include "config.h" + +typedef struct +{ + SDL_Window *window; + SDL_Renderer *renderer; + double factor; + double points_num; + struct + { + double x; + double y; + } center; + double radius; + bool running; +} t_state; + +void graphics_init(t_state *state, int width, int height);//, t_cardioid *cardioid); +void graphics_quit(t_state *state); +void graphics_run(t_state *state); + +#endif |
