Skip to content

Commit 6adbdb2

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents df0a5b3 + 7cfe7d7 commit 6adbdb2

23 files changed

Lines changed: 921 additions & 146 deletions

FFXIVClientStructs/FFXIV/Client/Game/Event/ShopEventHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public unsafe partial struct ShopItem {
7575
[FieldOffset(0x98)] public uint SubRowId; // in GilShopItem sheet, corresponding to this item; note that items could be sorted after loading
7676
[FieldOffset(0x9C)] public byte CategoryOrderMajor;
7777
[FieldOffset(0x9D)] public byte CategoryOrderMinor;
78-
// 0xA0: int, col 19 in Item row
78+
[FieldOffset(0xA0)] public int SubcategorySort;
7979
[FieldOffset(0xA4)] public ushort StateRequired; // column in GilShopItem row
8080
[FieldOffset(0xA6)] public ushort PatchAdded;
8181
}

FFXIVClientStructs/FFXIV/Client/Game/Housing/IndoorTerritory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public unsafe partial struct IndoorTerritory {
4242
[FieldOffset(0x12828)] public IndoorTerritoryAquariumData AquariumData;
4343
[FieldOffset(0x12880)] public InventoryType StoreroomItemInventoryType;
4444
[FieldOffset(0x12884)] public short StoreroomItemInventorySlot;
45-
[FieldOffset(0x12886)] private bool StoreroomItemInventoryUnk;
45+
[FieldOffset(0x12886)] public bool StoreroomItemInventoryIsPadModeEnabled;
4646

4747
[FieldOffset(0x12890)] public Vector3 StoreroomItemPlacePosition;
4848
[FieldOffset(0x128A0)] public float StoreroomItemPlaceRotation;
@@ -61,7 +61,7 @@ public unsafe partial struct IndoorTerritory {
6161
[FieldOffset(0x128E4)] public bool SSAOEnable;
6262
[FieldOffset(0x128E5)] public byte SavedInvertedBrightness;
6363
[FieldOffset(0x128E6)] public bool SavedSSAOEnable;
64-
[FieldOffset(0x128E7)] private byte Unk99B7;
64+
[FieldOffset(0x128E7)] public bool FurniturePlacedWithPadModeEnabled;
6565
[FieldOffset(0x128E8)] private byte Unk99B8;
6666
[FieldOffset(0x128E9)] private byte Unk99B9;
6767
[FieldOffset(0x128EA)] public bool ShowStoreroomTab; // in the "Indoor Furnishings" window

FFXIVClientStructs/FFXIV/Client/Game/Housing/OutdoorTerritory.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public unsafe partial struct OutdoorTerritory {
3737
[FieldOffset(0x12AB0)] public HousingTerritory.HousingTerritoryUIEventListener UIEventListener2;
3838
[FieldOffset(0x12AD8)] public OutdoorPlotExteriorData EditingPlotExteriorDataBackup;
3939

40+
[FieldOffset(0x12B1C)] public bool FurniturePlacedWithPadModeEnabled;
41+
4042
[FieldOffset(0x12B20)] public HouseBuddy HouseBuddy;
4143

4244
[FieldOffset(0x130D4), FixedSizeArray] internal FixedSizeArray62<HousingMapMarkerInfo> _housingMapMarkerInfos;

FFXIVClientStructs/FFXIV/Client/Game/WKS/WKSManager.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,31 @@ public unsafe partial struct WKSManager {
1414

1515
[FieldOffset(0x18)] public ushort TerritoryId;
1616

17-
[FieldOffset(0x50)] private WKSState State; // TODO: use this instead of the fields
17+
[FieldOffset(0x50)] public WKSState State;
1818

1919
/// <remarks> RowId of WKSDevGrade sheet. </remarks>
20-
[FieldOffset(0x5A), CExporterIgnore] public ushort DevGrade;
20+
[FieldOffset(0x5A), Obsolete("Use State.DevGrade")] public ushort DevGrade;
2121

2222
/// <remarks> For Hub upgrades. RowId of WKSFateControl sheet. </remarks>
23-
[FieldOffset(0x60), CExporterIgnore] public ushort CurrentFateControlRowId;
23+
[FieldOffset(0x60), Obsolete("Use State.CurrentFateControlRowId")] public ushort CurrentFateControlRowId;
2424
/// <remarks> For Hub upgrades. Id of Fate in FateManager. </remarks>
25-
[FieldOffset(0x62), CExporterIgnore] public ushort CurrentFateId;
25+
[FieldOffset(0x62), Obsolete("Use State.CurrentFateId")] public ushort CurrentFateId;
2626

2727
/// <remarks> RowId of WKSMissionUnit sheet. </remarks>
28-
[FieldOffset(0xE80), CExporterIgnore] public ushort CurrentMissionUnitRowId;
28+
[FieldOffset(0xE80), Obsolete("Use State.CurrentMissionUnitRowId")] public ushort CurrentMissionUnitRowId;
2929

30-
[FieldOffset(0xE8C), CExporterIgnore] public uint CurrentScore;
31-
[FieldOffset(0xE90), CExporterIgnore] public MissionRank CurrentRank;
30+
[FieldOffset(0xE8C), Obsolete("Use State.CurrentScore")] public uint CurrentScore;
31+
[FieldOffset(0xE90), Obsolete("Use State.CurrentRank")] public MissionRank CurrentRank;
3232

33-
[FieldOffset(0xE96), CExporterIgnore] public ushort CollectedTotal;
34-
[FieldOffset(0xE98), CExporterIgnore] public byte CollectedIndividual;
33+
[FieldOffset(0xE96), Obsolete("Use State.CollectedTotal")] public ushort CollectedTotal;
34+
[FieldOffset(0xE98), Obsolete("Use State.CollectedIndividual")] public byte CollectedIndividual;
3535

36-
[FieldOffset(0xEC4), CExporterIgnore] public uint FishingBait;
36+
[FieldOffset(0xEC4), Obsolete("Use State.FishingBait")] public uint FishingBait;
3737

38-
[FieldOffset(0xED1), FixedSizeArray, CExporterIgnore] internal FixedSizeArray213<byte> _missionCompletionFlags;
39-
[FieldOffset(0xFA6), FixedSizeArray, CExporterIgnore] internal FixedSizeArray213<byte> _missionGoldFlags;
38+
[FieldOffset(0xED1), FixedSizeArray, Obsolete("Use State.MissionCompletionFlags")] internal FixedSizeArray213<byte> _missionCompletionFlags;
39+
[FieldOffset(0xFA6), FixedSizeArray, Obsolete("Use State.MissionGoldFlags")] internal FixedSizeArray213<byte> _missionGoldFlags;
4040

41-
[FieldOffset(0x107C), FixedSizeArray, CExporterIgnore] internal FixedSizeArray11<int> _scores; // cosmic class scores
41+
[FieldOffset(0x107C), FixedSizeArray, Obsolete("Use State.Scores")] internal FixedSizeArray11<int> _scores; // cosmic class scores
4242

4343
[FieldOffset(0x10F8)] private void* UnkStruct10F8;
4444
[FieldOffset(0x1100)] private void* UnkStruct1100;
@@ -54,9 +54,9 @@ public unsafe partial struct WKSManager {
5454
[FieldOffset(0x1150)] private void* UnkStruct1150;
5555
[FieldOffset(0x1158)] public StdVector<Pointer<WKSModuleBase>> Modules;
5656

57-
public bool IsMissionCompleted(uint missionUnitId) => MissionCompletionFlags.CheckBitInSpan(missionUnitId);
57+
public bool IsMissionCompleted(uint missionUnitId) => State.MissionCompletionFlags.CheckBitInSpan(missionUnitId);
5858

59-
public bool IsMissionGolded(uint missionUnitId) => MissionGoldFlags.CheckBitInSpan(missionUnitId);
59+
public bool IsMissionGolded(uint missionUnitId) => State.MissionGoldFlags.CheckBitInSpan(missionUnitId);
6060

6161
public enum MissionRank {
6262
None,
@@ -68,7 +68,7 @@ public enum MissionRank {
6868

6969
[GenerateInterop]
7070
[StructLayout(LayoutKind.Explicit, Size = 0x1088)]
71-
internal partial struct WKSState {
71+
public partial struct WKSState {
7272
/// <remarks> RowId of WKSDevGrade sheet. </remarks>
7373
[FieldOffset(0x0A)] public ushort DevGrade;
7474

FFXIVClientStructs/FFXIV/Client/Graphics/Render/PartialSkeleton.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ public unsafe partial struct PartialSkeleton {
1414
[FieldOffset(0x138), FixedSizeArray] internal FixedSizeArray2<ulong> _havokAnimatedSkeletons;
1515
[FieldOffset(0x148), FixedSizeArray] internal FixedSizeArray4<ulong> _havokPoses;
1616
[FieldOffset(0x168)] public Skeleton* Skeleton;
17-
[FieldOffset(0x188)] public void* SkeletonParameterResourceHandle;
17+
[FieldOffset(0x188)] public SkeletonParamResourceHandle* SkeletonParamResourceHandle;
18+
[FieldOffset(0x188), Obsolete("Use SkeletonParamResourceHandle")] public void* SkeletonParameterResourceHandle;
1819
[FieldOffset(0x190)] public SkeletonResourceHandle* SkeletonResourceHandle;
1920
// 190, 1A0, 1B0 are std set i think, dont know what of
2021

FFXIVClientStructs/FFXIV/Client/Graphics/Scene/CharacterBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ public string ResolveEidPath() {
391391
public partial nint CreateDeformer(uint slotIndex);
392392

393393
[VirtualFunction(102)]
394-
public partial Model* CreateRenderModel(uint slotIndex, ModelResourceHandle* modelResourceHandle, nint deformer /* return value of CreateDeformer */);
394+
public partial Model* CreateRenderModel(ModelResourceHandle* modelResourceHandle, nint deformer /* return value of CreateDeformer */);
395395

396396
[VirtualFunction(108)]
397397
public partial bool IsFreeCompanyCrestVisibleOnSlot(byte slot);
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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+
}

FFXIVClientStructs/FFXIV/Client/System/Resource/ResourceGraph.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ public partial struct CategoryContainer {
2020
[FieldOffset(0x0), FixedSizeArray] internal FixedSizeArray20<CategoryContainer> _containers;
2121

2222
[UnscopedRef] public ref CategoryContainer GetContainer(ResourceCategory category) => ref Containers[(int)category];
23+
24+
[MemberFunction("E8 ?? ?? ?? ?? 48 8B D8 48 85 C0 0F 85 ?? ?? ?? ?? 48 8B 84 24")]
25+
public partial ResourceHandle* FindResourceHandle(ResourceCategory* category, uint* type, uint* hash);
2326
}

FFXIVClientStructs/FFXIV/Client/System/Resource/ResourceManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ public unsafe partial struct ResourceManager {
1212

1313
[FieldOffset(0x8)] public ResourceGraph* ResourceGraph;
1414

15-
[MemberFunction("E8 ?? ?? ?? ?? 48 8B D8 48 85 C0 0F 85 ?? ?? ?? ?? 48 8B 84 24")]
16-
public partial ResourceHandle* FindResourceHandle(ResourceCategory* category, uint* type, uint* hash);
15+
[Obsolete("Use ResourceGraph->FindResourceHandle() instead")]
16+
public ResourceHandle* FindResourceHandle(ResourceCategory* category, uint* type, uint* hash) => ResourceGraph->FindResourceHandle(category, type, hash);
1717

1818
[MemberFunction("E8 ?? ?? ?? ?? 48 8B C8 8B C3 F0 0F C0 81"), GenerateStringOverloads]
1919
public partial ResourceHandle* GetResourceSync(ResourceCategory* category, uint* type, uint* hash, CStringPointer path, void* unknown, void* unkDebugPtr, uint unkDebugInt);

FFXIVClientStructs/FFXIV/Client/UI/Agent/AgentEmjVoiceCharacter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ public unsafe partial struct AgentEmjVoiceCharacter {
2626
[FieldOffset(0x48)] public uint HighlightedEmjVoiceNpc;
2727
[FieldOffset(0x4C)] public uint SelectedEmjVoiceNpc;
2828
/// <summary>
29-
/// Id mappes to subrow id of EmjCostume
29+
/// Id maps to subrow id of EmjCostume
3030
/// </summary>
3131
[FieldOffset(0x50)] public uint SelectedAttire;
3232
[FieldOffset(0x54)] private uint Unk54;
3333
/// <summary>
34-
/// Ids mappes to subrow id of EmjCostume
34+
/// Ids maps to subrow id of EmjCostume
3535
/// </summary>
3636
[FieldOffset(0x58)] public StdVector<uint> SelectedAttires;
3737
[FieldOffset(0x70)] public StdVector<EmjCostume> SelectedCostumeRows;

0 commit comments

Comments
 (0)