diff options
author | Matthew Hoops | 2010-05-10 18:29:13 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-05-10 18:29:13 +0000 |
commit | 7344ac20d7461245103279a8b48f853371018a79 (patch) | |
tree | e102b3a50960e5c4845f8ef2e3a1e30868e93897 /engines/sci/resource.h | |
parent | b9813063ad3cfca5f7ff7a731eccca0bb32159e0 (diff) | |
download | scummvm-rg350-7344ac20d7461245103279a8b48f853371018a79.tar.gz scummvm-rg350-7344ac20d7461245103279a8b48f853371018a79.tar.bz2 scummvm-rg350-7344ac20d7461245103279a8b48f853371018a79.zip |
Add support for loading SCI games from Mac resource forks. The games themselves do not work yet as some (not all) of the data is in BE order instead of LE. They currently error out because it thinks the relocation block is outside of the script.
svn-id: r48998
Diffstat (limited to 'engines/sci/resource.h')
-rw-r--r-- | engines/sci/resource.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/engines/sci/resource.h b/engines/sci/resource.h index 64e3cb4a12..1704336f2d 100644 --- a/engines/sci/resource.h +++ b/engines/sci/resource.h @@ -80,7 +80,8 @@ enum ResSourceType { kSourceIntMap, kSourceAudioVolume, kSourceExtAudioMap, - kSourceWave + kSourceWave, + kSourceMacResourceFork }; enum ResourceType { @@ -205,6 +206,7 @@ public: kResVersionSci1Middle, kResVersionSci1Late, kResVersionSci11, + kResVersionSci11Mac, kResVersionSci32 }; @@ -367,8 +369,8 @@ protected: bool loadFromAudioVolumeSCI1(Resource *res, Common::File &file); bool loadFromAudioVolumeSCI11(Resource *res, Common::File &file); void freeOldResources(); - int decompress(Resource *res, Common::File *file); - int readResourceInfo(Resource *res, Common::File *file, uint32&szPacked, ResourceCompression &compression); + int decompress(Resource *res, Common::SeekableReadStream *file); + int readResourceInfo(Resource *res, Common::SeekableReadStream *file, uint32&szPacked, ResourceCompression &compression); void addResource(ResourceId resId, ResourceSource *src, uint32 offset, uint32 size = 0); void removeAudioResource(ResourceId resId); @@ -389,6 +391,13 @@ protected: * @return 0 on success, an SCI_ERROR_* code otherwise */ int readResourceMapSCI1(ResourceSource *map); + + /** + * Reads the SCI1.1+ resource file from a Mac resource fork. + * @param source The source + * @return 0 on success, an SCI_ERROR_* code otherwise + */ + int readMacResourceFork(ResourceSource *source); /** * Reads SCI1.1 audio map resources |