diff options
author | Paweł Kołodziejski | 2003-04-07 14:38:26 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-04-07 14:38:26 +0000 |
commit | 0a46882beab65286f5ac3ec3dbb8f6759c13abee (patch) | |
tree | c90eaf12d1ea01e8a1f128e1784b2f0c121f027a /scumm/charset.cpp | |
parent | 7e62d9a1197cec12a6eda047cff638946d829529 (diff) | |
download | scummvm-rg350-0a46882beab65286f5ac3ec3dbb8f6759c13abee.tar.gz scummvm-rg350-0a46882beab65286f5ac3ec3dbb8f6759c13abee.tar.bz2 scummvm-rg350-0a46882beab65286f5ac3ec3dbb8f6759c13abee.zip |
added charset support for all V3 games, and fix for cleaning all 16 variables not only 15
svn-id: r6928
Diffstat (limited to 'scumm/charset.cpp')
-rw-r--r-- | scumm/charset.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 9072b40e01..13dab3db08 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -30,7 +30,10 @@ void CharsetRendererCommon::setCurID(byte id) { _fontPtr = _vm->getResourceAddress(rtCharset, id); assert(_fontPtr); - if (_vm->_features & GF_SMALL_HEADER) + if (_vm->_features & GF_AFTER_V3) { + _nbChars = _fontPtr[4]; + _fontPtr += 6 + _nbChars; + } else if (_vm->_features & GF_AFTER_V4) _fontPtr += 17; else _fontPtr += 29; @@ -56,7 +59,7 @@ int CharsetRendererClassic::getCharWidth(byte chr) { int CharsetRendererOld256::getCharWidth(byte chr) { int spacing = 0; - spacing = *(_fontPtr - 11 + chr); + spacing = *(_fontPtr - _nbChars + chr); // FIXME - this fixes the inventory icons in Zak256/Indy3 // see bug #613109. @@ -193,7 +196,8 @@ void CharsetRendererOld256::printChar(int chr) { _strBottom = _top; _firstChar = false; } - char_ptr = _fontPtr + 207 + (chr + 1) * 8; + + char_ptr = _fontPtr + chr * 8; dest_ptr = vs->screenPtr + vs->xstart + (_top - vs->topline) * _vm->_realWidth + _left; _vm->updateDirtyRect(vs->number, _left, _left + 8, _top - vs->topline, _top - vs->topline + 8, 0); |