[Scummvm-cvs-logs] scummvm master -> 77959acd51982d9fedec94ac07241b1702681c6a

lordhoto lordhoto at gmail.com
Tue Dec 13 16:19:28 CET 2011


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
efa52cb79c KYRA: Fix for bug #3459000 "KYRA1CD: Accented characters overdrawn in introduction".
77959acd51 KYRA: Cast char to uint8 before passing it to getCharWidth.


Commit: efa52cb79c35a78e624f42e4ab919c6016bdadcf
    https://github.com/scummvm/scummvm/commit/efa52cb79c35a78e624f42e4ab919c6016bdadcf
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-12-13T07:18:12-08:00

Commit Message:
KYRA: Fix for bug #3459000 "KYRA1CD: Accented characters overdrawn in introduction".

Changed paths:
    engines/kyra/seqplayer.cpp



diff --git a/engines/kyra/seqplayer.cpp b/engines/kyra/seqplayer.cpp
index 531d864..1bdcde5 100644
--- a/engines/kyra/seqplayer.cpp
+++ b/engines/kyra/seqplayer.cpp
@@ -624,7 +624,7 @@ bool SeqPlayer::playSequence(const uint8 *seqData, bool skipSeq) {
 				if (_vm->gameFlags().lang == Common::JA_JPN)
 					charStr[1] = _vm->seqTextsTable()[_seqDisplayedText][++_seqDisplayedChar];
 				_screen->printText(charStr, _seqDisplayedTextX, 180, 0xF, 0xC);
-				_seqDisplayedTextX += _screen->getCharWidth(charStr[0]);
+				_seqDisplayedTextX += _screen->getCharWidth((uint8)charStr[0]);
 				++_seqDisplayedChar;
 
 				if (_vm->seqTextsTable()[_seqDisplayedText][_seqDisplayedChar] == '\0')


Commit: 77959acd51982d9fedec94ac07241b1702681c6a
    https://github.com/scummvm/scummvm/commit/77959acd51982d9fedec94ac07241b1702681c6a
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-12-13T07:18:12-08:00

Commit Message:
KYRA: Cast char to uint8 before passing it to getCharWidth.

This assures getCharWidth really gets the character number and now sign
extended version of it in case char is signed.

Changed paths:
    engines/kyra/sequences_hof.cpp



diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index 50b5db7..b27f0df 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -2622,7 +2622,7 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int
 						while (*str2) {
 							cChar[0] = *str2;
 							_screen->printText(cChar, x, y, col1++, 0);
-							x += _screen->getCharWidth(*str2++);
+							x += _screen->getCharWidth((uint8)*str2++);
 						}
 						palCycle = true;
 					} else if (!strcmp(str, specialData[1])) {
@@ -2631,7 +2631,7 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int
 						while (*str2) {
 							cChar[0] = *str2;
 							_screen->printText(cChar, x, y, col1--, 0);
-							x += _screen->getCharWidth(*str2++);
+							x += _screen->getCharWidth((uint8)*str2++);
 						}
 						palCycle = true;
 					} else {






More information about the Scummvm-git-logs mailing list