1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +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;
size_t length;
FILESYSTEM_loadFileToMemory("graphics/font.txt", &charmap, &length);
if (charmap != NULL) {
if (charmap != NULL)
{
unsigned char* current = charmap;
unsigned char* end = charmap + length;
int pos = 0;
while (current != end) {
while (current != end)
{
int codepoint = utf8::unchecked::next(current);
font_positions[codepoint] = pos;
++pos;
}
FILESYSTEM_freeMemory(&charmap);
} else {
}
else
{
font_positions.clear();
}
}
int Graphics::bfontlen(uint32_t ch) {
if (ch < 32) {
int Graphics::bfontlen(uint32_t ch)
{
if (ch < 32)
{
return 6;
} else {
}
else
{
return 8;
}
}