From 79456640c548cff9125a5ba137538642e3c41141 Mon Sep 17 00:00:00 2001 From: alekseiplusplus Date: Tue, 12 Dec 2023 10:29:53 +1100 Subject: added cmd args; changed video implementation --- src/video/mode.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/video/mode.c (limited to 'src/video/mode.c') diff --git a/src/video/mode.c b/src/video/mode.c new file mode 100644 index 0000000..81a314a --- /dev/null +++ b/src/video/mode.c @@ -0,0 +1,29 @@ +#include "interface.h" + +int VideoMode; + +void SetDisplayMode(int x) +{ + if ((x == 0) || (x == 1)) { + VideoMode = x; + } + else { + printf("Failed to set video mode."); + } +} + +void DisplayInit() { + VideoMode ? DisplayInit_SDL() : DisplayInit_Ncurses(); +} + +void DisplayClose() { + VideoMode ? DisplayClose_SDL() : DisplayClose_Ncurses(); +} + +void DisplayInput(byte n) { + VideoMode ? DisplayInput_SDL(n) : DisplayInput_Ncurses(n); +} + +void PrintInfo() { + VideoMode ? PrintInfo_SDL() : PrintInfo_Ncurses(); +} -- cgit v1.2.3