diff options
author | Ira Rice <irarice@gmail.com> | 2009-02-10 13:15:45 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-10 13:15:45 -0700 |
commit | 00d8f57800042a324795b30dd35b21d67d47a2aa (patch) | |
tree | b4ba4c2862af62392591b5b84a93ef7d072e3065 /src/gui | |
parent | 4eca78e647e8af3a19c70c5a6a3b73c20d2a4984 (diff) | |
download | mana-00d8f57800042a324795b30dd35b21d67d47a2aa.tar.gz mana-00d8f57800042a324795b30dd35b21d67d47a2aa.tar.bz2 mana-00d8f57800042a324795b30dd35b21d67d47a2aa.tar.xz mana-00d8f57800042a324795b30dd35b21d67d47a2aa.zip |
Fixed font glyph caching.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/truetypefont.cpp | 4 | ||||
-rw-r--r-- | src/gui/truetypefont.h | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/truetypefont.cpp b/src/gui/truetypefont.cpp index 6e8efeff..2d32a213 100644 --- a/src/gui/truetypefont.cpp +++ b/src/gui/truetypefont.cpp @@ -19,8 +19,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <list> - #include <guichan/exception.hpp> #include "truetypefont.h" @@ -75,8 +73,6 @@ class TextChunk gcn::Color color; }; -// Word surfaces cache -static std::list<TextChunk> cache; typedef std::list<TextChunk>::iterator CacheIterator; static int fontCounter; diff --git a/src/gui/truetypefont.h b/src/gui/truetypefont.h index bd338d84..017bc4fc 100644 --- a/src/gui/truetypefont.h +++ b/src/gui/truetypefont.h @@ -22,6 +22,7 @@ #ifndef TRUETYPEFONT_H #define TRUETYPEFONT_H +#include <list> #include <string> #include <guichan/font.hpp> @@ -31,6 +32,8 @@ #include <SDL_ttf.h> #endif +class TextChunk; + /** * A wrapper around SDL_ttf for allowing the use of TrueType fonts. * @@ -63,6 +66,9 @@ class TrueTypeFont : public gcn::Font private: TTF_Font *mFont; + + // Word surfaces cache + std::list<TextChunk> cache; }; #endif |