mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Update for SDK.
This commit is contained in:
parent
279a861582
commit
03bb07a9c0
28 changed files with 178 additions and 147 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '8.x.x'
|
||||
dotnet-version: '9.x.x'
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Download Dalamud
|
||||
|
|
|
|||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '8.x.x'
|
||||
dotnet-version: '9.x.x'
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Download Dalamud
|
||||
|
|
|
|||
2
.github/workflows/test_release.yml
vendored
2
.github/workflows/test_release.yml
vendored
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '8.x.x'
|
||||
dotnet-version: '9.x.x'
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Download Dalamud
|
||||
|
|
|
|||
2
OtterGui
2
OtterGui
|
|
@ -1 +1 @@
|
|||
Subproject commit 13f1a90b88d2b8572480748a209f957b70d6a46f
|
||||
Subproject commit 3396ee176fa72ad2dfb2de3294f7125ebce4dae5
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 404c8aaa5115925006963baa118bf710c7953380
|
||||
Subproject commit 6d262cd3181d44c29891c9473f7c423300320f15
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
using System.Text.Json.Nodes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Nodes;
|
||||
|
||||
namespace Penumbra.CrashHandler.Buffers;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
using System.Text.Json.Nodes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Nodes;
|
||||
|
||||
namespace Penumbra.CrashHandler.Buffers;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.IO.MemoryMappedFiles;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Text;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
using System.Text.Json.Nodes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Nodes;
|
||||
|
||||
namespace Penumbra.CrashHandler.Buffers;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Penumbra.CrashHandler.Buffers;
|
||||
|
||||
namespace Penumbra.CrashHandler;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
using System.Text.Json.Nodes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Nodes;
|
||||
using Penumbra.CrashHandler.Buffers;
|
||||
|
||||
namespace Penumbra.CrashHandler;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using Penumbra.CrashHandler.Buffers;
|
||||
using System;
|
||||
using Penumbra.CrashHandler.Buffers;
|
||||
|
||||
namespace Penumbra.CrashHandler;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Project Sdk="Dalamud.NET.Sdk/12.0.2">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<DalamudLibPath Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
|
||||
<DalamudLibPath Condition="$([MSBuild]::IsOSPlatform('Linux'))">$(HOME)/.xlcore/dalamud/Hooks/dev/</DalamudLibPath>
|
||||
<DalamudLibPath Condition="$(DALAMUD_HOME) != ''">$(DALAMUD_HOME)/</DalamudLibPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
|
@ -25,4 +11,8 @@
|
|||
<DebugType>embedded</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Use_DalamudPackager>false</Use_DalamudPackager>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
using System.Diagnostics;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Penumbra.CrashHandler;
|
||||
|
|
|
|||
13
Penumbra.CrashHandler/packages.lock.json
Normal file
13
Penumbra.CrashHandler/packages.lock.json
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
"net9.0-windows7.0": {
|
||||
"DotNet.ReproducibleBuilds": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.2.25, )",
|
||||
"resolved": "1.2.25",
|
||||
"contentHash": "xCXiw7BCxHJ8pF6wPepRUddlh2dlQlbr81gXA72hdk4FLHkKXas7EH/n+fk5UCA/YfMqG1Z6XaPiUjDbUNBUzg=="
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 757aaa39ac4aa988d0b8597ff088641a0f4f49fd
|
||||
Subproject commit ab3ee0ee814e170b59e0c13b023bbb8bc9314c74
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 4eb7c118cdac5873afb97cb04719602f061f03b7
|
||||
Subproject commit 2896c0561f60827f97408650d52a15c38f4d9d10
|
||||
52
Penumbra.sln
52
Penumbra.sln
|
|
@ -54,34 +54,34 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "structs", "structs", "{B03F
|
|||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{13C812E9-0D42-4B95-8646-40EEBF30636F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{13C812E9-0D42-4B95-8646-40EEBF30636F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{13C812E9-0D42-4B95-8646-40EEBF30636F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{13C812E9-0D42-4B95-8646-40EEBF30636F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EE551E87-FDB3-4612-B500-DC870C07C605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EE551E87-FDB3-4612-B500-DC870C07C605}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EE551E87-FDB3-4612-B500-DC870C07C605}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EE551E87-FDB3-4612-B500-DC870C07C605}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{87750518-1A20-40B4-9FC1-22F906EFB290}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{87750518-1A20-40B4-9FC1-22F906EFB290}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{87750518-1A20-40B4-9FC1-22F906EFB290}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{87750518-1A20-40B4-9FC1-22F906EFB290}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1FE4D8DF-B56A-464F-B39E-CDC0ED4167D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1FE4D8DF-B56A-464F-B39E-CDC0ED4167D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1FE4D8DF-B56A-464F-B39E-CDC0ED4167D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1FE4D8DF-B56A-464F-B39E-CDC0ED4167D4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5549BAFD-6357-4B1A-800C-75AC36E5B76D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5549BAFD-6357-4B1A-800C-75AC36E5B76D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5549BAFD-6357-4B1A-800C-75AC36E5B76D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5549BAFD-6357-4B1A-800C-75AC36E5B76D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EE834491-A98F-4395-BE0D-6861AE5AD953}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EE834491-A98F-4395-BE0D-6861AE5AD953}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EE834491-A98F-4395-BE0D-6861AE5AD953}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EE834491-A98F-4395-BE0D-6861AE5AD953}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{13C812E9-0D42-4B95-8646-40EEBF30636F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{13C812E9-0D42-4B95-8646-40EEBF30636F}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{13C812E9-0D42-4B95-8646-40EEBF30636F}.Release|x64.ActiveCfg = Release|x64
|
||||
{13C812E9-0D42-4B95-8646-40EEBF30636F}.Release|x64.Build.0 = Release|x64
|
||||
{EE551E87-FDB3-4612-B500-DC870C07C605}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{EE551E87-FDB3-4612-B500-DC870C07C605}.Debug|x64.Build.0 = Debug|x64
|
||||
{EE551E87-FDB3-4612-B500-DC870C07C605}.Release|x64.ActiveCfg = Release|x64
|
||||
{EE551E87-FDB3-4612-B500-DC870C07C605}.Release|x64.Build.0 = Release|x64
|
||||
{87750518-1A20-40B4-9FC1-22F906EFB290}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{87750518-1A20-40B4-9FC1-22F906EFB290}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{87750518-1A20-40B4-9FC1-22F906EFB290}.Release|x64.ActiveCfg = Release|x64
|
||||
{87750518-1A20-40B4-9FC1-22F906EFB290}.Release|x64.Build.0 = Release|x64
|
||||
{1FE4D8DF-B56A-464F-B39E-CDC0ED4167D4}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{1FE4D8DF-B56A-464F-B39E-CDC0ED4167D4}.Debug|x64.Build.0 = Debug|x64
|
||||
{1FE4D8DF-B56A-464F-B39E-CDC0ED4167D4}.Release|x64.ActiveCfg = Release|x64
|
||||
{1FE4D8DF-B56A-464F-B39E-CDC0ED4167D4}.Release|x64.Build.0 = Release|x64
|
||||
{5549BAFD-6357-4B1A-800C-75AC36E5B76D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{5549BAFD-6357-4B1A-800C-75AC36E5B76D}.Debug|x64.Build.0 = Debug|x64
|
||||
{5549BAFD-6357-4B1A-800C-75AC36E5B76D}.Release|x64.ActiveCfg = Release|x64
|
||||
{5549BAFD-6357-4B1A-800C-75AC36E5B76D}.Release|x64.Build.0 = Release|x64
|
||||
{EE834491-A98F-4395-BE0D-6861AE5AD953}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{EE834491-A98F-4395-BE0D-6861AE5AD953}.Debug|x64.Build.0 = Debug|x64
|
||||
{EE834491-A98F-4395-BE0D-6861AE5AD953}.Release|x64.ActiveCfg = Release|x64
|
||||
{EE834491-A98F-4395-BE0D-6861AE5AD953}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ public sealed unsafe class ShaderReplacementFixer : IDisposable, IRequiredServic
|
|||
if (shpk == null)
|
||||
return;
|
||||
|
||||
var shpkName = mtrl->ShpkNameSpan;
|
||||
var shpkName = mtrl->ShpkName.AsSpan();
|
||||
var shpkState = GetStateForHumanSetup(shpkName)
|
||||
?? GetStateForHumanRender(shpkName)
|
||||
?? GetStateForModelRendererRender(shpkName)
|
||||
|
|
@ -217,7 +217,7 @@ public sealed unsafe class ShaderReplacementFixer : IDisposable, IRequiredServic
|
|||
}
|
||||
|
||||
private ModdedShaderPackageState? GetStateForHumanSetup(MaterialResourceHandle* mtrlResource)
|
||||
=> mtrlResource == null ? null : GetStateForHumanSetup(mtrlResource->ShpkNameSpan);
|
||||
=> mtrlResource == null ? null : GetStateForHumanSetup(mtrlResource->ShpkName.AsSpan());
|
||||
|
||||
private ModdedShaderPackageState? GetStateForHumanSetup(ReadOnlySpan<byte> shpkName)
|
||||
=> CharacterStockingsShpkName.SequenceEqual(shpkName) ? _characterStockingsState : null;
|
||||
|
|
@ -227,7 +227,7 @@ public sealed unsafe class ShaderReplacementFixer : IDisposable, IRequiredServic
|
|||
=> _characterStockingsState.MaterialCount;
|
||||
|
||||
private ModdedShaderPackageState? GetStateForHumanRender(MaterialResourceHandle* mtrlResource)
|
||||
=> mtrlResource == null ? null : GetStateForHumanRender(mtrlResource->ShpkNameSpan);
|
||||
=> mtrlResource == null ? null : GetStateForHumanRender(mtrlResource->ShpkName.AsSpan());
|
||||
|
||||
private ModdedShaderPackageState? GetStateForHumanRender(ReadOnlySpan<byte> shpkName)
|
||||
=> SkinShpkName.SequenceEqual(shpkName) ? _skinState : null;
|
||||
|
|
@ -237,7 +237,7 @@ public sealed unsafe class ShaderReplacementFixer : IDisposable, IRequiredServic
|
|||
=> _skinState.MaterialCount;
|
||||
|
||||
private ModdedShaderPackageState? GetStateForModelRendererRender(MaterialResourceHandle* mtrlResource)
|
||||
=> mtrlResource == null ? null : GetStateForModelRendererRender(mtrlResource->ShpkNameSpan);
|
||||
=> mtrlResource == null ? null : GetStateForModelRendererRender(mtrlResource->ShpkName.AsSpan());
|
||||
|
||||
private ModdedShaderPackageState? GetStateForModelRendererRender(ReadOnlySpan<byte> shpkName)
|
||||
{
|
||||
|
|
@ -264,7 +264,7 @@ public sealed unsafe class ShaderReplacementFixer : IDisposable, IRequiredServic
|
|||
+ _hairMaskState.MaterialCount;
|
||||
|
||||
private ModdedShaderPackageState? GetStateForModelRendererUnk(MaterialResourceHandle* mtrlResource)
|
||||
=> mtrlResource == null ? null : GetStateForModelRendererUnk(mtrlResource->ShpkNameSpan);
|
||||
=> mtrlResource == null ? null : GetStateForModelRendererUnk(mtrlResource->ShpkName.AsSpan());
|
||||
|
||||
private ModdedShaderPackageState? GetStateForModelRendererUnk(ReadOnlySpan<byte> shpkName)
|
||||
{
|
||||
|
|
@ -480,7 +480,7 @@ public sealed unsafe class ShaderReplacementFixer : IDisposable, IRequiredServic
|
|||
if (material == null)
|
||||
return _prepareColorTableHook.Original(thisPtr, stain0Id, stain1Id);
|
||||
|
||||
var shpkState = GetStateForColorTable(thisPtr->ShpkNameSpan);
|
||||
var shpkState = GetStateForColorTable(thisPtr->ShpkName.AsSpan());
|
||||
if (shpkState == null || shpkState.MaterialCount == 0)
|
||||
return _prepareColorTableHook.Original(thisPtr, stain0Id, stain1Id);
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,9 @@ public sealed unsafe class LiveColorTablePreviewer : LiveMaterialPreviewerBase
|
|||
textureSize[1] = Height;
|
||||
|
||||
using var texture =
|
||||
new SafeTextureHandle(Device.Instance()->CreateTexture2D(textureSize, 1, 0x2460, 0x80000804, 7), false);
|
||||
new SafeTextureHandle(
|
||||
Device.Instance()->CreateTexture2D(textureSize, 1, TextureFormat.R16G16B16A16_FLOAT,
|
||||
TextureFlags.TextureNoSwizzle | TextureFlags.Immutable | TextureFlags.Managed, 7), false);
|
||||
if (texture.IsInvalid)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ internal unsafe partial record ResolveContext(
|
|||
return cached;
|
||||
|
||||
var node = CreateNode(ResourceType.Mtrl, (nint)mtrl, &resource->ResourceHandle, path, false);
|
||||
var shpkNode = CreateNodeFromShpk(resource->ShaderPackageResourceHandle, new CiByteString(resource->ShpkName));
|
||||
var shpkNode = CreateNodeFromShpk(resource->ShaderPackageResourceHandle, new CiByteString(resource->ShpkName.Value));
|
||||
if (shpkNode is not null)
|
||||
{
|
||||
if (Global.WithUiData)
|
||||
|
|
@ -253,7 +253,7 @@ internal unsafe partial record ResolveContext(
|
|||
var alreadyProcessedSamplerIds = new HashSet<uint>();
|
||||
for (var i = 0; i < resource->TextureCount; i++)
|
||||
{
|
||||
var texNode = CreateNodeFromTex(resource->Textures[i].TextureResourceHandle, new CiByteString(resource->TexturePath(i)),
|
||||
var texNode = CreateNodeFromTex(resource->Textures[i].TextureResourceHandle, new CiByteString(resource->TexturePath(i).Value),
|
||||
resource->Textures[i].IsDX11);
|
||||
if (texNode == null)
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using FFXIVClientStructs.FFXIV.Client.Graphics.Scene;
|
||||
using FFXIVClientStructs.STD;
|
||||
using InteropGenerator.Runtime;
|
||||
using Penumbra.String;
|
||||
|
||||
namespace Penumbra.Interop.Structs;
|
||||
|
|
@ -57,8 +58,8 @@ internal static class StructExtensions
|
|||
return ToOwnedByteString(character.ResolvePhybPath(pathBuffer, partialSkeletonIndex));
|
||||
}
|
||||
|
||||
private static unsafe CiByteString ToOwnedByteString(byte* str)
|
||||
=> str == null ? CiByteString.Empty : new CiByteString(str).Clone();
|
||||
private static unsafe CiByteString ToOwnedByteString(CStringPointer str)
|
||||
=> str.HasValue ? new CiByteString(str.Value).Clone() : CiByteString.Empty;
|
||||
|
||||
private static CiByteString ToOwnedByteString(ReadOnlySpan<byte> str)
|
||||
=> str.Length == 0 ? CiByteString.Empty : CiByteString.FromSpanUnsafe(str, true).Clone();
|
||||
|
|
|
|||
|
|
@ -1,25 +1,15 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Dalamud.NET.Sdk/12.0.2">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<AssemblyTitle>Penumbra</AssemblyTitle>
|
||||
<Company>absolute gangstas</Company>
|
||||
<Product>Penumbra</Product>
|
||||
<Copyright>Copyright © 2022</Copyright>
|
||||
<Copyright>Copyright © 2025</Copyright>
|
||||
<FileVersion>9.0.0.1</FileVersion>
|
||||
<AssemblyVersion>9.0.0.1</AssemblyVersion>
|
||||
<OutputPath>bin\$(Configuration)\</OutputPath>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Nullable>enable</Nullable>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<MSBuildWarningsAsMessages>$(MSBuildWarningsAsMessages);MSB3277</MSBuildWarningsAsMessages>
|
||||
<DefineConstants>PROFILING;</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
@ -35,63 +25,13 @@
|
|||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<DalamudLibPath>$(AppData)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Dalamud">
|
||||
<HintPath>$(DalamudLibPath)Dalamud.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ImGui.NET">
|
||||
<HintPath>$(DalamudLibPath)ImGui.NET.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ImGuiScene">
|
||||
<HintPath>$(DalamudLibPath)ImGuiScene.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Lumina">
|
||||
<HintPath>$(DalamudLibPath)Lumina.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Lumina.Excel">
|
||||
<HintPath>$(DalamudLibPath)Lumina.Excel.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="FFXIVClientStructs">
|
||||
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>$(DalamudLibPath)Newtonsoft.Json.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Iced">
|
||||
<HintPath>$(DalamudLibPath)Iced.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="SharpDX">
|
||||
<HintPath>$(DalamudLibPath)SharpDX.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="SharpDX.Direct3D11">
|
||||
<HintPath>$(DalamudLibPath)SharpDX.Direct3D11.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="SharpDX.DXGI">
|
||||
<HintPath>$(DalamudLibPath)SharpDX.DXGI.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="OtterTex.dll">
|
||||
<HintPath>lib\OtterTex.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- This reference is only there to silence a vulnerability warning caused by transitive inclusion of a lower version through PeNet and System.Security.Cryptography.Pkcs. -->
|
||||
<PackageReference Include="System.Formats.Asn1" Version="9.0.2" />
|
||||
<PackageReference Include="EmbedIO" Version="3.5.2" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.7" />
|
||||
<PackageReference Include="SharpCompress" Version="0.39.0" />
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
"RepoUrl": "https://github.com/xivdev/Penumbra",
|
||||
"ApplicableVersion": "any",
|
||||
"Tags": [ "modding" ],
|
||||
"DalamudApiLevel": 11,
|
||||
"DalamudApiLevel": 12,
|
||||
"LoadPriority": 69420,
|
||||
"LoadRequiredState": 2,
|
||||
"LoadSync": true,
|
||||
|
|
|
|||
|
|
@ -1,12 +1,76 @@
|
|||
using Dalamud.Interface.ImGuiNotification;
|
||||
using OtterGui.Classes;
|
||||
using OtterGui.Services;
|
||||
using Penumbra.Api.Enums;
|
||||
using Penumbra.GameData.Files;
|
||||
using Penumbra.Mods;
|
||||
using Penumbra.String.Classes;
|
||||
using SharpCompress.Common;
|
||||
using SharpCompress.Readers;
|
||||
|
||||
namespace Penumbra.Services;
|
||||
|
||||
public class ModMigrator
|
||||
{
|
||||
private class FileData(string path)
|
||||
{
|
||||
public readonly string Path = path;
|
||||
public readonly List<(string GamePath, int Option)> GamePaths = [];
|
||||
}
|
||||
|
||||
private sealed class FileDataDict : Dictionary<string, FileData>
|
||||
{
|
||||
public void Add(string path, string gamePath, int option)
|
||||
{
|
||||
if (!TryGetValue(path, out var data))
|
||||
{
|
||||
data = new FileData(path);
|
||||
data.GamePaths.Add((gamePath, option));
|
||||
Add(path, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
data.GamePaths.Add((gamePath, option));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private readonly FileDataDict Textures = [];
|
||||
private readonly FileDataDict Models = [];
|
||||
private readonly FileDataDict Materials = [];
|
||||
|
||||
public void Update(IEnumerable<Mod> mods)
|
||||
{
|
||||
CollectFiles(mods);
|
||||
}
|
||||
|
||||
private void CollectFiles(IEnumerable<Mod> mods)
|
||||
{
|
||||
var option = 0;
|
||||
foreach (var mod in mods)
|
||||
{
|
||||
AddDict(mod.Default.Files, option++);
|
||||
foreach (var container in mod.Groups.SelectMany(group => group.DataContainers))
|
||||
AddDict(container.Files, option++);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
void AddDict(Dictionary<Utf8GamePath, FullPath> dict, int currentOption)
|
||||
{
|
||||
foreach (var (gamePath, file) in dict)
|
||||
{
|
||||
switch (ResourceTypeExtensions.FromExtension(gamePath.Extension().Span))
|
||||
{
|
||||
case ResourceType.Tex: Textures.Add(file.FullName, gamePath.ToString(), currentOption); break;
|
||||
case ResourceType.Mdl: Models.Add(file.FullName, gamePath.ToString(), currentOption); break;
|
||||
case ResourceType.Mtrl: Materials.Add(file.FullName, gamePath.ToString(), currentOption); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class MigrationManager(Configuration config) : IService
|
||||
{
|
||||
public enum TaskType : byte
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.Textures;
|
||||
using Dalamud.Interface.Textures.TextureWraps;
|
||||
using Dalamud.Plugin;
|
||||
using Dalamud.Plugin.Services;
|
||||
|
|
@ -18,7 +19,6 @@ public class LaunchButton : IDisposable, IUiService
|
|||
private readonly string _fileName;
|
||||
private readonly ITextureProvider _textureProvider;
|
||||
|
||||
private IDalamudTextureWrap? _icon;
|
||||
private IReadOnlyTitleScreenMenuEntry? _entry;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -30,7 +30,6 @@ public class LaunchButton : IDisposable, IUiService
|
|||
_configWindow = ui;
|
||||
_textureProvider = textureProvider;
|
||||
_title = title;
|
||||
_icon = null;
|
||||
_entry = null;
|
||||
|
||||
_fileName = Path.Combine(pi.AssemblyLocation.DirectoryName!, "tsmLogo.png");
|
||||
|
|
@ -39,7 +38,6 @@ public class LaunchButton : IDisposable, IUiService
|
|||
|
||||
public void Dispose()
|
||||
{
|
||||
_icon?.Dispose();
|
||||
if (_entry != null)
|
||||
_title.RemoveEntry(_entry);
|
||||
}
|
||||
|
|
@ -52,9 +50,8 @@ public class LaunchButton : IDisposable, IUiService
|
|||
try
|
||||
{
|
||||
// TODO: update when API updated.
|
||||
_icon = _textureProvider.GetFromFile(_fileName).RentAsync().Result;
|
||||
if (_icon != null)
|
||||
_entry = _title.AddEntry("Manage Penumbra", _icon, OnTriggered);
|
||||
var icon = _textureProvider.GetFromFile(_fileName);
|
||||
_entry = _title.AddEntry("Manage Penumbra", icon, OnTriggered);
|
||||
|
||||
_uiBuilder.Draw -= CreateEntry;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,13 +164,14 @@ public unsafe class GlobalVariablesDrawer(
|
|||
_schedulerFilterMapU8 = CiByteString.FromString(_schedulerFilterMap, out var t, MetaDataComputation.All, false)
|
||||
? t
|
||||
: CiByteString.Empty;
|
||||
ImUtf8.Text($"{_shownResourcesMap} / {scheduler.Scheduler->NumResources}");
|
||||
ImUtf8.Text($"{_shownResourcesMap} / {scheduler.Scheduler->Resources.LongCount}");
|
||||
using var table = ImUtf8.Table("##SchedulerMapResources"u8, 10, ImGuiTableFlags.RowBg | ImGuiTableFlags.SizingFixedFit,
|
||||
-Vector2.UnitX);
|
||||
if (!table)
|
||||
return;
|
||||
|
||||
var map = (StdMap<int, Pointer<SchedulerResource>>*)&scheduler.Scheduler->Unknown;
|
||||
// TODO Remove cast when it'll have the right type in CS.
|
||||
var map = (StdMap<int, Pointer<SchedulerResource>>*)&scheduler.Scheduler->Resources;
|
||||
var total = 0;
|
||||
_shownResourcesMap = 0;
|
||||
foreach (var (key, resourcePtr) in *map)
|
||||
|
|
@ -214,7 +215,7 @@ public unsafe class GlobalVariablesDrawer(
|
|||
_schedulerFilterListU8 = CiByteString.FromString(_schedulerFilterList, out var t, MetaDataComputation.All, false)
|
||||
? t
|
||||
: CiByteString.Empty;
|
||||
ImUtf8.Text($"{_shownResourcesList} / {scheduler.Scheduler->NumResources}");
|
||||
ImUtf8.Text($"{_shownResourcesList} / {scheduler.Scheduler->Resources.LongCount}");
|
||||
using var table = ImUtf8.Table("##SchedulerListResources"u8, 10, ImGuiTableFlags.RowBg | ImGuiTableFlags.SizingFixedFit,
|
||||
-Vector2.UnitX);
|
||||
if (!table)
|
||||
|
|
@ -223,7 +224,7 @@ public unsafe class GlobalVariablesDrawer(
|
|||
var resource = scheduler.Scheduler->Begin;
|
||||
var total = 0;
|
||||
_shownResourcesList = 0;
|
||||
while (resource != null && total < (int)scheduler.Scheduler->NumResources)
|
||||
while (resource != null && total < scheduler.Scheduler->Resources.Count)
|
||||
{
|
||||
if (_schedulerFilterList.Length is 0 || resource->Name.Buffer.IndexOf(_schedulerFilterListU8.Span) >= 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,19 @@
|
|||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
"net8.0-windows7.0": {
|
||||
"net9.0-windows7.0": {
|
||||
"DalamudPackager": {
|
||||
"type": "Direct",
|
||||
"requested": "[12.0.0, )",
|
||||
"resolved": "12.0.0",
|
||||
"contentHash": "J5TJLV3f16T/E2H2P17ClWjtfEBPpq3yxvqW46eN36JCm6wR+EaoaYkqG9Rm5sHqs3/nK/vKjWWyvEs/jhKoXw=="
|
||||
},
|
||||
"DotNet.ReproducibleBuilds": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.2.25, )",
|
||||
"resolved": "1.2.25",
|
||||
"contentHash": "xCXiw7BCxHJ8pF6wPepRUddlh2dlQlbr81gXA72hdk4FLHkKXas7EH/n+fk5UCA/YfMqG1Z6XaPiUjDbUNBUzg=="
|
||||
},
|
||||
"EmbedIO": {
|
||||
"type": "Direct",
|
||||
"requested": "[3.5.2, )",
|
||||
|
|
@ -52,12 +64,6 @@
|
|||
"resolved": "3.1.7",
|
||||
"contentHash": "9fIOOAsyLFid6qKypM2Iy0Z3Q9yoanV8VoYAHtI2sYGMNKzhvRTjgFDHonIiVe+ANtxIxM6SuqUzj0r91nItpA=="
|
||||
},
|
||||
"System.Formats.Asn1": {
|
||||
"type": "Direct",
|
||||
"requested": "[9.0.2, )",
|
||||
"resolved": "9.0.2",
|
||||
"contentHash": "OKWHCPYQr/+cIoO8EVjFn7yFyiT8Mnf1wif/5bYGsqxQV6PrwlX2HQ9brZNx57ViOvRe4ing1xgHCKl/5Ko8xg=="
|
||||
},
|
||||
"JetBrains.Annotations": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2024.3.0",
|
||||
|
|
@ -134,8 +140,8 @@
|
|||
"type": "Project",
|
||||
"dependencies": {
|
||||
"OtterGui": "[1.0.0, )",
|
||||
"Penumbra.Api": "[5.6.0, )",
|
||||
"Penumbra.String": "[1.0.5, )"
|
||||
"Penumbra.Api": "[5.6.1, )",
|
||||
"Penumbra.String": "[1.0.6, )"
|
||||
}
|
||||
},
|
||||
"penumbra.string": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue