SCUMM: (MI1 - EGA/VGA) - fix bug no. 13762 (Inaccurate text position)

This concerns only the vertical positioning, not the wrapping. Currently, I have limited it to MI1 EGA and VGA.
This commit is contained in:
athrxx
2022-08-07 18:22:52 +02:00
parent 8829a9b4c0
commit 36a5571170
+6 -3
View File
@@ -690,10 +690,13 @@ void ScummEngine::CHARSET_1() {
_string[0].ypos = a->getPos().y - a->getElevation() - _screenTop;
if (_game.version <= 5) {
if (VAR(VAR_V5_TALK_STRING_Y) < 0) {
s = (a->_scaley * (int)VAR(VAR_V5_TALK_STRING_Y)) / 0xFF;
_string[0].ypos += (int)(((VAR(VAR_V5_TALK_STRING_Y) - s) / 2) + s);
if (_game.id == GID_MONKEY_EGA || _game.id == GID_MONKEY_VGA) {
_string[0].ypos = (int)VAR(VAR_V5_TALK_STRING_Y) + a->getPos().y + a->getElevation();
} else {
s = (a->_scaley * (int)VAR(VAR_V5_TALK_STRING_Y)) / 0xFF;
_string[0].ypos += (int)(((VAR(VAR_V5_TALK_STRING_Y) - s) / 2) + s);
}
} else {
_string[0].ypos = (int)VAR(VAR_V5_TALK_STRING_Y);
}