diff options
Diffstat (limited to 'inc/mandel.h')
| -rw-r--r-- | inc/mandel.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/inc/mandel.h b/inc/mandel.h index e6f3e10..a98e007 100644 --- a/inc/mandel.h +++ b/inc/mandel.h @@ -4,6 +4,7 @@ # include <stdlib.h> # include <stdbool.h> # include <math.h> +# include <immintrin.h> # include <SDL2/SDL.h> #define SDL_CALL(x) do { \ @@ -25,6 +26,13 @@ typedef union typedef struct { + uint8_t h; + uint8_t s; + uint8_t l; +} ColorHSL; + +typedef struct +{ double x; double y; } Point; @@ -34,12 +42,17 @@ typedef struct SDL_Window *window; SDL_Renderer *renderer; bool running; - SDL_Surface *surface; + SDL_Texture *texture; Color *palette; + double real_start; + double real_end; + double imag_start; + double imag_end; + int iterations; } State; // mandelbrot.c -int mandelbrot(double a, double b); +int mandelbrot(double ca, double cb, int iterations); // state.c bool state_init(State *state); @@ -52,4 +65,7 @@ void event_handle(State *state); // error.c void error_check_sdl(const char *code, const char *filename, int line_num); +// color.c +Color *color_palette_new(Color *palette, int iterations); + #endif |
