From d86bec542c37bef630ab05fb03345cb02d546e7f Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Thu, 11 Jun 2015 12:32:26 +0200 Subject: SHERLOCK: font class: skip for 3DO --- engines/sherlock/fonts.cpp | 9 ++++++++- engines/sherlock/fonts.h | 3 ++- engines/sherlock/screen.cpp | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'engines/sherlock') diff --git a/engines/sherlock/fonts.cpp b/engines/sherlock/fonts.cpp index e7173f03d0..8c3abb7189 100644 --- a/engines/sherlock/fonts.cpp +++ b/engines/sherlock/fonts.cpp @@ -21,18 +21,21 @@ */ #include "common/system.h" +#include "common/platform.h" #include "sherlock/fonts.h" #include "sherlock/image_file.h" #include "sherlock/surface.h" namespace Sherlock { +Common::Platform Fonts::_platform; ImageFile *Fonts::_font; int Fonts::_fontNumber; int Fonts::_fontHeight; -void Fonts::init() { +void Fonts::init(Common::Platform platform) { _font = nullptr; + _platform = platform; } void Fonts::free() { @@ -41,6 +44,10 @@ void Fonts::free() { void Fonts::setFont(int fontNumber) { _fontNumber = fontNumber; + + if (_platform == Common::kPlatform3DO) + return; + Common::String fname = Common::String::format("FONT%d.VGS", fontNumber + 1); // Discard any previous font and read in new one diff --git a/engines/sherlock/fonts.h b/engines/sherlock/fonts.h index 0c8c51c4bd..1013807e4c 100644 --- a/engines/sherlock/fonts.h +++ b/engines/sherlock/fonts.h @@ -34,6 +34,7 @@ class Surface; class Fonts { private: + static Common::Platform _platform; static ImageFile *_font; protected: static int _fontNumber; @@ -45,7 +46,7 @@ public: /** * Initialise the font manager */ - static void init(); + static void init(Common::Platform platform); /** * Frees the font manager diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp index d16296f690..6463bac334 100644 --- a/engines/sherlock/screen.cpp +++ b/engines/sherlock/screen.cpp @@ -39,7 +39,8 @@ Screen::Screen(SherlockEngine *vm) : Surface(g_system->getWidth(), g_system->get Common::fill(&_tMap[0], &_tMap[PALETTE_SIZE], 0); // Set up the initial font - Fonts::init(); + Fonts::init(_vm->getPlatform()); + setFont(IS_SERRATED_SCALPEL ? 1 : 4); // Rose Tattoo specific fields -- cgit v1.2.3