summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2023-06-13 21:41:35 -0700
committerKai Stevenson <kai@kaistevenson.com>2023-06-13 21:41:35 -0700
commit9e420f7b82c894e077f5c9b7d7020ac3f55ce146 (patch)
tree421b061ac62299324621a3940dff995e7697b31a /src
parentc97957b76a6ff95aa413ed5cf1a39ec76aad9a60 (diff)
created file for console related functions. will support scrolling the output and expanding lines
Diffstat (limited to 'src')
-rw-r--r--src/console.h17
-rw-r--r--src/eval.c1
2 files changed, 18 insertions, 0 deletions
diff --git a/src/console.h b/src/console.h
new file mode 100644
index 0000000..6a4d27f
--- /dev/null
+++ b/src/console.h
@@ -0,0 +1,17 @@
+#ifndef
+#define CONSOLE
+#define RED "\033[0:31m"
+#define GRN "\033[0:32m"
+#define WHT "\033[0:37m"
+struct ConsoleLine {
+ char* color;
+ char* content;
+ /* pointer to a function accepting a void pointer */
+ void (*onInteract)(void*);
+} consoleLine_t;
+consoleLine_t init_consoleline(char* color, char* content);
+void clear_screen();
+void draw_screen();
+void move_selection(int amount);
+void interact_selected();
+#endif
diff --git a/src/eval.c b/src/eval.c
index 263e1c1..0c5d1db 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2,6 +2,7 @@
#include "eval.h"
#include "stdio.h"
#include "parse.h"
+/* TODO: separate cases into functions */
char just_is_sound(line_t line, lineSet_t lines) {
prop_t prop = line.proposition;
just_t just = line.justification;