diff options
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; |