Explorar el Código

Lil' bit of cleaning

Eiyeron Fulmincendii hace 9 años
padre
commit
2afa8a6890
Se han modificado 1 ficheros con 2 adiciones y 14 borrados
  1. 2 14
      src/render/Text.cpp

+ 2 - 14
src/render/Text.cpp

@@ -31,7 +31,6 @@ void Text::print_char(char c, unsigned x, unsigned y)
 {
     put_rectangle({static_cast<int>(x), static_cast<int>(y), 8, 8}, Black);
     fnt->draw(x, y, c);
-    // put_sprite(tex_font, x, y, Rect((c % 16) * 8, (c / 16) * 8, 8, 8));
 }
 
 void Text::print_string(const char *str, unsigned x, unsigned y)
@@ -40,20 +39,9 @@ void Text::print_string(const char *str, unsigned x, unsigned y)
                    static_cast<unsigned>(8 * strlen(str)), 8},
                   Black);
     fnt->draw(x, y, str);
-    // Rect rect;
-    // rect.width = 8;
-    // rect.height = 8;
-    // for (unsigned index = 0; str[index]; index++)
-    // {
-    //     char c = str[index];
-    //     rect.x = (c % 16) * 8;
-    //     rect.y = (c / 16) * 8;
-    //     put_sprite(tex_font, x, y, rect);
-    //     x += 8;
-    // }
 }
 
-void Text::print_string(const std::string &str, unsigned x, unsigned y)
+inline void Text::print_string(const std::string &str, unsigned x, unsigned y)
 {
     Text::print_string(str.c_str(), x, y);
 }
@@ -67,7 +55,7 @@ void Text::print_format(unsigned x, unsigned y, const char *format, ...)
     print_string(buffer, x, y);
 }
 
-void Text::print_format(unsigned x, unsigned y, const std::string &format, ...)
+inline void Text::print_format(unsigned x, unsigned y, const std::string &format, ...)
 {
     Text::print_format(x, y, format.c_str());
 }