Browse Source

font: coding style ☜(゚ヮ゚☜)

undefined
Jean-Yves Lamoureux Sam Hocevar <sam@hocevar.net> 11 years ago
parent
commit
8e544d0815
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      src/font.cpp

+ 4
- 2
src/font.cpp View File

@@ -74,12 +74,14 @@ void Font::Print(vec3 pos, char const *str, vec2 scale)
{ {
uint32_t ch = (uint8_t)*str++; uint32_t ch = (uint8_t)*str++;


if(ch == '\n')
if (ch == '\n')
{ {
pos.x = origin_x; pos.x = origin_x;
pos.y-=data->size.y * scale.y; pos.y-=data->size.y * scale.y;
continue; continue;
}else if (ch != ' '){
}
else if (ch != ' ')
{
g_scene->AddTile(data->tileset, ch & 255, pos, 0, scale); g_scene->AddTile(data->tileset, ch & 255, pos, 0, scale);
} }
pos.x += data->size.x * scale.x; pos.x += data->size.x * scale.x;


Loading…
Cancel
Save