diff options
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(); +} |