aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/draw_v2.cpp
diff options
context:
space:
mode:
authorSven Hesse2006-06-01 12:18:12 +0000
committerSven Hesse2006-06-01 12:18:12 +0000
commit96d77f16b73925454c9204176c9e0e62839e9537 (patch)
treed550bdd1d303269cf55215170342916fce8afa97 /engines/gob/draw_v2.cpp
parentd64ea1ad87066aae2fae5f06b70d7b0358b78af9 (diff)
downloadscummvm-rg350-96d77f16b73925454c9204176c9e0e62839e9537.tar.gz
scummvm-rg350-96d77f16b73925454c9204176c9e0e62839e9537.tar.bz2
scummvm-rg350-96d77f16b73925454c9204176c9e0e62839e9537.zip
- Fixed drawing of sprite-parts based texts
- Removed misplaced Music::stopPlay() call svn-id: r22816
Diffstat (limited to 'engines/gob/draw_v2.cpp')
-rw-r--r--engines/gob/draw_v2.cpp9
1 files changed, 6 insertions, 3 deletions
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,