mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 19:31:12 +00:00
gfx: change line if max width is reached
This commit is contained in:
parent
28008ac7ac
commit
075d8e6393
1 changed files with 30 additions and 0 deletions
|
@ -207,6 +207,21 @@ void gfx_putc(char c)
|
||||||
cbuf++;
|
cbuf++;
|
||||||
}
|
}
|
||||||
gfx_con.x += 16;
|
gfx_con.x += 16;
|
||||||
|
if (gfx_con.x > gfx_ctxt.width - 16)
|
||||||
|
{
|
||||||
|
gfx_con.x = gfx_column;
|
||||||
|
gfx_con.y += 16;
|
||||||
|
if (gfx_con.y > gfx_ctxt.height - 33)
|
||||||
|
{
|
||||||
|
gfx_con.y = 0;
|
||||||
|
|
||||||
|
if (!gfx_column)
|
||||||
|
gfx_column = 640;
|
||||||
|
else
|
||||||
|
gfx_column = 0;
|
||||||
|
gfx_con.x = gfx_column;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (c == '\n')
|
else if (c == '\n')
|
||||||
{
|
{
|
||||||
|
@ -243,6 +258,21 @@ void gfx_putc(char c)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gfx_con.x += 8;
|
gfx_con.x += 8;
|
||||||
|
if (gfx_con.x > gfx_ctxt.width / 2 + gfx_column - 8)
|
||||||
|
{
|
||||||
|
gfx_con.x = gfx_column;
|
||||||
|
gfx_con.y += 8;
|
||||||
|
if (gfx_con.y > gfx_ctxt.height - 33)
|
||||||
|
{
|
||||||
|
gfx_con.y = 0;
|
||||||
|
|
||||||
|
if (!gfx_column)
|
||||||
|
gfx_column = 640;
|
||||||
|
else
|
||||||
|
gfx_column = 0;
|
||||||
|
gfx_con.x = gfx_column;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (c == '\n')
|
else if (c == '\n')
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue