diff --git a/engines/trecision/dialog.cpp b/engines/trecision/dialog.cpp index 5a5bf08c2b5..3204d3236de 100644 --- a/engines/trecision/dialog.cpp +++ b/engines/trecision/dialog.cpp @@ -44,7 +44,7 @@ DialogManager::~DialogManager() {} void DialogManager::dialogPrint(int x, int y, int c, const char *txt) { SDText curChoice; curChoice.set( - Common::Rect(x, y, _vm->textLength(txt, 0), 0), + Common::Rect(x, y, _vm->textLength(txt, 0) + x, y), Common::Rect(0, 0, MAXX, MAXY), c, MASKCOL, diff --git a/engines/trecision/trecision.cpp b/engines/trecision/trecision.cpp index eb53528f1c0..f5db8800b15 100644 --- a/engines/trecision/trecision.cpp +++ b/engines/trecision/trecision.cpp @@ -501,10 +501,12 @@ void TrecisionEngine::LoadAll() { } for (int i = 0; i < MAXOBJ; ++i) { + uint16 w = dataNl.readUint16LE(); + uint16 h = dataNl.readUint16LE(); _obj[i]._rect.left = dataNl.readUint16LE(); _obj[i]._rect.top = dataNl.readUint16LE(); - _obj[i]._rect.right = dataNl.readUint16LE(); - _obj[i]._rect.bottom = dataNl.readUint16LE(); + _obj[i]._rect.right = w + _obj[i]._rect.left; + _obj[i]._rect.bottom = h + _obj[i]._rect.top; _obj[i]._lim.left = dataNl.readUint16LE(); _obj[i]._lim.top = dataNl.readUint16LE(); diff --git a/engines/trecision/utils.cpp b/engines/trecision/utils.cpp index e6f0fe83409..4c5f71f5aba 100644 --- a/engines/trecision/utils.cpp +++ b/engines/trecision/utils.cpp @@ -257,7 +257,7 @@ bool TrecisionEngine::checkMask(uint16 mx, uint16 my) { for (uint16 b = _obj[checkedObj]._rect.top; b < max; b++) { bool insideObj = false; int16 e = 0; - while (e < _obj[checkedObj]._rect.right) { + while (e < _obj[checkedObj]._rect.width()) { if (!insideObj) { // not inside an object if (b + TOP == my) { if ((mx >= d + e) && (mx < d + e + *mask)) {