From 872a1ea36970af4a5440b81ac434a4e109e9cc51 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 26 Jul 2007 03:29:45 +0000 Subject: Fixed o1_fillRect() again svn-id: r28209 --- engines/gob/inter_v1.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 5ea307bf28..7f5a641c1b 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -1896,7 +1896,9 @@ bool Inter_v1::o1_copySprite(OpFuncParams ¶ms) { } bool Inter_v1::o1_fillRect(OpFuncParams ¶ms) { - _vm->_draw->_destSurface = load16(); + int16 destSurf; + + _vm->_draw->_destSurface = destSurf = load16(); _vm->_draw->_destSpriteX = _vm->_parse->parseValExpr(); _vm->_draw->_destSpriteY = _vm->_parse->parseValExpr(); @@ -1905,7 +1907,7 @@ bool Inter_v1::o1_fillRect(OpFuncParams ¶ms) { _vm->_draw->_backColor = _vm->_parse->parseValExpr(); - if (!_vm->_draw->_spritesArray[_vm->_draw->_destSurface]) + if (!_vm->_draw->_spritesArray[(destSurf > 100) ? (destSurf - 80) : destSurf]) return false; if (_vm->_draw->_spriteRight < 0) { -- cgit v1.2.3