diff options
author | johndoe123 | 2014-03-10 14:56:55 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | 5833ceda4b7e6eaf77ef5c51f7a47c1c7f92add1 (patch) | |
tree | 88ad91a9aa0893f31b49135b7b8675b4cba5b3ca /engines/illusions/resourcesystem.cpp | |
parent | 26487555b1c49fa95c3ebcc20c9b8228629c0552 (diff) | |
download | scummvm-rg350-5833ceda4b7e6eaf77ef5c51f7a47c1c7f92add1.tar.gz scummvm-rg350-5833ceda4b7e6eaf77ef5c51f7a47c1c7f92add1.tar.bz2 scummvm-rg350-5833ceda4b7e6eaf77ef5c51f7a47c1c7f92add1.zip |
ILLUSIONS: More work on BackgroundResource
Diffstat (limited to 'engines/illusions/resourcesystem.cpp')
-rw-r--r-- | engines/illusions/resourcesystem.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/illusions/resourcesystem.cpp b/engines/illusions/resourcesystem.cpp index f30f46b2c1..01a076bac0 100644 --- a/engines/illusions/resourcesystem.cpp +++ b/engines/illusions/resourcesystem.cpp @@ -23,12 +23,15 @@ #include "illusions/resourcesystem.h" #include "common/algorithm.h" +#include "common/debug.h" namespace Illusions { // Resource void Resource::loadData() { + debug("Resource::loadData()"); + Common::File fd; if (!fd.open(_filename)) error("Resource::loadData() Could not open %s for reading", _filename.c_str()); @@ -38,6 +41,8 @@ void Resource::loadData() { } void Resource::unloadData() { + debug("Resource::unloadData()"); + delete _data; _data = 0; _dataSize = 0; @@ -70,13 +75,17 @@ void ResourceSystem::loadResource(uint32 resId, uint32 tag, uint32 threadId) { resourceLoader->buildFilename(resource); - if (resourceLoader->isFlag(kRlfLoadFile)) + if (resourceLoader->isFlag(kRlfLoadFile)) { + debug("ResourceSystem::loadResource() kRlfLoadFile"); resource->loadData(); + } resourceLoader->load(resource); - if (resourceLoader->isFlag(kRlfFreeDataAfterUse)) + if (resourceLoader->isFlag(kRlfFreeDataAfterUse)) { + debug("ResourceSystem::loadResource() kRlfFreeDataAfterUse"); resource->unloadData(); + } resource->_loaded = true; |