aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/surface.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-10 19:46:14 -0400
committerPaul Gilbert2015-06-10 19:46:14 -0400
commit1dda0f6c406524e1b998da27743631d2ba227505 (patch)
tree5f87c83e88b9c4a364008a18d463d9652f11befc /engines/sherlock/surface.cpp
parentd7544b696c69b43c37b13e663d395f95adb212af (diff)
downloadscummvm-rg350-1dda0f6c406524e1b998da27743631d2ba227505.tar.gz
scummvm-rg350-1dda0f6c406524e1b998da27743631d2ba227505.tar.bz2
scummvm-rg350-1dda0f6c406524e1b998da27743631d2ba227505.zip
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
Diffstat (limited to 'engines/sherlock/surface.cpp')
-rw-r--r--engines/sherlock/surface.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/sherlock/surface.cpp b/engines/sherlock/surface.cpp
index 0f6fa94c67..436227eda2 100644
--- a/engines/sherlock/surface.cpp
+++ b/engines/sherlock/surface.cpp
@@ -30,11 +30,11 @@ namespace Sherlock {
const int TRANSPARENCY = 0xFF;
-Surface::Surface(uint16 width, uint16 height, Common::Platform platform) : _freePixels(true) {
+Surface::Surface(uint16 width, uint16 height, Common::Platform platform) : Fonts(), _freePixels(true) {
create(width, height, platform);
}
-Surface::Surface() : _freePixels(false) {
+Surface::Surface() : Fonts(), _freePixels(false) {
}
Surface::~Surface() {
@@ -277,6 +277,10 @@ void Surface::setPixels(byte *pixels, int width, int height) {
_surface.setPixels(pixels);
}
+void Surface::writeString(const Common::String &str, const Common::Point &pt, byte overrideColor) {
+ Fonts::writeString(this, str, pt, overrideColor);
+}
+
void Surface::maskArea(const ImageFrame &src, const Common::Point &pt, int scrollX) {
// TODO
error("TODO: maskArea");