diff options
| author | Charles <sircharlesaze@gmail.com> | 2019-08-27 17:24:45 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2019-08-27 17:24:45 +0200 |
| commit | 7c48d434f0a68ac47ebe1bd66daa2c86842979c7 (patch) | |
| tree | 9cf10fa6fe88a68038eebd5ff09cc550a7fb15b7 /header.h | |
| parent | 60adb6e2f051ab72fb66541a8f48ef195317d403 (diff) | |
| download | mandelbrot_cpu-7c48d434f0a68ac47ebe1bd66daa2c86842979c7.tar.gz mandelbrot_cpu-7c48d434f0a68ac47ebe1bd66daa2c86842979c7.tar.bz2 mandelbrot_cpu-7c48d434f0a68ac47ebe1bd66daa2c86842979c7.zip | |
SDL boilerplate window
init, quit and run functions.
Error handling.
Diffstat (limited to 'header.h')
| -rw-r--r-- | header.h | 25 |
1 files changed, 23 insertions, 2 deletions
@@ -1,9 +1,30 @@ #ifndef HEADER_H # define HEADER_H -#include <complex.h> +# include <stdbool.h> +# include <complex.h> +# include <SDL2/SDL.h> -double mandelbrot_in_set(double complex c); +typedef struct +{ + SDL_Window *window; + SDL_Renderer *renderer; + bool running; +} GState; + +typedef struct +{ + int window_width; + int window_height; +} GConf; + +// mandelbrot.c +double mandelbrot_in_set(double _Complex c); void mandelbrot_print(void); +// graphics.c +GState *graphics_init(GConf *conf); +void graphics_quit(GState *state); +void graphics_run(GState *state); + #endif |
