YPT/XML conversion progress

This commit is contained in:
dexy 2020-02-03 10:09:51 +11:00
parent b11d350294
commit 3b2135e8e1
2 changed files with 1364 additions and 405 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1739,8 +1739,8 @@ namespace CodeWalker.GameFiles
// structure data
public ulong EntriesPointer { get; private set; }
public ushort EntriesCount { get; private set; }
public ushort EntriesCapacity { get; private set; }
public ushort EntriesCount { get; set; }
public ushort EntriesCapacity { get; set; }
// reference data
//public ResourcePointerArray64<T> Entries;
@ -1748,6 +1748,8 @@ namespace CodeWalker.GameFiles
public ulong[] data_pointers { get; private set; }
public T[] data_items { get; set; }
public bool ManualCountOverride = false; //use this to manually specify the count
private ResourcePointerArray64<T> data_block;//used for saving.
@ -1777,8 +1779,11 @@ namespace CodeWalker.GameFiles
{
// update...
this.EntriesPointer = (ulong)(this.data_block != null ? this.data_block.FilePosition : 0);
this.EntriesCount = (ushort)(this.data_block != null ? this.data_block.Count : 0);
this.EntriesCapacity = (ushort)(this.data_block != null ? this.data_block.Count : 0);
if (ManualCountOverride == false)
{
this.EntriesCapacity = (ushort)(this.data_block != null ? this.data_block.Count : 0);
this.EntriesCount = (ushort)(this.data_block != null ? this.data_block.Count : 0);
}
// write...