Skip to content

Commit

Permalink
Add an ULD display to data window (#1938)
Browse files Browse the repository at this point in the history
* prelim uld data display
* change uld list to a string array
* fix some uld parts not having their texture id set.
* update uld browser to use themes and get locations from sig scanning
* undo ClientStructs change during rebase
* fix capitalization during rebase
  • Loading branch information
wolfcomp committed Aug 12, 2024
1 parent bba3298 commit ae4c561
Show file tree
Hide file tree
Showing 4 changed files with 406 additions and 1 deletion.
28 changes: 28 additions & 0 deletions Dalamud/Game/SigScanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,34 @@ public bool TryScanText(string signature, out IntPtr result)
}
}

/// <inheritddoc/>
public nint[] ScanAllText(string signature)
{
var mBase = this.IsCopy ? this.moduleCopyPtr : this.TextSectionBase;
var ret = new List<nint>();
while (mBase < this.TextSectionBase + this.TextSectionSize)
{
try
{
var scanRet = Scan(mBase, this.TextSectionSize, signature);
if (scanRet == IntPtr.Zero)
break;

if (this.IsCopy)
scanRet = new IntPtr(scanRet.ToInt64() - this.moduleCopyOffset);

ret.Add(scanRet);
mBase = scanRet + 1;
}
catch (KeyNotFoundException)
{
break;
}
}

return ret.ToArray();
}

/// <inheritdoc/>
public void Dispose()
{
Expand Down
1 change: 1 addition & 0 deletions Dalamud/Interface/Internal/Windows/Data/DataWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ internal class DataWindow : Window, IDisposable
new TexWidget(),
new ToastWidget(),
new UiColorWidget(),
new UldWidget(),
};

private readonly IOrderedEnumerable<IDataWindowWidget> orderedModules;
Expand Down
Loading

0 comments on commit ae4c561

Please sign in to comment.