Skip to content

Commit

Permalink
Remove Obsoletes
Browse files Browse the repository at this point in the history
  • Loading branch information
MidoriKami committed Sep 22, 2023
1 parent 43abb12 commit 9181e11
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 217 deletions.
12 changes: 0 additions & 12 deletions Dalamud/Game/ClientState/Buddy/BuddyList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,6 @@ public int Length
}
}

/// <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
{
Expand Down
48 changes: 0 additions & 48 deletions Dalamud/Game/ClientState/GamePad/GamepadState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,54 +55,6 @@ private GamepadState(ClientState clientState)
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.
///
Expand Down
110 changes: 5 additions & 105 deletions Dalamud/Game/ClientState/Objects/TargetManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,35 +39,35 @@ private TargetManager()
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/>
Expand All @@ -85,104 +85,4 @@ public GameObject? MouseOverNameplateTarget
}

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);
}
34 changes: 0 additions & 34 deletions Dalamud/Game/Internal/DXGI/SwapChainSigResolver.cs

This file was deleted.

10 changes: 0 additions & 10 deletions Dalamud/Interface/ImGuiFileDialog/FileDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,6 @@ public bool GetIsOk()
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>
Expand Down
8 changes: 0 additions & 8 deletions Dalamud/Interface/Windowing/WindowSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,6 @@ public void RemoveWindow(Window window)
/// </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>
Expand Down

0 comments on commit 9181e11

Please sign in to comment.