From 5fa661f1b0ff321a25b2ddec4eda125d56eba212 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 30 Apr 2021 15:20:23 +0200 Subject: [PATCH] PINK: Fix menu in Hebrew version. Unfortunately, we have no Hebrew glyphs in Win95 fonts. --- engines/pink/director.cpp | 12 +++++++++--- engines/pink/director.h | 3 ++- engines/pink/pink.cpp | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/engines/pink/director.cpp b/engines/pink/director.cpp index 3fde1920939..b99d57b3263 100644 --- a/engines/pink/director.cpp +++ b/engines/pink/director.cpp @@ -24,6 +24,7 @@ #include "graphics/macgui/mactext.h" #include "graphics/palette.h" +#include "pink/pink.h" #include "pink/cel_decoder.h" #include "pink/director.h" #include "pink/objects/actions/action_sound.h" @@ -88,11 +89,16 @@ static void redrawCallback(void *ref) { } } -Director::Director() +Director::Director(PinkEngine *vm) : _surface(640, 480), _textRendered(false) { - _wm = new Graphics::MacWindowManager(Graphics::kWMModeNoDesktop | Graphics::kWMModeAutohideMenu + uint32 wmMode = Graphics::kWMModeNoDesktop | Graphics::kWMModeAutohideMenu | Graphics::kWMModalMenuMode | Graphics::kWMModeForceBuiltinFonts - | Graphics::kWMModeUnicode | Graphics::kWMModeWin95); + | Graphics::kWMModeUnicode; + + if (vm->getLanguage() != Common::HE_ISR) // We do not have Hebrew font in MS fonts :( + wmMode |= Graphics::kWMModeWin95; + + _wm = new Graphics::MacWindowManager(wmMode); _wm->setScreen(&_surface); _wm->setMenuHotzone(Common::Rect(0, 0, 640, 23)); diff --git a/engines/pink/director.h b/engines/pink/director.h index a1652d2cc7e..6e451c751fc 100644 --- a/engines/pink/director.h +++ b/engines/pink/director.h @@ -40,10 +40,11 @@ class Actor; class ActionCEL; class ActionSound; class ActionText; +class PinkEngine; class Director { public: - Director(); + Director(PinkEngine *vm); ~Director(); void update(); diff --git a/engines/pink/pink.cpp b/engines/pink/pink.cpp index 839ec854623..0d8108c0aec 100644 --- a/engines/pink/pink.cpp +++ b/engines/pink/pink.cpp @@ -80,7 +80,7 @@ Common::Error PinkEngine::init() { } setDebugger(new Console(this)); - _director = new Director(); + _director = new Director(this); initMenu();