Files
YarikStudio/AssetStudio/Game/SR_CB3/BlocksFile.cs
2022-11-03 19:32:12 +04:00

31 lines
879 B
C#

using System.Collections.Generic;
namespace AssetStudio
{
public class BlocksFile
{
public Dictionary<long, StreamFile[]> Bundles = new Dictionary<long, StreamFile[]>();
public BlocksFile(FileReader reader)
{
if (reader.BundlePos.Length != 0)
{
foreach (var pos in reader.BundlePos)
{
reader.Position = pos;
var bundle = new BundleFile(reader);
Bundles.Add(pos, bundle.FileList);
}
}
else
{
while (reader.Position != reader.Length)
{
var pos = reader.Position;
var bundle = new BundleFile(reader);
Bundles.Add(pos, bundle.FileList);
}
}
}
}
}