From 2a51c7bff664929fb181a9c55f84d326cbe28bfb Mon Sep 17 00:00:00 2001 From: davidebeatrici Date: Mon, 13 Nov 2017 20:45:22 +0100 Subject: [PATCH] Accomplish changes in all the plugins --- plugins/aoc/aoc.cpp | 6 +-- plugins/arma2/arma2.cpp | 10 ++-- plugins/bf1/bf1.cpp | 40 +++++++-------- plugins/bf1942/bf1942.cpp | 8 +-- plugins/bf2/bf2.cpp | 40 +++++++-------- plugins/bf2142/bf2142.cpp | 22 ++++---- plugins/bf3/bf3.cpp | 24 ++++----- plugins/bf4/bf4.cpp | 18 +++---- plugins/bf4_x86/bf4_x86.cpp | 16 +++--- plugins/bfbc2/bfbc2.cpp | 2 +- plugins/bfheroes/bfheroes.cpp | 16 +++--- plugins/blacklight/blacklight.cpp | 10 ++-- plugins/borderlands/borderlands.cpp | 16 +++--- plugins/borderlands2/borderlands2.cpp | 14 ++--- plugins/breach/breach.cpp | 6 +-- plugins/cod2/cod2.cpp | 2 +- plugins/cod4/cod4.cpp | 2 +- plugins/cod5/cod5.cpp | 2 +- plugins/codmw2/codmw2.cpp | 2 +- plugins/codmw2so/codmw2so.cpp | 2 +- plugins/cs/cs.cpp | 4 +- plugins/dys/dys.cpp | 6 +-- plugins/etqw/etqw.cpp | 4 +- plugins/ffxiv/ffxiv.cpp | 60 ++++++++++------------ plugins/gmod/gmod.cpp | 8 +-- plugins/gtaiv/gtaiv.cpp | 12 ++--- plugins/gtav/gtav.cpp | 6 +-- plugins/gw/gw.cpp | 22 ++++---- plugins/insurgency/insurgency.cpp | 6 +-- plugins/jc2/jc2.cpp | 8 +-- plugins/l4d/l4d.cpp | 8 +-- plugins/l4d2/l4d2.cpp | 74 +++++++++++++-------------- plugins/lol/lol.cpp | 22 ++++---- plugins/lotro/lotro.cpp | 6 +-- plugins/ql/ql.cpp | 2 +- plugins/rl/rl_linux.cpp | 10 ++-- plugins/rl/rl_win32.cpp | 12 ++--- plugins/sr/sr.cpp | 2 +- plugins/ut2004/ut2004.cpp | 12 ++--- plugins/ut3/ut3.cpp | 8 +-- plugins/ut99/ut99.cpp | 20 ++++---- plugins/wolfet/wolfet.cpp | 2 +- plugins/wow/wow.cpp | 26 +++++----- plugins/wow_x64/wow_x64.cpp | 26 +++++----- 44 files changed, 310 insertions(+), 314 deletions(-) diff --git a/plugins/aoc/aoc.cpp b/plugins/aoc/aoc.cpp index ddf08d692db..b524587a756 100644 --- a/plugins/aoc/aoc.cpp +++ b/plugins/aoc/aoc.cpp @@ -3,11 +3,11 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" using namespace std; -procptr32_t posptr, rotptr, stateptr, hostptr; +procptr_t posptr, rotptr, stateptr, hostptr; static bool calcout(float *pos, float *rot, float *opos, float *front, float *top) { float h = rot[0]; @@ -97,7 +97,7 @@ static int trylock(const std::multimap &pi if (! initialize(pids, L"hl2.exe", L"client.dll")) return false; - procptr32_t mod_engine=getModuleAddr(L"engine.dll"); + procptr_t mod_engine=getModuleAddr(L"engine.dll"); if (!mod_engine) return false; diff --git a/plugins/arma2/arma2.cpp b/plugins/arma2/arma2.cpp index c2cfb62ee2f..cc8ec28fe32 100644 --- a/plugins/arma2/arma2.cpp +++ b/plugins/arma2/arma2.cpp @@ -3,9 +3,9 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" -procptr32_t posptr, frontptr, topptr; +procptr_t posptr, frontptr, topptr; static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &, std::wstring &) { for (int i=0;i<3;i++) @@ -92,11 +92,11 @@ static int trylock(const std::multimap &pi if (!pModule) */ - procptr32_t ptr1 = peekProc(0x00C500FC); + procptr_t ptr1 = peekProcPtr(0x00C500FC); - procptr32_t ptr2 = peekProc(ptr1 + 0x88); + procptr_t ptr2 = peekProcPtr(ptr1 + 0x88); - procptr32_t base = ptr2 + 0x10; + procptr_t base = ptr2 + 0x10; posptr = base + 0x18; frontptr = base; diff --git a/plugins/bf1/bf1.cpp b/plugins/bf1/bf1.cpp index a9294b87dc5..5e474ae9ac6 100644 --- a/plugins/bf1/bf1.cpp +++ b/plugins/bf1/bf1.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_64bit.h" // Include standard plugin header. +#include "../mumble_plugin_win32.h" // Include standard plugin header. #include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &context, std::wstring &identity) { @@ -16,51 +16,51 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa BYTE squad, squad_leader; // State pointers - procptr64_t state_base = peekProc(pModule + 0x33DBD08); + procptr_t state_base = peekProcPtr(pModule + 0x33DBD08); if (!state_base) return false; - procptr64_t state_offset_0 = peekProc(state_base + 0x5F0); + procptr_t state_offset_0 = peekProcPtr(state_base + 0x5F0); if (!state_offset_0) return false; - procptr64_t state_offset_1 = peekProc(state_offset_0 + 0x488); + procptr_t state_offset_1 = peekProcPtr(state_offset_0 + 0x488); if (!state_offset_1) return false; - procptr64_t state_offset_2 = peekProc(state_offset_1 + 0x8); + procptr_t state_offset_2 = peekProcPtr(state_offset_1 + 0x8); if (!state_offset_2) return false; - procptr64_t state_offset_3 = peekProc(state_offset_2 + 0x8); + procptr_t state_offset_3 = peekProcPtr(state_offset_2 + 0x8); if (!state_offset_3) return false; // Camera pointer - procptr64_t camera_base = peekProc(pModule + 0x368E828); + procptr_t camera_base = peekProcPtr(pModule + 0x368E828); if (!camera_base) return false; // Server name pointers - procptr64_t server_name_base = peekProc(pModule + 0x3103A38); + procptr_t server_name_base = peekProcPtr(pModule + 0x3103A38); if (!server_name_base) return false; - procptr64_t server_name_offset_0 = peekProc(server_name_base + 0x738); + procptr_t server_name_offset_0 = peekProcPtr(server_name_base + 0x738); if (!server_name_offset_0) return false; - procptr64_t server_name_offset_1 = peekProc(server_name_offset_0 + 0x370); + procptr_t server_name_offset_1 = peekProcPtr(server_name_offset_0 + 0x370); if (!server_name_offset_1) return false; - procptr64_t server_name_offset_2 = peekProc(server_name_offset_1 + 0x10); + procptr_t server_name_offset_2 = peekProcPtr(server_name_offset_1 + 0x10); if (!server_name_offset_2) return false; // Team pointers - procptr64_t team_base = peekProc(pModule + 0x36CC128); + procptr_t team_base = peekProcPtr(pModule + 0x36CC128); if (!team_base) return false; - procptr64_t team_offset_0 = peekProc(team_base + 0x20); + procptr_t team_offset_0 = peekProcPtr(team_base + 0x20); if (!team_offset_0) return false; - procptr64_t team_offset_1 = peekProc(team_offset_0 + 0x648); + procptr_t team_offset_1 = peekProcPtr(team_offset_0 + 0x648); if (!team_offset_1) return false; - procptr64_t team_offset_2 = peekProc(team_offset_1 + 0xF8); + procptr_t team_offset_2 = peekProcPtr(team_offset_1 + 0xF8); if (!team_offset_2) return false; // Squad pointers - procptr64_t squad_base = peekProc(pModule + 0x31C3E40); + procptr_t squad_base = peekProcPtr(pModule + 0x31C3E40); if (!squad_base) return false; - procptr64_t squad_offset_0 = peekProc(squad_base + 0x30); + procptr_t squad_offset_0 = peekProcPtr(squad_base + 0x30); if (!squad_offset_0) return false; - procptr64_t squad_offset_1 = peekProc(squad_offset_0 + 0x578); + procptr_t squad_offset_1 = peekProcPtr(squad_offset_0 + 0x578); if (!squad_offset_1) return false; - procptr64_t squad_offset_2 = peekProc(squad_offset_1 + 0xC0); + procptr_t squad_offset_2 = peekProcPtr(squad_offset_1 + 0xC0); if (!squad_offset_2) return false; - procptr64_t squad_offset_3 = peekProc(squad_offset_2 + 0x58); + procptr_t squad_offset_3 = peekProcPtr(squad_offset_2 + 0x58); if (!squad_offset_3) return false; // Peekproc and assign game addresses to our containers, so we can retrieve positional data diff --git a/plugins/bf1942/bf1942.cpp b/plugins/bf1942/bf1942.cpp index db43e033eaa..35f99e363f9 100644 --- a/plugins/bf1942/bf1942.cpp +++ b/plugins/bf1942/bf1942.cpp @@ -3,9 +3,9 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" -procptr32_t faceptr, topptr; +procptr_t faceptr, topptr; //BYTE *stateptr; //BYTE *contextptr; @@ -56,8 +56,8 @@ static int trylock(const std::multimap &pi if (! initialize(pids, L"BF1942.exe")) return false; - procptr32_t ptr1 = peekProc(0x009A9468); - procptr32_t ptr2 = peekProc(ptr1 + 0x98); + procptr_t ptr1 = peekProcPtr(0x009A9468); + procptr_t ptr2 = peekProcPtr(ptr1 + 0x98); faceptr = ptr2 + 0x5C; topptr = ptr2 + 0x4C; diff --git a/plugins/bf2/bf2.cpp b/plugins/bf2/bf2.cpp index 505a002eb0c..96107418ecf 100644 --- a/plugins/bf2/bf2.cpp +++ b/plugins/bf2/bf2.cpp @@ -3,27 +3,27 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" using namespace std; bool ptr_chain_valid = false; // Modules -procptr32_t pmodule_bf2, pmodule_renddx9; +procptr_t pmodule_bf2, pmodule_renddx9; // Magic ptrs -procptr32_t const login_ptr = 0x30058642; -procptr32_t const state_ptr = 0x00A1D0A8; +procptr_t const login_ptr = 0x30058642; +procptr_t const state_ptr = 0x00A1D0A8; // Vector ptrs -procptr32_t pos_ptr, face_ptr, top_ptr; +procptr_t pos_ptr, face_ptr, top_ptr; // Context ptrs -procptr32_t const ipport_ptr = 0x009A80B8; +procptr_t const ipport_ptr = 0x009A80B8; // Identity ptrs -procptr32_t commander_ptr, squad_leader_ptr, squad_state_ptr, team_state_ptr, voip_ptr, voip_com_ptr, target_squad_ptr; +procptr_t commander_ptr, squad_leader_ptr, squad_state_ptr, team_state_ptr, voip_ptr, voip_com_ptr, target_squad_ptr; inline bool resolve_ptrs() { pos_ptr = face_ptr = top_ptr = commander_ptr = squad_leader_ptr = squad_state_ptr = team_state_ptr = voip_ptr = voip_com_ptr = target_squad_ptr = 0; @@ -31,13 +31,13 @@ inline bool resolve_ptrs() { // Resolve all pointer chains to the values we want to fetch // - procptr32_t base_bf2audio = pModule + 0x4645c; - procptr32_t base_bf2audio_2 = peekProc(base_bf2audio); + procptr_t base_bf2audio = pModule + 0x4645c; + procptr_t base_bf2audio_2 = peekProcPtr(base_bf2audio); if (!base_bf2audio_2) return false; - pos_ptr = peekProc(base_bf2audio_2 + 0xb4); - face_ptr = peekProc(base_bf2audio_2 + 0xb8); - top_ptr = peekProc(base_bf2audio_2 + 0xbc); + pos_ptr = peekProcPtr(base_bf2audio_2 + 0xb4); + face_ptr = peekProcPtr(base_bf2audio_2 + 0xb8); + top_ptr = peekProcPtr(base_bf2audio_2 + 0xbc); if (!pos_ptr || !face_ptr || !top_ptr) return false; /* @@ -59,34 +59,34 @@ inline bool resolve_ptrs() { Com. VoiP state: BF2.exe+005A4DA0 -> 4E BYTE 1 is VoiP on commander channel active (held down) Target squad state: RendDX9.dll+00266D84 -> C0 -> C0 -> 40 -> AC BYTE 1 is Alpha squad, 2 Bravo... selected on commander screen */ - procptr32_t base_renddx9 = peekProc(pmodule_renddx9 + 0x00244AE0); + procptr_t base_renddx9 = peekProcPtr(pmodule_renddx9 + 0x00244AE0); if (!base_renddx9) return false; - procptr32_t base_renddx9_2 = peekProc(base_renddx9 + 0x60); + procptr_t base_renddx9_2 = peekProcPtr(base_renddx9 + 0x60); if (!base_renddx9_2) return false; commander_ptr = base_renddx9_2 + 0x110; squad_leader_ptr = base_renddx9_2 + 0x111; squad_state_ptr = base_renddx9_2 + 0x10C; - procptr32_t base_bf2 = peekProc(pmodule_bf2 + 0x0058734C); + procptr_t base_bf2 = peekProcPtr(pmodule_bf2 + 0x0058734C); if (!base_bf2) return false; team_state_ptr = base_bf2 + 0x239; - procptr32_t base_voip = peekProc(pmodule_bf2 + 0x005A4DA0); + procptr_t base_voip = peekProcPtr(pmodule_bf2 + 0x005A4DA0); if (!base_voip) return false; voip_ptr = base_voip + 0x61; voip_com_ptr = base_voip + 0x4E; - procptr32_t base_target_squad = peekProc(pmodule_renddx9 + 0x00266D84); + procptr_t base_target_squad = peekProcPtr(pmodule_renddx9 + 0x00266D84); if (!base_target_squad) return false; - procptr32_t base_target_squad_2 = peekProc(base_target_squad + 0xC0); + procptr_t base_target_squad_2 = peekProcPtr(base_target_squad + 0xC0); if (!base_target_squad_2) return false; - procptr32_t base_target_squad_3 = peekProc(base_target_squad_2 + 0xC0); + procptr_t base_target_squad_3 = peekProcPtr(base_target_squad_2 + 0xC0); if (!base_target_squad_3) return false; - procptr32_t base_target_squad_4 = peekProc(base_target_squad_3 + 0x40); + procptr_t base_target_squad_4 = peekProcPtr(base_target_squad_3 + 0x40); if (!base_target_squad_4) return false; target_squad_ptr = base_target_squad_4 + 0xAC; diff --git a/plugins/bf2142/bf2142.cpp b/plugins/bf2142/bf2142.cpp index 30c87893813..1dfa8300349 100644 --- a/plugins/bf2142/bf2142.cpp +++ b/plugins/bf2142/bf2142.cpp @@ -3,11 +3,11 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" // Include standard plugin header. +#include "../mumble_plugin_win32.h" // Include standard plugin header. #include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". // Variable to contain module's addresses -procptr32_t RendDX9 = 0; +procptr_t RendDX9 = 0; static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &context, std::wstring &identity) { @@ -21,7 +21,7 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa // Server name pointers // Doubles as an in-server state variable (NULL if not in a game) - procptr32_t server_offset_0 = peekProc(pModule + 0x61B5D8); + procptr_t server_offset_0 = peekProcPtr(pModule + 0x61B5D8); if (!server_offset_0) { context.clear(); // Clear context identity.clear(); // Clear identity @@ -29,29 +29,29 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa return true; // This tells Mumble to ignore all vectors. } - procptr32_t server_offset_1 = peekProc(server_offset_0 + 0x108); + procptr_t server_offset_1 = peekProcPtr(server_offset_0 + 0x108); if (!server_offset_1) return false; // Team ID pointers - procptr32_t team_offset_0 = peekProc(pModule + 0x624430); + procptr_t team_offset_0 = peekProcPtr(pModule + 0x624430); if (!team_offset_0) return false; - procptr32_t team_offset_1 = peekProc(team_offset_0 + 0x1B4); + procptr_t team_offset_1 = peekProcPtr(team_offset_0 + 0x1B4); if (!team_offset_1) return false; // Commander, SquadLeader, SquadID base pointers - procptr32_t role_offset_0 = peekProc(pModule + 0x685228); + procptr_t role_offset_0 = peekProcPtr(pModule + 0x685228); if (!role_offset_0) return false; - procptr32_t role_offset_1 = peekProc(role_offset_0 + 0x6C); + procptr_t role_offset_1 = peekProcPtr(role_offset_0 + 0x6C); if (!role_offset_1) return false; // Tactical pointers - procptr32_t tactical_offset_0 = peekProc(pModule + 0x72D148); + procptr_t tactical_offset_0 = peekProcPtr(pModule + 0x72D148); if (!tactical_offset_0) return false; - procptr32_t tactical_offset_1 = peekProc(tactical_offset_0 + 0xE4); + procptr_t tactical_offset_1 = peekProcPtr(tactical_offset_0 + 0xE4); if (!tactical_offset_1) return false; // VoiP pointers - procptr32_t voip_offset_0 = peekProc(pModule + 0x620D30); + procptr_t voip_offset_0 = peekProcPtr(pModule + 0x620D30); if (!voip_offset_0) return false; // Peekproc and assign game addresses to our containers, so we can retrieve positional data diff --git a/plugins/bf3/bf3.cpp b/plugins/bf3/bf3.cpp index 85d66b72822..9e2b33a47bb 100644 --- a/plugins/bf3/bf3.cpp +++ b/plugins/bf3/bf3.cpp @@ -36,22 +36,22 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" static bool ptr_chain_valid = false; // Magic ptrs -static procptr32_t const state_ptr = 0x238ABDC; +static procptr_t const state_ptr = 0x238ABDC; // Vector ptrs -static procptr32_t const avatar_pos_ptr = 0x0238AB70; -static procptr32_t const avatar_front_ptr = 0x0238ABA0; -static procptr32_t const avatar_top_ptr = 0x0238AB90; +static procptr_t const avatar_pos_ptr = 0x0238AB70; +static procptr_t const avatar_front_ptr = 0x0238ABA0; +static procptr_t const avatar_top_ptr = 0x0238AB90; // Context ptrs -static procptr32_t const ipport_ptr = 0x0235DB90; +static procptr_t const ipport_ptr = 0x0235DB90; // Identity ptrs -static procptr32_t team_state_ptr, squad_state_ptr, squad_lead_state_ptr; +static procptr_t team_state_ptr, squad_state_ptr, squad_lead_state_ptr; // Offsets static const int base_offset = 0x01EF25C4; @@ -100,17 +100,17 @@ inline bool resolve_ptrs() { Team state: BF3.exe+0x01EF25C4 + 0x1C + 0xBC + 0x31C BYTE 1 is blufor (US team, for example), 2 is opfor (RU), 0 is probably upcoming spec mode */ - procptr32_t base_bf3 = peekProc(pModule + base_offset); + procptr_t base_bf3 = peekProcPtr(pModule + base_offset); if (!base_bf3) return false; - procptr32_t offset_ptr1 = peekProc(base_bf3 + identity_offset1); + procptr_t offset_ptr1 = peekProcPtr(base_bf3 + identity_offset1); if (!offset_ptr1) return false; - procptr32_t offset_ptr2 = peekProc(offset_ptr1 + identity_offset2); + procptr_t offset_ptr2 = peekProcPtr(offset_ptr1 + identity_offset2); if (!offset_ptr2) return false; - procptr32_t offset_ptr3 = peekProc(offset_ptr2 + identity_offset3); + procptr_t offset_ptr3 = peekProcPtr(offset_ptr2 + identity_offset3); if (!offset_ptr3) return false; - procptr32_t offset_ptr4 = peekProc(offset_ptr3 + identity_offset4); + procptr_t offset_ptr4 = peekProcPtr(offset_ptr3 + identity_offset4); if (!offset_ptr4) return false; squad_state_ptr = offset_ptr4 + squad_state_offset; diff --git a/plugins/bf4/bf4.cpp b/plugins/bf4/bf4.cpp index 6cae5aa97e1..a5a8498f6e2 100644 --- a/plugins/bf4/bf4.cpp +++ b/plugins/bf4/bf4.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_64bit.h" // Include standard plugin header. +#include "../mumble_plugin_win32.h" // Include standard plugin header. #include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &context, std::wstring &identity) { @@ -16,23 +16,23 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa BYTE squad, squad_leader, squad_state; // Server ID pointers - procptr64_t serverid_base = peekProc(pModule + 0x23D5368); + procptr_t serverid_base = peekProcPtr(pModule + 0x23D5368); if (!serverid_base) return false; - procptr64_t serverid_offset_0 = peekProc(serverid_base + 0x18); + procptr_t serverid_offset_0 = peekProcPtr(serverid_base + 0x18); if (!serverid_offset_0) return false; - procptr64_t serverid_offset_1 = peekProc(serverid_offset_0 + 0x28); + procptr_t serverid_offset_1 = peekProcPtr(serverid_offset_0 + 0x28); if (!serverid_offset_1) return false; - procptr64_t serverid_offset = peekProc(serverid_offset_1 + 0x350); + procptr_t serverid_offset = peekProcPtr(serverid_offset_1 + 0x350); if (!serverid_offset) return false; // Squad pointers - procptr64_t squad_base = peekProc(pModule + 0x23D5458); + procptr_t squad_base = peekProcPtr(pModule + 0x23D5458); if (!squad_base) return false; - procptr64_t squad_offset_0 = peekProc(squad_base + 0xD8); + procptr_t squad_offset_0 = peekProcPtr(squad_base + 0xD8); if (!squad_offset_0) return false; - procptr64_t squad_offset_1 = peekProc(squad_offset_0 + 0x100); + procptr_t squad_offset_1 = peekProcPtr(squad_offset_0 + 0x100); if (!squad_offset_1) return false; - procptr64_t squad_offset_2 = peekProc(squad_offset_1 + 0x58); + procptr_t squad_offset_2 = peekProcPtr(squad_offset_1 + 0x58); if (!squad_offset_2) return false; // Peekproc and assign game addresses to our containers, so we can retrieve positional data diff --git a/plugins/bf4_x86/bf4_x86.cpp b/plugins/bf4_x86/bf4_x86.cpp index 74f920fea7e..0cf773470cf 100644 --- a/plugins/bf4_x86/bf4_x86.cpp +++ b/plugins/bf4_x86/bf4_x86.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" // Include standard plugin header. +#include "../mumble_plugin_win32.h" // Include standard plugin header. #include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &context, std::wstring &identity) { @@ -16,21 +16,21 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa BYTE squad, squad_leader, squad_state; // Server ID pointers - procptr32_t serverid_base = peekProc(pModule + 0x1D39C64); + procptr_t serverid_base = peekProcPtr(pModule + 0x1D39C64); if (!serverid_base) return false; - procptr32_t serverid_offset_0 = peekProc(serverid_base + 0xC); + procptr_t serverid_offset_0 = peekProcPtr(serverid_base + 0xC); if (!serverid_offset_0) return false; - procptr32_t serverid_offset_1 = peekProc(serverid_offset_0 + 0x14); + procptr_t serverid_offset_1 = peekProcPtr(serverid_offset_0 + 0x14); if (!serverid_offset_1) return false; - procptr32_t serverid_offset = peekProc(serverid_offset_1 + 0x1D0); + procptr_t serverid_offset = peekProcPtr(serverid_offset_1 + 0x1D0); if (!serverid_offset) return false; // Squad pointers - procptr32_t squad_base = peekProc(pModule + 0x1D39D0C); + procptr_t squad_base = peekProcPtr(pModule + 0x1D39D0C); if (!squad_base) return false; - procptr32_t squad_offset_0 = peekProc(squad_base + 0x7C); + procptr_t squad_offset_0 = peekProcPtr(squad_base + 0x7C); if (!squad_offset_0) return false; - procptr32_t squad_offset_1 = peekProc(squad_offset_0 + 0x728); + procptr_t squad_offset_1 = peekProcPtr(squad_offset_0 + 0x728); if (!squad_offset_1) return false; // Peekproc and assign game addresses to our containers, so we can retrieve positional data diff --git a/plugins/bfbc2/bfbc2.cpp b/plugins/bfbc2/bfbc2.cpp index 04f6b5c8ed0..65e617f94ff 100644 --- a/plugins/bfbc2/bfbc2.cpp +++ b/plugins/bfbc2/bfbc2.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" bool is_steam = false; diff --git a/plugins/bfheroes/bfheroes.cpp b/plugins/bfheroes/bfheroes.cpp index 2903dceb9a6..7053f7881bc 100644 --- a/plugins/bfheroes/bfheroes.cpp +++ b/plugins/bfheroes/bfheroes.cpp @@ -3,9 +3,9 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" -procptr32_t posptr, faceptr, topptr, stateptr; +procptr_t posptr, faceptr, topptr, stateptr; static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &, std::wstring &) { for (int i=0;i<3;i++) @@ -51,13 +51,13 @@ static int trylock(const std::multimap &pi if (! initialize(pids, L"BFHeroes.exe", L"BFAudio.dll")) return false; - procptr32_t cacheaddr = pModule + 0x4745c; - procptr32_t cache = peekProc(cacheaddr); + procptr_t cacheaddr = pModule + 0x4745c; + procptr_t cache = peekProcPtr(cacheaddr); - posptr = peekProc(cache + 0xc0); - faceptr = peekProc(cache + 0xc4); - topptr = peekProc(cache + 0xc8); - stateptr = peekProc(cache + 0xc0); + posptr = peekProcPtr(cache + 0xc0); + faceptr = peekProcPtr(cache + 0xc4); + topptr = peekProcPtr(cache + 0xc8); + stateptr = peekProcPtr(cache + 0xc0); float apos[3], afront[3], atop[3], cpos[3], cfront[3], ctop[3]; std::string context; diff --git a/plugins/blacklight/blacklight.cpp b/plugins/blacklight/blacklight.cpp index 6713fad511c..d45a287a4f9 100644 --- a/plugins/blacklight/blacklight.cpp +++ b/plugins/blacklight/blacklight.cpp @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" /* Arrays of bytes to find addresses accessed by respective functions so we don't have to blindly search for addresses after every update @@ -54,10 +54,10 @@ TODO: Find Avatar position, front, top vectors, protect against version change (find a random pointer to check), distinguish spectator and normal mode */ -static procptr32_t camfrontptr = 0x141bc20; -static procptr32_t camtopptr = camfrontptr + 0xC; -static procptr32_t camptr = camfrontptr + 0x18; -static procptr32_t hostipportptr; +static procptr_t camfrontptr = 0x141bc20; +static procptr_t camtopptr = camfrontptr + 0xC; +static procptr_t camptr = camfrontptr + 0x18; +static procptr_t hostipportptr; static char prev_hostipport[22]; diff --git a/plugins/borderlands/borderlands.cpp b/plugins/borderlands/borderlands.cpp index df7ebe298f6..9be83bccd6f 100644 --- a/plugins/borderlands/borderlands.cpp +++ b/plugins/borderlands/borderlands.cpp @@ -34,13 +34,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" -procptr32_t posptr, frontptr, topptr, contextptraddress, stateaddress, loginaddress; +procptr_t posptr, frontptr, topptr, contextptraddress, stateaddress, loginaddress; static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &context, std::wstring &) { static bool loggedin = false; - static procptr32_t contextptr; + static procptr_t contextptr; bool ok; // Zeroing the floats @@ -56,9 +56,9 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa if (login == 0) { loggedin = false; } else if (!loggedin) { - procptr32_t ptr1 = peekProc(contextptraddress); - procptr32_t ptr2 = peekProc(ptr1 + 0x28c); - procptr32_t ptr3 = peekProc(ptr2 + 0x210); + procptr_t ptr1 = peekProcPtr(contextptraddress); + procptr_t ptr2 = peekProcPtr(ptr1 + 0x28c); + procptr_t ptr3 = peekProcPtr(ptr2 + 0x210); if (ptr3 != 0) loggedin = true; //pointer set contextptr = ptr3 + 0x2c; } @@ -139,7 +139,7 @@ static int trylock(const std::multimap &pi return false; } - procptr32_t ptraddress; + procptr_t ptraddress; if (strncmp("the cl", version, sizeof(version)) == 0) { // retail version ptraddress = 0x01f73744; stateaddress = 0x01f9bb18; @@ -160,7 +160,7 @@ static int trylock(const std::multimap &pi return false; } - procptr32_t ptr1 = peekProc(ptraddress); + procptr_t ptr1 = peekProcPtr(ptraddress); if (ptr1 == 0) { generic_unlock(); return false; diff --git a/plugins/borderlands2/borderlands2.cpp b/plugins/borderlands2/borderlands2.cpp index ab4c3400df6..01eb336d5fb 100644 --- a/plugins/borderlands2/borderlands2.cpp +++ b/plugins/borderlands2/borderlands2.cpp @@ -35,12 +35,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" #include -procptr32_t vects_ptr; -procptr32_t state_ptr; -procptr32_t character_name_ptr_loc; +procptr_t vects_ptr; +procptr_t state_ptr; +procptr_t character_name_ptr_loc; static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &, std::wstring &identity) { @@ -80,9 +80,9 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa // Extract the character name - procptr32_t ptr1 = peekProc(character_name_ptr_loc); - procptr32_t ptr2 = peekProc(ptr1 + 0xC); - procptr32_t character_name_ptr = ptr2 + 0x80; + procptr_t ptr1 = peekProcPtr(character_name_ptr_loc); + procptr_t ptr2 = peekProcPtr(ptr1 + 0xC); + procptr_t character_name_ptr = ptr2 + 0x80; char character_name[16]; // The game limits us to 15 char names ok = peekProc(character_name_ptr, character_name); diff --git a/plugins/breach/breach.cpp b/plugins/breach/breach.cpp index b06846ebbe3..8e0d17d7f6d 100644 --- a/plugins/breach/breach.cpp +++ b/plugins/breach/breach.cpp @@ -34,9 +34,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" -procptr32_t posptr, frontptr, topptr; +procptr_t posptr, frontptr, topptr; static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &, std::wstring &) { bool ok; @@ -88,7 +88,7 @@ static int trylock(const std::multimap &pi } // Setting the pointers for the avatar information - procptr32_t ptr1 = peekProc(pModule + 0x177980); + procptr_t ptr1 = peekProcPtr(pModule + 0x177980); if (ptr1 == 0) { generic_unlock(); return false; diff --git a/plugins/cod2/cod2.cpp b/plugins/cod2/cod2.cpp index e7636aa26b1..20a38bfb992 100644 --- a/plugins/cod2/cod2.cpp +++ b/plugins/cod2/cod2.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &, std::wstring &) { float viewHor, viewVer; diff --git a/plugins/cod4/cod4.cpp b/plugins/cod4/cod4.cpp index e0e5d1faddd..854f465547f 100644 --- a/plugins/cod4/cod4.cpp +++ b/plugins/cod4/cod4.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" using namespace std; diff --git a/plugins/cod5/cod5.cpp b/plugins/cod5/cod5.cpp index ab039392495..5ecb5da7f35 100644 --- a/plugins/cod5/cod5.cpp +++ b/plugins/cod5/cod5.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &, std::wstring &) { float viewHor, viewVer; diff --git a/plugins/codmw2/codmw2.cpp b/plugins/codmw2/codmw2.cpp index 11c1fc17032..b174295e5e3 100644 --- a/plugins/codmw2/codmw2.cpp +++ b/plugins/codmw2/codmw2.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &, std::wstring &) { float viewHor, viewVer; diff --git a/plugins/codmw2so/codmw2so.cpp b/plugins/codmw2so/codmw2so.cpp index b702dfcf6e1..fbf60822056 100644 --- a/plugins/codmw2so/codmw2so.cpp +++ b/plugins/codmw2so/codmw2so.cpp @@ -35,7 +35,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &, std::wstring &) { float viewHor, viewVer; diff --git a/plugins/cs/cs.cpp b/plugins/cs/cs.cpp index e86bae327a0..003efbd16de 100644 --- a/plugins/cs/cs.cpp +++ b/plugins/cs/cs.cpp @@ -35,11 +35,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" using namespace std; -procptr32_t pEngine; +procptr_t pEngine; /* DESCRIPTION ADDRESS TYPE VALUE diff --git a/plugins/dys/dys.cpp b/plugins/dys/dys.cpp index 66fe7e26b1c..9ec46b91d60 100644 --- a/plugins/dys/dys.cpp +++ b/plugins/dys/dys.cpp @@ -3,11 +3,11 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" using namespace std; -procptr32_t posptr, rotptr, stateptr, hostptr; +procptr_t posptr, rotptr, stateptr, hostptr; static bool calcout(float *pos, float *rot, float *opos, float *front, float *top) { float h = rot[0]; @@ -97,7 +97,7 @@ static int trylock(const std::multimap &pi if (! initialize(pids, L"hl2.exe", L"client.dll")) return false; - procptr32_t mod_engine=getModuleAddr(L"engine.dll"); + procptr_t mod_engine=getModuleAddr(L"engine.dll"); if (!mod_engine) return false; diff --git a/plugins/etqw/etqw.cpp b/plugins/etqw/etqw.cpp index 0b902e2fd9f..04b79c103a5 100644 --- a/plugins/etqw/etqw.cpp +++ b/plugins/etqw/etqw.cpp @@ -3,11 +3,11 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" using namespace std; -procptr32_t pos1ptr, pos2ptr, pos3ptr, rot1ptr, rot2ptr; +procptr_t pos1ptr, pos2ptr, pos3ptr, rot1ptr, rot2ptr; static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &context, std::wstring &) { char menustate; diff --git a/plugins/ffxiv/ffxiv.cpp b/plugins/ffxiv/ffxiv.cpp index a4a43ad17d4..6837d8067e5 100755 --- a/plugins/ffxiv/ffxiv.cpp +++ b/plugins/ffxiv/ffxiv.cpp @@ -3,13 +3,9 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#ifdef FFXIV_USE_x64 -#include "../mumble_plugin_win32_64bit.h" // Include standard plugin header. -#else -#include "../mumble_plugin_win32_32bit.h" // Include standard plugin header. -#endif +#include "../mumble_plugin_win32.h" // Include standard plugin header. -#include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". +#include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". #include // Offset values can be obtained from: @@ -21,19 +17,19 @@ #ifdef FFXIV_USE_x64 // Memory offsets -const procptr64_t camera_ptr = 0x1673350; -const procptr64_t avatar_ptr = 0x1674950; -const procptr64_t state_offset = 0x1641990; -const procptr64_t map_id_offset = 0x16409E8; +const procptr_t camera_ptr = 0x1673350; +const procptr_t avatar_ptr = 0x1674950; +const procptr_t state_offset = 0x1641990; +const procptr_t map_id_offset = 0x16409E8; // Avatar struct offsets -const procptr64_t identity_offset = 48; // Name -const procptr64_t avatar_pos_offset = 176; // X, Z, Y -const procptr64_t avatar_azimuth_offset = 192; // Heading (-pi to pi) +const procptr_t identity_offset = 48; // Name +const procptr_t avatar_pos_offset = 176; // X, Z, Y +const procptr_t avatar_azimuth_offset = 192; // Heading (-pi to pi) // Camera struct offsets -const procptr64_t camera_is_free_offset = 272; // 0: First person mode; 1: 3rd person -const procptr64_t camera_pos_offset = 80; // X, Z, Y -const procptr64_t camera_azimuth_offset = 304; // (-pi to pi) -const procptr64_t camera_elevation_offset = 308; // (-pi to pi) +const procptr_t camera_is_free_offset = 272; // 0: First person mode; 1: 3rd person +const procptr_t camera_pos_offset = 80; // X, Z, Y +const procptr_t camera_azimuth_offset = 304; // (-pi to pi) +const procptr_t camera_elevation_offset = 308; // (-pi to pi) // Module names const wchar_t *exe_name = L"ffxiv_dx11.exe"; // Plugin long description @@ -42,19 +38,19 @@ static const std::wstring longdesc() {return std::wstring(L"Supports Final Fanta static std::wstring description(L"Final Fantasy XIV X64 (2016.11.11.0000.0000)"); #else // Memory offsets -const procptr32_t camera_ptr = 0x1045C40; -const procptr32_t avatar_ptr = 0x10468EC; -const procptr32_t state_offset = 0x1048C60; -const procptr32_t map_id_offset = 0x10210B0; +const procptr_t camera_ptr = 0x1045C40; +const procptr_t avatar_ptr = 0x10468EC; +const procptr_t state_offset = 0x1048C60; +const procptr_t map_id_offset = 0x10210B0; // Avatar struct offsets -const procptr32_t identity_offset = 48; // Name -const procptr32_t avatar_pos_offset = 160; // X, Z, Y -const procptr32_t avatar_azimuth_offset = 176; // Heading (-pi to pi) +const procptr_t identity_offset = 48; // Name +const procptr_t avatar_pos_offset = 160; // X, Z, Y +const procptr_t avatar_azimuth_offset = 176; // Heading (-pi to pi) // Camera struct offsets -const procptr32_t camera_is_free_offset = 256; // 0: First person mode; 1: 3rd person -const procptr32_t camera_pos_offset = 64; // X, Z, Y -const procptr32_t camera_azimuth_offset = 288; // (-pi to pi) -const procptr32_t camera_elevation_offset = 292; // (-pi to pi) +const procptr_t camera_is_free_offset = 256; // 0: First person mode; 1: 3rd person +const procptr_t camera_pos_offset = 64; // X, Z, Y +const procptr_t camera_azimuth_offset = 288; // (-pi to pi) +const procptr_t camera_elevation_offset = 292; // (-pi to pi) // Module names const wchar_t *exe_name = L"ffxiv.exe"; // Plugin long description @@ -82,11 +78,11 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa // Retrieve Avatar and Camera addresses #ifdef FFXIV_USE_x64 - procptr64_t avatar_address = peekProc(pModule + avatar_ptr); - procptr64_t camera_address = peekProc(pModule + camera_ptr); + procptr_t avatar_address = peekProcPtr(pModule + avatar_ptr); + procptr_t camera_address = peekProcPtr(pModule + camera_ptr); #else - procptr32_t avatar_address = peekProc(pModule + avatar_ptr); - procptr32_t camera_address = peekProc(pModule + camera_ptr); + procptr_t avatar_address = peekProcPtr(pModule + avatar_ptr); + procptr_t camera_address = peekProcPtr(pModule + camera_ptr); #endif if (!avatar_address || !camera_address) return false; diff --git a/plugins/gmod/gmod.cpp b/plugins/gmod/gmod.cpp index ff090cde5a7..a06b4d6c611 100644 --- a/plugins/gmod/gmod.cpp +++ b/plugins/gmod/gmod.cpp @@ -3,11 +3,11 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" using namespace std; -procptr32_t posptr, rotptr, stateptr, hostptr; +procptr_t posptr, rotptr, stateptr, hostptr; static bool calcout(float *pos, float *rot, float *opos, float *front, float *top) { float v = rot[0]; @@ -91,7 +91,7 @@ static int trylock(const std::multimap &pi if (! initialize(pids, L"hl2.exe", L"client.dll")) return false; - procptr32_t mod_engine=getModuleAddr(L"engine.dll"); + procptr_t mod_engine=getModuleAddr(L"engine.dll"); if (!mod_engine) return false; @@ -108,7 +108,7 @@ static int trylock(const std::multimap &pi stateptr = mod_engine + 0x375565; // ID string; Game name "garrysmod" // engine.dll+0x6622DC - procptr32_t idptr = mod_engine + 0x6622DC; + procptr_t idptr = mod_engine + 0x6622DC; // host string: String in form "ip:port". // engine.dll+0x49176C hostptr = mod_engine + 0x49176C; diff --git a/plugins/gtaiv/gtaiv.cpp b/plugins/gtaiv/gtaiv.cpp index 69ec03ef7c4..28c7e2f8c33 100644 --- a/plugins/gtaiv/gtaiv.cpp +++ b/plugins/gtaiv/gtaiv.cpp @@ -34,15 +34,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" static unsigned int playerid; -static procptr32_t base_address; -static procptr32_t cvecptr; -static procptr32_t displayptr; +static procptr_t base_address; +static procptr_t cvecptr; +static procptr_t displayptr; static int setuppointers() { - procptr32_t playerptr, charptr; + procptr_t playerptr, charptr; // Player stuff if (!peekProc(base_address + 0xF1CC68, playerid)) @@ -131,7 +131,7 @@ static int trylock(const std::multimap &pi float cpos[3], cfront[3], ctop[3]; std::wstring sidentity; std::string scontext; - procptr32_t viewportptr; + procptr_t viewportptr; base_address = pModule - 0x400000; diff --git a/plugins/gtav/gtav.cpp b/plugins/gtav/gtav.cpp index 202a8bf23f0..1aec986514d 100644 --- a/plugins/gtav/gtav.cpp +++ b/plugins/gtav/gtav.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_64bit.h" // Include standard plugin header. +#include "../mumble_plugin_win32.h" // Include standard plugin header. #include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". #include // Include algorithm header for the game version detector @@ -14,7 +14,7 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa // Memory addresses char game_name[20]; - procptr64_t state_address, in_game_address, avatar_pos_address, camera_pos_address, avatar_base_address, camera_front_address, camera_top_address, player_address, vehicle_address, location_address, street_address; + procptr_t state_address, in_game_address, avatar_pos_address, camera_pos_address, avatar_base_address, camera_front_address, camera_top_address, player_address, vehicle_address, location_address, street_address; #define VERSION_EQ(buf, strlit) \ memcmp(buf, strlit, std::min(sizeof(buf), sizeof(strlit)-1)) == 0 @@ -52,7 +52,7 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa } // Avatar pointer - procptr64_t avatar_base = peekProc(avatar_base_address); + procptr_t avatar_base = peekProcPtr(avatar_base_address); if (!avatar_base) return false; // Boolean value to check if game addresses retrieval is successful diff --git a/plugins/gw/gw.cpp b/plugins/gw/gw.cpp index 54a43dd2b49..08c06076780 100644 --- a/plugins/gw/gw.cpp +++ b/plugins/gw/gw.cpp @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" /* Arrays of bytes to find addresses accessed by respective functions so we don't have to blindly search for addresses after every update @@ -73,14 +73,14 @@ */ -static procptr32_t camptr = 0xa30274; -static procptr32_t posptr = 0xa302a4; -static procptr32_t camfrontptr = 0xbf46b8; -static procptr32_t frontptr_ = 0xd55610; -static procptr32_t frontptr; +static procptr_t camptr = 0xa30274; +static procptr_t posptr = 0xa302a4; +static procptr_t camfrontptr = 0xbf46b8; +static procptr_t frontptr_ = 0xd55610; +static procptr_t frontptr; -static procptr32_t locationptr = 0xa3fa08; -static procptr32_t areaptr = 0xa31158; +static procptr_t locationptr = 0xa3fa08; +static procptr_t areaptr = 0xa31158; static char prev_location; static int prev_areaid; @@ -114,13 +114,13 @@ static bool refreshPointers(void) { frontptr = 0; - frontptr = peekProc(frontptr_); + frontptr = peekProcPtr(frontptr_); if (!frontptr) return false; - frontptr = peekProc(frontptr + 0x8); + frontptr = peekProcPtr(frontptr + 0x8); if (!frontptr) return false; - frontptr = peekProc(frontptr); + frontptr = peekProcPtr(frontptr); if (!frontptr) return false; frontptr = frontptr + 0x1c; diff --git a/plugins/insurgency/insurgency.cpp b/plugins/insurgency/insurgency.cpp index 6bea434c123..a1fa7a83741 100644 --- a/plugins/insurgency/insurgency.cpp +++ b/plugins/insurgency/insurgency.cpp @@ -3,11 +3,11 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" using namespace std; -procptr32_t posptr, rotptr, stateptr, hostptr; +procptr_t posptr, rotptr, stateptr, hostptr; static bool calcout(float *pos, float *rot, float *opos, float *front, float *top) { float h = rot[0]; @@ -97,7 +97,7 @@ static int trylock(const std::multimap &pi if (! initialize(pids, L"hl2.exe", L"client.dll")) return false; - procptr32_t mod_engine=getModuleAddr(L"engine.dll"); + procptr_t mod_engine=getModuleAddr(L"engine.dll"); if (!mod_engine) return false; diff --git a/plugins/jc2/jc2.cpp b/plugins/jc2/jc2.cpp index b6a64b545e4..ad9ab5f55fe 100755 --- a/plugins/jc2/jc2.cpp +++ b/plugins/jc2/jc2.cpp @@ -35,7 +35,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" const unsigned int off_character_manager = 0xD8FB24; const unsigned int off_local_player = 0x3570; @@ -45,8 +45,8 @@ const unsigned int off_char_matrix = 0x15C; const unsigned int off_camera_manager = 0xD919F4; const unsigned int off_cam_matrix = 0x2FC; -static procptr32_t char_matrix_ptr = 0; -static procptr32_t cam_matrix_ptr = 0; +static procptr_t char_matrix_ptr = 0; +static procptr_t cam_matrix_ptr = 0; typedef struct { float x; @@ -63,7 +63,7 @@ typedef struct { } Matrix4; static int setuppointers() { - procptr32_t character_manager, local_player, character, camera_manager; + procptr_t character_manager, local_player, character, camera_manager; if (!peekProc(pModule + off_character_manager, &character_manager, 4) || !character_manager) return false; diff --git a/plugins/l4d/l4d.cpp b/plugins/l4d/l4d.cpp index 23da98b2a2b..cf6df5e57a5 100644 --- a/plugins/l4d/l4d.cpp +++ b/plugins/l4d/l4d.cpp @@ -3,10 +3,10 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" // Include standard plugin header. +#include "../mumble_plugin_win32.h" // Include standard plugin header. #include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". -static procptr32_t steamclient, engine; // Variables to contain modules addresses +static procptr_t steamclient, engine; // Variables to contain modules addresses static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &context, std::wstring &identity) { for (int i=0;i<3;i++) { @@ -23,9 +23,9 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa bool state; // State pointers - procptr32_t state_base = peekProc(pModule + 0x5A7354); + procptr_t state_base = peekProcPtr(pModule + 0x5A7354); if (state_base == 0) return false; - procptr32_t state_offset = peekProc(state_base + 0x5C); + procptr_t state_offset = peekProcPtr(state_base + 0x5C); if (state_offset == 0) return false; // Peekproc and assign game addresses to our containers, so we can retrieve positional data diff --git a/plugins/l4d2/l4d2.cpp b/plugins/l4d2/l4d2.cpp index 247c6352bcd..860ca93f1cb 100644 --- a/plugins/l4d2/l4d2.cpp +++ b/plugins/l4d2/l4d2.cpp @@ -4,56 +4,56 @@ // Mumble source tree or at . #ifdef WIN32 -#include "../mumble_plugin_win32_32bit.h" // Include standard plugin header. +#include "../mumble_plugin_win32.h" // Include standard plugin header. #else -#include "../mumble_plugin_linux_32bit.h" // Include standard plugin header. +#include "../mumble_plugin_linux.h" // Include standard plugin header. #endif #include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". // Variables to contain modules addresses -procptr32_t steamclient = 0; -procptr32_t server = 0; -procptr32_t engine = 0; +procptr_t steamclient = 0; +procptr_t server = 0; +procptr_t engine = 0; #ifdef WIN32 // Memory offsets -const procptr32_t state_offset = 0x6ACBD5; -const procptr32_t avatar_pos_offset = 0x6B9E1C; -const procptr32_t camera_pos_offset = 0x774B98; -const procptr32_t avatar_front_offset = 0x774BF8; -const procptr32_t avatar_top_offset = 0x774C28; -const procptr32_t host_offset = 0x772B24; -const procptr32_t servername_offset = 0x772D2C; -const procptr32_t map_offset = 0x772C28; -const procptr32_t serverid_steamclient_offset = 0x95E56D; -const procptr32_t player_server_offset = 0x7F87BC; -const procptr32_t playerid_engine_offset = 0x4EBF88; +const procptr_t state_offset = 0x6ACBD5; +const procptr_t avatar_pos_offset = 0x6B9E1C; +const procptr_t camera_pos_offset = 0x774B98; +const procptr_t avatar_front_offset = 0x774BF8; +const procptr_t avatar_top_offset = 0x774C28; +const procptr_t host_offset = 0x772B24; +const procptr_t servername_offset = 0x772D2C; +const procptr_t map_offset = 0x772C28; +const procptr_t serverid_steamclient_offset = 0x95E56D; +const procptr_t player_server_offset = 0x7F87BC; +const procptr_t playerid_engine_offset = 0x4EBF88; // Module names -const wchar_t *exe_name = L"left4dead2.exe"; -const wchar_t *client_name = L"client.dll"; -const wchar_t *steamclient_name = L"steamclient.dll"; -const wchar_t *server_name = L"server.dll"; -const wchar_t *engine_name = L"engine.dll"; +const wchar_t *exe_name = L"left4dead2.exe"; +const wchar_t *client_name = L"client.dll"; +const wchar_t *steamclient_name = L"steamclient.dll"; +const wchar_t *server_name = L"server.dll"; +const wchar_t *engine_name = L"engine.dll"; #else // Memory offsets -const procptr32_t state_offset = 0xE0A24C; -const procptr32_t avatar_pos_offset = 0xE773FC; -const procptr32_t camera_pos_offset = 0xED8700; -const procptr32_t avatar_front_offset = 0xE3C138; -const procptr32_t avatar_top_offset = 0xE3C150; -const procptr32_t host_offset = 0xE356D0; -const procptr32_t servername_offset = 0xE358D8; -const procptr32_t map_offset = 0xE09E9D; -const procptr32_t serverid_steamclient_offset = 0x1216CA5; -const procptr32_t player_server_offset = 0xF340E4; -const procptr32_t playerid_engine_offset = 0xA62C60; +const procptr_t state_offset = 0xE0A24C; +const procptr_t avatar_pos_offset = 0xE773FC; +const procptr_t camera_pos_offset = 0xED8700; +const procptr_t avatar_front_offset = 0xE3C138; +const procptr_t avatar_top_offset = 0xE3C150; +const procptr_t host_offset = 0xE356D0; +const procptr_t servername_offset = 0xE358D8; +const procptr_t map_offset = 0xE09E9D; +const procptr_t serverid_steamclient_offset = 0x1216CA5; +const procptr_t player_server_offset = 0xF340E4; +const procptr_t playerid_engine_offset = 0xA62C60; // Module names -const wchar_t *exe_name = L"hl2_linux"; -const wchar_t *client_name = L"client.so"; -const wchar_t *steamclient_name = L"steamclient.so"; -const wchar_t *server_name = L"server.so"; -const wchar_t *engine_name = L"engine.so"; +const wchar_t *exe_name = L"hl2_linux"; +const wchar_t *client_name = L"client.so"; +const wchar_t *steamclient_name = L"steamclient.so"; +const wchar_t *server_name = L"server.so"; +const wchar_t *engine_name = L"engine.so"; #endif static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &context, std::wstring &identity) { diff --git a/plugins/lol/lol.cpp b/plugins/lol/lol.cpp index a0ad606a9f5..876be424701 100644 --- a/plugins/lol/lol.cpp +++ b/plugins/lol/lol.cpp @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" /* Arrays of bytes to find addresses accessed by respective functions so we don't have to blindly search for addresses after every update @@ -57,15 +57,15 @@ PORT: +0x1C (offset, not pointer!) */ -static procptr32_t posptr, afrontptr, tmpptr; +static procptr_t posptr, afrontptr, tmpptr; -static procptr32_t posptr_ = 0x2F5E5F8; -static procptr32_t camptr = 0xB738E8; -static procptr32_t camfrontptr = 0x14; -static procptr32_t gameptr = 0xE22E90; +static procptr_t posptr_ = 0x2F5E5F8; +static procptr_t camptr = 0xB738E8; +static procptr_t camfrontptr = 0x14; +static procptr_t gameptr = 0xE22E90; -static procptr32_t hostipptr = 0xAF69D18; -static procptr32_t hostportptr = hostipptr + 0x1C; +static procptr_t hostipptr = 0xAF69D18; +static procptr_t hostportptr = hostipptr + 0x1C; static char prev_hostip[16]; // These should never change while the game is running, but just in case... static int prev_hostport; @@ -84,14 +84,14 @@ static bool refreshPointers(void) { posptr = afrontptr = tmpptr = 0; // Avatar front vector pointer - tmpptr = peekProc(gameptr); + tmpptr = peekProcPtr(gameptr); if (!tmpptr) return false; // Something went wrong, unlink afrontptr = tmpptr + 0x2acc; // Avatar position vector - tmpptr = peekProc(posptr_); + tmpptr = peekProcPtr(posptr_); if (!tmpptr) return false; // Something went wrong, unlink @@ -110,7 +110,7 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa bool ok; // Player not in game (or something broke), unlink - if (!peekProc(gameptr)) + if (!peekProcPtr(gameptr)) return false; ok = peekProc(camfrontptr, camera_front, 12) && diff --git a/plugins/lotro/lotro.cpp b/plugins/lotro/lotro.cpp index 79541faada7..0740320eae6 100644 --- a/plugins/lotro/lotro.cpp +++ b/plugins/lotro/lotro.cpp @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &context, std::wstring &) { for (int i=0;i<3;i++) @@ -45,7 +45,7 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa byte l[2]; byte r,i; float o[3]; - procptr32_t hPtr; + procptr_t hPtr; float h; /* @@ -75,7 +75,7 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa if (! ok) return false; - ok = peekProc((procptr32_t)(hPtr + 0x0000046F), &h, 4); + ok = peekProc((procptr_t)(hPtr + 0x0000046F), &h, 4); if (! ok) return false; diff --git a/plugins/ql/ql.cpp b/plugins/ql/ql.cpp index 7654b6d25ae..ee8a2100364 100644 --- a/plugins/ql/ql.cpp +++ b/plugins/ql/ql.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" // Include standard plugin header. +#include "../mumble_plugin_win32.h" // Include standard plugin header. #include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &context, std::wstring &identity) { diff --git a/plugins/rl/rl_linux.cpp b/plugins/rl/rl_linux.cpp index 0e1ee779ff0..d622f1495cf 100644 --- a/plugins/rl/rl_linux.cpp +++ b/plugins/rl/rl_linux.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_linux_32bit.h" +#include "../mumble_plugin_linux.h" static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &, std::wstring &) { for (int i=0;i<3;i++) @@ -13,13 +13,13 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa bool ok; // Avatar pointers - procptr32_t avatar_base = peekProc(pModule + 0x302A4F0); + procptr_t avatar_base = peekProcPtr(pModule + 0x302A4F0); if (!avatar_base) return false; - procptr32_t avatar_offset_0 = peekProc(avatar_base + 0x6c8); + procptr_t avatar_offset_0 = peekProcPtr(avatar_base + 0x6c8); if (!avatar_offset_0) return false; - procptr32_t avatar_offset_1 = peekProc(avatar_offset_0 + 0x2b0); + procptr_t avatar_offset_1 = peekProcPtr(avatar_offset_0 + 0x2b0); if (!avatar_offset_1) return false; - procptr32_t avatar_offset = peekProc(avatar_offset_1 + 0x38); + procptr_t avatar_offset = peekProcPtr(avatar_offset_1 + 0x38); if (!avatar_offset) return false; // Peekproc and assign game addresses to our containers, so we can retrieve positional data diff --git a/plugins/rl/rl_win32.cpp b/plugins/rl/rl_win32.cpp index b21f7eaa5c4..2e4ef7359f2 100644 --- a/plugins/rl/rl_win32.cpp +++ b/plugins/rl/rl_win32.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &, std::wstring &) { for (int i=0;i<3;i++) @@ -13,15 +13,15 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa bool ok; // Avatar pointers - procptr32_t avatar_base = peekProc(pModule + 0x174269C); + procptr_t avatar_base = peekProcPtr(pModule + 0x174269C); if (!avatar_base) return false; - procptr32_t avatar_offset_0 = peekProc(avatar_base + 0x448); + procptr_t avatar_offset_0 = peekProcPtr(avatar_base + 0x448); if (!avatar_offset_0) return false; - procptr32_t avatar_offset_1 = peekProc(avatar_offset_0 + 0x440); + procptr_t avatar_offset_1 = peekProcPtr(avatar_offset_0 + 0x440); if (!avatar_offset_1) return false; - procptr32_t avatar_offset_2 = peekProc(avatar_offset_1 + 0x0); + procptr_t avatar_offset_2 = peekProcPtr(avatar_offset_1 + 0x0); if (!avatar_offset_2) return false; - procptr32_t avatar_offset = peekProc(avatar_offset_2 + 0x1C); + procptr_t avatar_offset = peekProcPtr(avatar_offset_2 + 0x1C); if (!avatar_offset) return false; // Peekproc and assign game addresses to our containers, so we can retrieve positional data diff --git a/plugins/sr/sr.cpp b/plugins/sr/sr.cpp index 753929e2ef2..30119a33862 100644 --- a/plugins/sr/sr.cpp +++ b/plugins/sr/sr.cpp @@ -35,7 +35,7 @@ */ -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &/*context*/, std::wstring &/*identity*/) { for (int i=0;i<3;i++) diff --git a/plugins/ut2004/ut2004.cpp b/plugins/ut2004/ut2004.cpp index cb381274288..6bcd082128d 100644 --- a/plugins/ut2004/ut2004.cpp +++ b/plugins/ut2004/ut2004.cpp @@ -3,11 +3,11 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" using namespace std; -procptr32_t pos0ptr, pos1ptr, pos2ptr, faceptr, topptr; +procptr_t pos0ptr, pos1ptr, pos2ptr, faceptr, topptr; static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &, std::wstring &) { //char ccontext[128]; @@ -67,10 +67,10 @@ static int trylock(const std::multimap &pi if (! initialize(pids, L"UT2004.exe", L"Engine.dll")) return false; - procptr32_t ptraddress = pModule + 0x4A44FC; - procptr32_t ptr2 = peekProc(ptraddress); - procptr32_t ptr3 = peekProc(ptr2 + 0xCC); - procptr32_t baseptr = ptr3 + 0x1C8; + procptr_t ptraddress = pModule + 0x4A44FC; + procptr_t ptr2 = peekProcPtr(ptraddress); + procptr_t ptr3 = peekProcPtr(ptr2 + 0xCC); + procptr_t baseptr = ptr3 + 0x1C8; pos0ptr = baseptr; pos1ptr = baseptr + 0x4; diff --git a/plugins/ut3/ut3.cpp b/plugins/ut3/ut3.cpp index 249a487866f..e6af42d8961 100644 --- a/plugins/ut3/ut3.cpp +++ b/plugins/ut3/ut3.cpp @@ -3,11 +3,11 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" using namespace std; -procptr32_t pos0ptr, pos1ptr, pos2ptr, faceptr, topptr; +procptr_t pos0ptr, pos1ptr, pos2ptr, faceptr, topptr; //BYTE *stateptr; static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &, std::wstring &) { @@ -90,8 +90,8 @@ static int trylock(const std::multimap &pi if (! initialize(pids, L"UT3.exe", L"wrap_oal.dll")) return false; - procptr32_t ptraddress = pModule + 0x8A740; - procptr32_t baseptr = peekProc(ptraddress); + procptr_t ptraddress = pModule + 0x8A740; + procptr_t baseptr = peekProcPtr(ptraddress); pos0ptr = baseptr; pos1ptr = baseptr + 0x4; diff --git a/plugins/ut99/ut99.cpp b/plugins/ut99/ut99.cpp index 6a1097e3867..62c6d104a2e 100644 --- a/plugins/ut99/ut99.cpp +++ b/plugins/ut99/ut99.cpp @@ -34,11 +34,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" -procptr32_t posptr; -procptr32_t frtptr; -procptr32_t topptr; +procptr_t posptr; +procptr_t frtptr; +procptr_t topptr; static void wcsToMultibyteStdString(wchar_t *wcs, std::string &str) { const int size = WideCharToMultiByte(CP_UTF8, 0, wcs, -1, NULL, 0, NULL, NULL); @@ -147,15 +147,15 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa } // Read server name - procptr32_t cbase = peekProc (pModule + 0x00290550); - procptr32_t cptr0 = peekProc (cbase + 0x30); - procptr32_t cptr1 = peekProc (cptr0 + 0x73C); - procptr32_t cptr2 = peekProc (cptr1 + 0x244); + procptr_t cbase = peekProcPtr(pModule + 0x00290550); + procptr_t cptr0 = peekProcPtr(cbase + 0x30); + procptr_t cptr1 = peekProcPtr(cptr0 + 0x73C); + procptr_t cptr2 = peekProcPtr(cptr1 + 0x244); wchar_t wservername[60]; - ok = peekProc((procptr32_t) cptr2, wservername); + ok = peekProc((procptr_t) cptr2, wservername); if (! ok) return false; @@ -179,7 +179,7 @@ static int trylock(const std::multimap &pi if (! initialize(pids, L"UnrealTournament.exe", L"Engine.dll")) return false; - procptr32_t base = pModule + 0x290584; + procptr_t base = pModule + 0x290584; posptr = base; frtptr = base + 0x0C; topptr = base + 0x18; diff --git a/plugins/wolfet/wolfet.cpp b/plugins/wolfet/wolfet.cpp index e53b9147db7..ab148dab4ad 100644 --- a/plugins/wolfet/wolfet.cpp +++ b/plugins/wolfet/wolfet.cpp @@ -47,7 +47,7 @@ Increasing when turning left. */ -#include "../mumble_plugin_win32_32bit.h" +#include "../mumble_plugin_win32.h" static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &context, std::wstring &) { float viewHor, viewVer; diff --git a/plugins/wow/wow.cpp b/plugins/wow/wow.cpp index db21d8bd5a5..679e94f35d9 100644 --- a/plugins/wow/wow.cpp +++ b/plugins/wow/wow.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_32bit.h" // Include standard plugin header. +#include "../mumble_plugin_win32.h" // Include standard plugin header. #include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &context, std::wstring &identity) { @@ -16,28 +16,28 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa // http://www.ownedcore.com/forums/world-of-warcraft/world-of-warcraft-bots-programs/wow-memory-editing/585582-wow-7-0-3-22624-release-info-dump-thread.html#post3615091 // Avatar pointer - procptr32_t avatar_offset = peekProc(pModule + 0xDE565C); // "LocalPlayer" in the thread. + procptr_t avatar_offset = peekProcPtr(pModule + 0xDE565C); // "LocalPlayer" in the thread. if (!avatar_offset) return false; // Camera pointer - procptr32_t camera_base = peekProc(pModule + 0xEBA11C); // "CameraStruct" in the thread. + procptr_t camera_base = peekProcPtr(pModule + 0xEBA11C); // "CameraStruct" in the thread. if (!camera_base) return false; - procptr32_t camera_offset = peekProc(camera_base + 0x3264); // "CameraOffset" in the thread. + procptr_t camera_offset = peekProcPtr(camera_base + 0x3264); // "CameraOffset" in the thread. if (!camera_offset) return false; // Realm pointer - procptr32_t realm_offset = peekProc(pModule + 0xF3AF7C); // Not available in the thread. + procptr_t realm_offset = peekProcPtr(pModule + 0xF3AF7C); // Not available in the thread. if (!realm_offset) return false; // Memory addresses - procptr32_t state_address = 0xE5BD19; // "GameState" in the thread. - procptr32_t avatar_pos_address = 0xAF8; // "UnitOrigin" in the thread. - procptr32_t camera_pos_address = 0x08; // "CameraOrigin" in the thread. - procptr32_t camera_front_address = 0x14; // "CameraMatrix" in the thread. - procptr32_t camera_top_address = 0x2C; // "CameraMatrix" + 0x18. - procptr32_t avatar_heading_address = 0xB08; // "UnitAngle" in the thread. - procptr32_t realm_address = 0x384; // Not available in the thread. - procptr32_t player_address = 0xF3B288; // Not available in the thread. + procptr_t state_address = 0xE5BD19; // "GameState" in the thread. + procptr_t avatar_pos_address = 0xAF8; // "UnitOrigin" in the thread. + procptr_t camera_pos_address = 0x08; // "CameraOrigin" in the thread. + procptr_t camera_front_address = 0x14; // "CameraMatrix" in the thread. + procptr_t camera_top_address = 0x2C; // "CameraMatrix" + 0x18. + procptr_t avatar_heading_address = 0xB08; // "UnitAngle" in the thread. + procptr_t realm_address = 0x384; // Not available in the thread. + procptr_t player_address = 0xF3B288; // Not available in the thread. // Boolean value to check if game addresses retrieval is successful bool ok; diff --git a/plugins/wow_x64/wow_x64.cpp b/plugins/wow_x64/wow_x64.cpp index 47dd13021c6..363166c519a 100644 --- a/plugins/wow_x64/wow_x64.cpp +++ b/plugins/wow_x64/wow_x64.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at . -#include "../mumble_plugin_win32_64bit.h" // Include standard plugin header. +#include "../mumble_plugin_win32.h" // Include standard plugin header. #include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &context, std::wstring &identity) { @@ -16,28 +16,28 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa // http://www.ownedcore.com/forums/world-of-warcraft/world-of-warcraft-bots-programs/wow-memory-editing/585582-wow-7-0-3-22624-release-info-dump-thread.html#post3615091 // Avatar pointer - procptr64_t avatar_offset = peekProc(pModule + 0x169DF10); // "LocalPlayer" in the thread. + procptr_t avatar_offset = peekProcPtr(pModule + 0x169DF10); // "LocalPlayer" in the thread. if (!avatar_offset) return false; // Camera pointer - procptr64_t camera_base = peekProc(pModule + 0x179C778); // "CameraStruct" in the thread. + procptr_t camera_base = peekProcPtr(pModule + 0x179C778); // "CameraStruct" in the thread. if (!camera_base) return false; - procptr64_t camera_offset = peekProc(camera_base + 0x3338); // "CameraOffset" in the thread. + procptr_t camera_offset = peekProcPtr(camera_base + 0x3338); // "CameraOffset" in the thread. if (!camera_offset) return false; // Realm pointer - procptr64_t realm_offset = peekProc(pModule + 0x1827EC8); // Not available in the thread. + procptr_t realm_offset = peekProcPtr(pModule + 0x1827EC8); // Not available in the thread. if (!realm_offset) return false; // Memory addresses - procptr64_t state_address = 0x173E8CE; // "GameState" in the thread. - procptr64_t avatar_pos_address = 0x15A8; // "UnitOrigin" in the thread. - procptr64_t camera_pos_address = 0x10; // "CameraOrigin" in the thread. - procptr64_t camera_front_address = 0x1C; // "CameraMatrix" in the thread. - procptr64_t camera_top_address = 0x34; // "CameraMatrix" + 0x18. - procptr64_t avatar_heading_address = 0x15B8; // "UnitAngle" in the thread. - procptr64_t realm_address = 0x430; // Not available in the thread. - procptr64_t player_address = 0x1828220; // Not available in the thread. + procptr_t state_address = 0x173E8CE; // "GameState" in the thread. + procptr_t avatar_pos_address = 0x15A8; // "UnitOrigin" in the thread. + procptr_t camera_pos_address = 0x10; // "CameraOrigin" in the thread. + procptr_t camera_front_address = 0x1C; // "CameraMatrix" in the thread. + procptr_t camera_top_address = 0x34; // "CameraMatrix" + 0x18. + procptr_t avatar_heading_address = 0x15B8; // "UnitAngle" in the thread. + procptr_t realm_address = 0x430; // Not available in the thread. + procptr_t player_address = 0x1828220; // Not available in the thread. // Boolean value to check if game addresses retrieval is successful bool ok;