mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Remove Obsoletes
This commit is contained in:
parent
43abb12710
commit
9181e11195
6 changed files with 5 additions and 217 deletions
|
|
@ -55,18 +55,6 @@ internal sealed partial class BuddyList : IServiceType, IBuddyList
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the local player's companion is present.
|
||||
/// </summary>
|
||||
[Obsolete("Use CompanionBuddy != null", false)]
|
||||
public bool CompanionBuddyPresent => this.CompanionBuddy != null;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the local player's pet is present.
|
||||
/// </summary>
|
||||
[Obsolete("Use PetBuddy != null", false)]
|
||||
public bool PetBuddyPresent => this.PetBuddy != null;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public BuddyMember? CompanionBuddy
|
||||
{
|
||||
|
|
|
|||
|
|
@ -55,54 +55,6 @@ internal unsafe class GamepadState : IDisposable, IServiceType, IGamepadState
|
|||
public Vector2 RightStick =>
|
||||
new(this.rightStickX, this.rightStickY);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the state of the left analogue stick in the left direction between 0 (not tilted) and 1 (max tilt).
|
||||
/// </summary>
|
||||
[Obsolete("Use IGamepadState.LeftStick.X", false)]
|
||||
public float LeftStickLeft => this.leftStickX < 0 ? -this.leftStickX / 100f : 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the state of the left analogue stick in the right direction between 0 (not tilted) and 1 (max tilt).
|
||||
/// </summary>
|
||||
[Obsolete("Use IGamepadState.LeftStick.X", false)]
|
||||
public float LeftStickRight => this.leftStickX > 0 ? this.leftStickX / 100f : 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the state of the left analogue stick in the up direction between 0 (not tilted) and 1 (max tilt).
|
||||
/// </summary>
|
||||
[Obsolete("Use IGamepadState.LeftStick.Y", false)]
|
||||
public float LeftStickUp => this.leftStickY > 0 ? this.leftStickY / 100f : 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the state of the left analogue stick in the down direction between 0 (not tilted) and 1 (max tilt).
|
||||
/// </summary>
|
||||
[Obsolete("Use IGamepadState.LeftStick.Y", false)]
|
||||
public float LeftStickDown => this.leftStickY < 0 ? -this.leftStickY / 100f : 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the state of the right analogue stick in the left direction between 0 (not tilted) and 1 (max tilt).
|
||||
/// </summary>
|
||||
[Obsolete("Use IGamepadState.RightStick.X", false)]
|
||||
public float RightStickLeft => this.rightStickX < 0 ? -this.rightStickX / 100f : 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the state of the right analogue stick in the right direction between 0 (not tilted) and 1 (max tilt).
|
||||
/// </summary>
|
||||
[Obsolete("Use IGamepadState.RightStick.X", false)]
|
||||
public float RightStickRight => this.rightStickX > 0 ? this.rightStickX / 100f : 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the state of the right analogue stick in the up direction between 0 (not tilted) and 1 (max tilt).
|
||||
/// </summary>
|
||||
[Obsolete("Use IGamepadState.RightStick.Y", false)]
|
||||
public float RightStickUp => this.rightStickY > 0 ? this.rightStickY / 100f : 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the state of the right analogue stick in the down direction between 0 (not tilted) and 1 (max tilt).
|
||||
/// </summary>
|
||||
[Obsolete("Use IGamepadState.RightStick.Y", false)]
|
||||
public float RightStickDown => this.rightStickY < 0 ? -this.rightStickY / 100f : 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets buttons pressed bitmask, set once when the button is pressed. See <see cref="GamepadButtons"/> for the mapping.
|
||||
///
|
||||
|
|
|
|||
|
|
@ -39,35 +39,35 @@ internal sealed unsafe class TargetManager : IServiceType, ITargetManager
|
|||
public GameObject? Target
|
||||
{
|
||||
get => this.objectTable.CreateObjectReference((IntPtr)Struct->Target);
|
||||
set => this.SetTarget(value);
|
||||
set => Struct->Target = (FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)value?.Address;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public GameObject? MouseOverTarget
|
||||
{
|
||||
get => this.objectTable.CreateObjectReference((IntPtr)Struct->MouseOverTarget);
|
||||
set => this.SetMouseOverTarget(value);
|
||||
set => Struct->MouseOverTarget = (FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)value?.Address;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public GameObject? FocusTarget
|
||||
{
|
||||
get => this.objectTable.CreateObjectReference((IntPtr)Struct->FocusTarget);
|
||||
set => this.SetFocusTarget(value);
|
||||
set => Struct->FocusTarget = (FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)value?.Address;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public GameObject? PreviousTarget
|
||||
{
|
||||
get => this.objectTable.CreateObjectReference((IntPtr)Struct->PreviousTarget);
|
||||
set => this.SetPreviousTarget(value);
|
||||
set => Struct->PreviousTarget = (FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)value?.Address;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public GameObject? SoftTarget
|
||||
{
|
||||
get => this.objectTable.CreateObjectReference((IntPtr)Struct->SoftTarget);
|
||||
set => this.SetSoftTarget(value);
|
||||
set => Struct->SoftTarget = (FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)value?.Address;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
|
@ -85,104 +85,4 @@ internal sealed unsafe class TargetManager : IServiceType, ITargetManager
|
|||
}
|
||||
|
||||
private FFXIVClientStructs.FFXIV.Client.Game.Control.TargetSystem* Struct => (FFXIVClientStructs.FFXIV.Client.Game.Control.TargetSystem*)this.Address;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the current target.
|
||||
/// </summary>
|
||||
/// <param name="actor">Actor to target.</param>
|
||||
[Obsolete("Use Target Property", false)]
|
||||
public void SetTarget(GameObject? actor) => this.SetTarget(actor?.Address ?? IntPtr.Zero);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the mouseover target.
|
||||
/// </summary>
|
||||
/// <param name="actor">Actor to target.</param>
|
||||
[Obsolete("Use MouseOverTarget Property", false)]
|
||||
public void SetMouseOverTarget(GameObject? actor) => this.SetMouseOverTarget(actor?.Address ?? IntPtr.Zero);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the focus target.
|
||||
/// </summary>
|
||||
/// <param name="actor">Actor to target.</param>
|
||||
[Obsolete("Use FocusTarget Property", false)]
|
||||
public void SetFocusTarget(GameObject? actor) => this.SetFocusTarget(actor?.Address ?? IntPtr.Zero);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the previous target.
|
||||
/// </summary>
|
||||
/// <param name="actor">Actor to target.</param>
|
||||
[Obsolete("Use PreviousTarget Property", false)]
|
||||
public void SetPreviousTarget(GameObject? actor) => this.SetTarget(actor?.Address ?? IntPtr.Zero);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the soft target.
|
||||
/// </summary>
|
||||
/// <param name="actor">Actor to target.</param>
|
||||
[Obsolete("Use SoftTarget Property", false)]
|
||||
public void SetSoftTarget(GameObject? actor) => this.SetTarget(actor?.Address ?? IntPtr.Zero);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the current target.
|
||||
/// </summary>
|
||||
/// <param name="actorAddress">Actor (address) to target.</param>
|
||||
[Obsolete("Use Target Property", false)]
|
||||
public void SetTarget(IntPtr actorAddress) => Struct->Target = (FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)actorAddress;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the mouseover target.
|
||||
/// </summary>
|
||||
/// <param name="actorAddress">Actor (address) to target.</param>
|
||||
[Obsolete("Use MouseOverTarget Property", false)]
|
||||
public void SetMouseOverTarget(IntPtr actorAddress) => Struct->MouseOverTarget = (FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)actorAddress;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the focus target.
|
||||
/// </summary>
|
||||
/// <param name="actorAddress">Actor (address) to target.</param>
|
||||
[Obsolete("Use FocusTarget Property", false)]
|
||||
public void SetFocusTarget(IntPtr actorAddress) => Struct->FocusTarget = (FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)actorAddress;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the previous target.
|
||||
/// </summary>
|
||||
/// <param name="actorAddress">Actor (address) to target.</param>
|
||||
[Obsolete("Use PreviousTarget Property", false)]
|
||||
public void SetPreviousTarget(IntPtr actorAddress) => Struct->PreviousTarget = (FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)actorAddress;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the soft target.
|
||||
/// </summary>
|
||||
/// <param name="actorAddress">Actor (address) to target.</param>
|
||||
[Obsolete("Use SoftTarget Property", false)]
|
||||
public void SetSoftTarget(IntPtr actorAddress) => Struct->SoftTarget = (FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)actorAddress;
|
||||
|
||||
/// <summary>
|
||||
/// Clears the current target.
|
||||
/// </summary>
|
||||
[Obsolete("Use Target Property", false)]
|
||||
public void ClearTarget() => this.SetTarget(IntPtr.Zero);
|
||||
|
||||
/// <summary>
|
||||
/// Clears the mouseover target.
|
||||
/// </summary>
|
||||
[Obsolete("Use MouseOverTarget Property", false)]
|
||||
public void ClearMouseOverTarget() => this.SetMouseOverTarget(IntPtr.Zero);
|
||||
|
||||
/// <summary>
|
||||
/// Clears the focus target.
|
||||
/// </summary>
|
||||
[Obsolete("Use FocusTarget Property", false)]
|
||||
public void ClearFocusTarget() => this.SetFocusTarget(IntPtr.Zero);
|
||||
|
||||
/// <summary>
|
||||
/// Clears the previous target.
|
||||
/// </summary>
|
||||
[Obsolete("Use PreviousTarget Property", false)]
|
||||
public void ClearPreviousTarget() => this.SetPreviousTarget(IntPtr.Zero);
|
||||
|
||||
/// <summary>
|
||||
/// Clears the soft target.
|
||||
/// </summary>
|
||||
[Obsolete("Use SoftTarget Property", false)]
|
||||
public void ClearSoftTarget() => this.SetSoftTarget(IntPtr.Zero);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
|
||||
using Serilog;
|
||||
|
||||
namespace Dalamud.Game.Internal.DXGI;
|
||||
|
||||
/// <summary>
|
||||
/// The address resolver for native D3D11 methods to facilitate displaying the Dalamud UI.
|
||||
/// </summary>
|
||||
[Obsolete("This has been deprecated in favor of the VTable resolver.")]
|
||||
internal sealed class SwapChainSigResolver : BaseAddressResolver, ISwapChainAddressResolver
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public IntPtr Present { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IntPtr ResizeBuffers { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override void Setup64Bit(SigScanner sig)
|
||||
{
|
||||
var module = Process.GetCurrentProcess().Modules.Cast<ProcessModule>().First(m => m.ModuleName == "dxgi.dll");
|
||||
|
||||
Log.Debug($"Found DXGI: 0x{module.BaseAddress.ToInt64():X}");
|
||||
|
||||
var scanner = new SigScanner(module);
|
||||
|
||||
// This(code after the function head - offset of it) was picked to avoid running into issues with other hooks being installed into this function.
|
||||
this.Present = scanner.ScanModule("41 8B F0 8B FA 89 54 24 ?? 48 8B D9 48 89 4D ?? C6 44 24 ?? 00") - 0x37;
|
||||
|
||||
this.ResizeBuffers = scanner.ScanModule("48 8B C4 55 41 54 41 55 41 56 41 57 48 8D 68 B1 48 81 EC ?? ?? ?? ?? 48 C7 45 ?? ?? ?? ?? ?? 48 89 58 10 48 89 70 18 48 89 78 20 45 8B F9 45 8B E0 44 8B EA 48 8B F9 8B 45 7F 89 44 24 30 8B 75 77 89 74 24 28 44 89 4C 24");
|
||||
}
|
||||
}
|
||||
|
|
@ -123,16 +123,6 @@ public partial class FileDialog
|
|||
return this.isOk;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the result of the selection.
|
||||
/// </summary>
|
||||
/// <returns>The result of the selection (file or folder path). If multiple entries were selected, they are separated with commas.</returns>
|
||||
[Obsolete("Use GetResults() instead.", true)]
|
||||
public string GetResult()
|
||||
{
|
||||
return string.Join(',', this.GetResults());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the result of the selection.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -94,14 +94,6 @@ public class WindowSystem
|
|||
/// </summary>
|
||||
public void RemoveAllWindows() => this.windows.Clear();
|
||||
|
||||
/// <summary>
|
||||
/// Get a window by name.
|
||||
/// </summary>
|
||||
/// <param name="windowName">The name of the <see cref="Window"/>.</param>
|
||||
/// <returns>The <see cref="Window"/> object with matching name or null.</returns>
|
||||
[Obsolete("WindowSystem does not own your window - you should store a reference to it and use that instead.")]
|
||||
public Window? GetWindow(string windowName) => this.windows.FirstOrDefault(w => w.WindowName == windowName);
|
||||
|
||||
/// <summary>
|
||||
/// Draw all registered windows using ImGui.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue