Skip to content

Commit

Permalink
chore: store name on cmf/trg/manifest files
Browse files Browse the repository at this point in the history
  • Loading branch information
Js41637 committed Nov 19, 2024
1 parent 62502d4 commit b8f5129
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TACTLib/Core/Product/Tank/AssetPackageManifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public enum RecordFlags : byte {
Bundle = 0x40
}

public string m_name;
public APMHeader m_header;
public Entry[] m_entries;
public PackageEntry[] m_packageEntries;
Expand All @@ -78,6 +79,7 @@ public enum RecordFlags : byte {
public ulong[][] m_packageBundles;

public AssetPackageManifest(ClientHandler client, ProductHandler_Tank tankHandler, Stream stream, string name) {
m_name = name;
var cmf = tankHandler.m_rootContentManifest;

using (BinaryReader reader = new BinaryReader(stream)) {
Expand Down
2 changes: 2 additions & 0 deletions TACTLib/Core/Product/Tank/ContentManifestFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public bool IsEncrypted()
}
}

public string m_name;
public CMFHeader m_header;

public AssetPackageManifest.Entry[] m_entries = null!;
Expand All @@ -99,6 +100,7 @@ public bool IsEncrypted()
public const int ENCRYPTED_MAGIC = 0x636D66; // todo: use the thingy again?

public ContentManifestFile(ClientHandler client, Stream stream, string name) {
m_name = name;
using (BinaryReader reader = new BinaryReader(stream)) {
m_header = reader.Read<CMFHeader>();
if (m_header.m_buildVersion < ProductHandler_Tank.VERSION_148_PTR) { // before 1.48
Expand Down
2 changes: 2 additions & 0 deletions TACTLib/Core/Product/Tank/ResourceGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ public struct SkinAsset8B {
public uint m_wtf2;
}

public string m_name;
public TRGHeader m_header;
public Dictionary<ulong, Package> m_packages;
public Dictionary<ulong, Skin> m_skins;
Expand All @@ -224,6 +225,7 @@ public static bool IsPre212(TRGHeader header) {
}

public ResourceGraph(ClientHandler client, Stream stream, string name) {
m_name = name;
using (BinaryReader reader = new BinaryReader(stream)) {
m_header = reader.Read<TRGHeader>();
if (IsPre152(m_header)) {
Expand Down

0 comments on commit b8f5129

Please sign in to comment.