From fea248ae2f0c2659d84bd8ec400530a6c5e5bc22 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 15 Jun 2010 20:23:25 +0000 Subject: SCI: make umlauts work in kFrameout for sci32 svn-id: r49890 --- engines/sci/graphics/frameout.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'engines/sci') diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index d794fad39e..f16f1068a9 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -265,14 +265,15 @@ void GfxFrameout::kernelFrameout() { uint16 curX = itemEntry->x; uint16 curY = itemEntry->y; for (uint32 i = 0; i < text.size(); i++) { + unsigned char curChar = text[i]; // TODO: proper text splitting... this is a hack - if ((text[i] == ' ' && i > 0 && text[i - i] == ' ') || text[i] == '\n' || - (curX + font->getCharWidth(text[i]) > _screen->getWidth())) { + if ((curChar == ' ' && i > 0 && text[i - i] == ' ') || curChar == '\n' || + (curX + font->getCharWidth(curChar) > _screen->getWidth())) { curY += font->getHeight(); curX = itemEntry->x; } - font->draw(text[i], curY, curX, foreColor, dimmed); - curX += font->getCharWidth(text[i]); + font->draw(curChar, curY, curX, foreColor, dimmed); + curX += font->getCharWidth(curChar); } delete font; } -- cgit v1.2.3