mirror of
https://github.com/autc04/Retro68.git
synced 2024-11-26 06:49:33 +00:00
ResourceFiles: read data forks from MacBinary and AppleSingle
This commit is contained in:
parent
eb9dd5aaff
commit
5f998b85be
@ -265,13 +265,14 @@ bool ResourceFile::read()
|
||||
in.seekg(26 + i * 12);
|
||||
int what = longword(in);
|
||||
int off = longword(in);
|
||||
//int len = longword(in);
|
||||
int len = longword(in);
|
||||
in.seekg(off);
|
||||
switch(what)
|
||||
{
|
||||
case 1:
|
||||
// ###
|
||||
// FIXME: read data fork
|
||||
std::vector<char> buf(len);
|
||||
in.read(buf, len);
|
||||
data = std::string(buf.begin(), buf.end());
|
||||
break;
|
||||
case 2:
|
||||
resources = Resources(in);
|
||||
@ -342,7 +343,9 @@ bool ResourceFile::read()
|
||||
unsigned short crc = CalculateCRC(0,header,124);
|
||||
if(word(in) != crc)
|
||||
return false;
|
||||
// FIXME: read data fork
|
||||
std::vector<char> buf(datasize);
|
||||
in.read(buf, datasize);
|
||||
data = std::string(buf.begin(), buf.end());
|
||||
in.seekg(128 + datasize);
|
||||
resources = Resources(in);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user