27 #include "common/array.h" 28 #include "common/fs.h" 29 #include "common/rect.h" 30 #include "common/str.h" 31 #include "common/str-array.h" 33 #ifndef COMMON_MACRESMAN_H 34 #define COMMON_MACRESMAN_H 56 typedef Array<uint16> MacResIDArray;
57 typedef Array<uint32> MacResTagArray;
78 kFinderFlagAlias = (1 << 15),
79 kFinderFlagInvisible = (1 << 14),
80 kFinderFlagBundle = (1 << 13),
81 kFinderFlagNameLocked = (1 << 12),
82 kFinderFlagStationery = (1 << 11),
83 kFinderFlagCustomIcon = (1 << 10),
84 kFinderFlagInited = (1 << 8),
85 kFinderFlagNoInit = (1 << 7),
86 kFinderFlagShared = (1 << 6),
88 kFinderFlagColorBit2 = (1 << 3),
89 kFinderFlagColorBit1 = (1 << 2),
90 kFinderFlagColorBit0 = (1 << 1),
109 static const uint kDataSize = 16;
118 int32 homeDirectoryID;
127 #define MBI_INFOHDR 128 143 bool open(
const Path &fileName);
173 static bool exists(
const Path &fileName);
185 static bool getFileFinderInfo(
const Path &fileName,
MacFinderInfo &outFinderInfo);
207 bool hasResFork()
const;
233 static int getDataForkOffset() {
return MBI_INFOHDR; }
241 String getResName(uint32 typeID, uint16 resID)
const;
249 uint32 getResLength(uint32 typeID, uint16 resID);
255 uint32 getResForkDataSize()
const;
263 String computeResForkMD5AsString(uint32 length = 0,
bool tail =
false)
const;
271 void setBaseFileName(
Common::Path str) { _baseFileName = str; }
276 MacResIDArray getResIDArray(uint32 typeID);
281 MacResTagArray getResTagArray();
330 static bool readAndValidateMacBinaryHeader(
SeekableReadStream &stream, byte (&outMacBinaryHeader)[MBI_INFOHDR]);
332 static Path constructAppleDoubleName(
const Path &name);
333 static Path disassembleAppleDoubleName(
const Path &name,
bool *isAppleDouble);
366 ResMap() { reset(); }
383 typedef Resource *ResPtr;
385 int32 _resForkOffset;
Definition: macresman.h:125
Path getBaseFileName() const
Definition: macresman.h:269
Definition: archive.h:141
Definition: macresman.h:76
Definition: macresman.h:299
Definition: macresman.h:108
Definition: algorithm.h:29
Definition: macresman.h:62
Definition: macresman.h:69