ALL: synced with scummvm
This commit is contained in:
parent
5e86a8d5a8
commit
8e2ab87455
90 changed files with 2414 additions and 1422 deletions
|
@ -238,6 +238,27 @@ bool MacResManager::open(FSNode path, String filename) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool MacResManager::exists(const String &filename) {
|
||||
// Try the file name by itself
|
||||
if (Common::File::exists(filename))
|
||||
return true;
|
||||
|
||||
// Try the .rsrc extension
|
||||
if (Common::File::exists(filename + ".rsrc"))
|
||||
return true;
|
||||
|
||||
// Check if we have a MacBinary file
|
||||
Common::File tempFile;
|
||||
if (tempFile.open(filename + ".bin") && isMacBinary(tempFile))
|
||||
return true;
|
||||
|
||||
// Check if we have an AppleDouble file
|
||||
if (tempFile.open("._" + filename) && tempFile.readUint32BE() == 0x00051607)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MacResManager::loadFromAppleDouble(SeekableReadStream &stream) {
|
||||
if (stream.readUint32BE() != 0x00051607) // tag
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue