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 /inc | |
| 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 'inc')
| -rw-r--r-- | inc/cardioid.h | 27 | ||||
| -rw-r--r-- | inc/graphics.h | 21 |
2 files changed, 0 insertions, 48 deletions
diff --git a/inc/cardioid.h b/inc/cardioid.h deleted file mode 100644 index 23ba64a..0000000 --- a/inc/cardioid.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef CARDIOID_H -# define CARDIOID_H - -# include <stddef.h> -# include <SDL2/SDL.h> - -typedef struct -{ - size_t points_num; - SDL_Point *points; - SDL_Point center; - size_t radius; - // double multiplication; -} t_cardioid; - -# define MIN(x, y) ((x) < (y) ? (x) : (y)) - -# define CARDIOID_ADD_POINTS(cardioid, n) cardioid_update_points((cardioid), (cardioid)->points_num + (n)) -# define CARDIOID_SUB_POINTS(cardioid, n) \ - cardioid_update_points((cardioid), (cardioid)->points_num < (n) ? 0 : (cardioid)->points_num - (n)) - -int cardioid_init(t_cardioid *cardioid, size_t points_num, int width, int height); -int cardioid_update_window(t_cardioid *cardioid, int width, int height); -int cardioid_update_points(t_cardioid *cardioid, size_t points_num); -void cardioid_quit(t_cardioid *cardioid); - -#endif diff --git a/inc/graphics.h b/inc/graphics.h deleted file mode 100644 index bb7e491..0000000 --- a/inc/graphics.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef GRAPHICS_H -# define GRAPHICS_H - -# include <stdbool.h> -# include <SDL2/SDL.h> - -# include "cardioid.h" - -typedef struct -{ - SDL_Window *window; - SDL_Renderer *renderer; - t_cardioid *cardioid; - 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 |
