diff options
author | Neeraj Kumar | 2010-08-06 20:13:41 +0000 |
---|---|---|
committer | Neeraj Kumar | 2010-08-06 20:13:41 +0000 |
commit | 7e126ed299cb789340cb2f8d409338dbdd6c8235 (patch) | |
tree | 91f6e4be633fd579922ddf270443011582b8f9ec /engines/groovie/font.h | |
parent | 6c0855f3d3efc52478ba9ce019fbd4c9287f4691 (diff) | |
parent | 4ae7427eed781613e2cda096d0f61c77883bca05 (diff) | |
download | scummvm-rg350-7e126ed299cb789340cb2f8d409338dbdd6c8235.tar.gz scummvm-rg350-7e126ed299cb789340cb2f8d409338dbdd6c8235.tar.bz2 scummvm-rg350-7e126ed299cb789340cb2f8d409338dbdd6c8235.zip |
TESTBED: Merged changes from trunk to my branch
svn-id: r51798
Diffstat (limited to 'engines/groovie/font.h')
-rw-r--r-- | engines/groovie/font.h | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/engines/groovie/font.h b/engines/groovie/font.h index 1a4a967fa6..71f8393d28 100644 --- a/engines/groovie/font.h +++ b/engines/groovie/font.h @@ -27,24 +27,38 @@ #define GROOVIE_FONT_H #include "common/stream.h" -#include "common/system.h" +#include "graphics/font.h" namespace Groovie { -class Font { +class T7GFont : public Graphics::Font { public: - Font(OSystem *syst); - ~Font(); - void printstring(const char *messagein); + T7GFont(); + ~T7GFont(); + + bool load(Common::SeekableReadStream &stream); + + int getFontHeight() const { return _maxHeight; } + int getMaxCharWidth() const { return _maxWidth; } + int getCharWidth(byte chr) const { return getGlyph(chr)->width; } + void drawChar(Graphics::Surface *dst, byte chr, int x, int y, uint32 color) const; private: - OSystem *_syst; - Common::MemoryReadStream *_sphinxfnt; + int _maxHeight, _maxWidth; + + struct Glyph { + Glyph() : pixels(0) {} + ~Glyph() { delete[] pixels; } + + byte width; + byte height; + byte julia; + byte *pixels; + }; - uint16 letteroffset(char letter); - uint8 letterwidth(char letter); - uint8 letterheight(char letter); - uint8 printletter(char letter, uint16 xoffset); + byte _mapChar2Glyph[128]; + Glyph *_glyphs; + const Glyph *getGlyph(byte chr) const; }; } // End of Groovie namespace |