mumble/plugins
Davide Beatrici d8c4b82efe FEAT(client): add several new functions to be used in positional audio plugins
- peekProcString(): reads the specified amount of data at the specified address and returns it as std::string. An empty std::string is returned in case of error.
If length is 0, the function reads one byte at a time and stops when either '\0' is found or 3 seconds have passed.
The successfully read data is returned, also in case of error.

- peekProcVector(): can be used to read a dynamic array (size known at runtime) from the process' memory.
Dynamic arrays are part of C99, which should be supported by most compilers nowadays, but std::vector provides many advantages (e.g. easy resize) over a raw array.

- getVirtualFunction(): gets the address of a virtual function given its index and the class object's base address.
A macro called GET_POINTER_SIZE is added because "is64Bit ? 8 : 4" is used in two places now. Also, it's useful and intuitive for plugin(s) programmers.

- sinCos(): calculates sine and cosine of the specified value. On Linux the calculation is guaranteed to be simultaneous.

- degreesToRadians(): converts degrees to radians.

- isBigEndian(): returns whether the architecture is big-endian, by checking how a 4-byte value is stored in memory.

- networkToHost() converts from network byte order to host byte order.
I decided to create our own function because ntohs() is part of winsock(2).h on Windows, which means we would have to link to "ws2_32".

This commit also adds and makes use of the new "OS_WINDOWS" and "OS_LINUX" definitions.
The reason behind their existence is the "_WIN32" and "__linux__" definitions not being intuitive, mainly because they don't follow the same naming convention.
2020-09-27 19:59:18 +02:00
..
aoc FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
arma2 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
bf1 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
bf2 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
bf3 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
bf4 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
bf4_x86 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
bf1942 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
bf2142 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
bfbc2 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
bfheroes FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
blacklight FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
borderlands FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
borderlands2 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
breach FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
cod2 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
cod4 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
cod5 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
codmw2 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
codmw2so FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
cs FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
css BUILD(cmake): Don't build retracted plugins by default 2020-09-26 09:14:39 +02:00
dods BUILD(cmake): Don't build retracted plugins by default 2020-09-26 09:14:39 +02:00
dys FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
etqw FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
ffxiv FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
ffxiv_x64 BUILD(qmake): Remove 2020-09-02 08:29:45 +02:00
gmod FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
gtaiv FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
gtasa FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
gtav FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
gw FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
hl2dm BUILD(cmake): Don't build retracted plugins by default 2020-09-26 09:14:39 +02:00
insurgency FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
jc2 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
l4d FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
l4d2 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
link FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
lol FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
lotro FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
ql FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
rl FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
sr FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
sto BUILD(cmake): Don't build retracted plugins by default 2020-09-26 09:14:39 +02:00
tf2 BUILD(cmake): Don't build retracted plugins by default 2020-09-26 09:14:39 +02:00
ut3 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
ut99 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
ut2004 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
wolfet FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
wow FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
wow_x64 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
CMakeLists.txt FEAT(client): add several new functions to be used in positional audio plugins 2020-09-27 19:59:18 +02:00
mumble_plugin_linux.h FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
mumble_plugin_main.h FEAT(client): add several new functions to be used in positional audio plugins 2020-09-27 19:59:18 +02:00
mumble_plugin_utils.h FEAT(client): add several new functions to be used in positional audio plugins 2020-09-27 19:59:18 +02:00
mumble_plugin_win32_internals.h Auto-update LICENSE.header in source files 2020-01-07 03:09:22 +01:00
mumble_plugin_win32.h FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
mumble_plugin.h FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
null_plugin.cpp FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00