diff options
author | Torbjörn Andersson | 2010-07-16 03:07:30 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2010-07-16 03:07:30 +0000 |
commit | d20ae841dd4321cb602139e175bef42f00268fcd (patch) | |
tree | 4e39404c8f74f72efd7ce40e8930dc9c8d57c57f /engines/sword2 | |
parent | 30238347e9b68a597f395dfe6662557de5ac3cfe (diff) | |
download | scummvm-rg350-d20ae841dd4321cb602139e175bef42f00268fcd.tar.gz scummvm-rg350-d20ae841dd4321cb602139e175bef42f00268fcd.tar.bz2 scummvm-rg350-d20ae841dd4321cb602139e175bef42f00268fcd.zip |
Cleanup.
svn-id: r50923
Diffstat (limited to 'engines/sword2')
-rw-r--r-- | engines/sword2/anims.cpp | 8 | ||||
-rw-r--r-- | engines/sword2/music.cpp | 6 |
2 files changed, 2 insertions, 12 deletions
diff --git a/engines/sword2/anims.cpp b/engines/sword2/anims.cpp index 1bf3967047..7fd36fcc86 100644 --- a/engines/sword2/anims.cpp +++ b/engines/sword2/anims.cpp @@ -56,8 +56,6 @@ int Router::doAnimate(byte *ob_logic, byte *ob_graph, int32 animRes, bool revers ObjectGraphic obGraph(ob_graph); if (obLogic.getLooping() == 0) { - byte *ptr; - // This is the start of the anim - set up the first frame // For testing all anims! @@ -75,12 +73,8 @@ int Router::doAnimate(byte *ob_logic, byte *ob_graph, int32 animRes, bool revers return IR_STOP; } - ptr = _vm->_resman->openResource(animRes); - // if it's not an animation file if (_vm->_resman->fetchType(animRes) != ANIMATION_FILE) { - _vm->_resman->closeResource(animRes); - // switch off the sprite // don't animate - just continue // script next cycle @@ -88,8 +82,6 @@ int Router::doAnimate(byte *ob_logic, byte *ob_graph, int32 animRes, bool revers return IR_STOP; } - _vm->_resman->closeResource(animRes); - // switch on the sprite setSpriteStatus(ob_graph, SORT_SPRITE); } diff --git a/engines/sword2/music.cpp b/engines/sword2/music.cpp index a68baed097..c052aa6b46 100644 --- a/engines/sword2/music.cpp +++ b/engines/sword2/music.cpp @@ -136,10 +136,8 @@ static Audio::AudioStream *getAudioStream(SoundFileHandle *fh, const char *base, return NULL; } if (fh->fileSize != fh->file.size()) { - if (fh->idxTab) { - free(fh->idxTab); - fh->idxTab = NULL; - } + free(fh->idxTab); + fh->idxTab = NULL; } } else alreadyOpen = true; |