diff options
author | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-12-12 10:29:53 +1100 |
---|---|---|
committer | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-12-12 10:29:53 +1100 |
commit | 79456640c548cff9125a5ba137538642e3c41141 (patch) | |
tree | fbfd474833b644b123e6f1d9dac78fedeceaf9bc /src/video/mode.c | |
parent | 8968f471650d25c9df68347644e0e5c0ecdbda6e (diff) |
added cmd args; changed video implementation
Diffstat (limited to 'src/video/mode.c')
-rw-r--r-- | src/video/mode.c | 29 |
1 files changed, 29 insertions, 0 deletions
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(); +} |