diff options
Diffstat (limited to 'Source/Kernel/DisplayManager/Disp.ns.cpp')
-rw-r--r-- | Source/Kernel/DisplayManager/Disp.ns.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Source/Kernel/DisplayManager/Disp.ns.cpp b/Source/Kernel/DisplayManager/Disp.ns.cpp new file mode 100644 index 0000000..75344f8 --- /dev/null +++ b/Source/Kernel/DisplayManager/Disp.ns.cpp @@ -0,0 +1,36 @@ +#include "Disp.ns.h" + +namespace Disp { + +mode_t mode; + +u16int textCols() { + return mode.textCols; +} + +u16int textRows() { + return mode.textRows; +} + +void putChar(u16int line, u16int col, char c, char color) { + if (line >= mode.textRows or col >= mode.textCols) return; + mode.device->putChar(line, col, c, color); +} + +void moveCursor(u16int line, u16int col) { + if (line >= mode.textRows or col >= mode.textCols) return; + mode.device->moveCursor(line, col); +} + +void clear() { + mode.device->clear(); +} + +void setDisplay(Display* disp) { + mode.device = disp; + disp->clear(); + mode.textCols = disp->textCols(); + mode.textRows = disp->textRows(); +} + +} |