mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[FREELDR] Reimplement i386PrintText(), adding line wrap handling. CORE-16268
Co-Authored-By: Stanislav Motylkov <x86corez@gmail.com>
This commit is contained in:
parent
043307624f
commit
ad43210b41
1 changed files with 14 additions and 9 deletions
|
@ -49,21 +49,26 @@ i386PrintChar(CHAR chr, ULONG x, ULONG y)
|
|||
static void
|
||||
i386PrintText(CHAR *pszText)
|
||||
{
|
||||
char chr;
|
||||
while (1)
|
||||
{
|
||||
chr = *pszText++;
|
||||
ULONG Width, Unused;
|
||||
|
||||
if (chr == 0) break;
|
||||
if (chr == '\n')
|
||||
MachVideoGetDisplaySize(&Width, &Unused, &Unused);
|
||||
|
||||
for (; *pszText != ANSI_NULL; ++pszText)
|
||||
{
|
||||
if (*pszText == '\n')
|
||||
{
|
||||
i386_ScreenPosY++;
|
||||
i386_ScreenPosX = 0;
|
||||
++i386_ScreenPosY;
|
||||
continue;
|
||||
}
|
||||
|
||||
MachVideoPutChar(chr, SCREEN_ATTR, i386_ScreenPosX, i386_ScreenPosY);
|
||||
i386_ScreenPosX++;
|
||||
MachVideoPutChar(*pszText, SCREEN_ATTR, i386_ScreenPosX, i386_ScreenPosY);
|
||||
if (++i386_ScreenPosX >= Width)
|
||||
{
|
||||
i386_ScreenPosX = 0;
|
||||
++i386_ScreenPosY;
|
||||
}
|
||||
// FIXME: Implement vertical screen scrolling if we are at the end of the screen.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue