SHERLOCK: Implemented checkObject and some support methods

This commit is contained in:
Paul Gilbert 2015-03-21 18:18:12 -04:00
parent 8f4b4a7bc2
commit 26c5168074
15 changed files with 521 additions and 33 deletions

View file

@ -129,7 +129,7 @@ void Resources::addToCache(const Common::String &filename) {
}
/**
* Adds a resource from a library file tot he cache
* Adds a resource from a library file to the cache
*/
void Resources::addToCache(const Common::String &filename, const Common::String &libFilename) {
// Get the resource
@ -140,6 +140,16 @@ void Resources::addToCache(const Common::String &filename, const Common::String
delete stream;
}
/**
* Adds a given stream to the cache under the given name
*/
void Resources::addToCache(const Common::String &filename, Common::SeekableReadStream &stream) {
_cache.load(filename, stream);
}
/**
* Returns a stream for a given file
*/
Common::SeekableReadStream *Resources::load(const Common::String &filename) {
// First check if the file is directly in the cache
if (_cache.isCached(filename))