diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-02-28 14:07:27 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-02-28 14:07:27 -0500 |
| commit | 9008c00fdfd144363fc6b8665d1a24d53a0a5092 (patch) | |
| tree | 42fabdefe2a2db4e81191b7b32f73e6001f980b0 | |
| parent | 5beba4bea306dc0bbae9d1092fa187514ca96d98 (diff) | |
| download | volute-9008c00fdfd144363fc6b8665d1a24d53a0a5092.zip | |
init Engine struct
| -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); |