From 9f1416c6a358eb1dc860ff1176ae89721d82fc50 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 22 Feb 2014 00:24:39 -0500 Subject: MADS: Implemented constructor for copy protection dialog, and support methods --- engines/mads/font.h | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) (limited to 'engines/mads/font.h') diff --git a/engines/mads/font.h b/engines/mads/font.h index d36be80830..3f01260fbd 100644 --- a/engines/mads/font.h +++ b/engines/mads/font.h @@ -62,19 +62,16 @@ protected: Common::String _filename; uint8 _fontColors[4]; -protected: - Font(MADSEngine *vm); - - virtual void setFont(const Common::String &filename) = 0; - virtual int getBpp(int charWidth) = 0; -public: - static Font *init(MADSEngine *vm); + int getBpp(int charWidth); public: + Font(MADSEngine *vm); virtual ~Font(); + void setFont(const Common::String &filename); void setColor(uint8 color); - void setColors(uint8 alt1, uint8 alt2, uint8 foreground); + void setColors(uint8 v1, uint8 v2, uint8 v3, uint8 v4); + 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[]); @@ -83,24 +80,6 @@ public: } }; -class FontMADS: public Font { - friend class Font; -protected: - virtual void setFont(const Common::String &filename); - virtual int getBpp(int charWidth); - - FontMADS(MADSEngine *vm): Font(vm) {} -}; - -class FontM4: public Font { - friend class Font; -protected: - virtual void setFont(const Common::String &filename); - virtual int getBpp(int charWidth); - - FontM4(MADSEngine *vm): Font(vm) {} -}; - } // End of namespace MADS #endif /* MADS_FONT_H */ -- cgit v1.2.3