- replaced console buffer with a significantly more efficient new version that also can hold a lot more data.
This commit is contained in:
parent
01e909070a
commit
9d846395bc
8 changed files with 458 additions and 366 deletions
|
|
@ -336,7 +336,7 @@ static void breakit (FBrokenLines *line, FFont *font, const BYTE *start, const B
|
|||
line->Width = font->StringWidth (line->Text);
|
||||
}
|
||||
|
||||
FBrokenLines *V_BreakLines (FFont *font, int maxwidth, const BYTE *string)
|
||||
FBrokenLines *V_BreakLines (FFont *font, int maxwidth, const BYTE *string, bool preservecolor)
|
||||
{
|
||||
FBrokenLines lines[128]; // Support up to 128 lines (should be plenty)
|
||||
|
||||
|
|
@ -397,7 +397,7 @@ FBrokenLines *V_BreakLines (FFont *font, int maxwidth, const BYTE *string)
|
|||
space = string - 1;
|
||||
|
||||
breakit (&lines[i], font, start, space, linecolor);
|
||||
if (c == '\n')
|
||||
if (c == '\n' && !preservecolor)
|
||||
{
|
||||
lastcolor = ""; // Why, oh why, did I do it like this?
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue