diff options
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | engine.c | 9 | ||||
| -rw-r--r-- | engine.h | 2 |
3 files changed, 13 insertions, 2 deletions
@@ -1,7 +1,7 @@ CFLAGS = -std=c99 -Wall -Wextra -pedantic -Wno-deprecated-declarations -D_XOPEN_SOURCE=700L LDFLAGS = -lSDL2 -lSDL2_ttf -SRC = main.c microui.c renderer.c widget.c ui.c unit.c +SRC = main.c microui.c renderer.c widget.c ui.c unit.c engine.c OBJ = ${SRC:.c=.o} all: volute @@ -23,4 +23,4 @@ volute: ${OBJ} %.o: %.c ${CC} -c ${CFLAGS} $< -${OBJ}: microui.h renderer.h widget.h ui.h unit.h +${OBJ}: microui.h renderer.h widget.h ui.h unit.h engine.h diff --git a/engine.c b/engine.c new file mode 100644 index 0000000..a7fbf11 --- /dev/null +++ b/engine.c @@ -0,0 +1,9 @@ +#include <string.h> + +#include "unit.h" +#include "engine.h" + +void +init_engine(Engine *e) { + memset(e, 0, sizeof(*e)); +} @@ -4,3 +4,5 @@ typedef struct { Pressure map; Fraction ve; } Engine; + +void init_engine(Engine *e); |