SCUMM: COMI: fix hebrew multiline dialogue #2746
Conversation
Also, added fix for regression in hebrew text in smush videos introduced in 9ff197e |
vs->curRect.right -= vs->curRect.left; | ||
vs->curRect.left = _screenWidth - _charset->getStringWidth(0, tmpBuf); | ||
vs->curRect.right += vs->curRect.left; | ||
} |
bluegr
Jan 30, 2021
Member
Can you explain what you're doing here?
Can you explain what you're doing here?
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).
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).
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?
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?
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.
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.
Thanks, merging |
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.