aboutsummaryrefslogtreecommitdiff
path: root/engines/queen
diff options
context:
space:
mode:
authorGregory Montoir2006-11-24 18:24:45 +0000
committerGregory Montoir2006-11-24 18:24:45 +0000
commitd4f61e6ee91bc705fd781f0b5c2a7f9e55af80e4 (patch)
tree6a7f41df5099dcad249401319aadf0bbdaeacfc3 /engines/queen
parent82601174f3f540d2a939c946bb2170819562cddb (diff)
downloadscummvm-rg350-d4f61e6ee91bc705fd781f0b5c2a7f9e55af80e4.tar.gz
scummvm-rg350-d4f61e6ee91bc705fd781f0b5c2a7f9e55af80e4.tar.bz2
scummvm-rg350-d4f61e6ee91bc705fd781f0b5c2a7f9e55af80e4.zip
loadFile isn't called with useMalloc=true anymore, got rid of it
svn-id: r24782
Diffstat (limited to 'engines/queen')
-rw-r--r--engines/queen/resource.cpp10
-rw-r--r--engines/queen/resource.h2
2 files changed, 3 insertions, 9 deletions
diff --git a/engines/queen/resource.cpp b/engines/queen/resource.cpp
index 6f75439376..753ca1ff4e 100644
--- a/engines/queen/resource.cpp
+++ b/engines/queen/resource.cpp
@@ -107,7 +107,7 @@ ResourceEntry *Resource::resourceEntry(const char *filename) const {
return re;
}
-uint8 *Resource::loadFile(const char *filename, uint32 skipBytes, uint32 *size, bool useMalloc) {
+uint8 *Resource::loadFile(const char *filename, uint32 skipBytes, uint32 *size) {
ResourceEntry *re = resourceEntry(filename);
assert(re != NULL);
uint32 sz = re->size - skipBytes;
@@ -115,13 +115,7 @@ uint8 *Resource::loadFile(const char *filename, uint32 skipBytes, uint32 *size,
*size = sz;
}
- byte *dstBuf;
- if (useMalloc) {
- dstBuf = (byte *)malloc(sz);
- } else {
- dstBuf = new byte[sz];
- }
-
+ byte *dstBuf = new byte[sz];
_resourceFile.seek(re->offset + skipBytes);
_resourceFile.read(dstBuf, sz);
return dstBuf;
diff --git a/engines/queen/resource.h b/engines/queen/resource.h
index 3ff5c1e2fc..98b4ef46fb 100644
--- a/engines/queen/resource.h
+++ b/engines/queen/resource.h
@@ -65,7 +65,7 @@ public:
~Resource();
//! loads the specified from the resource file
- uint8 *loadFile(const char *filename, uint32 skipBytes = 0, uint32 *size = NULL, bool useMalloc = false);
+ uint8 *loadFile(const char *filename, uint32 skipBytes = 0, uint32 *size = NULL);
//! returns true if the file is present in the resource
bool fileExists(const char *filename) const { return resourceEntry(filename) != NULL; }