aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/surface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sherlock/surface.cpp')
-rw-r--r--engines/sherlock/surface.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/engines/sherlock/surface.cpp b/engines/sherlock/surface.cpp
index 47b7d4a780..93bc001149 100644
--- a/engines/sherlock/surface.cpp
+++ b/engines/sherlock/surface.cpp
@@ -25,19 +25,20 @@
namespace Sherlock {
-Surface::Surface() : Graphics::ManagedSurface(), Fonts() {
+BaseSurface::BaseSurface() : Graphics::Screen(0, 0), Fonts() {
+ free(); // Free the 0x0 surface allocated by Graphics::Screen
}
-Surface::Surface(int width, int height) : Graphics::ManagedSurface(width, height),
+BaseSurface::BaseSurface(int width, int height) : Graphics::Screen(width, height),
Fonts() {
create(width, height);
}
-void Surface::writeString(const Common::String &str, const Common::Point &pt, uint overrideColor) {
+void BaseSurface::writeString(const Common::String &str, const Common::Point &pt, uint overrideColor) {
Fonts::writeString(this, str, pt, overrideColor);
}
-void Surface::writeFancyString(const Common::String &str, const Common::Point &pt, uint overrideColor1, uint overrideColor2) {
+void BaseSurface::writeFancyString(const Common::String &str, const Common::Point &pt, uint overrideColor1, uint overrideColor2) {
writeString(str, Common::Point(pt.x, pt.y), overrideColor1);
writeString(str, Common::Point(pt.x + 1, pt.y), overrideColor1);
writeString(str, Common::Point(pt.x + 2, pt.y), overrideColor1);
@@ -49,19 +50,19 @@ void Surface::writeFancyString(const Common::String &str, const Common::Point &p
writeString(str, Common::Point(pt.x + 1, pt.y + 1), overrideColor2);
}
-void Surface::SHtransBlitFrom(const ImageFrame &src, const Common::Point &pt,
+void BaseSurface::SHtransBlitFrom(const ImageFrame &src, const Common::Point &pt,
bool flipped, int overrideColor, int scaleVal) {
Common::Point drawPt(pt.x + src.sDrawXOffset(scaleVal), pt.y + src.sDrawYOffset(scaleVal));
SHtransBlitFrom(src._frame, drawPt, flipped, overrideColor, scaleVal);
}
-void Surface::SHtransBlitFrom(const Graphics::Surface &src, const Common::Point &pt,
+void BaseSurface::SHtransBlitFrom(const Graphics::Surface &src, const Common::Point &pt,
bool flipped, int overrideColor, int scaleVal) {
Common::Rect srcRect(0, 0, src.w, src.h);
Common::Rect destRect(pt.x, pt.y, pt.x + src.w * SCALE_THRESHOLD / scaleVal,
pt.y + src.h * SCALE_THRESHOLD / scaleVal);
- Graphics::ManagedSurface::transBlitFrom(src, srcRect, destRect, TRANSPARENCY,
+ Graphics::Screen::transBlitFrom(src, srcRect, destRect, TRANSPARENCY,
flipped, overrideColor);
}