aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2014-07-20 21:18:40 +0300
committerFilippos Karapetis2014-07-20 21:18:40 +0300
commit0d926f9aaf81b18fdac290efb5dffeca09533cae (patch)
treefb11b0f0a9e4e1a286d742d0d1ac6fe4cc13bf9f
parentd8508a512818085640d4584f6c3daf271aba5307 (diff)
downloadscummvm-rg350-0d926f9aaf81b18fdac290efb5dffeca09533cae.tar.gz
scummvm-rg350-0d926f9aaf81b18fdac290efb5dffeca09533cae.tar.bz2
scummvm-rg350-0d926f9aaf81b18fdac290efb5dffeca09533cae.zip
SAGA: Cleanup
-rw-r--r--engines/saga/resource.cpp14
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()) {