From 4846a23b2067e285f51e9fdc89b703ecf8897d4e Mon Sep 17 00:00:00 2001 From: cancel Date: Sun, 25 Nov 2018 06:23:44 +0900 Subject: [PATCH] Add sim.h/.c add stub for orca_run() --- Makefile | 2 +- base.h | 6 ++++++ field.h | 6 ------ sim.c | 5 +++++ sim.h | 4 ++++ 5 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 sim.c create mode 100644 sim.h diff --git a/Makefile b/Makefile index 39cf488..f6c1111 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ library_flags := -lncurses else library_flags := -lncursesw endif -source_files := field.c main.c +source_files := field.c sim.c main.c all: debug diff --git a/base.h b/base.h index a160ac6..aa41bdf 100644 --- a/base.h +++ b/base.h @@ -10,3 +10,9 @@ typedef char Term; typedef uint32_t U32; typedef int32_t I32; + +typedef struct { + Term* buffer; + U32 height; + U32 width; +} Field; diff --git a/field.h b/field.h index e8a428f..61f548a 100644 --- a/field.h +++ b/field.h @@ -1,12 +1,6 @@ #pragma once #include "base.h" -typedef struct { - Term* buffer; - U32 height; - U32 width; -} Field; - void field_init_zeros(Field* f, U32 height, U32 width); void field_init_fill(Field* f, U32 height, U32 width, Term fill_char); void field_resize_raw(Field* f, U32 height, U32 width); diff --git a/sim.c b/sim.c new file mode 100644 index 0000000..97d8cae --- /dev/null +++ b/sim.c @@ -0,0 +1,5 @@ +#include "field.h" +#include "sim.h" + +void orca_run(Field* f) { +} diff --git a/sim.h b/sim.h new file mode 100644 index 0000000..56386c0 --- /dev/null +++ b/sim.h @@ -0,0 +1,4 @@ +#pragma once +#include "base.h" + +void orca_run(Field* f);