diff options
author | Filippos Karapetis | 2009-10-06 17:04:56 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-10-06 17:04:56 +0000 |
commit | f664dcdee8946946544205764b8c9a7610c89715 (patch) | |
tree | 7a298339e72dbdb37ba44708f8ca4f7665d8d44d /engines/sci/gui | |
parent | ed0a9611707c7b9145cb4e0401db4b53de754707 (diff) | |
download | scummvm-rg350-f664dcdee8946946544205764b8c9a7610c89715.tar.gz scummvm-rg350-f664dcdee8946946544205764b8c9a7610c89715.tar.bz2 scummvm-rg350-f664dcdee8946946544205764b8c9a7610c89715.zip |
Simplified the LSL1VGA font resource workaround
svn-id: r44703
Diffstat (limited to 'engines/sci/gui')
-rw-r--r-- | engines/sci/gui/gui_gfx.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp index 5db42fe1e0..2e2d1b9cce 100644 --- a/engines/sci/gui/gui_gfx.cpp +++ b/engines/sci/gui/gui_gfx.cpp @@ -104,31 +104,21 @@ GuiResourceId SciGuiGfx::GetFontId() { } SciGuiFont *SciGuiGfx::GetFont() { - GuiResourceId fontId = _curPort->fontId; - - // Workaround: lsl1sci mixes its own internal fonts with the global - // SCI ones, so we translate them here, by removing their extra bits - if (_s->_gameName == "lsl1sci") - fontId &= 0x7ff; - if ((_font == NULL) || (_font->getResourceId() != _curPort->fontId)) - _font = new SciGuiFont(_s->resMan, fontId); + _font = new SciGuiFont(_s->resMan, _curPort->fontId); return _font; } void SciGuiGfx::SetFont(GuiResourceId fontId) { - GuiResourceId actualFontId = fontId; - // Workaround: lsl1sci mixes its own internal fonts with the global // SCI ones, so we translate them here, by removing their extra bits - if (_s->_gameName == "lsl1sci") - actualFontId &= 0x7ff; - + GuiResourceId actualFontId = (_s->_gameName == "lsl1sci") ? fontId & 0x7ff : fontId; + if ((_font == NULL) || (_font->getResourceId() != fontId)) _font = new SciGuiFont(_s->resMan, actualFontId); - _curPort->fontId = fontId; + _curPort->fontId = actualFontId; _curPort->fontHeight = _font->getHeight(); } |