diff options
author | Enne Walker <ennewalker@users.sourceforge.net> | 2010-04-23 16:00:41 -0400 |
---|---|---|
committer | Enne Walker <ennewalker@users.sourceforge.net> | 2010-04-24 11:41:02 -0400 |
commit | a22caea21579cd15007a2c2167d233789a1e01fa (patch) | |
tree | 96a415826979769b7a00a75966df91b785b98b02 /crawl-ref/source/fontwrapper-ft.h | |
parent | 0f928518b4f7497c0108c1fcab0096c6c369cffb (diff) | |
download | crawl-ref-a22caea21579cd15007a2c2167d233789a1e01fa.tar.gz crawl-ref-a22caea21579cd15007a2c2167d233789a1e01fa.zip |
General coding standards update.
No spaces on parens. Line up function params. Sort includes more
rationally. Put curly braces on their own line. Don't C-style typedef
enum and structs. Put if-clauses on their own line.
Diffstat (limited to 'crawl-ref/source/fontwrapper-ft.h')
-rw-r--r-- | crawl-ref/source/fontwrapper-ft.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/crawl-ref/source/fontwrapper-ft.h b/crawl-ref/source/fontwrapper-ft.h index 41ed27e2a4..29f4e41bb1 100644 --- a/crawl-ref/source/fontwrapper-ft.h +++ b/crawl-ref/source/fontwrapper-ft.h @@ -2,10 +2,10 @@ #define FT_FONTWRAPPER_H #ifdef USE_TILE -#include "tilefont.h" - #ifdef USE_FT +#include "tilefont.h" + // This class handles loading FreeType2 fonts and rendering them via OpenGL. // TODO enne - Fonts could be made better by: @@ -20,33 +20,33 @@ public: virtual ~FTFontWrapper(); // font loading - virtual bool load_font( const char *font_name, unsigned int font_size, - bool outline); + virtual bool load_font(const char *font_name, unsigned int font_size, + bool outline); // render just text - virtual void render_textblock( unsigned int x, unsigned int y, - unsigned char *chars, unsigned char *colours, - unsigned int width, unsigned int height, - bool drop_shadow = false); + virtual void render_textblock(unsigned int x, unsigned int y, + unsigned char *chars, unsigned char *colours, + unsigned int width, unsigned int height, + bool drop_shadow = false); // render text + background box - virtual void render_string( unsigned int x, unsigned int y, - const char *text, const coord_def &min_pos, - const coord_def &max_pos, - unsigned char font_colour, - bool drop_shadow = false, - unsigned char box_alpha = 0, - unsigned char box_colour = 0, - unsigned int outline = 0, - bool tooltip = false); + virtual void render_string(unsigned int x, unsigned int y, + const char *text, const coord_def &min_pos, + const coord_def &max_pos, + unsigned char font_colour, + bool drop_shadow = false, + unsigned char box_alpha = 0, + unsigned char box_colour = 0, + unsigned int outline = 0, + bool tooltip = false); // FontBuffer helper functions virtual void store(FontBuffer &buf, float &x, float &y, - const std::string &s, const VColour &c); + const std::string &s, const VColour &c); virtual void store(FontBuffer &buf, float &x, float &y, - const formatted_string &fs); + const formatted_string &fs); virtual void store(FontBuffer &buf, float &x, float &y, unsigned char c, - const VColour &col); + const VColour &col); virtual unsigned int char_width() const; virtual unsigned int char_height() const; @@ -57,9 +57,9 @@ public: virtual unsigned int string_height(const formatted_string &str) const; // Try to split this string to fit in w x h pixel area. - virtual formatted_string split( const formatted_string &str, - unsigned int max_width, - unsigned int max_height); + virtual formatted_string split(const formatted_string &str, + unsigned int max_width, + unsigned int max_height); virtual const GenericTexture *font_tex() const; @@ -97,4 +97,4 @@ protected: #endif // USE_FT #endif // USE_TILE -#endif // include guard
\ No newline at end of file +#endif // include guard |