Working on PathResolver

This commit is contained in:
Ottermandias 2022-03-16 14:33:25 +01:00
parent 6f527a1dbc
commit e7282384f5
29 changed files with 1170 additions and 527 deletions

View file

@ -0,0 +1,28 @@
using System.Runtime.InteropServices;
namespace Penumbra.Interop.Structs;
[StructLayout( LayoutKind.Explicit )]
public unsafe struct MtrlResource
{
[FieldOffset( 0x00 )]
public ResourceHandle Handle;
[FieldOffset( 0xD0 )]
public ushort* TexSpace; // Contains the offsets for the tex files inside the string list.
[FieldOffset( 0xE0 )]
public byte* StringList;
[FieldOffset( 0xF8 )]
public ushort ShpkOffset;
[FieldOffset( 0xFA )]
public byte NumTex;
public byte* ShpkString
=> StringList + ShpkOffset;
public byte* TexString( int idx )
=> StringList + *( TexSpace + 4 + idx * 8 );
}