mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
COMPOSER: Support full macbinary dump
Currently the code assumes that normal file opening is good enough but it's a problem if the disk has been dumped as macbinary
This commit is contained in:
parent
52b9d064d9
commit
778106a67b
@ -26,6 +26,7 @@
|
||||
#include "common/substream.h"
|
||||
#include "common/util.h"
|
||||
#include "common/textconsole.h"
|
||||
#include "common/macresman.h"
|
||||
|
||||
namespace Composer {
|
||||
|
||||
@ -41,10 +42,10 @@ Archive::~Archive() {
|
||||
}
|
||||
|
||||
bool Archive::openFile(const Common::String &fileName) {
|
||||
Common::File *file = new Common::File();
|
||||
Common::SeekableReadStream *file
|
||||
= Common::MacResManager::openFileOrDataFork(fileName);
|
||||
|
||||
if (!file->open(fileName)) {
|
||||
delete file;
|
||||
if (!file) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "composer/composer.h"
|
||||
#include "composer/graphics.h"
|
||||
#include "composer/resource.h"
|
||||
#include "common/macresman.h"
|
||||
|
||||
namespace Composer {
|
||||
|
||||
@ -616,8 +617,9 @@ int16 ComposerEngine::scriptFuncCall(uint16 id, int16 param1, int16 param2, int1
|
||||
if (!_bookIni.hasKey(Common::String::format("%d", param1), "Data"))
|
||||
return 0;
|
||||
filename = getFilename("Data", param1);
|
||||
Common::File *file = new Common::File();
|
||||
if (!file->open(filename))
|
||||
Common::SeekableReadStream *file =
|
||||
Common::MacResManager::openFileOrDataFork(filename);
|
||||
if (!file)
|
||||
error("couldn't open '%s' to get vars id '%d'", filename.c_str(), param1);
|
||||
stream = file;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user