Add handling for the 1.0 Decal texture.

This commit is contained in:
Ottermandias 2022-09-19 18:52:49 +02:00
parent 57e66f9b66
commit ea023ebb5c
9 changed files with 147 additions and 17 deletions

View file

@ -80,6 +80,9 @@ public unsafe struct CharacterUtility
BodyEst,
}
public const int IndexTransparentTex = 72;
public const int IndexDecalTex = 73;
public static readonly Index[] EqdpIndices = Enum.GetNames< Index >()
.Zip( Enum.GetValues< Index >() )
.Where( n => n.First.StartsWith( "Eqdp" ) )
@ -157,5 +160,11 @@ public unsafe struct CharacterUtility
[FieldOffset( 8 + ( int )Index.HeadEst * 8 )]
public ResourceHandle* HeadEstResource;
[FieldOffset( 8 + IndexTransparentTex * 8 )]
public TextureResourceHandle* TransparentTexResource;
[FieldOffset( 8 + IndexDecalTex * 8 )]
public TextureResourceHandle* DecalTexResource;
// not included resources have no known use case.
}

View file

@ -5,6 +5,22 @@ using Penumbra.GameData.Enums;
namespace Penumbra.Interop.Structs;
[StructLayout( LayoutKind.Explicit )]
public unsafe struct TextureResourceHandle
{
[FieldOffset( 0x0 )]
public ResourceHandle Handle;
[FieldOffset( 0x38 )]
public IntPtr Unk;
[FieldOffset( 0x118 )]
public IntPtr KernelTexture;
[FieldOffset( 0x20 )]
public IntPtr NewKernelTexture;
}
[StructLayout( LayoutKind.Explicit )]
public unsafe struct ResourceHandle
{