diff options
Diffstat (limited to 'Source/Kernel/Core')
-rw-r--r-- | Source/Kernel/Core/SB.ns.cpp | 50 | ||||
-rw-r--r-- | Source/Kernel/Core/kmain.wtf.cpp | 50 |
2 files changed, 18 insertions, 82 deletions
diff --git a/Source/Kernel/Core/SB.ns.cpp b/Source/Kernel/Core/SB.ns.cpp index f5b21ec..acf042f 100644 --- a/Source/Kernel/Core/SB.ns.cpp +++ b/Source/Kernel/Core/SB.ns.cpp @@ -22,57 +22,37 @@ void init() { sb = new SimpleVT(1, 80, STATUSBAR_FGCOLOR, STATUSBAR_BGCOLOR); height = 1; sb->map(0, 0); - sb->hideCursor(); + *sb << MVT::hidecsr(); } void drawprogress(const String& s) { - sb->clear(); + *sb << MVT::clear(); int d = (sb->width() / 2) - ((BOOT_ITEMS + 4) / 2); if (height == 1) d -= 4; - sb->moveCursor(0, d); - *sb << "{"; + *sb << MVT::movecsr(0, d) << "{"; for (u32int i = 0; i < boot_progress; i++) *sb << ":"; - *sb << "."; - sb->moveCursor(0, BOOT_ITEMS + d + 3); - *sb << "}"; + *sb << "." << MVT::movecsr(0, BOOT_ITEMS + d + 3) << "}"; if (height > 1) { *sb << "\n"; - *sb << "Loading : [" << s; - sb->moveCursor(1, sb->width() - 2); - *sb << "]"; + *sb << "Loading : [" << s << MVT::movecsr(1, sb->width() - 2) << "]"; } else { - sb->moveCursor(0, 0); - *sb << "Melon is loading :"; - sb->moveCursor(0, d + BOOT_ITEMS + 6); - *sb << "[" << s; - sb->moveCursor(0, sb->width() - 2); - *sb << "]"; + *sb << MVT::movecsr(0, 0) << "Melon is loading :" << MVT::movecsr(0, d + BOOT_ITEMS + 6) << "[" << s; + *sb << MVT::movecsr(0, sb->width() - 2) << "]"; } } void drawnormal() { - sb->clear(); - sb->moveCursor(0, 0); - *sb << " [Up:" << (s64int)Time::uptime() << "s"; - sb->moveCursor(0, 10); - *sb << "] [Mem:" << (s64int)PhysMem::free() << "/" << (s64int)PhysMem::total(); - sb->moveCursor(0, 28); - *sb << "] [Proc.:" << (s64int)Task::processes->size(); - sb->setCursorCol(39); + *sb << MVT::clear() << MVT::movecsr(0, 0) << " [Up:" << (s64int)Time::uptime() << "s"; + *sb << MVT::movecsr(0, 10) << "] [Mem:" << (s64int)PhysMem::free() << "/" << (s64int)PhysMem::total(); + *sb << MVT::movecsr(0, 28) << "] [Proc.:" << (s64int)Task::processes->size() << MVT::setcsrcol(39); if (height > 1) { - *sb << "]"; - sb->moveCursor(1, 0); + *sb << "]" << MVT::movecsr(1, 0); *sb << " [Threads:" << (s64int)Task::threads->size(); - sb->setCursorCol(12); - *sb << "] [" << msg; - sb->setCursorCol(sb->width() - 2); - *sb << "]"; + *sb << MVT::setcsrcol(12) << "] [" << msg; + *sb << MVT::setcsrcol(sb->width() - 2) << "]"; } else { *sb << "] [Threads:" << (s64int)Task::threads->size(); - sb->setCursorCol(52); - *sb << "] [" << msg; - sb->setCursorCol(sb->width() - 2); - *sb << "]"; + *sb << MVT::setcsrcol(52) << "] [" << msg << MVT::setcsrcol(sb->width() - 2) << "]"; } } @@ -83,7 +63,7 @@ void reinit() { height = (Disp::mode.textCols < 80 ? 2 : 1); sb = new SimpleVT(height, Disp::mode.textCols, STATUSBAR_FGCOLOR, STATUSBAR_BGCOLOR); sb->map(0, 0); - sb->hideCursor(); + *sb << MVT::hidecsr(); if (boot_progress != 0) { drawprogress(msg); } else { diff --git a/Source/Kernel/Core/kmain.wtf.cpp b/Source/Kernel/Core/kmain.wtf.cpp index 1760de8..bd19e8c 100644 --- a/Source/Kernel/Core/kmain.wtf.cpp +++ b/Source/Kernel/Core/kmain.wtf.cpp @@ -44,50 +44,6 @@ extern "C" void kmain(multiboot_info_t* mbd, u32int magic); SimpleVT* kvt; -u32int logoAnimation(void* p) { - SimpleVT& vt = *((SimpleVT*)p); - vt.setColor(8); - u8int *wat = new u8int[melonLogoLines * melonLogoCols]; - for (int x = 0; x < melonLogoCols; x++) { - for (int y = 0; y < melonLogoLines; y++) { - wat[x * melonLogoLines + y] = melonLogo[y][x]; - vt.putChar(y, x, " "); - } - } - vt.setColor(TXTLOGO_FGCOLOR); - u32int s = 32; - for (int i = 0; i < 255; i++) { - for (int x = 0; x < (i < melonLogoCols ? i : melonLogoCols); x++) { - for (int y = 0; y < melonLogoLines; y++) { - if (wat[x * melonLogoLines + y] != melonLogo[y][x]) { - wat[x * melonLogoLines + y]++; - if (wat[x * melonLogoLines + y] > melonLogo[y][x] && (y + x) % 2 == 1) - wat[x * melonLogoLines + y] += 2; - if (wat[x * melonLogoLines + y] >= 127) - wat[x * melonLogoLines + y] = 32; - vt.setColor(7); - vt.putChar(y, x, wat[x * melonLogoLines + y]); - } else { - vt.setColor(TXTLOGO_FGCOLOR); - vt.putChar(y, x, wat[x * melonLogoLines + y]); - } - } - } - vt.setColor(8); - if (i < melonLogoCols) { - for (int y = 0; y < melonLogoLines; y++) { - s += 102; - while (s > 127) s -= (127 - 33); - wat[(i + (y%3)) * melonLogoLines + y] = s; - vt.putChar(y, (i + (y%3)), wat[(i + (y%3)) * melonLogoLines + y]); - } - } - Task::currThread()->sleep(20); - } - delete wat; - return 0; -} - void kmain(multiboot_info_t* mbd, u32int magic) { DEBUG("Entering kmain."); @@ -121,12 +77,12 @@ void kmain(multiboot_info_t* mbd, u32int magic) { SB::progress("Create kernel VT"); kvt = new ScrollableVT(24, 80, 20, KVT_FGCOLOR, KVT_BGCOLOR); kvt->map(1, 0); - kvt->setColor(TXTLOGO_FGCOLOR, TXTLOGO_BGCOLOR); + *kvt << MVT::setcolor(TXTLOGO_FGCOLOR, TXTLOGO_BGCOLOR); for (int i = 0; i < melonLogoLines; i++) { - kvt->setCursorCol(40 - (melonLogoCols / 2)); + *kvt << MVT::setcsrcol(40 - (melonLogoCols / 2)); *kvt << melonLogo[i] << "\n"; } - kvt->setColor(KVT_FGCOLOR, KVT_BGCOLOR); + *kvt << MVT::setcolor(KVT_FGCOLOR, KVT_BGCOLOR); SB::progress("IDT"); IDT::init(); //Setup interrupts |