From 960f16b89ba5283be974a25c180cbbf3a2b7448f Mon Sep 17 00:00:00 2001 From: Renee Koecher Date: Tue, 10 Jan 2023 13:05:46 +0100 Subject: [PATCH] Ashita: v4 - update to ADK v4.15 --- 3rdParty/SDKs/Ashita/ADK_v4/Ashita.h | 60 +++++++++++++++++-- 3rdParty/SDKs/Ashita/ADK_v4/BinaryData.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/Chat.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/Commands.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/ErrorHandling.h | 2 +- .../SDKs/Ashita/ADK_v4/ImGuiFontAwesome.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/Memory.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/Registry.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/ScopeGuard.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/Threading.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/ffxi/autofollow.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/ffxi/castbar.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/ffxi/config.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/ffxi/entity.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/ffxi/enums.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/ffxi/inventory.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/ffxi/party.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/ffxi/player.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/ffxi/target.h | 2 +- 3rdParty/SDKs/Ashita/ADK_v4/imgui.h | 2 +- XIPivot.Ashita_v4/polplugin/AshitaInterface.h | 2 +- 21 files changed, 76 insertions(+), 24 deletions(-) diff --git a/3rdParty/SDKs/Ashita/ADK_v4/Ashita.h b/3rdParty/SDKs/Ashita/ADK_v4/Ashita.h index 083d6c1..b6dd194 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/Ashita.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/Ashita.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * @@ -65,7 +65,7 @@ // //////////////////////////////////////////////////////////////////////////////////////////////////// -constexpr auto ASHITA_INTERFACE_VERSION = 4.14; +constexpr auto ASHITA_INTERFACE_VERSION = 4.15; //////////////////////////////////////////////////////////////////////////////////////////////////// // @@ -84,6 +84,7 @@ constexpr auto ASHITA_INTERFACE_VERSION = 4.14; #include "d3d8/includes/d3d8.h" #include "d3d8/includes/d3dx8.h" #include "d3d8/includes/dinput.h" +#include // Ashita SDK Includes #include "BinaryData.h" @@ -408,6 +409,12 @@ namespace Ashita // method. Passes the device state to the callback to be handled before being sent to the // game. (Uses standard IDirectInputDevice8::GetDeviceState setup and params.) // +// controllercallback_f +// +// Function prototype used for registered callbacks to the hooked directinput controller +// interface. Passes the parameters from a rgdod entry to be handled before being used +// to update controller state and sent to the game. +// // keyboardcallback_f // // https://msdn.microsoft.com/en-us/library/windows/desktop/ms644984(v=vs.85).aspx @@ -421,13 +428,28 @@ namespace Ashita // Function prototype used for registered callbacks to the hooked mouse window message // events. Passes the mouse message to the callback to be handled before being sent to // the game. +// +// xinputgetstatecallback_f +// +// https://learn.microsoft.com/en-us/windows/win32/api/xinput/nf-xinput-xinputgetstate +// Function prototype used for registered callbacks to the hooked XInputGetState function. +// Passes the device state to the callback to be handled before being sent to the game. +// +// xinputcallback_f +// +// Function prototype used for registered callbacks to the XInput interface. Passes +// single button events to be handled before being used to update controller state and +// sent to the game. // //////////////////////////////////////////////////////////////////////////////////////////////////// typedef HRESULT(__stdcall* getdevicedatacallback_f)(DWORD, LPDIDEVICEOBJECTDATA, DWORD, LPDWORD, DWORD); typedef HRESULT(__stdcall* getdevicestatecallback_f)(DWORD, LPVOID); +typedef BOOL(__stdcall* controllercallback_f)(uint32_t*, int32_t*, bool, bool); typedef BOOL(__stdcall* keyboardcallback_f)(WPARAM, LPARAM, bool); typedef BOOL(__stdcall* mousecallback_f)(uint32_t, WPARAM, LPARAM, bool); +typedef DWORD(__stdcall* xinputgetstatecallback_f)(DWORD, XINPUT_STATE*); +typedef BOOL(__stdcall* xinputcallback_f)(uint8_t*, int16_t*, bool, bool); //////////////////////////////////////////////////////////////////////////////////////////////////// // @@ -1239,6 +1261,20 @@ struct ITarget // //////////////////////////////////////////////////////////////////////////////////////////////////// +struct IController +{ + // Methods (Callbacks) + virtual void AddCallback(const char* alias, const getdevicedatacallback_f& datacb, const getdevicestatecallback_f& statecb, const controllercallback_f& controllercb) = 0; + virtual void RemoveCallback(const char* alias) = 0; + + // Methods (Input Injection) + virtual void QueueButtonData(DWORD dwOfs, DWORD dwData) = 0; + + // Properties + virtual bool GetTrackDeadZone(void) const = 0; + virtual void SetTrackDeadZone(bool track) = 0; +}; + struct IKeyboard { // Methods (Keybinds) @@ -1282,11 +1318,27 @@ struct IMouse virtual void SetBlockInput(bool blocked) = 0; }; +struct IXInput +{ + // Methods (Callbacks) + virtual void AddCallback(const char* alias, const xinputgetstatecallback_f& statecb, const xinputcallback_f& controllercb) = 0; + virtual void RemoveCallback(const char* alias) = 0; + + // Methods (Input Injection) + virtual void QueueButtonData(uint8_t button, int16_t state) = 0; + + // Properties + virtual bool GetTrackDeadZone(void) const = 0; + virtual void SetTrackDeadZone(bool track) = 0; +}; + struct IInputManager { // Methods (Input Objects) - virtual IKeyboard* GetKeyboard(void) const = 0; - virtual IMouse* GetMouse(void) const = 0; + virtual IController* GetController(void) const = 0; + virtual IKeyboard* GetKeyboard(void) const = 0; + virtual IMouse* GetMouse(void) const = 0; + virtual IXInput* GetXInput(void) const = 0; // Properties virtual bool GetAllowGamepadInBackground(void) const = 0; diff --git a/3rdParty/SDKs/Ashita/ADK_v4/BinaryData.h b/3rdParty/SDKs/Ashita/ADK_v4/BinaryData.h index 7f3c5a7..6de6e6c 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/BinaryData.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/BinaryData.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/Chat.h b/3rdParty/SDKs/Ashita/ADK_v4/Chat.h index c445d6a..bad969d 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/Chat.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/Chat.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/Commands.h b/3rdParty/SDKs/Ashita/ADK_v4/Commands.h index feed95c..d5ab3a7 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/Commands.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/Commands.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/ErrorHandling.h b/3rdParty/SDKs/Ashita/ADK_v4/ErrorHandling.h index caaec15..08eb6fd 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/ErrorHandling.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/ErrorHandling.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/ImGuiFontAwesome.h b/3rdParty/SDKs/Ashita/ADK_v4/ImGuiFontAwesome.h index 7b6183c..4ddbb52 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/ImGuiFontAwesome.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/ImGuiFontAwesome.h @@ -1,5 +1,5 @@ /** - * Ashita - Copyright (c) 2022 Ashita Development Team + * Ashita - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/Memory.h b/3rdParty/SDKs/Ashita/ADK_v4/Memory.h index c8f5923..fb8826a 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/Memory.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/Memory.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/Registry.h b/3rdParty/SDKs/Ashita/ADK_v4/Registry.h index b520f75..c3f87cf 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/Registry.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/Registry.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/ScopeGuard.h b/3rdParty/SDKs/Ashita/ADK_v4/ScopeGuard.h index 1c1d12d..c6806a3 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/ScopeGuard.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/ScopeGuard.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/Threading.h b/3rdParty/SDKs/Ashita/ADK_v4/Threading.h index 9cf60bf..34c1279 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/Threading.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/Threading.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/autofollow.h b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/autofollow.h index 70912b1..859e125 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/autofollow.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/autofollow.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/castbar.h b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/castbar.h index 1a8c21f..d61b831 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/castbar.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/castbar.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/config.h b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/config.h index 85549ec..9b3042d 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/config.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/config.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/entity.h b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/entity.h index dbda826..f07e569 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/entity.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/entity.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/enums.h b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/enums.h index 0cfbc7b..c5d728f 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/enums.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/enums.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/inventory.h b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/inventory.h index c1e1d19..e15bd5f 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/inventory.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/inventory.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/party.h b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/party.h index b5825c6..d4de4d8 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/party.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/party.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/player.h b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/player.h index 758f618..fe3f7c4 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/player.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/player.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/target.h b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/target.h index ab242eb..2758cd9 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/ffxi/target.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/ffxi/target.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/3rdParty/SDKs/Ashita/ADK_v4/imgui.h b/3rdParty/SDKs/Ashita/ADK_v4/imgui.h index 3426ee7..2d59e8b 100644 --- a/3rdParty/SDKs/Ashita/ADK_v4/imgui.h +++ b/3rdParty/SDKs/Ashita/ADK_v4/imgui.h @@ -1,5 +1,5 @@ /** - * Ashita SDK - Copyright (c) 2022 Ashita Development Team + * Ashita SDK - Copyright (c) 2023 Ashita Development Team * Contact: https://www.ashitaxi.com/ * Contact: https://discord.gg/Ashita * diff --git a/XIPivot.Ashita_v4/polplugin/AshitaInterface.h b/XIPivot.Ashita_v4/polplugin/AshitaInterface.h index 71cdaf2..0bb37ed 100644 --- a/XIPivot.Ashita_v4/polplugin/AshitaInterface.h +++ b/XIPivot.Ashita_v4/polplugin/AshitaInterface.h @@ -40,7 +40,7 @@ namespace XiPivot { static constexpr auto PluginName = "pivot"; static constexpr auto PluginAuthor = "Heals"; - static constexpr auto PluginVersion = 4.1403; + static constexpr auto PluginVersion = 4.1500; static constexpr auto PluginUrl = "https://github.com/Shirk/XIPivot"; static constexpr auto PluginDescr = "Runtime DAT, sfx and bgm replacement manager."; static constexpr auto PluginCommand = "pivot";