From f202b4d06da3bb3d5b67f341e7593f71f755a5ef Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 6 Mar 2005 04:49:58 +0000 Subject: Use sprite groups number, not sprite id. svn-id: r17000 --- scumm/sprite_he.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scumm') diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp index f8eb27f777..bc93742109 100644 --- a/scumm/sprite_he.cpp +++ b/scumm/sprite_he.cpp @@ -257,7 +257,7 @@ int ScummEngine_v90he::spriteInfoGet_grp_tx(int spriteId) { checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d"); if (_spriteTable[spriteId].group_num) - return _spriteTable[spriteId].tx + _spriteGroups[spriteId].tx; + return _spriteTable[spriteId].tx + _spriteGroups[_spriteTable[spriteId].group_num].tx; else return _spriteTable[spriteId].tx; } @@ -266,7 +266,7 @@ int ScummEngine_v90he::spriteInfoGet_grp_ty(int spriteId) { checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d"); if (_spriteTable[spriteId].group_num) - return _spriteTable[spriteId].ty + _spriteGroups[spriteId].ty; + return _spriteTable[spriteId].ty + _spriteGroups[_spriteTable[spriteId].group_num].ty; else return _spriteTable[spriteId].ty; } -- cgit v1.2.3