diff options
author | Travis Howell | 2005-03-18 15:04:37 +0000 |
---|---|---|
committer | Travis Howell | 2005-03-18 15:04:37 +0000 |
commit | 47e9cc1b3a75ed24246c4e4465d619664f27c47d (patch) | |
tree | 60b29c08f09af2167e349195c234b3482c61abe5 | |
parent | 749cf8a083460e18db96c24220f756307dd0b4d0 (diff) | |
download | scummvm-rg350-47e9cc1b3a75ed24246c4e4465d619664f27c47d.tar.gz scummvm-rg350-47e9cc1b3a75ed24246c4e4465d619664f27c47d.tar.bz2 scummvm-rg350-47e9cc1b3a75ed24246c4e4465d619664f27c47d.zip |
Add string height override for loom
svn-id: r17178
-rw-r--r-- | scumm/script_v5.cpp | 13 | ||||
-rw-r--r-- | scumm/scumm.cpp | 1 | ||||
-rw-r--r-- | scumm/scumm.h | 1 | ||||
-rw-r--r-- | scumm/string.cpp | 6 |
4 files changed, 13 insertions, 8 deletions
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index f2648cf651..a908028751 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -2641,9 +2641,10 @@ void ScummEngine_v5::decodeParseString() { break; case 3: // SO_ERASE { - int a = getVarOrDirectWord(PARAM_1); - int b = getVarOrDirectWord(PARAM_2); - warning("ScummEngine_v5::decodeParseString: Unhandled case 3: %d, %d", a, b); + int w = getVarOrDirectWord(PARAM_1); + int h = getVarOrDirectWord(PARAM_2); + // restoreCharsetBg(xpos, xpos + w, ypos, ypos + h) + error("ScummEngine_v5::decodeParseString: Unhandled case 3: %d, %d", w, h); } break; case 4: // SO_CENTER @@ -2652,10 +2653,7 @@ void ScummEngine_v5::decodeParseString() { break; case 6: // SO_LEFT if (_version == 3) { - // FIXME: this value seems to be some kind of override - // for text spacing?!? - /* int a = */ getVarOrDirectWord(PARAM_1); - + _string[textSlot].height = getVarOrDirectWord(PARAM_1); } else { _string[textSlot].center = false; _string[textSlot].overhead = false; @@ -2715,6 +2713,7 @@ void ScummEngine_v5::decodeParseString() { if (_version <= 3) { _string[textSlot]._default.xpos = _string[textSlot].xpos; _string[textSlot]._default.ypos = _string[textSlot].ypos; + _string[textSlot]._default.height = _string[textSlot].height; _string[textSlot]._default.color = _string[textSlot].color; } return; diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 56da24d0f4..41dddf17c2 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -1516,6 +1516,7 @@ void ScummEngine::scummInit() { _string[i]._default.ypos = 5; } _string[i]._default.right = _screenWidth - 1; + _string[i]._default.height = 0; _string[i]._default.color = 0xF; _string[i]._default.center = 0; _string[i]._default.charset = 0; diff --git a/scumm/scumm.h b/scumm/scumm.h index 49daf51cc7..f6e66548c9 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -249,6 +249,7 @@ struct StringSlot { int16 xpos; int16 ypos; int16 right; + int16 height; byte color; byte charset; bool center; diff --git a/scumm/string.cpp b/scumm/string.cpp index f764f3a7b9..8e6770a646 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -234,7 +234,11 @@ void ScummEngine::CHARSET_1() { if (_charset->_center) { _charset->_nextLeft -= _charset->getStringWidth(0, buffer) / 2; } - _charset->_nextTop += _charset->getFontHeight(); + if (_string[0].height) { + _charset->_nextTop += _string[0].height; + } else { + _charset->_nextTop += _charset->getFontHeight(); + } if (_version > 3) { // FIXME - is this really needed? _charset->_disableOffsX = true; |