1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2025-01-08 18:09:45 +01:00

Fix brace style in Graphics::Makebfont() and Graphics::bfontlen()

Seriously, Leo, why did you have to use braces like this...
This commit is contained in:
Misa 2020-09-25 12:55:12 -07:00 committed by Ethan Lee
parent 2e78eab92f
commit 990ee63a6e

View file

@ -257,25 +257,33 @@ void Graphics::Makebfont()
unsigned char* charmap = NULL; unsigned char* charmap = NULL;
size_t length; size_t length;
FILESYSTEM_loadFileToMemory("graphics/font.txt", &charmap, &length); FILESYSTEM_loadFileToMemory("graphics/font.txt", &charmap, &length);
if (charmap != NULL) { if (charmap != NULL)
{
unsigned char* current = charmap; unsigned char* current = charmap;
unsigned char* end = charmap + length; unsigned char* end = charmap + length;
int pos = 0; int pos = 0;
while (current != end) { while (current != end)
{
int codepoint = utf8::unchecked::next(current); int codepoint = utf8::unchecked::next(current);
font_positions[codepoint] = pos; font_positions[codepoint] = pos;
++pos; ++pos;
} }
FILESYSTEM_freeMemory(&charmap); FILESYSTEM_freeMemory(&charmap);
} else { }
else
{
font_positions.clear(); font_positions.clear();
} }
} }
int Graphics::bfontlen(uint32_t ch) { int Graphics::bfontlen(uint32_t ch)
if (ch < 32) { {
if (ch < 32)
{
return 6; return 6;
} else { }
else
{
return 8; return 8;
} }
} }