diff options
author | lukaslw | 2014-05-29 19:46:48 +0200 |
---|---|---|
committer | lukaslw | 2014-06-22 20:08:19 +0200 |
commit | 2e1f7db043b0f960c2325e2ec3946ba375d78988 (patch) | |
tree | cf38554cd463efcd68507ea5866fc96134083c69 /engines/prince/animation.cpp | |
parent | ac845b5b98849ed328534abe5dd82e528255ae05 (diff) | |
download | scummvm-rg350-2e1f7db043b0f960c2325e2ec3946ba375d78988.tar.gz scummvm-rg350-2e1f7db043b0f960c2325e2ec3946ba375d78988.tar.bz2 scummvm-rg350-2e1f7db043b0f960c2325e2ec3946ba375d78988.zip |
PRINCE: showBackAnims anim type 2, memory leaks debugging
Diffstat (limited to 'engines/prince/animation.cpp')
-rw-r--r-- | engines/prince/animation.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/prince/animation.cpp b/engines/prince/animation.cpp index c27505735e..e2197c22f2 100644 --- a/engines/prince/animation.cpp +++ b/engines/prince/animation.cpp @@ -68,12 +68,12 @@ int16 Animation::getLoopCount() const { } // AH_Fazy -uint Animation::getPhaseCount() const { +int32 Animation::getPhaseCount() const { return READ_LE_UINT16(_data + 4); } // AH_Ramki -uint Animation::getFrameCount() const { +int32 Animation::getFrameCount() const { return READ_LE_UINT16(_data + 6); } @@ -113,7 +113,7 @@ int16 Animation::getFrameHeight(uint frameIndex) const { return READ_LE_UINT16(frameData + 2); } -Graphics::Surface *Animation::getFrame(uint frameIndex) { +Graphics::Surface *Animation::getFrame(uint frameIndex, int i, int phase) { byte *frameData = _data + READ_LE_UINT32(_data + 16 + frameIndex * 4); int16 width = READ_LE_UINT16(frameData + 0); int16 height = READ_LE_UINT16(frameData + 2); @@ -132,6 +132,7 @@ Graphics::Surface *Animation::getFrame(uint frameIndex) { } free(ddata); } else { + debug("nr: %d, phase: %d", i, phase); // Uncompressed for (uint16 i = 0; i < height; i++) { memcpy(surf->getBasePtr(0, i), frameData + 4 + width * i, width); |