Commit Graph

465 Commits

Author SHA1 Message Date
Mikkel Krautz
797bc9b915 mumble_plugin.h: add MUMBLE_PLUGIN_EXPORT macro.
This allows plugins to use MUMBLE_PLUGIN_EXPORT
instead of __declspec(dllexport) -- but get the
same behavior on MSVC/Windows.

This is part of the effort to allow Windows PA
plugins to work with Wine games on Linux.
2016-08-13 10:04:12 +00:00
Mikkel Krautz
5b5167646d pugins/mumble_plugin_linux.h: convert C-style casts to C++-style casts. 2016-08-12 20:37:31 +00:00
Mikkel Krautz
ee0c6a2739 plugins/mumble_plugin_linux.h: use non-C++11 std::ifstream::open().
Fixes the C++03 build.
2016-08-12 20:36:20 +00:00
davidebeatrici
746322ecc1 plugins/l4d2: Rename "l4d2.cpp" to "l4d2_win32.cpp" 2016-08-11 23:41:21 +02:00
davidebeatrici
88797fa324 mumble/plugins: Rename Win32 headers 2016-08-11 23:31:15 +02:00
Mikkel Krautz
58a7ff5471 Merge PR #2508: Positional audio support for Left 4 Dead 2 on Linux 2016-08-11 22:11:10 +02:00
davidebeatrici
2b414da702 Positional audio support for Left 4 Dead 2 on Linux 2016-08-11 22:02:26 +02:00
davidebeatrici
2da60f96e0 Linux support for positional audio plugins 2016-08-11 20:53:10 +02:00
Davide Beatrici
713d531fe9 plugins/link: Initialize wsPluginName to fix #2482 2016-08-08 18:32:24 +02:00
Mikkel Krautz
042efe4d4b plugins/link: remove uses of HWND in about() and config(). 2016-08-06 17:18:11 +02:00
Mikkel Krautz
d818a8d362 plugins/mumble_plugin.h: fix typo in MUMBLE_PLUGIN_MAGIC_QT for _MSC_VER == 1600, M_IX86. 2016-08-06 17:18:09 +02:00
Mikkel Krautz
f0a5bd265b plugins/mumble_plugin.h: replace use of HWND with void *.
The mumble_plugin.h header is used in more places than on Windows,
but the HWND type is Windows-specific.

This has caused problems in the past, forcing all users of mumble_plugin.h
to define a fake HWND type.

We recently began passing 0 to the about() and config() plugin functions
unconditionally -- so they are practically unused.

Therefore, it makes no sense to use the HWND type anymore.
Because of that, this commit changes the HWND type to void *.
It is ABI compatible with HWND.
2016-08-06 17:17:49 +02:00
Mikkel Krautz
6b67f35b71 plugins/mumble_plugin.h: replace hardcoded __cdecl with MUMBLE_PLUGIN_CALLING_CONVENTION.
The new preprocessor define is only used on MSVC.
2016-08-06 16:09:19 +02:00
Davide Beatrici
730200a983 plugins/l4d2: Updated server ID memory address
Probably it has been changed by this update: http://www.l4d.com/blog/post.php?id=22630
It mentions only fixes for the MacOS version, but also the Windows one got a small update.

Also:
Removed wrong comma in identity at line 103.
Moved "std:endl" in the identity item's line.
Removed extra zero in memory addresses.
Removed empty line at the end of the file.
2016-07-18 17:04:03 +02:00
Davide Beatrici
c757a814f1 plugins/l4d2: Updated server ID memory address
Probably it has been changed by this update: http://www.l4d.com/blog/post.php?id=22630
It mentions only fixes for the MacOS version, but also the Windows one got a small update.

Also:
Removed wrong comma in identity at line 103.
Moved "std:endl" in the identity item's line.
Removed extra zero in memory addresses.
Removed empty line at the end of the file.
2016-07-18 16:58:19 +02:00
Mikkel Krautz
f63d834cd2 plugins: allow getModuleAddr() to enumerate 32-bit modules in WoW64 mode. 2016-07-18 16:21:30 +02:00
Mikkel Krautz
a179f5d249 Move 'manual' plugin into Mumble itself.
The machinery needed to support the "manual" plugin as a DLL
file on Windows is very complex.

This is because we build Mumble itself as mumble_app.dll and link
our dependencies statically. And also because of various changes
made in Qt 5.

The manual plugin uses Qt. When Mumble linked dynamically against
Qt4Gui.dll, etc. - everything worked fine. The manual plugin simply
linked against the same DLLs.

With the move to mumble_app.dll, we also moved to statically link
against Qt for mumble_app.dll.

To accommodate the manual plugin, we implemented various hacks to
export the Qt symbols from mumble_app.dll that were necessary for
loading the manual plugin.

And that worked for a while.

However, right now, with Qt 5.6, the plugin is broken. And I get
a lot of weird crashes when interacting with the manual plugin.

Most of it boils down to the fact that both manual.dll and mumble_app.dll
have copies of statically initialized data, like QArrayData::shared_null.
Sharing objects between mumble_app.dll and manual.dll in this scenario is
impossible, because using the object in one module will cause one set of
statically initialized data to be used, while use in the other will cause
the other data to be accessed. This is especially bad for things that use
reference counting, because it'll get out of sync.

So, to get rid of this mess, we're moving the manual plugin into Mumble
itself. Functionally, it doesn't change anything. The manual plugin could
not be auto-updated because it depended on a specific Qt and Mumble
version. Mostly because it depended on the correct set of Qt symbols to be
exported from mumble_app.dll.

The plugin now works correctly, and we can safely remove a lot of the
hacks that were required to load the manual plugin in its earlier
incarnation.

The only downside is that we can't test the manual plugin in PAHelper.
But that wasn't really the case before either, because the plugin
practically depended on Mumble to run.
2016-07-17 00:32:06 +02:00
Mikkel Krautz
3ea298a58f Plugins: add MumblePluginQt to better support the 'manual' plugin.
If a plugin implements MumblePluginQt, it is a signal to Mumble
that the plugin wishes to use Qt-based about and config dialogs.

The MmublePluginQt interface includes two methods: "about" and
"config".

Mumble will call these methods with a pointer to a QWidget that
is suitable to be the parent for the plugin's about and/or config
dialogs.

The MumblePluginQt interface is only useful for plugins that use Qt.
That, for now, is only the "manual" plugin. In general, plugins can't
really use Qt unless they're very tightly coupled to Mumble.
2016-07-17 00:31:59 +02:00
Davide Beatrici
d7b26dd923 plugins/gtav: update game_name memory addresses
I accidentally forgot to update them.
2016-07-17 00:17:53 +02:00
Davide Beatrici
bfa9be7122 plugins/gtav: update plugin to work with version 1.35
Game version: 1.35
https://support.rockstargames.com/hc/en-us/articles/222662548-GTAV-Title-Update-1-35-Notes-PS4-Xbox-One-PC
2016-07-14 01:48:34 +02:00
Davide Beatrici
4f565c65b2 plugins/rl: update plugin to work with version 1.21
Game version: 1.21
http://www.rocketleaguegame.com/news/2016/07/patch-notes-v1-21
2016-07-09 08:57:34 +02:00
Mikkel Krautz
295961dc16 Convert all remaining uses of LIBPATH in qmake files to use QMAKE_LIBDIR instead.
LIBPATH is deprecated in favor of QMAKE_LIBDIR.
2016-07-05 23:07:27 +02:00
Davide Beatrici
536a3a58d9 plugins/gtav: Support for retail version
Added support for retail version.
Fixed avatar position Y being 0 when the game is paused.
2016-07-01 19:33:17 +02:00
Mikkel Krautz
68606feebf Merge PR #2378: plugins/rl: Plugin update for game's latest version 2016-06-29 23:53:09 +02:00
Davide Beatrici
e1b80c0e4f plugins/rl: Plugin update for game's latest version
Game version: 1.20
http://www.rocketleaguegame.com/news/2016/06/rocket-league-patch-notes-v1-20
2016-06-29 01:17:16 +02:00
Mikkel Krautz
aa34251ac9 plugins/ut3: fix warnings-as-errors build for UT3. 2016-06-26 22:10:17 +02:00
Mikkel Krautz
c4301b5831 plugins/rl: fix warnings-as-errors build for Rocket League plugin. 2016-06-26 22:10:01 +02:00
Mikkel Krautz
d21de05d24 Merge PR #2361: plugins/ql: Native front and top vectors 2016-06-24 00:27:34 +02:00
Davide Beatrici
c1b91cf645 plugins/ql: Native front and top vectors
Improvements:
Native front and top vectors

Fixes:
X/Z axis: Quake uses a left-handed, Z-up coordinate system. http://www.ritualistic.com/games/fakk2/editing/coordinatesystem.html
2016-06-24 00:27:15 +02:00
Davide Beatrici
b1a9a36c30 plugins/rl: Plugin update for game's latest version
Fixed X/Z axes: Rocket League uses a left-handed Y-up coordinate system (like Mumble), even if Unreal Engine uses a Z-up one. http://www.aclockworkberry.com/world-coordinate-systems-in-3ds-max-unity-and-unreal-engine/

Game version: 1.19
http://www.rocketleaguegame.com/news/2016/06/patch-notes-v1-19-title-update-7
2016-06-23 23:52:48 +02:00
davidebeatrici
ed8748dc07 plugins: update memory addresses retrieval to use procptr32_t/procptr64_t. 2016-06-23 23:32:37 +02:00
Mikkel Krautz
6c2cf49e4c plugins.pri, mumble_plugin_win32.h: add CONFIG(no-plugin-legacy-ptr) to disable use of non-explicit mumble_plugin_win32.h header.
The idea is that we can use the CONFIG option until we've fixed the
remaining plugins.

Once all plugins have been transitioned over to the new explicit
pointer types, we can drop the mumble_plugin_win32.h header and
point people to mumble_plugin_win32_x86.h and mumble_plugin_win32_x64.h.
2016-06-20 22:40:12 +02:00
Mikkel Krautz
c450c3ba44 plugins/rl: convert plugin to use 'mumble_plugin_win32_x86.h'. 2016-06-20 22:40:12 +02:00
Mikkel Krautz
9d7ead3929 plugins: add distinct header files for x86 and x64.
This is accomplished by making a 'generic' header,
mumble_plugin_win32_ptr_type.h

This header requires files that include it to
define PTR_TYPE and PTR_TYPE_CONCRETE.

In the old-style mumble_plugin_win32.h, PTR_TYPE
is set to 'void *', and PTR_TYPE_CONCRETE is
set to 'BYTE *'. The pModule varaible and the
getModuleAddr functions return PTR_TYPE_CONCRETE,
whereas the peekProc functions take PTR_TYPE.

The new-style arch-specific headers use the same
value for PTR_TYPE and PTR_TYPE_CONCRETE. The x86
variant uses procptr32_t. The x64 variant uses
procptr64_t.
2016-06-20 22:40:05 +02:00
Mikkel Krautz
a9384f11ca Merge PR #2344: Remove old-style license header from WoW plugin. 2016-06-15 23:40:20 +02:00
Davide Beatrici
5271180a26 plugins/gtav: Plugin update for game's latest version
Fixed:
X/Z axes: http://www.gtamodding.com/wiki/Map_system
Wrong comma at line 106
Wrong comment at line 150

Game version: 1.34
https://support.rockstargames.com/hc/en-us/articles/220249028-GTAV-Title-Update-1-34-Notes-PS4-Xbox-One-PC
2016-06-11 19:59:42 +02:00
Mikkel Krautz
64f1c095e6 Remove old-style license header from WoW plugin.
Karl Dietz has allowed us to remove the old license header
from the WoW plugin.
2016-06-11 19:18:01 +02:00
Davide Beatrici
3e7b0bab4f plugins/ql: Plugin update for game's latest version
Added:
Context/Identity escape function
Map name in identity

Improved:
Horizontal and vertical view memory addresses changed, the new ones are updated in real-time
Team names

Fixed:
Avatar/Camera front and top vectors calculation
Wrong comment at line 140

Game version: 1069
http://steamcommunity.com/games/282440/announcements/detail/876328108049672536
2016-06-10 22:04:22 +02:00
Mikkel Krautz
a3275f579b plugins/l4d2: fix build. 2016-06-07 00:14:43 +02:00
Davide Beatrici
e652888ddc Plugin update for game's latest version and identity support
Added:
- Correct avatar position (the one used before was the camera one)
- Camera position
- State value
- Context based on server ID
- Server name in identity
- Map name in identity
- Player nickname in identity

Game version: 2.1.4.6
http://www.l4d.com/blog/post.php?id=22240
2016-06-04 02:07:54 +02:00
Davide Beatrici
d2416ca4fb Fixed inverted Z (left/right) value
Rocket League uses a right handed coordinate system.
2016-05-31 18:54:32 +02:00
Mikkel Krautz
7a89a2ca18 Add GTA V plugin to the build and to the installer. 2016-05-29 11:55:22 +02:00
Davide Beatrici
b147287818 Plugin update for latest version of Rocket League
Unknown game update.
2016-05-29 01:27:09 +02:00
Davide Beatrici
c695463fae Positional Audio support for Grand Theft Auto V
No context support yet.
Identity: Player nickname, vehicle, location and street.

Details: 64-bit only.
2016-05-29 01:26:22 +02:00
Davide Beatrici
7591b5c153 Move "escape" function to mumble_plugin_utils.h header 2016-05-29 00:57:57 +02:00
Davide Beatrici
decab3ffcb Plugin update for latest version of Rocket League
Added:
- Avatar position
- Avatar front vector
- Camera front vector
- Camera top vector

Game Version: 1.18
http://www.rocketleaguegame.com/news/2016/05/patch-notes-v1-18-title-update-6/
2016-05-29 00:56:20 +02:00
Davide Beatrici
e023f4561f plugins/bf4: Added Squad State value
- Added Squad State value (Public or Private).
- Added/Changed comments.
2016-05-19 00:33:49 +02:00
Mikkel Krautz
8af5c233d5 Add BF4 x86 to the build and to the installer. 2016-05-19 00:25:48 +02:00
Davide Beatrici
a1fe822a51 Positional Audio support for Battlefield 4 (x86)
Context based on Server ID.
Identity data: IP address + port, team, squad, squad leader and squad state.
2016-05-19 00:22:12 +02:00
Mikkel Krautz
0c07d259dc plugins/bf4: fix JSON encoding.
The previous code accidently used the
C-string "host" and "serverID" variables
in the JSON output for the context and
identity.

To avoid too many changes, this commit
changes the JSON escape function to
work on C strings instead, and uses
that to escape the "host" and "serverID"
strings from the game before emitting
them into the JSON documents.

This commit also adds some extra code
to ensure that the game strings we
include in the JSON document are
within the printable ASCII range.
2016-05-18 23:45:08 +02:00