-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Excluded effects(particles, trails, etc.) from depth buffer
- Loading branch information
Showing
12 changed files
with
259 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
### EGSM | ||
A module that enhances gmod with a thing that was asked for decades | ||
|
||
Works only on the main branch | ||
Works only on the main and x86 branch | ||
|
||
[Documentation](https://github.com/devonium/EGSM/wiki) | ||
|
||
[Discord](https://discord.gg/X2Ay3cgW8T) | ||
|
||
### How to install | ||
* Put [the dll](https://github.com/devonium/EGSM/releases) in garrysmod/lua/bin | ||
* APPEND `require("egsm")` to garrysmod/lua/menu/menu.lua | ||
* APPEND `require((BRANCH == "x86-64" or BRANCH == "chromium" ) and "egsm_chromium" or "egsm")` to garrysmod/lua/menu/menu.lua | ||
|
||
https://youtu.be/SlWGKU-mYRw | ||
|
||
### How to compile | ||
[garrysmod_common](https://github.com/danielga/garrysmod_common) | ||
``` | ||
git clone --recursive https://github.com/danielga/garrysmod_common | ||
git clone --recursive https://github.com/danielga/garrysmod_common -b "x86-64-support-sourcesdk" | ||
``` | ||
|
||
``` | ||
premake5 vs2017 --gmcommon="garrysmod_common_path" --autoinstall="gmod_lua_bin_path" | ||
premake5 vs2017 --gmcommon="garrysmod_common_x86_64_path" --autoinstall="gmod_lua_bin_path --chromium=1" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#pragma once | ||
#ifdef CHROMIUM | ||
#undef strdup | ||
#include <tier0/memdbgoff.h> | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#pragma once | ||
#include <Windows.h> | ||
#include <scanning/symbolfinder.hpp> | ||
#include <detouring/hook.hpp> | ||
|
||
struct DynLibInfo | ||
{ | ||
void* baseAddress; | ||
size_t memorySize; | ||
}; | ||
|
||
bool GetLibraryInfo(const void* handle, DynLibInfo& lib); | ||
void* ScanSign(const void* handle, const char* sig, size_t len, const void* start = NULL); | ||
|
||
#define GetVTable(ptr) ((void***)ptr)[0] | ||
|
||
#define Define_thiscall_Hook(rettype, name, thistype, ...) \ | ||
Detouring::Hook name##_hook; \ | ||
typedef rettype (__thiscall* name##_decl)(thistype _this, __VA_ARGS__); \ | ||
inline name##_decl name##_trampoline() { return name##_hook.GetTrampoline<name##_decl>();}\ | ||
rettype __fastcall name##_detour(thistype _this, void* edx, __VA_ARGS__) | ||
|
||
#define Setup_Hook(name, targ) \ | ||
{ \ | ||
Detouring::Hook::Target target(reinterpret_cast<void*>(targ)); \ | ||
name##_hook.Create(target, name##_detour); \ | ||
name##_hook.Enable(); \ | ||
} | ||
|
||
#define HOOK_SIGN(x) x; | ||
|
||
#ifdef WIN64 | ||
#define HOOK_SIGN_x32(x) | ||
#define HOOK_SIGN_x64(x) x; | ||
#else | ||
#define HOOK_SIGN_x32(x) x; | ||
#define HOOK_SIGN_x64(x) | ||
#endif | ||
|
||
#ifdef CHROMIUM | ||
#define HOOK_SIGN_M(x) | ||
|
||
#ifdef WIN64 | ||
#define HOOK_SIGN_CHROMIUM_X64(x) x; | ||
#define HOOK_SIGN_CHROMIUM_x32(x) | ||
#else | ||
#define HOOK_SIGN_CHROMIUM_X64(x) | ||
#define HOOK_SIGN_CHROMIUM_X32(x) x; | ||
|
||
#endif | ||
#define HOOK_SIGN_CHROMIUM(x) x; | ||
#else | ||
#define HOOK_SIGN_M(x) x; | ||
#define HOOK_SIGN_CHROMIUM(x) | ||
#define HOOK_SIGN_CHROMIUM_X64(x) | ||
#define HOOK_SIGN_CHROMIUM_X32(x) | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.