diff options
author | Davide Beatrici <davidebeatrici@gmail.com> | 2019-07-31 02:41:58 +0300 |
---|---|---|
committer | Davide Beatrici <davidebeatrici@gmail.com> | 2019-08-09 00:51:13 +0300 |
commit | 9875c59b7af7e71184cd44049ad58d3d89a83e23 (patch) | |
tree | 077d8059b9108935da883f99293c4a65f09232fe /plugins | |
parent | e8afc3872a09472e444b41c92a98f307b27b4efc (diff) |
plugins: use new header
Diffstat (limited to 'plugins')
46 files changed, 70 insertions, 63 deletions
diff --git a/plugins/aoc/aoc.cpp b/plugins/aoc/aoc.cpp index e6507f8d0..9a7f8799d 100644 --- a/plugins/aoc/aoc.cpp +++ b/plugins/aoc/aoc.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" using namespace std; diff --git a/plugins/arma2/arma2.cpp b/plugins/arma2/arma2.cpp index bdfce88fd..e4335273d 100644 --- a/plugins/arma2/arma2.cpp +++ b/plugins/arma2/arma2.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" procptr_t posptr, frontptr, topptr; diff --git a/plugins/bf1/bf1.cpp b/plugins/bf1/bf1.cpp index f1adb9d8c..95c1c42a2 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 <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" // Include standard plugin header. +#include "../mumble_plugin_main.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/bf1942/bf1942.cpp b/plugins/bf1942/bf1942.cpp index 524eec986..f45a95aec 100644 --- a/plugins/bf1942/bf1942.cpp +++ b/plugins/bf1942/bf1942.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" procptr_t faceptr, topptr; //BYTE *stateptr; diff --git a/plugins/bf2/bf2.cpp b/plugins/bf2/bf2.cpp index e5baef332..5902750b5 100644 --- a/plugins/bf2/bf2.cpp +++ b/plugins/bf2/bf2.cpp @@ -3,7 +3,8 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" + using namespace std; diff --git a/plugins/bf2142/bf2142.cpp b/plugins/bf2142/bf2142.cpp index 4ddceacc6..a786fc41c 100644 --- a/plugins/bf2142/bf2142.cpp +++ b/plugins/bf2142/bf2142.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" // Include standard plugin header. +#include "../mumble_plugin_main.h" // Include standard plugin header. #include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". // Variable to contain module's addresses diff --git a/plugins/bf3/bf3.cpp b/plugins/bf3/bf3.cpp index 29960aaa4..b12a72c92 100644 --- a/plugins/bf3/bf3.cpp +++ b/plugins/bf3/bf3.cpp @@ -36,7 +36,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" + static bool ptr_chain_valid = false; // Magic ptrs diff --git a/plugins/bf4/bf4.cpp b/plugins/bf4/bf4.cpp index 306510794..b63e33047 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 <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" // Include standard plugin header. +#include "../mumble_plugin_main.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/bf4_x86/bf4_x86.cpp b/plugins/bf4_x86/bf4_x86.cpp index ce5976230..2381becb8 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 <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" // Include standard plugin header. +#include "../mumble_plugin_main.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/bfbc2/bfbc2.cpp b/plugins/bfbc2/bfbc2.cpp index 5c7b8d451..89df9850e 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 <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" bool is_steam = false; diff --git a/plugins/bfheroes/bfheroes.cpp b/plugins/bfheroes/bfheroes.cpp index cf2a9a847..c0f1b554b 100644 --- a/plugins/bfheroes/bfheroes.cpp +++ b/plugins/bfheroes/bfheroes.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" procptr_t posptr, faceptr, topptr, stateptr; diff --git a/plugins/blacklight/blacklight.cpp b/plugins/blacklight/blacklight.cpp index f3e32c663..5e704cc7e 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.h" +#include "../mumble_plugin_main.h" /* Arrays of bytes to find addresses accessed by respective functions so we don't have to blindly search for addresses after every update diff --git a/plugins/borderlands/borderlands.cpp b/plugins/borderlands/borderlands.cpp index 734964664..c1c1eb270 100644 --- a/plugins/borderlands/borderlands.cpp +++ b/plugins/borderlands/borderlands.cpp @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" procptr_t posptr, frontptr, topptr, contextptraddress, stateaddress, loginaddress; diff --git a/plugins/borderlands2/borderlands2.cpp b/plugins/borderlands2/borderlands2.cpp index c13345884..73a1ecd45 100644 --- a/plugins/borderlands2/borderlands2.cpp +++ b/plugins/borderlands2/borderlands2.cpp @@ -35,7 +35,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" + #include <algorithm> procptr_t vects_ptr; diff --git a/plugins/breach/breach.cpp b/plugins/breach/breach.cpp index af12af9e4..e9d6f8898 100644 --- a/plugins/breach/breach.cpp +++ b/plugins/breach/breach.cpp @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" procptr_t posptr, frontptr, topptr; diff --git a/plugins/cod2/cod2.cpp b/plugins/cod2/cod2.cpp index da8f5bd5a..23908f913 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 <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.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 e111eb8c7..252d0e445 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 <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" using namespace std; diff --git a/plugins/cod5/cod5.cpp b/plugins/cod5/cod5.cpp index 78448ef47..c327311c7 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 <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.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 fde39e727..6f5340523 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 <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.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 0de297bd6..439b69565 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.h" +#include "../mumble_plugin_main.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 73c10ea04..f9a39745f 100644 --- a/plugins/cs/cs.cpp +++ b/plugins/cs/cs.cpp @@ -35,7 +35,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" using namespace std; diff --git a/plugins/dys/dys.cpp b/plugins/dys/dys.cpp index 32c2f79a8..c2cf90b3a 100644 --- a/plugins/dys/dys.cpp +++ b/plugins/dys/dys.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" using namespace std; diff --git a/plugins/etqw/etqw.cpp b/plugins/etqw/etqw.cpp index 561422575..b8ad01e5d 100644 --- a/plugins/etqw/etqw.cpp +++ b/plugins/etqw/etqw.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" using namespace std; diff --git a/plugins/ffxiv/ffxiv.cpp b/plugins/ffxiv/ffxiv.cpp index 1f2572e35..33c17c042 100755 --- a/plugins/ffxiv/ffxiv.cpp +++ b/plugins/ffxiv/ffxiv.cpp @@ -3,9 +3,9 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" // Include standard plugin header. - +#include "../mumble_plugin_main.h" // Include standard plugin header. #include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". + #include <cmath> // Offset values can be obtained from: diff --git a/plugins/gmod/gmod.cpp b/plugins/gmod/gmod.cpp index 48ef21f5c..1ea589299 100644 --- a/plugins/gmod/gmod.cpp +++ b/plugins/gmod/gmod.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" using namespace std; diff --git a/plugins/gtaiv/gtaiv.cpp b/plugins/gtaiv/gtaiv.cpp index 0ed25dc23..9900d4203 100644 --- a/plugins/gtaiv/gtaiv.cpp +++ b/plugins/gtaiv/gtaiv.cpp @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" static unsigned int playerid; static procptr_t base_address; diff --git a/plugins/gtav/gtav.cpp b/plugins/gtav/gtav.cpp index 825e3c28c..b1d9d9e38 100644 --- a/plugins/gtav/gtav.cpp +++ b/plugins/gtav/gtav.cpp @@ -3,8 +3,9 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" // Include standard plugin header. +#include "../mumble_plugin_main.h" // Include standard plugin header. #include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". + #include <algorithm> // Include algorithm header for the game version detector 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/gw/gw.cpp b/plugins/gw/gw.cpp index 111d52150..cbb938c75 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.h" +#include "../mumble_plugin_main.h" /* Arrays of bytes to find addresses accessed by respective functions so we don't have to blindly search for addresses after every update diff --git a/plugins/insurgency/insurgency.cpp b/plugins/insurgency/insurgency.cpp index c17de9a9a..822225295 100644 --- a/plugins/insurgency/insurgency.cpp +++ b/plugins/insurgency/insurgency.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" using namespace std; diff --git a/plugins/jc2/jc2.cpp b/plugins/jc2/jc2.cpp index 292f5d794..bcdac470b 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.h" +#include "../mumble_plugin_main.h" const unsigned int off_character_manager = 0xD8FB24; const unsigned int off_local_player = 0x3570; diff --git a/plugins/l4d/l4d.cpp b/plugins/l4d/l4d.cpp index cf5395041..75a2ebf86 100644 --- a/plugins/l4d/l4d.cpp +++ b/plugins/l4d/l4d.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" // Include standard plugin header. +#include "../mumble_plugin_main.h" // Include standard plugin header. #include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". static procptr_t steamclient, engine; // Variables to contain modules addresses diff --git a/plugins/l4d2/l4d2.cpp b/plugins/l4d2/l4d2.cpp index 3891dbda0..7844a93c6 100644 --- a/plugins/l4d2/l4d2.cpp +++ b/plugins/l4d2/l4d2.cpp @@ -3,12 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#ifdef WIN32 -#include "../mumble_plugin_win32.h" // Include standard plugin header. -#else -#include "../mumble_plugin_linux.h" // Include standard plugin header. -#endif - +#include "../mumble_plugin_main.h" // Include standard plugin header. #include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape". // Variables to contain modules addresses diff --git a/plugins/lol/lol.cpp b/plugins/lol/lol.cpp index 2b60f3c3e..6402cc2ff 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.h" +#include "../mumble_plugin_main.h" /* Arrays of bytes to find addresses accessed by respective functions so we don't have to blindly search for addresses after every update diff --git a/plugins/lotro/lotro.cpp b/plugins/lotro/lotro.cpp index d754f8ec0..1077dcc3f 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.h" +#include "../mumble_plugin_main.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++) diff --git a/plugins/mumble_plugin_linux.h b/plugins/mumble_plugin_linux.h index 3fff04201..1815874b4 100644 --- a/plugins/mumble_plugin_linux.h +++ b/plugins/mumble_plugin_linux.h @@ -6,6 +6,10 @@ #ifndef MUMBLE_PLUGIN_LINUX_H_ #define MUMBLE_PLUGIN_LINUX_H_ +# ifndef MUMBLE_PLUGIN_MAIN_H_ +# error "Include mumble_plugin_main.h instead of mumble_plugin_linux.h" +# endif + #include <sys/uio.h> #include <stdio.h> #include <stdlib.h> @@ -16,8 +20,6 @@ #include <fstream> #include <sstream> -#include "mumble_plugin.h" - static inline std::string readAll(const std::string &fn) { std::ifstream ifs; ifs.open(fn.c_str(), std::ifstream::binary); @@ -168,7 +170,7 @@ static inline procptr_t getModuleAddr(const procid_t &pid, const wchar_t *modnam if (pathname.size() > lastSlash + 1) { std::string basename = pathname.substr(lastSlash + 1); if (basename == modnameNonWide) { - unsigned long addr = strtoul(baseaddr.c_str(), NULL, 16); + unsigned long addr = strtoul(baseaddr.c_str(), nullptr, 16); return addr; } } @@ -192,7 +194,7 @@ static inline bool peekProc(const procptr_t &addr, void *dest, const size_t &len return (nread != -1 && static_cast<size_t>(nread) == in.iov_len); } -static bool inline initialize(const std::multimap<std::wstring, unsigned long long int> &pids, const wchar_t *procname, const wchar_t *modname = NULL) { +static bool inline initialize(const std::multimap<std::wstring, unsigned long long int> &pids, const wchar_t *procname, const wchar_t *modname = nullptr) { pModule = 0; if (! pids.empty()) { diff --git a/plugins/mumble_plugin_main.h b/plugins/mumble_plugin_main.h index 26539a6a6..dc770b55a 100644 --- a/plugins/mumble_plugin_main.h +++ b/plugins/mumble_plugin_main.h @@ -1,15 +1,23 @@ -// Copyright 2005-2019 The Mumble Developers. All rights reserved. +// Copyright 2019 The Mumble Developers. All rights reserved. // Use of this source code is governed by a BSD-style license // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. +// This is the main header for process/OS stuff; it's included in most plugins +// because values can rarely be retrieved without accessing the process' memory. +// +// Various functions are provided for common tasks when reading from memory. +// The most important are getModuleAddr() and peekProc(); the first returns the +// base address of a module (e.g. shared library), the latter reads memory at the +// specified address and stores it in a variable. + #ifndef MUMBLE_PLUGIN_MAIN_H_ #define MUMBLE_PLUGIN_MAIN_H_ #include "mumble_plugin.h" -static procid_t pPid; static bool is64Bit; +static procid_t pPid; static procptr_t pModule; static inline bool peekProc(const procptr_t &addr, void *dest, const size_t &len); diff --git a/plugins/mumble_plugin_win32.h b/plugins/mumble_plugin_win32.h index d2cf22043..653ac16c9 100644 --- a/plugins/mumble_plugin_win32.h +++ b/plugins/mumble_plugin_win32.h @@ -6,7 +6,9 @@ #ifndef MUMBLE_MUMBLE_PLUGIN_WIN32_H_ #define MUMBLE_MUMBLE_PLUGIN_WIN32_H_ -#include "mumble_plugin_main.h" +# ifndef MUMBLE_PLUGIN_MAIN_H_ +# error "Include mumble_plugin_main.h instead of mumble_plugin_win32.h" +# endif #define _USE_MATH_DEFINES #include <stdio.h> @@ -98,8 +100,8 @@ static inline bool peekProc(const procptr_t &addr, void *dest, const size_t &len return (ok && (r == len)); } -static bool inline initialize(const std::multimap<std::wstring, unsigned long long int> &pids, const wchar_t *procname, const wchar_t *modname = NULL) { - hProcess = NULL; +static bool inline initialize(const std::multimap<std::wstring, unsigned long long int> &pids, const wchar_t *procname, const wchar_t *modname = nullptr) { + hProcess = nullptr; pModule = 0; if (!pids.empty()) { @@ -145,7 +147,7 @@ static bool inline initialize(const std::multimap<std::wstring, unsigned long lo static void generic_unlock() { if (hProcess) { CloseHandle(hProcess); - hProcess = NULL; + hProcess = nullptr; pModule = 0; pPid = 0; } diff --git a/plugins/ql/ql.cpp b/plugins/ql/ql.cpp index 99d76758d..7744d77b6 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 <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" // Include standard plugin header. +#include "../mumble_plugin_main.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.cpp b/plugins/rl/rl.cpp index e1ff0c93a..64071fcf8 100644 --- a/plugins/rl/rl.cpp +++ b/plugins/rl/rl.cpp @@ -3,11 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#ifdef WIN32 -#include "../mumble_plugin_win32.h" -#else -#include "../mumble_plugin_linux.h" -#endif +#include "../mumble_plugin_main.h" #ifdef WIN32 // Memory offsets diff --git a/plugins/sr/sr.cpp b/plugins/sr/sr.cpp index 406442f31..3156906ba 100644 --- a/plugins/sr/sr.cpp +++ b/plugins/sr/sr.cpp @@ -35,7 +35,7 @@ */ -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.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 e13a44605..a68465c7a 100644 --- a/plugins/ut2004/ut2004.cpp +++ b/plugins/ut2004/ut2004.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" using namespace std; diff --git a/plugins/ut3/ut3.cpp b/plugins/ut3/ut3.cpp index c32f1cfcd..3a9740014 100644 --- a/plugins/ut3/ut3.cpp +++ b/plugins/ut3/ut3.cpp @@ -3,7 +3,7 @@ // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" using namespace std; diff --git a/plugins/ut99/ut99.cpp b/plugins/ut99/ut99.cpp index 0f302499b..827ff9310 100644 --- a/plugins/ut99/ut99.cpp +++ b/plugins/ut99/ut99.cpp @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.h" procptr_t posptr; procptr_t frtptr; diff --git a/plugins/wolfet/wolfet.cpp b/plugins/wolfet/wolfet.cpp index 3f85ca8a4..b93ba7cc9 100644 --- a/plugins/wolfet/wolfet.cpp +++ b/plugins/wolfet/wolfet.cpp @@ -47,7 +47,7 @@ Increasing when turning left. */ -#include "../mumble_plugin_win32.h" +#include "../mumble_plugin_main.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 30d2913c3..07054b3e3 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 <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" // Include standard plugin header. +#include "../mumble_plugin_main.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/wow_x64/wow_x64.cpp b/plugins/wow_x64/wow_x64.cpp index 572ced585..afd83d81b 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 <https://www.mumble.info/LICENSE>. -#include "../mumble_plugin_win32.h" // Include standard plugin header. +#include "../mumble_plugin_main.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) { |