diff options
author | Travis Howell | 2004-06-21 02:33:23 +0000 |
---|---|---|
committer | Travis Howell | 2004-06-21 02:33:23 +0000 |
commit | fce2762f2906e332c9cc3922642174c4931afa8b (patch) | |
tree | abbf99445377403cab4b17668148dda36e15a959 /scumm/object.cpp | |
parent | 02376854734790b17026a2836294e8f0111d2f40 (diff) | |
download | scummvm-rg350-fce2762f2906e332c9cc3922642174c4931afa8b.tar.gz scummvm-rg350-fce2762f2906e332c9cc3922642174c4931afa8b.tar.bz2 scummvm-rg350-fce2762f2906e332c9cc3922642174c4931afa8b.zip |
Add some missing code
svn-id: r13990
Diffstat (limited to 'scumm/object.cpp')
-rw-r--r-- | scumm/object.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp index adaecfc2ed..237eb06f22 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -168,6 +168,23 @@ int ScummEngine::getObjectIndex(int object) const { return -1; } +int ScummEngine::getObjectImageCount(int object) { + const byte *ptr; + const ImageHeader *imhd; + int count, objnum; + + objnum = getObjectIndex(object); + if (objnum == -1) + error("getObjectImageCount: object %d not in memory", object); + + ptr = getOBIMFromObject(_objs[objnum]); + imhd = (const ImageHeader *)findResourceData(MKID('IMHD'), ptr); + + count = READ_LE_UINT32(&imhd->v8.image_count); + debug(1, "getObjectImageCount: image count %d", count); + return count; +} + int ScummEngine::whereIsObject(int object) const { int i; |