Skip to content

Commit 47f91cf

Browse files
committed
Merge commit '00fe1f81db9a919def17fd93dd038f1182d01a42' into cn
2 parents 616223c + 00fe1f8 commit 47f91cf

9 files changed

Lines changed: 61 additions & 33 deletions

File tree

FFXIVClientStructs/FFXIV/Client/Graphics/Physics/BoneSimulator.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,20 @@ public unsafe struct BoneSimulator {
1111
[FieldOffset(0x20)] public Vector3 CharacterPosition;
1212
[FieldOffset(0x30)] public Vector3 Gravity;
1313
[FieldOffset(0x40)] public Vector3 Wind;
14+
// The following two values are derived from the PhysicsGroup sheet if applicable to the object.
15+
// They are hardcoded to roughly 1/60 (0.016666668) and 60 (59.999996) in cases where the sheet isn't used.
16+
[FieldOffset(0x50)] public float SimulationTime;
17+
[FieldOffset(0x54)] public float SimulationTimeInv; // 1/SimulationTime
18+
[Obsolete("Use SimulationTimeInv instead")]
1419
[FieldOffset(0x54)] public float Spring; // Default is ~60, intense jitter happens above that value. Lesser values remove the spring in the bone.
1520
[FieldOffset(0xF6)] public bool IsStarted; // Flag that is set to true when the simulator starts, and is quickly reset
1621
[FieldOffset(0xF7)] public bool IsStopped; // Same as Start, but when the simulator is requested to stop
1722
[FieldOffset(0xF8)] public bool IsReset; // When set to true, resets the bone simulator
1823

24+
[FieldOffset(0x444)] public bool IsSimulating;
25+
[FieldOffset(0x445)] public bool IsTimeIntegrating; // Whether the simulator is integrating (time stepping) on this frame
26+
[FieldOffset(0x446)] public bool IsCollidable;
27+
1928
/// <summary> Non-exhaustive list of physics groups </summary>
2029
public enum PhysicsGroup : uint {
2130
Clothing = 2,

FFXIVClientStructs/FFXIV/Client/System/Memory/IMemorySpace.cs

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,14 @@ public unsafe partial struct IMemorySpace {
3737
[MemberFunction("4C 8B D9 0F B6 D2")]
3838
public static partial void Memset(void* ptr, int value, ulong size);
3939

40-
[MemberFunction("E8 ?? ?? ?? ?? 48 8B F0 48 85 C0 74 16 48 3B FB")]
41-
public static partial void* Realloc(void* ptr, ulong size);
42-
43-
[MemberFunction("E8 ?? ?? ?? ?? 33 C9 4C 8B E8")]
44-
public static partial void* Calloc(ulong count, ulong size);
45-
46-
[MemberFunction("E8 ?? ?? ?? ?? 33 C9 48 8B D8 E8 ?? ?? ?? ?? 48 85 DB 74 20")]
47-
public static partial void* Recalloc(void* ptr, ulong count, ulong size);
48-
4940
[VirtualFunction(3)]
5041
public partial void* Malloc(ulong size, ulong alignment);
5142

52-
public void* Malloc<T>(ulong alignment = 8) where T : unmanaged // TODO: return T*
53-
=> Malloc((ulong)sizeof(T), alignment);
54-
55-
public static T* Calloc<T>(ulong count) where T : unmanaged
56-
=> (T*)Calloc(count, (ulong)sizeof(T));
57-
58-
public static T* Recalloc<T>(T* ptr, ulong count) where T : unmanaged
59-
=> (T*)Recalloc(ptr, count, (ulong)sizeof(T));
43+
public void* Malloc<T>(ulong alignment = 8) where T : unmanaged {
44+
return Malloc((ulong)sizeof(T), alignment);
45+
}
6046

61-
public static void Free<T>(T* ptr) where T : unmanaged
62-
=> Free(ptr, (ulong)sizeof(T));
47+
public static void Free<T>(T* ptr) where T : unmanaged {
48+
Free(ptr, (ulong)sizeof(T));
49+
}
6350
}

FFXIVClientStructs/FFXIV/Client/UI/UIModule.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public unsafe partial struct UIModule {
3434
[FieldOffset(0x7F4)] public uint FrameCount;
3535
[FieldOffset(0x7F8)] internal ExcelModuleInterface* ExcelModuleInterface; // this is Component::Excel::ExcelModuleInterface, not Common::Component::Excel::ExcelModuleInterface!
3636
[FieldOffset(0x800)] internal RaptureTextModule RaptureTextModule;
37-
[FieldOffset(0x1668)] internal CompletionModule CompletionModule;
37+
[FieldOffset(0x1668)] public CompletionModule CompletionModule;
3838
[FieldOffset(0x19E0)] internal RaptureLogModule RaptureLogModule;
39-
[FieldOffset(0x60B0)] internal UserFileManager UserFileManager;
39+
[FieldOffset(0x60B0)] public UserFileManager UserFileManager;
4040
[FieldOffset(0x60D0)] internal RaptureMacroModule RaptureMacroModule;
4141
[FieldOffset(0x57B80)] internal RaptureHotbarModule RaptureHotbarModule;
4242
[FieldOffset(0x80910)] internal RaptureGearsetModule RaptureGearsetModule;
@@ -105,19 +105,19 @@ public unsafe partial struct UIModule {
105105
[FieldOffset(0xC8490)] internal RaptureAtkModule RaptureAtkModule;
106106
[FieldOffset(0xF2098)] internal InfoModule InfoModule;
107107
[FieldOffset(0xF3D10)] internal UIModuleHelpers UIModuleHelpers;
108-
[FieldOffset(0xF3D48)] internal Utf8String AddonSheetName;
108+
[FieldOffset(0xF3D48)] public Utf8String AddonSheetName;
109109

110-
[FieldOffset(0xF3DB8)] internal Utf8String UIColorSheetName;
110+
[FieldOffset(0xF3DB8)] public Utf8String UIColorSheetName;
111111

112-
[FieldOffset(0xF3E30)] internal Utf8String CompletionSheetName;
113-
[FieldOffset(0xF3E98)] internal Utf8String CompletionOpenIconMacro;
114-
[FieldOffset(0xF3F00)] internal Utf8String CompletionCloseIconMacro;
115-
[FieldOffset(0xF3F68)] internal Utf8String NewLineMacro;
112+
[FieldOffset(0xF3E30)] public Utf8String CompletionSheetName;
113+
[FieldOffset(0xF3E98)] public Utf8String CompletionOpenIconMacro;
114+
[FieldOffset(0xF3F00)] public Utf8String CompletionCloseIconMacro;
115+
[FieldOffset(0xF3F68)] public Utf8String NewLineMacro;
116116
[FieldOffset(0xF3FD0)] public Utf8String LastTalkName;
117117
[FieldOffset(0xF4038)] public Utf8String LastTalkText;
118118
[FieldOffset(0xF40A0)] internal UIInputData UIInputData;
119119
[FieldOffset(0xF4AD0)] internal UIInputModule UIInputModule;
120-
// [FieldOffset(0xF4BC0)] internal Vf79Struct;
120+
// [FieldOffset(0xF4BC0)] public Vf79Struct;
121121

122122
[MemberFunction("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 20 48 8B F2 48 8B F9 45 84 C9")]
123123
public partial void ProcessChatBoxEntry(Utf8String* message, nint a4 = 0, bool saveToHistory = false);

FFXIVClientStructs/FFXIV/Component/Completion/CompletionModule.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ namespace FFXIVClientStructs.FFXIV.Component.Completion;
1616
public unsafe partial struct CompletionModule {
1717
[FieldOffset(0x18)] public ExcelModuleInterface* ExcelModuleInterface;
1818
[FieldOffset(0x20)] public RaptureTextModule* RaptureTextModule;
19+
[FieldOffset(0x28)] private bool Unk28;
20+
[FieldOffset(0x29)] private byte Unk29;
1921

2022
[FieldOffset(0x30)] public StdVector<Pointer<CategoryData>> CategoryData;
2123
[FieldOffset(0x48)] public StdVector<CStringPointer> CategoryNames;
@@ -29,8 +31,8 @@ public unsafe partial struct CompletionModule {
2931

3032
[FieldOffset(0x278)] public StdVector<Utf8String> CompanionNames;
3133
[FieldOffset(0x290)] public StdVector<SheetName> SheetNames;
32-
[FieldOffset(0x2A8)] private Utf8String Unk2A8;
33-
[FieldOffset(0x310)] private Utf8String Unk310;
34+
[FieldOffset(0x2A8)] public Utf8String OpenIconMacro;
35+
[FieldOffset(0x310)] public Utf8String CloseIconMacro;
3436

3537
[MemberFunction("E8 ?? ?? ?? ?? 48 8B 1B 41 FF C7"), GenerateStringOverloads]
3638
public partial void AddCompletionEntry(long groupIndex, uint rowId, CStringPointer itemText, CStringPointer groupTitle, ushort itemKey);
@@ -41,6 +43,9 @@ public unsafe partial struct CompletionModule {
4143
[MemberFunction("E8 ?? ?? ?? ?? 48 8D 8D ?? ?? ?? ?? E8 ?? ?? ?? ?? 4C 8B 6C 24 ??")]
4244
public partial void ClearCompletionData();
4345

46+
[MemberFunction("E8 ?? ?? ?? ?? 49 8D 8E ?? ?? ?? ?? 0F 28 CE")]
47+
public partial void Update(Utf8String* completionSheetName, Utf8String* openIconMacro, Utf8String* closeIconMacro, nint a5);
48+
4449
[VirtualFunction(5)]
4550
public partial int GetSelection(CategoryData.CompletionDataStruct* dataStructs, int index, Utf8String* outputString, Utf8String* outputDisplayString);
4651

FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentBase.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ public unsafe partial struct AtkComponentBase : ICreatable {
2121
[MemberFunction("48 8D 05 ?? ?? ?? ?? C7 81 ?? ?? ?? ?? ?? ?? ?? ?? 48 89 01 33 C0 48 89 41 08")]
2222
public partial void Ctor();
2323

24+
[MemberFunction("E8 ?? ?? ?? ?? 83 F8 0E 75 2B")]
25+
public partial ComponentType GetComponentType();
26+
2427
[MemberFunction("E8 ?? ?? ?? ?? 8B 53 F8")]
2528
public partial AtkResNode* GetNodeById(uint id);
2629

FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentInputBase.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ public unsafe partial struct AtkComponentInputBase {
1616
[FieldOffset(0x148)] public Utf8String UnkText2;
1717
[FieldOffset(0x1B0)] public AtkUnitBase* ContainingAddon;
1818
[FieldOffset(0x1D0)] public AtkUldComponentDataInputBase InputDataBase;
19+
[FieldOffset(0x1C4)] public int SelectionStart;
20+
[FieldOffset(0x1C8)] public int SelectionEnd;
21+
[FieldOffset(0x1CC)] public int CursorPos;
1922
}

FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentTextInput.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public unsafe partial struct AtkComponentTextInput : ICreatable {
2121
[FieldOffset(0x1F0)] public AtkUldComponentDataTextInput ComponentTextData;
2222
[FieldOffset(0x250), Obsolete("Use ComponentTextData.MaxByte instead")] public uint MaxTextLength;
2323
[FieldOffset(0x254), Obsolete("Use ComponentTextData.MaxChar instead")] public uint MaxTextLength2;
24-
[FieldOffset(0x26C)] public ushort InputSanitizationFlags; // passed to SanitizeString
24+
[FieldOffset(0x26C)] public ushort InputSanitizationFlags; // passed to SanitizeString // TODO: change type to AllowedEntities
2525

2626
[FieldOffset(0x280)] public Utf8String UnkText01;
2727
[FieldOffset(0x2E8)] public Utf8String UnkText02;

FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using FFXIVClientStructs.FFXIV.Client.UI;
44
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
55
using FFXIVClientStructs.FFXIV.Component.Completion;
6+
using FFXIVClientStructs.FFXIV.Component.Text;
67

78
namespace FFXIVClientStructs.FFXIV.Component.GUI;
89

@@ -14,16 +15,33 @@ public unsafe partial struct AtkTextInput {
1415
[FieldOffset(0x18)] public TextService* TextService;
1516
[FieldOffset(0x20), FixedSizeArray] internal FixedSizeArray19<Pointer<RaptureAtkHistory>> _atkHistory;
1617
[FieldOffset(0xC0)] public RaptureTextModule* RaptureTextModule;
18+
[FieldOffset(0xC8)] public TextChecker* TextChecker;
1719
[FieldOffset(0xD0)] public AtkFontCodeModule* AtkFontCodeModule;
20+
21+
[FieldOffset(0xDA)] public short CursorPos;
22+
[FieldOffset(0xDC)] public short TextLength;
23+
[FieldOffset(0xDE)] public short SelectionEnd;
24+
[FieldOffset(0xE0)] public short SelectionStart;
25+
1826
[FieldOffset(0x1C0)] public ClipBoard ClipboardData;
1927
[FieldOffset(0x298)] public Utf8String CopyBufferRaw;
2028
[FieldOffset(0x300)] public Utf8String CopyBufferFiltered;
21-
[FieldOffset(0xBF0)] public uint CompletionDepth;
29+
30+
[FieldOffset(0xBF0)] public uint CompletionDepth; // TODO: should be (u)short
31+
32+
[FieldOffset(0xC10)] public AllowedEntities InputSanitizationFlags;
33+
34+
/// <remarks> Call this only if <see cref="InputSanitizationFlags"/> has Payloads! </remarks>
35+
[MemberFunction("E8 ?? ?? ?? ?? E9 ?? ?? ?? ?? 48 8B 4E 18 48 8B 01")]
36+
public partial void OpenCompletion();
2237

2338
// Component::GUI::AtkTextInput::AtkTextInputEventInterface
2439
// no explicit constructor, just an event interface
2540
[GenerateInterop(true)]
2641
[VirtualTable("48 89 86 ?? ?? ?? ?? 48 8D 05 ?? ?? ?? ?? 48 89 86 ?? ?? ?? ?? E8 ?? ?? ?? ?? 40 F6 C5 01", 10, 5)]
2742
[StructLayout(LayoutKind.Explicit, Size = 0x8)]
28-
public unsafe partial struct AtkTextInputEventInterface;
43+
public unsafe partial struct AtkTextInputEventInterface {
44+
[VirtualFunction(4)]
45+
public partial AtkResNode* GetOwnerNode();
46+
}
2947
}

ida/data.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,7 @@ classes:
901901
- ea: 0x142039CA0
902902
vfuncs:
903903
0: Dtor
904+
4: GetOwnerNode
904905
Component::GUI::AtkGrid:
905906
vtbls:
906907
- ea: 0x1420396F0
@@ -910,6 +911,7 @@ classes:
910911
base: Client::System::Input::TextServiceInterface::TextServiceEvent
911912
funcs:
912913
0x1406459C0: ctor
914+
0x140649690: OpenCompletion
913915
Component::Text::TextChecker::ExecNonMacroFunc:
914916
vtbls:
915917
- ea: 0x142009010
@@ -7233,6 +7235,7 @@ classes:
72337235
funcs:
72347236
0x14064A920: ctor
72357237
0x14064ABA0: GetOwnerNodePosition
7238+
0x14064AC90: GetComponentType
72367239
0x14064AEC0: GetNodeById
72377240
0x14064AF20: GetComponentById
72387241
0x14064AFD0: GetComponentIconTextById

0 commit comments

Comments
 (0)