Skip to content

Commit

Permalink
Update pictomancy submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
sourpuh committed Nov 30, 2024
1 parent 3cb329c commit a701307
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
10 changes: 8 additions & 2 deletions ffxiv_pictomancy/Pictomancy/DXDraw/AddonClipper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ public unsafe void ClipWindows()
try
{
AtkUnitBase* addon = *(AtkUnitBase**)Unsafe.AsPointer(ref loadedUnitsList->Entries[i]);
if (addon == null || !addon->IsVisible || addon->WindowNode == null || addon->Scale == 0)
if (addon == null
|| !addon->IsVisible
|| addon->WindowNode == null
|| addon->Scale == 0
|| addon->RootNode == null
|| !addon->RootNode->IsVisible())
{
continue;
}
Expand Down Expand Up @@ -577,10 +582,11 @@ private unsafe void ClipBrd()
ClipAtkNodeDiamond(addon->UldManager.NodeList[13], scale: _diamondScale);
ClipAtkNodeDiamond(addon->UldManager.NodeList[14], scale: _diamondScale);
ClipAtkNodeCircle(addon->UldManager.NodeList[5], scale: _gaugeTextScale);
ClipAtkNodeRectangle(addon->UldManager.NodeList[16]->GetAsAtkComponentNode()->Component->UldManager.NodeList[0], scale: _resourceBarScale);
ClipAtkNodeCircle(addon->UldManager.NodeList[17], scale: _gaugeTextScale);
}
private unsafe void ClipMch()
{

var addon = GetVisibleAddonOrNull("JobHudMCH0", 10);
if (addon == null) return;
ClipAtkNodeRectangle(addon->UldManager.NodeList[3]->GetAsAtkComponentNode()->Component->UldManager.NodeList[0], scale: _resourceBarScale);
Expand Down
3 changes: 2 additions & 1 deletion ffxiv_pictomancy/Pictomancy/PctDrawHints.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Pictomancy;
namespace Pictomancy;

///
/// <summary>
Expand All @@ -20,6 +20,7 @@ public record struct PctDrawHints(
AlphaBlendMode alphaBlendMode = AlphaBlendMode.Add,
bool clipNativeUI = true)
{
// Surely there's a better way to do this?
public PctDrawHints() : this(false, false, true, 255, AlphaBlendMode.Add, true) { }

public bool DrawInCutscene => drawInCutscene;
Expand Down
3 changes: 0 additions & 3 deletions ffxiv_pictomancy/Pictomancy/PctDrawList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,10 @@ public PctTexture DrawToTexture()

public void Dispose()
{
//PictoService.Log.Error("[Pictomancy] Dispose " + PictoService.Hints.AutoDraw);
if (PictoService.DrawList == this) PictoService.DrawList = null;
if (!PictoService.Hints.AutoDraw) return;

//PictoService.Log.Error("[Pictomancy] Disposing");
PctTexture texture = DrawToTexture();
//PictoService.Log.Error("[Pictomancy] Texture " + texture.textureId);
_drawList.AddImage(
texture.TextureId,
ImGuiHelpers.MainViewport.Pos,
Expand Down
5 changes: 1 addition & 4 deletions ffxiv_pictomancy/Pictomancy/PictoService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Dalamud.Game;
using Dalamud.Game.ClientState.Conditions;
using Dalamud.Game.ClientState.Conditions;
using Dalamud.IoC;
using Dalamud.Plugin;
using Dalamud.Plugin.Services;
Expand All @@ -15,9 +14,7 @@ public class PictoService
[PluginService] public static IDalamudPluginInterface PluginInterface { get; private set; }
[PluginService] public static IGameGui GameGui { get; private set; }
[PluginService] public static ICondition Condition { get; private set; }
[PluginService] public static ISigScanner SigScanner { get; private set; }
[PluginService] public static IPluginLog Log { get; private set; }
[PluginService] public static IAddonLifecycle AddonLifecycle { get; private set; }

private static DXRenderer _renderer;
private static AddonClipper _addonClipper;
Expand Down
6 changes: 5 additions & 1 deletion ffxiv_pictomancy/Pictomancy/Pictomancy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
</PropertyGroup>

<PropertyGroup>
<DalamudLibPath>$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))'">
<DalamudLibPath>$(DALAMUD_HOME)/</DalamudLibPath>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit a701307

Please sign in to comment.