diff options
author | BLooperZ | 2018-10-20 19:12:04 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2020-01-01 00:31:21 +0100 |
commit | cd4ce42b460604a59a156dbca6fbb683b58bff39 (patch) | |
tree | cb0fe679f71c9c5240769740e734ae7edc971702 /engines/scumm | |
parent | 7b0e50cdce90a15e2bca25c59a4fe5bd53858a7e (diff) | |
download | scummvm-rg350-cd4ce42b460604a59a156dbca6fbb683b58bff39.tar.gz scummvm-rg350-cd4ce42b460604a59a156dbca6fbb683b58bff39.tar.bz2 scummvm-rg350-cd4ce42b460604a59a156dbca6fbb683b58bff39.zip |
SCUMM: fix title screen positioning
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/string.cpp | 55 |
1 files changed, 5 insertions, 50 deletions
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index 2efca2e2ee..d5921ececd 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -434,17 +434,11 @@ bool ScummEngine_v72he::handleNextCharsetCode(Actor *a, int *code) { bool ScummEngine::newLine() { _nextLeft = _string[0].xpos; if (_charset->_center) { - // warning("NL CENTER"); _nextLeft -= _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) / 2; if (_nextLeft < 0) _nextLeft = _game.version >= 6 ? _string[0].xpos : 0; } else if (_game.version >= 4 && _game.version < 7 && (_language == Common::HE_ISR || true)) { - // warning("FIRST"); - // char buffy[30]; - // sprintf(buffy, "%d-%d", _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos), _screenWidth); - // warning(buffy); - byte c = *(_charsetBuffer + _charsetBufPos + 7); - if (_game.id == GID_MONKEY && c == 0x05) { + if (_game.id == GID_MONKEY && _charset->getCurID() == 4) { _nextLeft = _screenWidth - _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) - _nextLeft; } } @@ -604,29 +598,14 @@ void ScummEngine::CHARSET_1() { _charset->addLinebreaks(0, _charsetBuffer + _charsetBufPos, 0, maxwidth); } - if (_game.version >= 4 && _game.version < 7 && (_language == Common::HE_ISR || true)) { - byte c = *(_charsetBuffer + _charsetBufPos + 7); - if (_game.id == GID_MONKEY && c == 0x05) { - _nextLeft = _screenWidth - _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) - _nextLeft; - } - } if (_charset->_center) { - // warning("CENTER"); - //_nextLeft = _midLeft; _nextLeft -= _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) / 2; if (_nextLeft < 0) _nextLeft = _game.version >= 6 ? _string[0].xpos : 0; - // } else if (_game.version >= 4 && _game.version < 7 && (_language == Common::HE_ISR || true)) { - // byte c = *(_charsetBuffer + _charsetBufPos); - // if (c != 0xFF) - // _nextLeft = _screenWidth - _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) - _nextLeft; - //warning("SECOND"); - //_nextLeft -= _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos); - // char buffy[30]; - // sprintf(buffy, "%d-%d", _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos), _screenWidth); - // warning(buffy); - //_midLeft = _nextLeft; - // _nextLeft = _screenWidth - _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) - _nextLeft; + } else if (_game.version >= 4 && _game.version < 7 && (_language == Common::HE_ISR || true)) { + if (_game.id == GID_MONKEY && _charset->getCurID() == 4) { + _nextLeft = _screenWidth - _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) - _nextLeft; + } } _charset->_disableOffsX = _charset->_firstChar = !_keepText; @@ -1001,19 +980,6 @@ void ScummEngine::drawString(int a, const byte *msg) { int start = 0; char* text = (char*)ltext + ll; - - // warning("BBEFORE"); - // for (int u = 0; u < strlen(text); u++) { - // char buffy[30] = {0}; - // sprintf(buffy, "%d,%d[%d-%c]\n",ltext[ll], ll, text[u], text[u]); - // debugN(buffy); - // } - // debugN("\n"); - - - - - strncpy((char*)fin + ll, text, strlen(text)); char* current = text; while(1) { @@ -1055,17 +1021,6 @@ void ScummEngine::drawString(int a, const byte *msg) { buf[start + pos+ll + 1] = '\0'; } - - - - // warning("BREVERSED"); - // for (int u = 0; u < strlen(text); u++) { - // char buffy[30] = {0}; - // sprintf(buffy, "[%d-%c]\n", text[u], text[u]); - // debugN(buffy); - // } - // debugN("\n\n\n\n\n"); - } |