diff options
author | Filippos Karapetis | 2011-02-03 18:18:36 +0000 |
---|---|---|
committer | Filippos Karapetis | 2011-02-03 18:18:36 +0000 |
commit | e1cea3b879037dc5b52ae7a2043824baa82112c6 (patch) | |
tree | 1687099f0cc383ec5adbf6d4dfc54b05ec27ebbc /engines/sci/graphics/robot.cpp | |
parent | be1f62af23b6a525e60a9585ac40009da95f0b1c (diff) | |
download | scummvm-rg350-e1cea3b879037dc5b52ae7a2043824baa82112c6.tar.gz scummvm-rg350-e1cea3b879037dc5b52ae7a2043824baa82112c6.tar.bz2 scummvm-rg350-e1cea3b879037dc5b52ae7a2043824baa82112c6.zip |
SCI: Robot related changes
- Reverted accidental changes in r55752, and moved all the deletion code in freeData()
again
- Now skipping v6 videos (in SCI3), instead of throwing an error
svn-id: r55756
Diffstat (limited to 'engines/sci/graphics/robot.cpp')
-rw-r--r-- | engines/sci/graphics/robot.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/engines/sci/graphics/robot.cpp b/engines/sci/graphics/robot.cpp index f3e58951f2..44465b2761 100644 --- a/engines/sci/graphics/robot.cpp +++ b/engines/sci/graphics/robot.cpp @@ -68,11 +68,7 @@ GfxRobot::GfxRobot(ResourceManager *resMan, GfxScreen *screen, GfxPalette *palet } GfxRobot::~GfxRobot() { - delete[] _resourceData; - delete[] _imageStart; - delete[] _audioStart; - delete[] _audioLen; - delete[] _outputBuffer; + freeData(); } void GfxRobot::init(GuiResourceId resourceId, uint16 x, uint16 y) { @@ -137,7 +133,12 @@ void GfxRobot::init(GuiResourceId resourceId, uint16 x, uint16 y) { _curFrame = _frameCount; // jump to the last frame return; case 5: - // Supported, the most well-known and used version + // Supported, the most well-known and used version in SCI2.1 + break; + case 6: + // Introduced in SCI3 + warning("TODO: add support for v6 robot videos"); + _curFrame = _frameCount; // jump to the last frame break; default: // Unsupported, error out so that we find out where this is used @@ -240,8 +241,7 @@ void GfxRobot::drawNextFrame() { // End of robot video, restore palette g_system->setPalette(_savedPal, 0, 256); _resourceId = -1; - delete[] _outputBuffer; - _outputBuffer = 0; + freeData(); } } @@ -347,6 +347,7 @@ void GfxRobot::freeData() { delete[] _imageStart; _imageStart = 0; delete[] _audioStart; _audioStart = 0; delete[] _audioLen; _audioLen = 0; + delete[] _outputBuffer; _outputBuffer = 0; } #endif |