From b67d95435106ef7366ab06c76e2c0f3f92fe2763 Mon Sep 17 00:00:00 2001 From: BLooperZ Date: Tue, 2 Oct 2018 20:14:15 +0300 Subject: SCUMM: disable warnings --- engines/scumm/string.cpp | 48 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 11 deletions(-) (limited to 'engines') diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index 6f0f489e66..dee62a7823 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -434,10 +434,15 @@ 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); _nextLeft = _screenWidth - _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) - _nextLeft; } @@ -597,13 +602,21 @@ void ScummEngine::CHARSET_1() { _charset->addLinebreaks(0, _charsetBuffer + _charsetBufPos, 0, maxwidth); } - + if (_game.version >= 4 && _game.version < 7 && (_language == Common::HE_ISR || true)) { + _nextLeft = (_screenWidth - _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos)) - _nextLeft; + } if (_charset->_center) { + // warning("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)) { - _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); + // _nextLeft = _screenWidth - _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) - _nextLeft; } _charset->_disableOffsX = _charset->_firstChar = !_keepText; @@ -621,6 +634,16 @@ void ScummEngine::CHARSET_1() { int start = 0; char* text = ltext + ll; + + + for (int u = 0; u < strlen(text); u++) { + char buffy[30] = {0}; + sprintf(buffy, "[%d-%c],", text[u], text[u]); + debugN(buffy); + } + debugN("\n"); + + char* current = text; while(1) { if (*current == 13 || *current == 0 || *current == -1 || *current == -2) { @@ -665,6 +688,17 @@ void ScummEngine::CHARSET_1() { } break; } + + + // warning("REVERSED"); + // for (int u = 0; u < strlen(text); u++) { + // char buffy[30] = {0}; + // sprintf(buffy, "[%d-%c],", text[u], text[u]); + // debugN(buffy); + // } + // debugN("\n\n\n\n\n"); + + } while (handleNextCharsetCode(a, &c)) { @@ -936,20 +970,12 @@ void ScummEngine::drawString(int a, const byte *msg) { convertMessageToString(msg, buf, sizeof(buf)); - if (_game.version >= 4 && true /*TODO: IS_HEBREW*/) { + if (_game.version >= 4 && _game.version < 7 && (_language == Common::HE_ISR || true)) { int ll = 0; char* ltext = (char*)buf; while (ltext[ll] == -1) { ll += 4; } - // for (int u = 0; u < strlen(ltext + ll); u++) { - // char buf[384] = {0}; - // sprintf(buf, "%d - %c\n", (ltext + ll)[u], (ltext + ll)[u]); - // debugN(buf); - // } - // char buf[384] = {0}; - // sprintf(buf, "LL: %d", ll); - // warning(buf); byte fin[270] = {0}; memcpy(fin, ltext, ll); -- cgit v1.2.3