Add project files.

This commit is contained in:
Razmoth
2022-09-27 17:40:31 +04:00
parent 871d908948
commit a476ace7d7
305 changed files with 71340 additions and 84 deletions

View File

@@ -0,0 +1,43 @@
using Newtonsoft.Json;
using System.Collections.Generic;
namespace AssetStudio
{
public class Index
{
public PPtr<Object> Object;
public ulong Size;
public Index(ObjectReader reader)
{
Object = new PPtr<Object>(reader);
Size = reader.ReadUInt64();
}
}
public sealed class IndexObject : NamedObject
{
public static bool Exportable;
public int Count;
public KeyValuePair<string, Index>[] AssetMap;
public Dictionary<long, string> Names = new Dictionary<long, string>();
public IndexObject(ObjectReader reader) : base(reader)
{
Count = reader.ReadInt32();
AssetMap = new KeyValuePair<string, Index>[Count];
for (int i = 0; i < Count; i++)
{
var key = reader.ReadAlignedString();
var value = new Index(reader);
AssetMap[i] = new KeyValuePair<string, Index>(key, value);
if (value.Object.m_FileID == 0)
Names.Add(value.Object.m_PathID, key);
}
}
}
}