static bool DetectVersionSci0(AssetLoader loader)
{
var version = ResourceMapVersion.Sci0;
var reader = loader.Reader;
var length = loader.Length;
// File is a simple list of 6-byte resource ids.
if (length % 6 != 0 || length / 6 > short.MaxValue)
return false;
int count = (int)(length / 6);
for (int index = 0; index < count - 1; index++) {
ResourceId id = new ResourceId(reader, version);
if (id.IsEnd)
return false;
}
ResourceId end = new ResourceId(reader, version);
if (!end.IsEnd)
return false;
return true;
}