[Scummvm-cvs-logs] SF.net SVN: scummvm:[44703] scummvm/trunk/engines/sci/gui/gui_gfx.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Tue Oct 6 19:04:56 CEST 2009
Revision: 44703
http://scummvm.svn.sourceforge.net/scummvm/?rev=44703&view=rev
Author: thebluegr
Date: 2009-10-06 17:04:56 +0000 (Tue, 06 Oct 2009)
Log Message:
-----------
Simplified the LSL1VGA font resource workaround
Modified Paths:
--------------
scummvm/trunk/engines/sci/gui/gui_gfx.cpp
Modified: scummvm/trunk/engines/sci/gui/gui_gfx.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.cpp 2009-10-06 16:45:06 UTC (rev 44702)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.cpp 2009-10-06 17:04:56 UTC (rev 44703)
@@ -104,31 +104,21 @@
}
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();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list