aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorBLooperZ2018-10-04 00:27:28 +0300
committerEugene Sandulenko2020-01-01 00:31:21 +0100
commit7b0e50cdce90a15e2bca25c59a4fe5bd53858a7e (patch)
tree28b2fd760b8d971419712ab9d17746dbe33286c2 /engines/scumm
parent5e26fbdf9a74b295c5f4d3fdf69154e76ce6419f (diff)
downloadscummvm-rg350-7b0e50cdce90a15e2bca25c59a4fe5bd53858a7e.tar.gz
scummvm-rg350-7b0e50cdce90a15e2bca25c59a4fe5bd53858a7e.tar.bz2
scummvm-rg350-7b0e50cdce90a15e2bca25c59a4fe5bd53858a7e.zip
SCUMM: conditional alignment
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/string.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index 43d22afadd..2efca2e2ee 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -443,9 +443,11 @@ bool ScummEngine::newLine() {
// char buffy[30];
// sprintf(buffy, "%d-%d", _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos), _screenWidth);
// warning(buffy);
- _nextLeft = _screenWidth - _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) - _nextLeft;
+ byte c = *(_charsetBuffer + _charsetBufPos + 7);
+ if (_game.id == GID_MONKEY && c == 0x05) {
+ _nextLeft = _screenWidth - _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) - _nextLeft;
+ }
}
-
if (_game.version == 0) {
return false;
} else if (!(_game.platform == Common::kPlatformFMTowns) && _string[0].height) {
@@ -602,23 +604,29 @@ 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 (_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)) {
- // warning("SECOND");
+ // } 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;
- //_charset->_left = _screenWidth - _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) - _nextLeft;
+ // _nextLeft = _screenWidth - _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) - _nextLeft;
}
_charset->_disableOffsX = _charset->_firstChar = !_keepText;