SHERLOCK: RT: Beginnings of speech code
This commit is contained in:
parent
60759cfb5d
commit
9b0bf9e215
6 changed files with 69 additions and 12 deletions
|
@ -116,6 +116,10 @@ Resources::Resources(SherlockEngine *vm) : _vm(vm), _cache(vm) {
|
|||
}
|
||||
|
||||
void Resources::addToCache(const Common::String &filename) {
|
||||
// Return immediately if the library has already been loaded
|
||||
if (_indexes.contains(filename))
|
||||
return;
|
||||
|
||||
_cache.load(filename);
|
||||
|
||||
// Check to see if the file is a library
|
||||
|
@ -218,6 +222,10 @@ void Resources::loadLibraryIndex(const Common::String &libFilename,
|
|||
Common::SeekableReadStream *stream, bool isNewStyle) {
|
||||
uint32 offset, nextOffset;
|
||||
|
||||
// Return immediately if the library has already been loaded
|
||||
if (_indexes.contains(libFilename))
|
||||
return;
|
||||
|
||||
// Create an index entry
|
||||
_indexes[libFilename] = LibraryIndex();
|
||||
LibraryIndex &index = _indexes[libFilename];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue