From 1dda0f6c406524e1b998da27743631d2ba227505 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 10 Jun 2015 19:46:14 -0400 Subject: SHERLOCK: Split up font handling into a new Fonts surface base class This will be needed for Rose Tattoo, which needs to be able to write text to arbitrary surfaces --- engines/sherlock/surface.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'engines/sherlock/surface.h') diff --git a/engines/sherlock/surface.h b/engines/sherlock/surface.h index dc2ba7b1d5..d42dd5c21e 100644 --- a/engines/sherlock/surface.h +++ b/engines/sherlock/surface.h @@ -26,6 +26,7 @@ #include "common/rect.h" #include "common/platform.h" #include "graphics/surface.h" +#include "sherlock/fonts.h" namespace Sherlock { @@ -33,7 +34,7 @@ namespace Sherlock { struct ImageFrame; -class Surface { +class Surface: public Fonts { private: bool _freePixels; @@ -70,6 +71,11 @@ protected: Graphics::Surface _surface; virtual void addDirtyRect(const Common::Rect &r) {} + + /** + * Draws the given string into the back buffer using the images stored in _font + */ + virtual void writeString(const Common::String &str, const Common::Point &pt, byte overrideColor); public: Surface(uint16 width, uint16 height, Common::Platform platform); Surface(); -- cgit v1.2.3