FindSprite should report the spriteId.

svn-id: r17027
This commit is contained in:
Travis Howell 2005-03-07 11:34:23 +00:00
parent 214742783e
commit 17562c097a
2 changed files with 4 additions and 2 deletions

View file

@ -76,7 +76,7 @@ int ScummEngine_v90he::findSpriteWithClassOf(int x, int y, int spriteGroupId, in
continue; continue;
if (spi->bbox.bottom < y) if (spi->bbox.bottom < y)
continue; continue;
return i; return spi->id;
} else { } else {
int resId, state, rot_angle, zoom; int resId, state, rot_angle, zoom;
int32 w, h; int32 w, h;
@ -134,7 +134,7 @@ int ScummEngine_v90he::findSpriteWithClassOf(int x, int y, int spriteGroupId, in
} }
if(isWizPixelNonTransparent(rtImage, resId, state, x, y, spi->imgFlags)) if(isWizPixelNonTransparent(rtImage, resId, state, x, y, spi->imgFlags))
return i; return spi->id;
} }
} }
@ -1184,6 +1184,7 @@ void ScummEngine_v90he::spritesSortActiveSprites() {
else else
groupZorder = 0; groupZorder = 0;
spi->id = i;
spi->zorder = spi->field_18 + groupZorder; spi->zorder = spi->field_18 + groupZorder;
_activeSpritesTable[_numSpritesToProcess++] = spi; _activeSpritesTable[_numSpritesToProcess++] = spi;

View file

@ -66,6 +66,7 @@ enum SpriteGroupFlags {
}; };
struct SpriteInfo { struct SpriteInfo {
int id;
int zorder; int zorder;
int flags; int flags;
int res_id; int res_id;