diff options
Diffstat (limited to 'engines/sci/resource.h')
-rw-r--r-- | engines/sci/resource.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/engines/sci/resource.h b/engines/sci/resource.h index ef48998b04..f70bf48bd4 100644 --- a/engines/sci/resource.h +++ b/engines/sci/resource.h @@ -84,7 +84,10 @@ enum ResourceType { kResourceTypePatch, kResourceTypeBitmap, kResourceTypePalette, - kResourceTypeCdAudio, + kResourceTypeCdAudio = 12, +#ifdef ENABLE_SCI32 + kResourceTypeWave = 12, +#endif kResourceTypeAudio, kResourceTypeSync, kResourceTypeMessage, @@ -212,6 +215,10 @@ public: return (_type == other._type) && (_number == other._number) && (_tuple == other._tuple); } + bool operator!=(const ResourceId &other) const { + return !operator==(other); + } + bool operator<(const ResourceId &other) const { return (_type < other._type) || ((_type == other._type) && (_number < other._number)) || ((_type == other._type) && (_number == other._number) && (_tuple < other._tuple)); @@ -259,6 +266,10 @@ public: */ void writeToStream(Common::WriteStream *stream) const; +#ifdef ENABLE_SCI32 + Common::SeekableReadStream *makeStream() const; +#endif + const Common::String &getResourceLocation() const; // FIXME: This audio specific method is a hack. After all, why should a @@ -315,11 +326,6 @@ public: void init(); /** - * Similar to the function above, only called from the fallback detector - */ - void initForDetection(); - - /** * Adds all of the resource files for a game */ int addAppropriateSources(); @@ -426,9 +432,7 @@ protected: // Note: maxMemory will not be interpreted as a hard limit, only as a restriction // for resources which are not explicitly locked. However, a warning will be // issued whenever this limit is exceeded. - enum { - MAX_MEMORY = 256 * 1024 // 256KB - }; + int _maxMemoryLRU; ViewType _viewType; // Used to determine if the game has EGA or VGA graphics Common::List<ResourceSource *> _sources; @@ -559,6 +563,8 @@ protected: ViewType detectViewType(); bool hasSci0Voc999(); bool hasSci1Voc900(); + bool checkResourceDataForSignature(Resource *resource, const byte *signature); + bool checkResourceForSignatures(ResourceType resourceType, uint16 resourceNr, const byte *signature1, const byte *signature2); void detectSciVersion(); }; |