diff options
author | Alexis211 <alexis211@gmail.com> | 2009-12-20 21:25:05 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-12-20 21:25:05 +0100 |
commit | 5c0d8c3ff6d02eec309463982df9e53f44f4359c (patch) | |
tree | 6c70549dfb9da05698a569637860665af0803d45 /Source/Kernel/Devices/Display/VESADisplay.class.cpp | |
parent | 4333fd5847818d7c7509f1cd3651edf0bf58df86 (diff) | |
download | Melon-5c0d8c3ff6d02eec309463982df9e53f44f4359c.tar.gz Melon-5c0d8c3ff6d02eec309463982df9e53f44f4359c.zip |
Same optimisation for VESADisplay
Diffstat (limited to 'Source/Kernel/Devices/Display/VESADisplay.class.cpp')
-rw-r--r-- | Source/Kernel/Devices/Display/VESADisplay.class.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/Kernel/Devices/Display/VESADisplay.class.cpp b/Source/Kernel/Devices/Display/VESADisplay.class.cpp index 7c4adca..2992910 100644 --- a/Source/Kernel/Devices/Display/VESADisplay.class.cpp +++ b/Source/Kernel/Devices/Display/VESADisplay.class.cpp @@ -300,3 +300,20 @@ void VESADisplay::drawChar(u16int line, u16int col, WChar c, u8int color) { y++; } } + +bool VESADisplay::textScroll(u16int line, u16int col, u16int height, u16int width, u8int color) { + u8int* start = memPos(col * C_FONT_WIDTH, line * C_FONT_HEIGHT); + u32int count = width * C_FONT_WIDTH * m_pixWidth; + u32int diff = C_FONT_HEIGHT * m_currMode.pitch; + putCsrBuff(); + for (int i = 0; i < (height - 1) * C_FONT_HEIGHT; i++) { + memcpy(start, start + diff, count); + start += m_currMode.pitch; + } + for (u32int i = 0; i < width; i++) { + drawChar(line + height - 1, col + i, " ", color); + } + m_csrBuff.line--; + drawCsr(); + return true; +} |