Skip to content

Commit

Permalink
Fix various types (#1245)
Browse files Browse the repository at this point in the history
* Fix various return types

* Fix type of SubView.Camera

* Fix type of GameMain.CurrentTerritoryIntendedUseId

* Fix comment

---------

Co-authored-by: wolfcomp <[email protected]>
  • Loading branch information
Haselnussbomber and wolfcomp authored Mar 9, 2025
1 parent 59b01af commit 11ef0f5
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion FFXIVClientStructs/FFXIV/Client/Game/GameMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public unsafe partial struct GameMain {
[FieldOffset(0x4098)] public uint TerritoryLoadState; // 1 = loading, 2 = loaded, 3 = unloading/shutting down
[FieldOffset(0x409C)] public uint NextTerritoryTypeId;
[FieldOffset(0x40A0)] public uint CurrentTerritoryTypeId; // can be 0 during loading screens
[FieldOffset(0x40A4)] public uint CurrentTerritoryIntendedUseId;
[FieldOffset(0x40A4)] public byte CurrentTerritoryIntendedUseId;
[FieldOffset(0x40A8)] public uint CurrentTerritoryFilterKey;
[FieldOffset(0x40AC)] public ushort CurrentContentFinderConditionId;
[FieldOffset(0x40B0)] public uint TransitionTerritoryTypeId;
Expand Down
2 changes: 1 addition & 1 deletion FFXIVClientStructs/FFXIV/Client/Graphics/Render/SubView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public unsafe struct SubView {
// TODO check and update for 7.0
[FieldOffset(0x8)] public uint Flags;
[FieldOffset(0x10)] public Rectangle ViewportRegion;
[FieldOffset(0x20)] public void* Camera; // Client::Graphics::Render::Camera
[FieldOffset(0x20)] public Camera* Camera;
[FieldOffset(0x28)] public Texture* RenderTarget_1;
[FieldOffset(0x30)] public Texture* RenderTarget_2;
[FieldOffset(0x38)] public Texture* RenderTarget_3;
Expand Down
2 changes: 1 addition & 1 deletion FFXIVClientStructs/FFXIV/Client/Graphics/Scene/Camera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public unsafe partial struct Camera {
[FieldOffset(0xE0)] public Render.Camera* RenderCamera;

[MemberFunction("E8 ?? ?? ?? ?? 4C 8B E0 48 8B EB")]
public partial void ScreenPointToRay(Ray* ray, int x, int y);
public partial Ray* ScreenPointToRay(Ray* ray, int x, int y);

[MemberFunction("E8 ?? ?? ?? ?? 0F 28 C7 0F 28 CE")]
public static partial Vector2* WorldToScreenPoint(Vector2* screenPoint, Vector3* worldPoint);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace FFXIVClientStructs.FFXIV.Client.UI.Info;

// Client::UI::Info::InfoProxyBlacklist
// Client::UI::Info::InfoProxyCatalogSearch
// Client::UI::Info::InfoProxyPageInterface
// Client::UI::Info::InfoProxyInterface
[InfoProxy(InfoProxyId.CatalogSearch)]
Expand Down
7 changes: 2 additions & 5 deletions FFXIVClientStructs/FFXIV/Client/UI/Misc/CharaViewPortrait.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace FFXIVClientStructs.FFXIV.Client.UI.Misc;
[GenerateInterop]
[Inherits<CharaView>]
[StructLayout(LayoutKind.Explicit, Size = 0x420)]
public unsafe partial struct CharaViewPortrait : ICreatable {
public unsafe partial struct CharaViewPortrait {
// Spherical Camera?
[FieldOffset(0x320)] public Vector4 CameraPosition;
[FieldOffset(0x330)] public Vector4 CameraTarget;
Expand Down Expand Up @@ -50,11 +50,8 @@ public unsafe partial struct CharaViewPortrait : ICreatable {
[FieldOffset(0x410)] public int AgentEventId;
[FieldOffset(0x418)] public ulong AgentEventKind;

public static CharaViewPortrait* Create()
=> IMemorySpace.GetUISpace()->Create<CharaViewPortrait>();

[MemberFunction("E8 ?? ?? ?? ?? 48 8B F8 45 33 C0")]
public partial void Ctor();
public partial CharaViewPortrait* Ctor();

/// <summary>
/// Sets up the CharaViewPortrait.
Expand Down
2 changes: 1 addition & 1 deletion FFXIVClientStructs/FFXIV/Component/SteamApi/SteamApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public unsafe partial struct SteamApi {
[FieldOffset(0x4C0)] public GamepadTextInputDismissedCallback GamepadTextInputDismissedCallback;

[MemberFunction("E8 ?? ?? ?? ?? 48 8B D8 48 8B CB 48 89 9F")]
public partial void Ctor();
public partial SteamApi* Ctor();

[MemberFunction("48 89 5C 24 ?? 57 48 83 EC 20 48 8B D9 FF 15 ?? ?? ?? ?? 48 8D 8B")]
public partial void Dtor();
Expand Down

0 comments on commit 11ef0f5

Please sign in to comment.