mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Merge branch 'api14' into update-terrafx
This commit is contained in:
commit
4d949e4a07
8 changed files with 8 additions and 82 deletions
|
|
@ -73,8 +73,6 @@
|
|||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MinSharp" />
|
||||
<PackageReference Include="SharpDX.Direct3D11" />
|
||||
<PackageReference Include="SharpDX.Mathematics" />
|
||||
<PackageReference Include="Newtonsoft.Json" />
|
||||
<PackageReference Include="Serilog" />
|
||||
<PackageReference Include="Serilog.Sinks.Async" />
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ using Dalamud.Interface.Textures.TextureWraps;
|
|||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Storage.Assets;
|
||||
using Dalamud.Utility;
|
||||
using SharpDX.DXGI;
|
||||
using TerraFX.Interop.DirectX;
|
||||
|
||||
namespace Dalamud.Interface.ManagedFontAtlas.Internals;
|
||||
|
|
@ -749,7 +748,7 @@ internal sealed partial class FontAtlasFactory
|
|||
new(
|
||||
width,
|
||||
height,
|
||||
(int)(use4 ? Format.B4G4R4A4_UNorm : Format.B8G8R8A8_UNorm),
|
||||
(int)(use4 ? DXGI_FORMAT.DXGI_FORMAT_B4G4R4A4_UNORM : DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM),
|
||||
width * bpp),
|
||||
buf,
|
||||
name);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ using Dalamud.Interface.FontIdentifier;
|
|||
using Dalamud.Interface.Internal;
|
||||
using Dalamud.Interface.ManagedFontAtlas;
|
||||
using Dalamud.Interface.ManagedFontAtlas.Internals;
|
||||
using Dalamud.Plugin;
|
||||
using Dalamud.Plugin.Internal.Types;
|
||||
using Dalamud.Utility;
|
||||
using Serilog;
|
||||
|
|
@ -150,13 +149,6 @@ public interface IUiBuilder
|
|||
/// </summary>
|
||||
public ImFontPtr FontMono { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the game's active Direct3D device.
|
||||
/// </summary>
|
||||
// TODO: Remove it on API11/APIXI, and remove SharpDX/PInvoke/etc. dependency from Dalamud.
|
||||
[Obsolete($"Use {nameof(DeviceHandle)} and wrap it using DirectX wrapper library of your choice.")]
|
||||
SharpDX.Direct3D11.Device Device { get; }
|
||||
|
||||
/// <summary>Gets the game's active Direct3D device.</summary>
|
||||
/// <value>Pointer to the instance of IUnknown that the game is using and should be containing an ID3D11Device,
|
||||
/// or 0 if it is not available yet.</value>
|
||||
|
|
@ -302,8 +294,6 @@ public sealed class UiBuilder : IDisposable, IUiBuilder
|
|||
private IFontHandle? monoFontHandle;
|
||||
private IFontHandle? iconFontFixedWidthHandle;
|
||||
|
||||
private SharpDX.Direct3D11.Device? sdxDevice;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UiBuilder"/> class and registers it.
|
||||
/// You do not have to call this manually.
|
||||
|
|
@ -493,12 +483,6 @@ public sealed class UiBuilder : IDisposable, IUiBuilder
|
|||
this.InterfaceManagerWithScene?.MonoFontHandle
|
||||
?? throw new InvalidOperationException("Scene is not yet ready.")));
|
||||
|
||||
/// <inheritdoc/>
|
||||
// TODO: Remove it on API11/APIXI, and remove SharpDX/PInvoke/etc. dependency from Dalamud.
|
||||
[Obsolete($"Use {nameof(DeviceHandle)} and wrap it using DirectX wrapper library of your choice.")]
|
||||
public SharpDX.Direct3D11.Device Device =>
|
||||
this.sdxDevice ??= new(this.InterfaceManagerWithScene!.Backend!.DeviceHandle);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public nint DeviceHandle => this.InterfaceManagerWithScene?.Backend?.DeviceHandle ?? 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ public enum DalamudAssetPurpose
|
|||
Empty = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The asset is a .png file, and can be purposed as a <see cref="SharpDX.Direct3D11.Texture2D"/>.
|
||||
/// The asset is a .png file, and can be purposed as a <see cref="TerraFX.Interop.DirectX.ID3D11Texture2D"/>.
|
||||
/// </summary>
|
||||
TextureFromPng = 10,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The asset is a raw texture, and can be purposed as a <see cref="SharpDX.Direct3D11.Texture2D"/>.
|
||||
/// The asset is a raw texture, and can be purposed as a <see cref="TerraFX.Interop.DirectX.ID3D11Texture2D"/>.
|
||||
/// </summary>
|
||||
TextureFromRaw = 1001,
|
||||
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
using System.Numerics;
|
||||
|
||||
namespace Dalamud.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Extension methods for System.Numerics.VectorN and SharpDX.VectorN.
|
||||
/// </summary>
|
||||
public static class VectorExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts a SharpDX vector to System.Numerics.
|
||||
/// </summary>
|
||||
/// <param name="vec">Vector to convert.</param>
|
||||
/// <returns>A converted vector.</returns>
|
||||
public static Vector2 ToSystem(this SharpDX.Vector2 vec) => new(x: vec.X, y: vec.Y);
|
||||
|
||||
/// <summary>
|
||||
/// Converts a SharpDX vector to System.Numerics.
|
||||
/// </summary>
|
||||
/// <param name="vec">Vector to convert.</param>
|
||||
/// <returns>A converted vector.</returns>
|
||||
public static Vector3 ToSystem(this SharpDX.Vector3 vec) => new(x: vec.X, y: vec.Y, z: vec.Z);
|
||||
|
||||
/// <summary>
|
||||
/// Converts a SharpDX vector to System.Numerics.
|
||||
/// </summary>
|
||||
/// <param name="vec">Vector to convert.</param>
|
||||
/// <returns>A converted vector.</returns>
|
||||
public static Vector4 ToSystem(this SharpDX.Vector4 vec) => new(x: vec.X, y: vec.Y, z: vec.Z, w: vec.W);
|
||||
|
||||
/// <summary>
|
||||
/// Converts a System.Numerics vector to SharpDX.
|
||||
/// </summary>
|
||||
/// <param name="vec">Vector to convert.</param>
|
||||
/// <returns>A converted vector.</returns>
|
||||
public static SharpDX.Vector2 ToSharpDX(this Vector2 vec) => new(x: vec.X, y: vec.Y);
|
||||
|
||||
/// <summary>
|
||||
/// Converts a System.Numerics vector to SharpDX.
|
||||
/// </summary>
|
||||
/// <param name="vec">Vector to convert.</param>
|
||||
/// <returns>A converted vector.</returns>
|
||||
public static SharpDX.Vector3 ToSharpDX(this Vector3 vec) => new(x: vec.X, y: vec.Y, z: vec.Z);
|
||||
|
||||
/// <summary>
|
||||
/// Converts a System.Numerics vector to SharpDX.
|
||||
/// </summary>
|
||||
/// <param name="vec">Vector to convert.</param>
|
||||
/// <returns>A converted vector.</returns>
|
||||
public static SharpDX.Vector4 ToSharpDX(this Vector4 vec) => new(x: vec.X, y: vec.Y, z: vec.Z, w: vec.W);
|
||||
}
|
||||
|
|
@ -26,9 +26,7 @@
|
|||
<PackageVersion Include="sqlite-net-pcl" Version="1.8.116" />
|
||||
|
||||
<!-- DirectX / Win32 -->
|
||||
<PackageVersion Include="TerraFX.Interop.Windows" Version="10.0.26100.5" />
|
||||
<PackageVersion Include="SharpDX.Direct3D11" Version="4.2.0" />
|
||||
<PackageVersion Include="SharpDX.Mathematics" Version="4.2.0" />
|
||||
<PackageVersion Include="TerraFX.Interop.Windows" Version="10.0.22621.2" />
|
||||
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.3.183" />
|
||||
|
||||
<!-- Logging -->
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Nuke.Common;
|
||||
using Nuke.Common.Execution;
|
||||
using Nuke.Common.Git;
|
||||
|
|
@ -128,7 +127,7 @@ public class DalamudBuild : NukeBuild
|
|||
if (IsCIBuild)
|
||||
{
|
||||
s = s
|
||||
.SetProcessArgumentConfigurator(a => a.Add("/clp:NoSummary")); // Disable MSBuild summary on CI builds
|
||||
.SetProcessAdditionalArguments("/clp:NoSummary"); // Disable MSBuild summary on CI builds
|
||||
}
|
||||
// We need to emit compiler generated files for the docs build, since docfx can't run generators directly
|
||||
// TODO: This fails every build after this because of redefinitions...
|
||||
|
|
@ -238,7 +237,6 @@ public class DalamudBuild : NukeBuild
|
|||
.SetProject(InjectorProjectFile)
|
||||
.SetConfiguration(Configuration));
|
||||
|
||||
FileSystemTasks.DeleteDirectory(ArtifactsDirectory);
|
||||
Directory.CreateDirectory(ArtifactsDirectory);
|
||||
ArtifactsDirectory.CreateOrCleanDirectory();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Nuke.Common" Version="6.2.1" />
|
||||
<PackageReference Include="Nuke.Common" Version="10.1.0" />
|
||||
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="10.0.0" />
|
||||
<PackageReference Remove="Microsoft.CodeAnalysis.BannedApiAnalyzers" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue