diff options
-rw-r--r-- | engines/saga/resource.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/engines/saga/resource.cpp b/engines/saga/resource.cpp index cdf674dc66..1fb9ac1c04 100644 --- a/engines/saga/resource.cpp +++ b/engines/saga/resource.cpp @@ -304,21 +304,13 @@ void Resource::clearContexts() { } void Resource::loadResource(ResourceContext *context, uint32 resourceId, ByteArray &resourceBuffer) { - Common::File *file; - uint32 resourceOffset; - ResourceData *resourceData; - - - resourceData = context->getResourceData(resourceId); - - file = context->getFile(resourceData); - - resourceOffset = resourceData->offset; + ResourceData *resourceData = context->getResourceData(resourceId); + Common::File *file = context->getFile(resourceData); + uint32 resourceOffset = resourceData->offset; debug(8, "loadResource %d 0x%X:0x%X", resourceId, resourceOffset, uint(resourceData->size)); resourceBuffer.resize(resourceData->size); - file->seek((long)resourceOffset, SEEK_SET); if (file->read(resourceBuffer.getBuffer(), resourceBuffer.size()) != resourceBuffer.size()) { |