aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/resource.h
diff options
context:
space:
mode:
authorMax Horn2010-06-15 12:15:52 +0000
committerMax Horn2010-06-15 12:15:52 +0000
commit824dd44ddfc7ca70aafcb4182b3afc58fa480528 (patch)
tree95c101e1b987c3f442be807782b75d05334bb148 /engines/sci/resource.h
parent713e61acba05c49ec4bc896fa2e873c3265000a7 (diff)
downloadscummvm-rg350-824dd44ddfc7ca70aafcb4182b3afc58fa480528.tar.gz
scummvm-rg350-824dd44ddfc7ca70aafcb4182b3afc58fa480528.tar.bz2
scummvm-rg350-824dd44ddfc7ca70aafcb4182b3afc58fa480528.zip
SCI: Revise how ResourceManager is instantiated.
This should allow for better error handling. Also, it means that g_sci->getResMan() returns a valid value much sooner, allowing me to simplify some code. Also added a note about potentially replacing Common::FSList usage by Common::Archive (and FSNode by Archive/ArchiveMember ?). This might be a way to unify the addAppropriateSources variants again. svn-id: r49825
Diffstat (limited to 'engines/sci/resource.h')
-rw-r--r--engines/sci/resource.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index 3d5b874977..36d75fb56f 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -229,9 +229,17 @@ public:
* Creates a new SCI resource manager.
*/
ResourceManager();
- ResourceManager(const Common::FSList &fslist);
~ResourceManager();
+
+ /**
+ * Initializes the resource manager.
+ */
+ void init();
+
+ int addAppropriateSources();
+ int addAppropriateSources(const Common::FSList &fslist); // TODO: Switch from FSList to Common::Archive?
+
/**
* Looks up a resource's data.
* @param id The resource type to look for
@@ -325,11 +333,6 @@ protected:
ResVersion _mapVersion; ///< resource.map version
/**
- * Initializes the resource manager
- */
- void init();
-
- /**
* Add a path to the resource manager's list of sources.
* @return a pointer to the added source structure, or NULL if an error occurred.
*/
@@ -379,8 +382,7 @@ protected:
* @return One of SCI_ERROR_*.
*/
void scanNewSources();
- int addAppropriateSources();
- int addAppropriateSources(const Common::FSList &fslist);
+
int addInternalSources();
void freeResourceSources();