SCUMM: Fix unclickable centered verbs

Fixes #12552
This commit is contained in:
Orgad Shaneh 2021-05-17 21:47:11 +03:00 committed by Filippos Karapetis
parent 08441dcda3
commit 8047607908
2 changed files with 5 additions and 4 deletions

View File

@ -2304,7 +2304,7 @@ void ScummEngine_v5::o5_verbOps() {
vs->hicolor = getVarOrDirectByte(PARAM_1);
break;
case 5: // SO_VERB_AT
vs->curRect.left = vs->origLeft = getVarOrDirectWord(PARAM_1);
vs->curRect.left = getVarOrDirectWord(PARAM_1);
vs->curRect.top = getVarOrDirectWord(PARAM_2);
// Macintosh version of indy3ega used different interface, so adjust values.
if ((_game.platform == Common::kPlatformMacintosh) && (_game.id == GID_INDY3)) {
@ -2374,6 +2374,7 @@ void ScummEngine_v5::o5_verbOps() {
// if we trim to 200 pixels, we need to move the 'down arrow' (verb 116) to higher location
vs->curRect.top -= 18;
}
vs->origLeft = vs->curRect.left;
break;
case 6: // SO_VERB_ON
vs->curmode = 1;

View File

@ -1083,8 +1083,9 @@ void ScummEngine::drawVerb(int verb, int mode) {
restoreVerbBG(verb);
const bool isRtl = _language == Common::HE_ISR && !vs->center;
_string[4].charset = vs->charset_nr;
_string[4].xpos = _language != Common::HE_ISR ? vs->curRect.left : vs->origLeft;
_string[4].xpos = isRtl ? vs->origLeft : vs->curRect.left;
_string[4].ypos = vs->curRect.top;
_string[4].right = _screenWidth - 1;
_string[4].center = vs->center;
@ -1110,9 +1111,8 @@ void ScummEngine::drawVerb(int verb, int mode) {
drawString(4, msg);
_charset->_center = tmp;
if (_language == Common::HE_ISR)
if (isRtl)
vs->curRect.left = _charset->_str.left;
vs->curRect.right = _charset->_str.right;
vs->curRect.bottom = _charset->_str.bottom;
vs->oldRect = _charset->_str;