aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/font.h
diff options
context:
space:
mode:
authorPaul Gilbert2014-03-16 23:40:21 -0400
committerPaul Gilbert2014-03-16 23:40:21 -0400
commitacba8f9254a724ce9c57f5ddd81e6b9264c07274 (patch)
tree9587c545c7a7a71c256b48dcf08588bbd8fffd11 /engines/mads/font.h
parente24a4b7b16f5ded50974220d546b2ff0483f99f7 (diff)
downloadscummvm-rg350-acba8f9254a724ce9c57f5ddd81e6b9264c07274.tar.gz
scummvm-rg350-acba8f9254a724ce9c57f5ddd81e6b9264c07274.tar.bz2
scummvm-rg350-acba8f9254a724ce9c57f5ddd81e6b9264c07274.zip
MADS: Implementing user interface text display methods
Diffstat (limited to 'engines/mads/font.h')
-rw-r--r--engines/mads/font.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/engines/mads/font.h b/engines/mads/font.h
index c642831952..9b3e5bc828 100644
--- a/engines/mads/font.h
+++ b/engines/mads/font.h
@@ -41,38 +41,42 @@ namespace MADS {
class MADSEngine;
class Font {
-protected:
- MADSEngine *_vm;
+private:
+ static uint8 _fontColors[4];
+ static MADSEngine *_vm;
+public:
+ /**
+ * Initialise the font system
+ */
+ static void init(MADSEngine *vm);
+ /**
+ * Returns a new Font instance using the specified font name
+ */
+ static Font *getFont(const Common::String &fontName);
+protected:
uint8 _maxWidth, _maxHeight;
uint8 *_charWidths;
uint16 *_charOffs;
uint8 *_charData;
bool _sysFont;
Common::String _filename;
- uint8 _fontColors[4];
int getBpp(int charWidth);
public:
- Font(MADSEngine *vm);
+ Font();
virtual ~Font();
void setFont(const Common::String &filename);
void setColor(uint8 color);
void setColors(uint8 v1, uint8 v2, uint8 v3, uint8 v4);
+ void setColorMode(int mode);
int maxWidth() const { return _maxWidth; }
int getWidth(const Common::String &msg, int spaceWidth = -1);
int getHeight() const { return _maxHeight; }
- int write(MSurface *surface, const Common::String &msg, const Common::Point &pt, int width, int spaceWidth, uint8 colors[]);
- int writeString(MSurface *surface, const Common::String &msg, const Common::Point &pt, int width = 0, int spaceWidth = -1) {
- return write(surface, msg, pt, width, spaceWidth, _fontColors);
- }
-
- /**
- * Returns a new Font instance using the specified font name
- */
- Font *getFont(const Common::String &fontName);
+ int writeString(MSurface *surface, const Common::String &msg, const Common::Point &pt,
+ int spaceWidth = 0, int width = 0);
};
} // End of namespace MADS