Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCUMM: COMI: fix hebrew multiline dialogue #2746

Merged
merged 2 commits into from Feb 4, 2021

Conversation

@BLooperZ
Copy link
Contributor

@BLooperZ BLooperZ commented Jan 25, 2021

Fixes bug in dialogue text in COMI hebrew fan translation,
bug was: when the dialogue option should have span on multiple lines, it was instead cropped out of the screen.

this is solved by aligning the text to the right after lines are splitted.

Thanks.

@BLooperZ
Copy link
Contributor Author

@BLooperZ BLooperZ commented Jan 25, 2021

Also, added fix for regression in hebrew text in smush videos introduced in 9ff197e
(or rather: original off-by-1 error in logic was discovered by it)
Where first character in sentence didn't appear, and multiline text was repeated several times.

@BLooperZ BLooperZ force-pushed the BLooperZ:comi_multiline_rtl branch from 60f58fd to 344206f Jan 26, 2021
vs->curRect.right -= vs->curRect.left;
vs->curRect.left = _screenWidth - _charset->getStringWidth(0, tmpBuf);
vs->curRect.right += vs->curRect.left;
}

This comment has been minimized.

@bluegr

bluegr Jan 30, 2021
Member

Can you explain what you're doing here?

This comment has been minimized.

@BLooperZ

BLooperZ Jan 30, 2021
Author Contributor

Aligning the text to the right.
The first and third lines is replacing the old left position value with the new left position. (substract old value, add new value).

This comment has been minimized.

@bluegr

bluegr Feb 1, 2021
Member

Yes, but you're trying to right-align the text relative to the screen. Is that intended? Does the original align the text to the left of the screen?

This comment has been minimized.

@BLooperZ

BLooperZ Feb 3, 2021
Author Contributor

Yes, this is the dialogue on SCUMM-7-8, which is aligned to the left.
altough I have checked this now again, the original version of COMI is indeed indented 5 pixels to the left (value of vs->curRect.left). (not 0 as I assumed)
ideally we would use this value to calculate
drawLeft = _screenWidth - originalLeft - _widthOfString
problem is the updated value is used for the clickable/hoverable mouse area, and it causes the new value to be received when drawing the next time, so using it make the text to jump from side to side.
the difference is (IMO) somewhat neglectable visually, though.
could be solved by making 2 _verbs arrays, but that is a change that may affect much more games.

@bluegr
Copy link
Member

@bluegr bluegr commented Feb 4, 2021

Thanks, merging

@bluegr bluegr merged commit 73e8a49 into scummvm:master Feb 4, 2021
3 checks passed
3 checks passed
Codacy Static Code Analysis Codacy Static Code Analysis
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deepcode-ci-bot Well done, no issues found!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants