aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2005-03-07 11:34:23 +0000
committerTravis Howell2005-03-07 11:34:23 +0000
commit17562c097a18b6cf55e26e1dfb55f0eb4b7ec34f (patch)
tree58cf88d8d1a22dab09e5231298ca008d5ee5021d /scumm
parent214742783ed4d0ec3e28f2fd00f682ddcf7ffc31 (diff)
downloadscummvm-rg350-17562c097a18b6cf55e26e1dfb55f0eb4b7ec34f.tar.gz
scummvm-rg350-17562c097a18b6cf55e26e1dfb55f0eb4b7ec34f.tar.bz2
scummvm-rg350-17562c097a18b6cf55e26e1dfb55f0eb4b7ec34f.zip
FindSprite should report the spriteId.
svn-id: r17027
Diffstat (limited to 'scumm')
-rw-r--r--scumm/sprite_he.cpp5
-rw-r--r--scumm/sprite_he.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp
index bc93742109..3dec1ebee1 100644
--- a/scumm/sprite_he.cpp
+++ b/scumm/sprite_he.cpp
@@ -76,7 +76,7 @@ int ScummEngine_v90he::findSpriteWithClassOf(int x, int y, int spriteGroupId, in
continue;
if (spi->bbox.bottom < y)
continue;
- return i;
+ return spi->id;
} else {
int resId, state, rot_angle, zoom;
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))
- return i;
+ return spi->id;
}
}
@@ -1184,6 +1184,7 @@ void ScummEngine_v90he::spritesSortActiveSprites() {
else
groupZorder = 0;
+ spi->id = i;
spi->zorder = spi->field_18 + groupZorder;
_activeSpritesTable[_numSpritesToProcess++] = spi;
diff --git a/scumm/sprite_he.h b/scumm/sprite_he.h
index 9dccdcaabb..b0d1619883 100644
--- a/scumm/sprite_he.h
+++ b/scumm/sprite_he.h
@@ -66,6 +66,7 @@ enum SpriteGroupFlags {
};
struct SpriteInfo {
+ int id;
int zorder;
int flags;
int res_id;