summaryrefslogtreecommitdiff
path: root/src/main/engine/engine.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/engine/engine.c')
-rw-r--r--src/main/engine/engine.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/main/engine/engine.c b/src/main/engine/engine.c
index 362d2d8..3abfbcc 100644
--- a/src/main/engine/engine.c
+++ b/src/main/engine/engine.c
@@ -26,7 +26,7 @@
#include "engine.h"
#include "ui/ui.h"
#include "../util/list.h"
-#include "types.h"
+#include "shape/circle.h"
#ifdef X11
#include <X11/Xlib.h>
@@ -88,24 +88,11 @@ engine_set_window_title(Engine *engine, const char *title)
ui_set_title(engine->ui, title);
}
-static Circle *
-engine_new_circle(float cx, float cy, float r, int num_segments, int outline)
-{
- Circle *circle = malloc(sizeof(Circle));
- circle->cx = cx;
- circle->cy = cy;
- circle->r = r;
- circle->num_segments = num_segments;
- circle->outline = outline;
-
- return circle;
-}
-
void
engine_draw_circle(float cx, float cy, float r, int num_segments, int outline)
{
if (engine == NULL || engine->circles == NULL) return;
- list_add(engine->circles, engine_new_circle(cx, cy, r, num_segments, outline));
+ list_add(engine->circles, engine_circle_new(cx, cy, r, num_segments, outline));
}
static Line *