aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/surface.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-18 19:21:04 -0400
committerPaul Gilbert2015-06-18 19:21:04 -0400
commit1732428aa63c35c3989568fbc3a3e9c63bc8482c (patch)
tree915d16465e39c28b65c84b7e2d7f1688a16bacf2 /engines/sherlock/surface.cpp
parentf6c710e5b33b72723c4983bc498a4127497d772e (diff)
downloadscummvm-rg350-1732428aa63c35c3989568fbc3a3e9c63bc8482c.tar.gz
scummvm-rg350-1732428aa63c35c3989568fbc3a3e9c63bc8482c.tar.bz2
scummvm-rg350-1732428aa63c35c3989568fbc3a3e9c63bc8482c.zip
SHERLOCK: RT: Implement font _yOffsets table
Since this table must only be set up for RT when changing fonts, I needed to put an engine reference in the Fonts base class. Because of this, I've been able to simplify the creation of the various surfaces, since you no longer need to pass in the platform
Diffstat (limited to 'engines/sherlock/surface.cpp')
-rw-r--r--engines/sherlock/surface.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sherlock/surface.cpp b/engines/sherlock/surface.cpp
index 79711b44d7..60790df6b2 100644
--- a/engines/sherlock/surface.cpp
+++ b/engines/sherlock/surface.cpp
@@ -28,8 +28,8 @@
namespace Sherlock {
-Surface::Surface(uint16 width, uint16 height, Common::Platform platform) : Fonts(), _freePixels(true) {
- create(width, height, platform);
+Surface::Surface(uint16 width, uint16 height) : Fonts(), _freePixels(true) {
+ create(width, height);
}
Surface::Surface() : Fonts(), _freePixels(false) {
@@ -40,11 +40,11 @@ Surface::~Surface() {
_surface.free();
}
-void Surface::create(uint16 width, uint16 height, Common::Platform platform) {
+void Surface::create(uint16 width, uint16 height) {
if (_freePixels)
_surface.free();
- if (platform == Common::kPlatform3DO) {
+ if (_vm->getPlatform() == Common::kPlatform3DO) {
_surface.create(width, height, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0));
} else {
_surface.create(width, height, Graphics::PixelFormat::createFormatCLUT8());