mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-23 00:49:18 +01:00
Resource Tree: Improve mtrl and sklb support
This commit is contained in:
parent
ecfe88faa6
commit
ccc0b51a99
5 changed files with 129 additions and 43 deletions
|
|
@ -9,37 +9,43 @@ public class ResourceNode
|
|||
{
|
||||
public readonly string? Name;
|
||||
public readonly ResourceType Type;
|
||||
public readonly nint SourceAddress;
|
||||
public readonly nint ObjectAddress;
|
||||
public readonly nint ResourceHandle;
|
||||
public readonly Utf8GamePath GamePath;
|
||||
public readonly Utf8GamePath[] PossibleGamePaths;
|
||||
public readonly FullPath FullPath;
|
||||
public readonly ulong Length;
|
||||
public readonly bool Internal;
|
||||
public readonly List<ResourceNode> Children;
|
||||
|
||||
public ResourceNode(string? name, ResourceType type, nint sourceAddress, Utf8GamePath gamePath, FullPath fullPath, bool @internal)
|
||||
public ResourceNode(string? name, ResourceType type, nint objectAddress, nint resourceHandle, Utf8GamePath gamePath, FullPath fullPath, ulong length, bool @internal)
|
||||
{
|
||||
Name = name;
|
||||
Type = type;
|
||||
SourceAddress = sourceAddress;
|
||||
GamePath = gamePath;
|
||||
Name = name;
|
||||
Type = type;
|
||||
ObjectAddress = objectAddress;
|
||||
ResourceHandle = resourceHandle;
|
||||
GamePath = gamePath;
|
||||
PossibleGamePaths = new[]
|
||||
{
|
||||
gamePath,
|
||||
};
|
||||
FullPath = fullPath;
|
||||
Length = length;
|
||||
Internal = @internal;
|
||||
Children = new List<ResourceNode>();
|
||||
}
|
||||
|
||||
public ResourceNode(string? name, ResourceType type, nint sourceAddress, Utf8GamePath[] possibleGamePaths, FullPath fullPath,
|
||||
bool @internal)
|
||||
public ResourceNode(string? name, ResourceType type, nint objectAddress, nint resourceHandle, Utf8GamePath[] possibleGamePaths, FullPath fullPath,
|
||||
ulong length, bool @internal)
|
||||
{
|
||||
Name = name;
|
||||
Type = type;
|
||||
SourceAddress = sourceAddress;
|
||||
ObjectAddress = objectAddress;
|
||||
ResourceHandle = resourceHandle;
|
||||
GamePath = possibleGamePaths.Length == 1 ? possibleGamePaths[0] : Utf8GamePath.Empty;
|
||||
PossibleGamePaths = possibleGamePaths;
|
||||
FullPath = fullPath;
|
||||
Length = length;
|
||||
Internal = @internal;
|
||||
Children = new List<ResourceNode>();
|
||||
}
|
||||
|
|
@ -48,10 +54,12 @@ public class ResourceNode
|
|||
{
|
||||
Name = name;
|
||||
Type = originalResourceNode.Type;
|
||||
SourceAddress = originalResourceNode.SourceAddress;
|
||||
ObjectAddress = originalResourceNode.ObjectAddress;
|
||||
ResourceHandle = originalResourceNode.ResourceHandle;
|
||||
GamePath = originalResourceNode.GamePath;
|
||||
PossibleGamePaths = originalResourceNode.PossibleGamePaths;
|
||||
FullPath = originalResourceNode.FullPath;
|
||||
Length = originalResourceNode.Length;
|
||||
Internal = originalResourceNode.Internal;
|
||||
Children = originalResourceNode.Children;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue