diff --git a/FFXIVClientStructs/FFXIV/Client/Graphics/Scene/BgObject.cs b/FFXIVClientStructs/FFXIV/Client/Graphics/Scene/BgObject.cs index 67fab6856..748bf85bb 100644 --- a/FFXIVClientStructs/FFXIV/Client/Graphics/Scene/BgObject.cs +++ b/FFXIVClientStructs/FFXIV/Client/Graphics/Scene/BgObject.cs @@ -1,3 +1,4 @@ +using FFXIVClientStructs.FFXIV.Client.System.Resource; using FFXIVClientStructs.FFXIV.Client.System.Resource.Handle; using FFXIVClientStructs.FFXIV.Common.Math; @@ -15,6 +16,37 @@ public unsafe partial struct BgObject { [FieldOffset(0xA0)] internal Matrix4x4* CachedTransformMatrices; [FieldOffset(0xA8)] public BgObjectStainBuffer* StainBuffer; [FieldOffset(0xB0)] internal Transform* CachedTransform; + [FieldOffset(0xB8)] public BgObjectAnimationData* LoadedAnimationData; // Not null even if no skeleton or animation were found + + /// + /// Loads the skeleton and animation for this BgObject, if any. + /// + /// + /// The skeleton and animation resources are found by changing the extension of the given model resource path + /// to .sklb and .pap, respectively, and are loaded async. + /// + /// The path of the model resource. + /// Whether a skeleton and animation were found. + [GenerateStringOverloads] + [MemberFunction("E8 ?? ?? ?? ?? 0F B6 8B ?? ?? ?? ?? 84 C0 74 21")] + public partial bool LoadAnimationData(CStringPointer modelResourcePath); + + /// + /// Resets the , , and + /// for this BgObject during its creation. + /// + [MemberFunction("E8 ?? ?? ?? ?? 48 8B 0D ?? ?? ?? ?? 48 8B D3 E8 ?? ?? ?? ?? 48 8B CB E8 ?? ?? ?? ?? 48 8D 4C 24 ??")] + public partial void ResetFlags(); + + /// + /// Loads the model resource at the given path. + /// + /// The resource category that contains the model resource. + /// The path of the model resource. + /// Success or failure. + [MemberFunction("48 89 5C 24 ?? 57 48 83 EC 30 48 8B C2 C7 44 24 ?? ?? ?? ?? ??")] + [GenerateStringOverloads] + public partial bool SetModel(ResourceCategory* modelResourceCategory, CStringPointer modelResourcePath); [GenerateStringOverloads] [MemberFunction("E8 ?? ?? ?? ?? 48 89 43 30 48 8B D7")] @@ -54,3 +86,10 @@ public struct BgObjectStainBuffer { /// [FieldOffset(0x04)] public Vector4 LinearFloatColor; } + +[StructLayout(LayoutKind.Explicit, Size = 0x120)] +public unsafe struct BgObjectAnimationData { + [FieldOffset(0x00)] public CharacterBase.SkeletonAnimationContainer SkeletonAnimationContainer; + [FieldOffset(0x100)] public SkeletonResourceHandle* AsyncSkeletonResourceHandle; + [FieldOffset(0x108)] public ResourceHandle* AsyncPapResourceHandle; +} diff --git a/ida/data.yml b/ida/data.yml index 3285924cc..8313e1623 100644 --- a/ida/data.yml +++ b/ida/data.yml @@ -7410,6 +7410,9 @@ classes: funcs: 0x14043DB80: ctor 0x1407743A0: Create + 0x140440160: LoadAnimationData + 0x14043DC20: ResetFlags + 0x14043E040: SetModel Client::Graphics::Scene::EnvScene: vtbls: - ea: 0x142098ED8