From cec27feccd1d3232ceae2bf284f66071d36cc96a Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Thu, 22 May 2025 18:04:51 +0200 Subject: Remove the rendering of circles from the Engine --- src/main/engine/engine.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/main/engine/engine.h') diff --git a/src/main/engine/engine.h b/src/main/engine/engine.h index f3f817b..24dbe61 100644 --- a/src/main/engine/engine.h +++ b/src/main/engine/engine.h @@ -24,24 +24,32 @@ #include "../util/list.h" #include "domain/color.h" +#include "shape/circle.h" + enum EngineInput { ENGINE_MOUSE_PRESSED = 4 }; +typedef struct DrawFrameListener { + void (*draw_frames)(void *data); + void *data; +} DrawFrameListener; + typedef struct { UI *ui; - list_t *circles; + list_t *circles1; list_t *lines; - void (*draw_frame)(); float ortho_left, ortho_right, ortho_top, ortho_bottom; Color *rendering_background; + /* Listeners */ + DrawFrameListener *draw_frame_listener; } Engine;; Engine *engine_new(int width, int height); void engine_set_rendering_background(Engine *engine, float r, float g, float b, float a); void engine_set_rendering_background_c(Engine *engine, Color *color); void engine_set_window_title(Engine *engine, const char *title); -void engine_draw_circle(float cx, float cy, float r, int num_segments, int outline); +void engine_set_rendering_listener(Engine *engine, void (*draw_frames)(void *data), void *data); void engine_draw_line(float x1, float y1, float x2, float y2); void engine_loop(void); void engine_input(void (*f_input)(int engine_input)); -- cgit v1.2.3