diff options
author | 2025-05-22 11:30:56 +0200 | |
---|---|---|
committer | 2025-05-22 11:33:56 +0200 | |
commit | cafc107481db061bf3c70aeee072843f06ff1e3a (patch) | |
tree | cbba4e8996907fe2c69f9b18b119239a8e4fe149 | |
parent | 0a47d6fd0d10d5ea049c68e42e373935e4a283ee (diff) | |
download | tris-cafc107481db061bf3c70aeee072843f06ff1e3a.tar.gz tris-cafc107481db061bf3c70aeee072843f06ff1e3a.zip |
Move the Engine struct inside the header
-rw-r--r-- | src/main/engine/engine.c | 7 | ||||
-rw-r--r-- | src/main/engine/engine.h | 11 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/main/engine/engine.c b/src/main/engine/engine.c index ab19785..191f5c9 100644 --- a/src/main/engine/engine.c +++ b/src/main/engine/engine.c @@ -52,13 +52,6 @@ typedef struct Line { float x1, y1, x2, y2; } Line; -typedef struct Engine { - UI *ui; - list_t *circles; - void (*draw_frame)(); - float ortho_left, ortho_right, ortho_top, ortho_bottom; -} Engine; - static Engine *engine; /* FPS */ diff --git a/src/main/engine/engine.h b/src/main/engine/engine.h index 3c75d1a..8ed7a5a 100644 --- a/src/main/engine/engine.h +++ b/src/main/engine/engine.h @@ -20,10 +20,21 @@ #ifndef __ENGINE_H__ #define __ENGINE_H__ +#include "ui/ui.h" +#include "../util/list.h" +#include "domain/color.h" + enum EngineInput { ENGINE_MOUSE_PRESSED = 4 }; +typedef struct { + UI *ui; + list_t *circles; + void (*draw_frame)(); + float ortho_left, ortho_right, ortho_top, ortho_bottom; +} Engine;; + void engine_init(int width, int height); void engine_draw_circle(float cx, float cy, float r, int num_segments, int outline); void engine_draw_line(float x1, float y1, float x2, float y2); |