- updated common code from screenjob branch.
That is, all parts not related to cutscenes.
This commit is contained in:
parent
f89e6950c3
commit
c1a8776a15
16 changed files with 163 additions and 21 deletions
|
|
@ -98,8 +98,7 @@ unsigned FCommandBuffer::CalcCellSize(unsigned length)
|
|||
unsigned cellcount = 0;
|
||||
for (unsigned i = 0; i < length; i++)
|
||||
{
|
||||
int w;
|
||||
NewConsoleFont->GetChar(Text[i], CR_UNTRANSLATED, &w);
|
||||
int w = NewConsoleFont->GetCharWidth(Text[i]);
|
||||
cellcount += w / 9;
|
||||
}
|
||||
return cellcount;
|
||||
|
|
@ -112,8 +111,7 @@ unsigned FCommandBuffer::CharsForCells(unsigned cellin, bool *overflow)
|
|||
int cells = cellin;
|
||||
while (cells > 0)
|
||||
{
|
||||
int w;
|
||||
NewConsoleFont->GetChar(Text[chars++], CR_UNTRANSLATED, &w);
|
||||
int w = NewConsoleFont->GetCharWidth(Text[chars++]);
|
||||
cells -= w / 9;
|
||||
}
|
||||
*overflow = (cells < 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue