diff options
author | Andrew Kurushin | 2010-10-24 22:17:44 +0000 |
---|---|---|
committer | Andrew Kurushin | 2010-10-24 22:17:44 +0000 |
commit | 67cc1b8a84e8cbc344e87fe0f4715cae96199b69 (patch) | |
tree | fddf53a8a74288676993025c5c1ad073982db740 /engines/saga/introproc_ihnm.cpp | |
parent | 859c1c2c08c39262de6b6ba6e1169bb03d14353a (diff) | |
download | scummvm-rg350-67cc1b8a84e8cbc344e87fe0f4715cae96199b69.tar.gz scummvm-rg350-67cc1b8a84e8cbc344e87fe0f4715cae96199b69.tar.bz2 scummvm-rg350-67cc1b8a84e8cbc344e87fe0f4715cae96199b69.zip |
SAGA: replace Resource:loadResource malloc with ByteArray class
svn-id: r53779
Diffstat (limited to 'engines/saga/introproc_ihnm.cpp')
-rw-r--r-- | engines/saga/introproc_ihnm.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/engines/saga/introproc_ihnm.cpp b/engines/saga/introproc_ihnm.cpp index ac75bcf19d..cf3dd5cb4c 100644 --- a/engines/saga/introproc_ihnm.cpp +++ b/engines/saga/introproc_ihnm.cpp @@ -121,8 +121,7 @@ int Scene::IHNMCreditsProc() { void Scene::IHNMLoadCutaways() { ResourceContext *resourceContext; //ResourceContext *soundContext; - byte *resourcePointer; - size_t resourceLength; + ByteArray resourceData; resourceContext = _vm->_resource->getContext(GAME_RESOURCEFILE); if (resourceContext == NULL) { @@ -130,18 +129,16 @@ void Scene::IHNMLoadCutaways() { } if (!_vm->isIHNMDemo()) - _vm->_resource->loadResource(resourceContext, RID_IHNM_INTRO_CUTAWAYS, resourcePointer, resourceLength); + _vm->_resource->loadResource(resourceContext, RID_IHNM_INTRO_CUTAWAYS, resourceData); else - _vm->_resource->loadResource(resourceContext, RID_IHNMDEMO_INTRO_CUTAWAYS, resourcePointer, resourceLength); + _vm->_resource->loadResource(resourceContext, RID_IHNMDEMO_INTRO_CUTAWAYS, resourceData); - if (resourceLength == 0) { + if (resourceData.empty() == 0) { error("Scene::IHNMStartProc() Can't load cutaway list"); } // Load the cutaways for the title screens - _vm->_anim->loadCutawayList(resourcePointer, resourceLength); - - free(resourcePointer); + _vm->_anim->loadCutawayList(resourceData); } bool Scene::checkKey() { |