summaryrefslogtreecommitdiff
path: root/common/texfont.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/texfont.h')
-rw-r--r--common/texfont.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/common/texfont.h b/common/texfont.h
new file mode 100644
index 0000000..e3dc185
--- /dev/null
+++ b/common/texfont.h
@@ -0,0 +1,32 @@
+#ifndef _TEXFONT_H_
+#define _TEXFONT_H_
+
+class File;
+class Texture;
+
+class TexFont
+{
+public:
+ TexFont ();
+ ~TexFont ();
+
+ bool IsLoaded () const
+ { return m_bLoaded; }
+
+ bool FileLoad (File& file);
+ void PrintText (float left, float top, const char* text) const;
+ void PrintCharScaled (float scale, char ch) const;
+
+protected:
+ struct
+ {
+ unsigned char width;
+ float left, right, top, bottom;
+ } m_Glyphs[256];
+
+ Texture* m_pTexture;
+ unsigned char m_nFontHeight;
+ bool m_bLoaded;
+};
+
+#endif // _TEXFONT_H_