aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-13 07:17:44 +0000
committerFilippos Karapetis2010-06-13 07:17:44 +0000
commiteff1d4bb1c2e1a33946c7333c3d28f38dfdcb5e8 (patch)
tree42e226e3fcbfa594d14da68bed18836aaca4a7e5 /engines/sci
parent94cdfefe1c9c32b3497d8d1564d4e5e0940dc403 (diff)
downloadscummvm-rg350-eff1d4bb1c2e1a33946c7333c3d28f38dfdcb5e8.tar.gz
scummvm-rg350-eff1d4bb1c2e1a33946c7333c3d28f38dfdcb5e8.tar.bz2
scummvm-rg350-eff1d4bb1c2e1a33946c7333c3d28f38dfdcb5e8.zip
Added a default constructor for the ResourceSource struct
svn-id: r49622
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/resource.cpp20
-rw-r--r--engines/sci/resource.h9
2 files changed, 9 insertions, 20 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 05aae0a39e..1906510d24 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -174,9 +174,6 @@ ResourceSource *ResourceManager::addExternalMap(const char *file_name, int volum
newsrc->source_type = kSourceExtMap;
newsrc->location_name = file_name;
- newsrc->resourceFile = 0;
- newsrc->scanned = false;
- newsrc->associated_map = NULL;
newsrc->volume_number = volume_nr;
_sources.push_back(newsrc);
@@ -189,8 +186,6 @@ ResourceSource *ResourceManager::addExternalMap(const Common::FSNode *mapFile, i
newsrc->source_type = kSourceExtMap;
newsrc->location_name = mapFile->getName();
newsrc->resourceFile = mapFile;
- newsrc->scanned = false;
- newsrc->associated_map = NULL;
newsrc->volume_number = volume_nr;
_sources.push_back(newsrc);
@@ -201,13 +196,9 @@ ResourceSource *ResourceManager::addSource(ResourceSource *map, ResSourceType ty
ResourceSource *newsrc = new ResourceSource();
newsrc->source_type = type;
- newsrc->scanned = false;
newsrc->location_name = filename;
- newsrc->resourceFile = 0;
newsrc->volume_number = number;
newsrc->associated_map = map;
- newsrc->audioCompressionType = 0;
- newsrc->audioCompressionOffsetMapping = NULL;
if (type == kSourceAudioVolume)
checkIfAudioVolumeIsCompressed(newsrc);
@@ -219,13 +210,10 @@ ResourceSource *ResourceManager::addSource(ResourceSource *map, ResSourceType ty
ResourceSource *newsrc = new ResourceSource();
newsrc->source_type = type;
- newsrc->scanned = false;
newsrc->location_name = resFile->getName();
newsrc->resourceFile = resFile;
newsrc->volume_number = number;
newsrc->associated_map = map;
- newsrc->audioCompressionType = 0;
- newsrc->audioCompressionOffsetMapping = NULL;
if (type == kSourceAudioVolume)
checkIfAudioVolumeIsCompressed(newsrc);
@@ -237,8 +225,6 @@ ResourceSource *ResourceManager::addPatchDir(const char *dirname) {
ResourceSource *newsrc = new ResourceSource();
newsrc->source_type = kSourceDirectory;
- newsrc->resourceFile = 0;
- newsrc->scanned = false;
newsrc->location_name = dirname;
_sources.push_back(newsrc);
@@ -1229,9 +1215,6 @@ void ResourceManager::readResourcePatchesBase36(ResourceSource *source) {
psrcPatch = new ResourceSource;
psrcPatch->source_type = kSourcePatch;
psrcPatch->location_name = name;
- psrcPatch->resourceFile = 0;
- psrcPatch->audioCompressionType = 0;
- psrcPatch->audioCompressionOffsetMapping = NULL;
processPatch(psrcPatch, (ResourceType)i, resourceNr, resource36.tuple);
}
}
@@ -1282,9 +1265,6 @@ void ResourceManager::readResourcePatches(ResourceSource *source) {
psrcPatch = new ResourceSource;
psrcPatch->source_type = kSourcePatch;
psrcPatch->location_name = name;
- psrcPatch->resourceFile = 0;
- psrcPatch->audioCompressionType = 0;
- psrcPatch->audioCompressionOffsetMapping = NULL;
processPatch(psrcPatch, (ResourceType)i, resourceNr);
}
}
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index 66742f11f5..7fbb3ca9a2 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -133,6 +133,15 @@ struct ResourceSource {
uint32 audioCompressionType;
int32 *audioCompressionOffsetMapping;
Common::MacResManager macResMan;
+ ResourceSource() {
+ source_type = kSourceDirectory;
+ scanned = false;
+ resourceFile = 0;
+ volume_number = 0;
+ associated_map = NULL;
+ audioCompressionType = 0;
+ audioCompressionOffsetMapping = NULL;
+ }
};
class ResourceId {