aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/resource.h')
-rw-r--r--engines/sci/resource.h33
1 files changed, 27 insertions, 6 deletions
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index b212a36710..e6bacdab1d 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -206,13 +206,24 @@ typedef Common::HashMap<ResourceId, Resource *, ResourceIdHash, ResourceIdEqualT
class ResourceManager {
public:
- int _sciVersion; //!< SCI resource version to use */
- int _mapVersion; //!< RESOURCE.MAP version
- int _volVersion; //!< RESOURCE.0xx version
+ enum ResVersion {
+ kResVersionUnknown,
+ kResVersionSci0Sci1Early,
+ kResVersionSci1Middle,
+ kResVersionSci1Late,
+ kResVersionSci11,
+ kResVersionSci32
+ };
bool isVGA() const { return _isVGA; }
/**
+ * Returns the SCI version as detected by the resource manager
+ * @return SCI version
+ */
+ sci_version_t sciVersion() const { return _sciVersion; }
+
+ /**
* Creates a new SCI resource manager.
* @param version The SCI version to look for; use SCI_VERSION_AUTODETECT
* in the default case.
@@ -222,7 +233,7 @@ public:
* for resources which are not explicitly locked. However, a warning will be
* issued whenever this limit is exceeded.
*/
- ResourceManager(int version, int maxMemory);
+ ResourceManager(int maxMemory);
~ResourceManager();
/**
@@ -272,6 +283,9 @@ protected:
ResourceMap _resMap;
Common::List<Common::File *> _volumeFiles; //!< list of opened volume files
ResourceSource *_audioMapSCI1; //!< Currently loaded audio map for SCI1
+ ResVersion _volVersion; //!< RESOURCE.0xx version
+ ResVersion _mapVersion; //!< RESOURCE.MAP version
+ sci_version_t _sciVersion; //!< Detected SCI version */
/**
* Add a path to the resource manager's list of sources.
@@ -315,6 +329,13 @@ protected:
int addInternalSources();
void freeResourceSources();
+ /**
+ * Returns a string describing a ResVersion
+ * @param version: The resource version
+ * @return: The description of version
+ */
+ const char *versionDescription(ResVersion version) const;
+
Common::File *getVolumeFile(const char *filename);
void loadResource(Resource *res);
bool loadPatch(Resource *res, Common::File &file);
@@ -328,8 +349,8 @@ protected:
void removeAudioResource(ResourceId resId);
/**--- Resource map decoding functions ---*/
- int detectMapVersion();
- int detectVolVersion();
+ ResVersion detectMapVersion();
+ ResVersion detectVolVersion();
/**
* Reads the SCI0 resource.map file from a local directory.