From 96d77f16b73925454c9204176c9e0e62839e9537 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 1 Jun 2006 12:18:12 +0000 Subject: - Fixed drawing of sprite-parts based texts - Removed misplaced Music::stopPlay() call svn-id: r22816 --- engines/gob/draw_v2.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'engines/gob/draw_v2.cpp') diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index b5459750b2..6f600e127c 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -709,9 +709,12 @@ void Draw_v2::spriteOperation(int16 operation) { } } else { for (i = 0; i < len; i++) { - ratio = _spritesArray[_fontToSprite[_fontIndex].sprite]->width / _fontToSprite[_fontIndex].width; - x = ((_textToPrint[i] - _fontToSprite[_fontIndex].base) / ratio) * _fontToSprite[_fontIndex].height; - y = ((_textToPrint[i] - _fontToSprite[_fontIndex].base) / ratio) * _fontToSprite[_fontIndex].width; + ratio = _spritesArray[_fontToSprite[_fontIndex].sprite]->width + / _fontToSprite[_fontIndex].width; + y = ((_textToPrint[i] - _fontToSprite[_fontIndex].base) / ratio) + * _fontToSprite[_fontIndex].height; + x = ((_textToPrint[i] - _fontToSprite[_fontIndex].base) % ratio) + * _fontToSprite[_fontIndex].width; _vm->_video->drawSprite(_spritesArray[_fontToSprite[_fontIndex].sprite], _spritesArray[_destSurface], x, y, x + _fontToSprite[_fontIndex].width - 1, -- cgit v1.2.3