diff options
author | Paul Gilbert | 2016-04-04 00:07:50 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-04-04 00:07:50 -0400 |
commit | 56b29987443075faba0495d84eeaf42b443d577f (patch) | |
tree | 94c2bbd841ca2cf802d28d61fa6a5ed678ec3b2f /engines/titanic/support/font.h | |
parent | ebdc773247fb1e6a41f58ee8336986dcdc8e75d6 (diff) | |
download | scummvm-rg350-56b29987443075faba0495d84eeaf42b443d577f.tar.gz scummvm-rg350-56b29987443075faba0495d84eeaf42b443d577f.tar.bz2 scummvm-rg350-56b29987443075faba0495d84eeaf42b443d577f.zip |
TITANIC: Further work on STFont character drawing
Diffstat (limited to 'engines/titanic/support/font.h')
-rw-r--r-- | engines/titanic/support/font.h | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/engines/titanic/support/font.h b/engines/titanic/support/font.h index c41f4dc1e0..5ed0b5b7b4 100644 --- a/engines/titanic/support/font.h +++ b/engines/titanic/support/font.h @@ -25,24 +25,38 @@ #include "common/scummsys.h" #include "common/array.h" +#include "titanic/support/rect.h" #include "titanic/support/string.h" namespace Titanic { +class CVideoSurface; + class STFont { struct CharEntry { - uint _charWidth; + uint _width; uint _offset; }; +private: + /** + * Copys a rectangle representing a character in the font data to + * a given destination position in the surface + */ + void copyRect(CVideoSurface *surface, const Common::Point &destPos, + Rect &srcRect); + + /** + * Write a character + */ + int writeChar(CVideoSurface *surface, unsigned char c, + const Common::Point &pt, Rect *destRect, Rect *srcRect); public: byte *_dataPtr; size_t _dataSize; - int _field8; - int _maxCharWidth; + int _fontHeight; + uint _dataWidth; CharEntry _chars[256]; - int _field810; - int _field814; - int _field818; + byte _fontR, _fontG, _fontB; public: STFont(); ~STFont(); @@ -62,6 +76,16 @@ public: * TODO: Verify this */ void writeString(int maxWidth, const CString &text, int *v1, int *v2); + + /** + * Sets the font color + */ + void setColor(byte r, byte g, byte b); + + /** + * Gets the font color + */ + uint16 getColor() const; }; } // End of namespace Titanic |