1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-02 02:53:32 +02:00

Add Graphics::bigrprint()

Same as bigbprint(), we duplicate some of the calculations because it's
better than duplicating another text printing function.
This commit is contained in:
Misa 2021-03-19 14:28:04 -07:00
parent f7173027ce
commit 6538d1e5dd
2 changed files with 25 additions and 0 deletions

View File

@ -3177,6 +3177,30 @@ void Graphics::bigrprint(int x, int y, std::string& t, int r, int g, int b, bool
}
}
void Graphics::bigbrprint(int x, int y, std::string& s, int r, int g, int b, bool cen, float sc)
{
if (!notextoutline)
{
int x_o = x / sc - len(s);
bigrprint(x, y - sc, s, 0, 0, 0, cen, sc);
if (cen)
{
x_o = VVV_max(160 - (len(s) / 2) * sc, 0);
bigprint(x_o - sc, y, s, 0, 0, 0, false, sc);
bigprint(x_o + sc, y, s, 0, 0, 0, false, sc);
}
else
{
x_o *= sc;
bigprint(x_o - sc, y, s, 0, 0, 0, false, sc);
bigprint(x_o + sc, y, s, 0, 0, 0, false, sc);
}
bigrprint(x, y + sc, s, 0, 0, 0, cen, sc);
}
bigrprint(x, y, s, r, g, b, cen, sc);
}
void Graphics::drawtele(int x, int y, int t, Uint32 c)
{
setcolreal(getRGB(16,16,16));

View File

@ -169,6 +169,7 @@ public:
void drawtrophytext(void);
void bigrprint(int x, int y, std::string& t, int r, int g, int b, bool cen = false, float sc = 2);
void bigbrprint(int x, int y, std::string& t, int r, int g, int b, bool cen = false, float sc = 2);
void drawtele(int x, int y, int t, Uint32 c);