Emscripten port

This commit is contained in:
elasota
2021-03-29 21:41:11 -04:00
parent 9ba0e9f13d
commit 6fb45f480b
92 changed files with 15731 additions and 300 deletions

View File

@@ -100,6 +100,8 @@ namespace PortabilityLayer
if (!stream)
return nullptr;
fprintf(stderr, "Composite file opened\n");
ZipFileProxy *zipFile = ZipFileProxy::Create(stream);
if (!zipFile)
{
@@ -107,6 +109,8 @@ namespace PortabilityLayer
return nullptr;
}
fprintf(stderr, "Zip proxy created\n");
size_t metaIndex = 0;
if (!zipFile->IndexFile("!!meta", metaIndex))
{
@@ -114,6 +118,8 @@ namespace PortabilityLayer
return nullptr;
}
fprintf(stderr, "Meta file indexed\n");
MacFilePropertiesSerialized mfps;
GpIOStream *metaStream = zipFile->OpenFile(metaIndex);
@@ -124,6 +130,8 @@ namespace PortabilityLayer
return nullptr;
}
fprintf(stderr, "Meta data deserialized\n");
if (!metaStream->ReadExact(mfps.m_data, sizeof(mfps.m_data)))
{
metaStream->Close();
@@ -152,6 +160,8 @@ namespace PortabilityLayer
stream = nullptr;
}
fprintf(stderr, "Composite constructed\n");
CompositeFile *compositeFile = CompositeFileImpl::Create(dirID, filename, stream, zipFile, mfp, hasResources, hasData, hasData ? dataIndex : 0);
if (!compositeFile)
{