mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49: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:
parent
2e78eab92f
commit
990ee63a6e
1 changed files with 14 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue