|
| 1 | +using FFXIVClientStructs.Havok.Common.Base.Math.Vector; |
| 2 | + |
| 3 | +namespace FFXIVClientStructs.FFXIV.Client.System.Resource.Handle; |
| 4 | + |
| 5 | +// Client::System::Resource::Handle::SkeletonParamResourceHandle |
| 6 | +// Client::System::Resource::Handle::DefaultResourceHandle |
| 7 | +// Client::System::Resource::Handle::ResourceHandle |
| 8 | +// Client::System::Common::NonCopyable |
| 9 | +[GenerateInterop] |
| 10 | +[Inherits<DefaultResourceHandle>] |
| 11 | +[StructLayout(LayoutKind.Explicit, Size = 0x148)] |
| 12 | +public unsafe partial struct SkeletonParamResourceHandle { |
| 13 | + [FieldOffset(0xC0)] public SklpHeader Header; |
| 14 | + [FieldOffset(0xE0)] public SklpLookAt LookAt; |
| 15 | + [FieldOffset(0x100)] public SklpSlope Slope; |
| 16 | + [FieldOffset(0x128)] public SklpFeet Feet; |
| 17 | + |
| 18 | + [StructLayout(LayoutKind.Explicit, Size = 0x20)] |
| 19 | + public struct SklpHeader { |
| 20 | + [FieldOffset(0x00), FixedSizeArray(isString: true)] internal FixedSizeArray4<byte> _magic; |
| 21 | + [FieldOffset(0x04), FixedSizeArray(isString: true)] internal FixedSizeArray4<byte> _version; |
| 22 | + [FieldOffset(0x08)] public SkpFlag Flags; |
| 23 | + [FieldOffset(0x0C)] public uint HeaderSize; |
| 24 | + [FieldOffset(0x10)] public uint LookAtOffset; |
| 25 | + [FieldOffset(0x14)] public uint CCDOffset; |
| 26 | + [FieldOffset(0x18)] public uint FeetOffset; |
| 27 | + [FieldOffset(0x1C)] public uint SlopeOffset; |
| 28 | + } |
| 29 | + |
| 30 | + [StructLayout(LayoutKind.Explicit, Size = 0x20)] |
| 31 | + public partial struct SklpLookAt { |
| 32 | + [FieldOffset(0x00)] public byte ParameterCount; |
| 33 | + [FieldOffset(0x01)] public byte GroupCount; |
| 34 | + [FieldOffset(0x08)] public byte* GroupElementCount; |
| 35 | + [FieldOffset(0x10)] public LookAtParam* Parameters; |
| 36 | + [FieldOffset(0x18)] public LookAtGroup* Groups; |
| 37 | + |
| 38 | + public Span<LookAtParam> ParametersSpan => new(Parameters, ParameterCount); |
| 39 | + public Span<LookAtGroup> GroupsSpan => new(Groups, GroupCount); |
| 40 | + |
| 41 | + [StructLayout(LayoutKind.Explicit, Size = 0x38)] |
| 42 | + public struct LookAtParam { |
| 43 | + [FieldOffset(0x00)] public hkVector4f ForwardLookAtVector; |
| 44 | + [FieldOffset(0x10)] public float ForwardRotationX; |
| 45 | + [FieldOffset(0x14)] public float ForwardRotationY; |
| 46 | + [FieldOffset(0x18)] public float ForwardRotationZ; |
| 47 | + [FieldOffset(0x1C)] public float LimitAngle; |
| 48 | + [FieldOffset(0x20)] public float EyePositionX; |
| 49 | + [FieldOffset(0x24)] public float EyePositionY; |
| 50 | + [FieldOffset(0x28)] public float EyePositionZ; |
| 51 | + [FieldOffset(0x2C)] public uint Flags; |
| 52 | + [FieldOffset(0x30)] public float Gain; |
| 53 | + [FieldOffset(0x34)] public uint Index; |
| 54 | + } |
| 55 | + |
| 56 | + [GenerateInterop] |
| 57 | + [StructLayout(LayoutKind.Explicit, Size = 0x30)] |
| 58 | + public partial struct LookAtGroup { |
| 59 | + [FieldOffset(0x00), FixedSizeArray(isString: true)] internal FixedSizeArray8<byte> _groupId; |
| 60 | + [FieldOffset(0x20)] public byte ElementCount; |
| 61 | + [FieldOffset(0x28)] public LookAtElement* Elements; |
| 62 | + |
| 63 | + public Span<LookAtElement> ElementsSpan => new(Elements, ElementCount); |
| 64 | + } |
| 65 | + |
| 66 | + [GenerateInterop] |
| 67 | + [StructLayout(LayoutKind.Explicit, Size = 0x42)] |
| 68 | + public partial struct LookAtElement { |
| 69 | + [FieldOffset(0x00)] public byte Priority; |
| 70 | + [FieldOffset(0x01)] public byte SetupParameterIndex; |
| 71 | + [FieldOffset(0x02), FixedSizeArray(isString: true)] internal FixedSizeArray14<byte> _boneName; |
| 72 | + [FieldOffset(0x22), FixedSizeArray(isString: true)] internal FixedSizeArray14<byte> _parentBoneName; |
| 73 | + } |
| 74 | + } |
| 75 | + |
| 76 | + [StructLayout(LayoutKind.Explicit, Size = 0x28)] |
| 77 | + public struct SklpSlope; |
| 78 | + |
| 79 | + [StructLayout(LayoutKind.Explicit, Size = 0x20)] |
| 80 | + public struct SklpFeet; |
| 81 | +} |
| 82 | + |
| 83 | +[Flags] |
| 84 | +public enum SkpFlag { |
| 85 | + Animation = 0x01, |
| 86 | + LookAt = 0x02, |
| 87 | + CCD = 0x04, |
| 88 | + Feet = 0x08, |
| 89 | + Slope = 0x10 |
| 90 | +} |
0 commit comments