COMMON: Give direct access to Data fork in MacResMan

This commit is contained in:
Eugene Sandulenko 2020-07-07 22:29:47 +02:00
parent 390297b410
commit be388e644a
2 changed files with 10 additions and 7 deletions

View File

@ -37,7 +37,6 @@
namespace Common {
#define MBI_INFOHDR 128
#define MBI_ZERO1 0
#define MBI_NAMELEN 1
#define MBI_ZERO2 74

View File

@ -49,6 +49,8 @@ typedef Array<uint32> MacResTagArray;
*/
class MacResManager {
#define MBI_INFOHDR 128
public:
MacResManager();
~MacResManager();
@ -139,6 +141,8 @@ public:
*/
SeekableReadStream *getDataFork();
static int getDataForkOffset() { return MBI_INFOHDR; }
/**
* Get the name of a given resource
* @param typeID FourCC of the type
@ -188,6 +192,12 @@ public:
*/
void dumpRaw();
/**
* Check if the given stream is in the MacBinary format.
* @param stream The stream we're checking
*/
static bool isMacBinary(SeekableReadStream &stream);
private:
SeekableReadStream *_stream;
String _baseFileName;
@ -200,12 +210,6 @@ private:
static String constructAppleDoubleName(String name);
static String disassembleAppleDoubleName(String name, bool *isAppleDouble);
/**
* Check if the given stream is in the MacBinary format.
* @param stream The stream we're checking
*/
static bool isMacBinary(SeekableReadStream &stream);
/**
* Do a sanity check whether the given stream is a raw resource fork.
*