Skip to content

Commit 47df6e4

Browse files
committed
Cleanup
1 parent de5e2eb commit 47df6e4

File tree

7 files changed

+54
-22
lines changed

7 files changed

+54
-22
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
git config --global user.email "[email protected]"
5858
git fetch origin main && git checkout main
5959
$ver = '${{ github.event.inputs.version }}'
60-
$path = './Resources/Templates/repo_template.json'
60+
$path = './Resources/Templates/repo.tmpl'
6161
$new_path = './repo.json'
6262
$content = get-content -path $path
6363
$content = $content -replace '{version}',$ver

Brio/Game/World/FestivalService.cs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Brio.Core;
22
using Brio.Game.GPose;
3+
using Brio.Game.World.Interop;
34
using Brio.Utils;
45
using Lumina.Excel.GeneratedSheets;
56
using System.Collections.Generic;

Brio/Game/World/FestivalInterop.cs Brio/Game/World/Interop/FestivalInterop.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
using System;
55
using System.Runtime.InteropServices;
66

7-
namespace Brio.Game.World;
7+
namespace Brio.Game.World.Interop;
88

99
// TODO: Move into ClientStructs
1010
// Tracking: https://github.com/aers/FFXIVClientStructs/pull/310 & https://github.com/aers/FFXIVClientStructs/pull/311
1111

1212
[StructLayout(LayoutKind.Explicit, Size = 0x98)]
13-
public unsafe struct LayoutManager
13+
public unsafe struct LayoutManagerStruct
1414
{
1515
[FieldOffset(0x38)] public uint FestivalStatus; // SetActiveFestivals will not allow a change when not 5 or 0
1616
[FieldOffset(0x40)] public fixed uint ActiveFestivals[4];
1717
}
1818

1919
public unsafe class LayoutManagerInterop
2020
{
21-
private delegate void SetActiveFestivalsDelegate(LayoutManager* instance, uint* festivalArray);
21+
private delegate void SetActiveFestivalsDelegate(LayoutManagerStruct* instance, uint* festivalArray);
2222

2323
[Signature("E8 ?? ?? ?? ?? 8B C5 EB 6A", ScanType = ScanType.Text)]
2424
private SetActiveFestivalsDelegate _setActiveFestivals = null!;
2525

26-
public LayoutManagerInterop()
26+
public LayoutManagerInterop()
2727
{
2828
SignatureHelper.Initialise(this);
2929
}
@@ -33,7 +33,7 @@ public unsafe void SetActiveFestivals(uint* festivalArray)
3333
var world = LayoutWorld.Instance();
3434
if(world != null)
3535
{
36-
var manager = (LayoutManager*) world->ActiveLayout;
36+
var manager = (LayoutManagerStruct*)world->ActiveLayout;
3737
if(manager != null)
3838
{
3939
_setActiveFestivals(manager, festivalArray);
@@ -48,7 +48,7 @@ public uint[] GetActiveFestivals()
4848
var world = LayoutWorld.Instance();
4949
if(world != null)
5050
{
51-
var manager = (LayoutManager*)world->ActiveLayout;
51+
var manager = (LayoutManagerStruct*)world->ActiveLayout;
5252
if(manager != null)
5353
{
5454
for(int i = 0; i < 4; ++i)
@@ -68,7 +68,7 @@ public bool IsBusy
6868
var world = LayoutWorld.Instance();
6969
if(world != null)
7070
{
71-
var manager = (LayoutManager*)world->ActiveLayout;
71+
var manager = (LayoutManagerStruct*)world->ActiveLayout;
7272
if(manager != null)
7373
{
7474
return manager->FestivalStatus != 0 && manager->FestivalStatus != 5;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using FFXIVClientStructs.FFXIV.Client.Game;
2+
using FFXIVClientStructs.FFXIV.Client.LayoutEngine;
3+
using ImGuiNET;
4+
using static Brio.Game.World.WeatherService;
5+
using System;
6+
using System.Runtime.InteropServices;
7+
8+
namespace Brio.UI.Components.Debug;
9+
public static class DebugAddressControls
10+
{
11+
public unsafe static void Draw()
12+
{
13+
if(ImGui.Button("Copy Layout World Address"))
14+
{
15+
var addr = (nint)LayoutWorld.Instance();
16+
ImGui.SetClipboardText(addr.ToString("X"));
17+
}
18+
19+
if(ImGui.Button("Copy Layout Manager Address"))
20+
{
21+
var addr = (nint)LayoutWorld.Instance()->ActiveLayout;
22+
ImGui.SetClipboardText(addr.ToString("X"));
23+
}
24+
25+
if(ImGui.Button("Copy Game Main Address"))
26+
{
27+
var addr = (nint)GameMain.Instance();
28+
ImGui.SetClipboardText(addr.ToString("X"));
29+
}
30+
31+
if(ImGui.Button("Copy EnvManager Address"))
32+
{
33+
IntPtr rawWeather = Dalamud.SigScanner.GetStaticAddressFromSig("4C 8B 05 ?? ?? ?? ?? 41 8B 80 ?? ?? ?? ?? C1 E8 02");
34+
IntPtr weatherSystem = Marshal.ReadIntPtr(rawWeather);
35+
ImGui.SetClipboardText(weatherSystem.ToString("X"));
36+
}
37+
}
38+
}
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
1-
using FFXIVClientStructs.FFXIV.Client.Game;
2-
using FFXIVClientStructs.FFXIV.Client.LayoutEngine;
3-
using ImGuiNET;
1+
using ImGuiNET;
42

53
namespace Brio.UI.Components.Debug;
64
public static class DebugSandboxControls
75
{
86
public unsafe static void Draw()
97
{
10-
if(ImGui.Button("Copy Layout Address"))
11-
{
12-
var addr = (nint) LayoutWorld.Instance();
13-
ImGui.SetClipboardText(addr.ToString("X"));
14-
}
15-
16-
if(ImGui.Button("Copy Game Main Address"))
17-
{
18-
var addr = (nint)GameMain.Instance();
19-
ImGui.SetClipboardText(addr.ToString("X"));
20-
}
8+
219

2210
}
2311
}

Brio/UI/Components/Debug/DebugTab.cs

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ public unsafe static void Draw()
1616
DebugIPCControls.Draw();
1717
}
1818

19+
if(ImGui.CollapsingHeader("Addresses"))
20+
{
21+
DebugAddressControls.Draw();
22+
}
23+
1924
if(ImGui.CollapsingHeader("Sandbox"))
2025
{
2126
DebugSandboxControls.Draw();
File renamed without changes.

0 commit comments

Comments
 (0)