refactor: Remove Detected Code (#203)
* feat(premake): Cleaned up premake file, disabled ImGui asserts and other unused files * feat(renderer): Don't build default font * feat(vendor): replace ImGui with GTA V safe ImGui * revert: feat(System): Added looped feature to disable sigscanner
This commit is contained in:
parent
076aabadca
commit
f0330f2277
9
.gitmodules
vendored
9
.gitmodules
vendored
@ -10,10 +10,6 @@
|
||||
path = vendor/MinHook
|
||||
url = https://github.com/TsudaKageyu/minhook
|
||||
ignore = dirty
|
||||
[submodule "vendor/ImGui"]
|
||||
path = vendor/ImGui
|
||||
url = https://github.com/ocornut/imgui
|
||||
ignore = dirty
|
||||
[submodule "vendor/g3log"]
|
||||
path = vendor/g3log
|
||||
url = https://github.com/KjellKod/g3log.git
|
||||
@ -21,3 +17,8 @@
|
||||
[submodule "vendor/GTAV-Classes"]
|
||||
path = vendor/GTAV-Classes
|
||||
url = https://github.com/Yimura/GTAV-Classes.git
|
||||
ignore = dirty
|
||||
[submodule "vendor/ImGui"]
|
||||
path = vendor/ImGui
|
||||
url = https://github.com/Yimura/gtav-imgui.git
|
||||
ignore = dirty
|
||||
|
@ -10,7 +10,6 @@ namespace big
|
||||
void backend::loop()
|
||||
{
|
||||
g->attempt_save();
|
||||
looped::system_anticheat_bypass();
|
||||
looped::system_self_globals();
|
||||
looped::system_update_pointers();
|
||||
|
||||
|
@ -32,7 +32,6 @@ namespace big
|
||||
|
||||
static void session_local_time();
|
||||
|
||||
static void system_anticheat_bypass();
|
||||
static void system_self_globals();
|
||||
static void system_update_pointers();
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
#include "pointers.hpp"
|
||||
#include "backend/looped/looped.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
// reference: https://github.com/Yimura/YimMenu/issues/180
|
||||
void looped::system_anticheat_bypass()
|
||||
{
|
||||
*g_pointers->m_some_anticheat_thing = 0;
|
||||
}
|
||||
}
|
@ -249,12 +249,6 @@ namespace big
|
||||
m_net_array_handler = ptr.sub(0x3C).as<PVOID>();
|
||||
});
|
||||
|
||||
// Some Anticheat Thing
|
||||
main_batch.add("SAT", "89 05 ? ? ? ? 48 8D 05 ? ? ? ? 48 6B DB 38 48 03 D8", [this](memory::handle ptr)
|
||||
{
|
||||
m_some_anticheat_thing = ptr.add(2).rip().add(0x14).as<std::uint16_t*>();
|
||||
});
|
||||
|
||||
main_batch.run(memory::module(nullptr));
|
||||
|
||||
m_hwnd = FindWindowW(L"grcWindow", nullptr);
|
||||
|
@ -43,7 +43,6 @@ namespace big
|
||||
std::strcpy(font_cfg.Name, "Storopia");
|
||||
|
||||
m_font = ImGui::GetIO().Fonts->AddFontFromMemoryTTF(const_cast<std::uint8_t*>(font_storopia), sizeof(font_storopia), 20.f, &font_cfg);
|
||||
m_monospace_font = ImGui::GetIO().Fonts->AddFontDefault();
|
||||
|
||||
g->window.font_title = ImGui::GetIO().Fonts->AddFontFromMemoryTTF(const_cast<std::uint8_t*>(font_storopia), sizeof(font_storopia), 40.f, &font_cfg);
|
||||
g->window.font_sub_title = ImGui::GetIO().Fonts->AddFontFromMemoryTTF(const_cast<std::uint8_t*>(font_storopia), sizeof(font_storopia), 30.f, &font_cfg);
|
||||
|
428
premake5.lua
428
premake5.lua
@ -1,237 +1,227 @@
|
||||
workspace "BigBaseV2"
|
||||
architecture "x64"
|
||||
startproject "BigBaseV2"
|
||||
architecture "x64"
|
||||
startproject "BigBaseV2"
|
||||
|
||||
configurations
|
||||
{
|
||||
"Debug",
|
||||
"Release",
|
||||
"Dist"
|
||||
}
|
||||
|
||||
outputdir = "%{cfg.buildcfg}"
|
||||
|
||||
IncludeDir = {}
|
||||
IncludeDir["fmtlib"] = "vendor/fmtlib/include"
|
||||
IncludeDir["json"] = "vendor/json/single_include"
|
||||
IncludeDir["MinHook"] = "vendor/MinHook/include"
|
||||
IncludeDir["ImGui"] = "vendor/ImGui"
|
||||
IncludeDir["ImGuiImpl"] = "vendor/ImGui/examples"
|
||||
IncludeDir["g3log"] = "vendor/g3log/src"
|
||||
IncludeDir["GTAV_Classes"] = "vendor/GTAV-Classes"
|
||||
|
||||
CppVersion = "C++17"
|
||||
MsvcToolset = "v143"
|
||||
WindowsSdkVersion = "10.0"
|
||||
|
||||
function DeclareMSVCOptions()
|
||||
filter "system:windows"
|
||||
staticruntime "Off"
|
||||
floatingpoint "Fast"
|
||||
vectorextensions "AVX2"
|
||||
systemversion (WindowsSdkVersion)
|
||||
toolset (MsvcToolset)
|
||||
cppdialect (CppVersion)
|
||||
|
||||
defines
|
||||
{
|
||||
"_CRT_SECURE_NO_WARNINGS",
|
||||
"NOMINMAX",
|
||||
"WIN32_LEAN_AND_MEAN",
|
||||
"_WIN32_WINNT=0x601" -- Support Windows 7
|
||||
}
|
||||
|
||||
disablewarnings
|
||||
{
|
||||
"4100", -- C4100: unreferenced formal parameter
|
||||
"4201", -- C4201: nameless struct/union
|
||||
"4307", -- C4307: integral constant overflow
|
||||
"4996" -- C4996: deprecated in C++17
|
||||
}
|
||||
end
|
||||
|
||||
function file_exists(name)
|
||||
local f=io.open(name,"r")
|
||||
if f~=nil then io.close(f) return true else return false end
|
||||
end
|
||||
|
||||
function DeclareDebugOptions()
|
||||
filter "configurations:Debug"
|
||||
defines { "_DEBUG" }
|
||||
symbols "On"
|
||||
filter "not configurations:Debug"
|
||||
defines { "NDEBUG" }
|
||||
end
|
||||
|
||||
project "ImGui"
|
||||
location "vendor/%{prj.name}"
|
||||
kind "StaticLib"
|
||||
language "C++"
|
||||
|
||||
targetdir ("bin/lib/" .. outputdir)
|
||||
objdir ("bin/lib/int/" .. outputdir .. "/%{prj.name}")
|
||||
|
||||
files
|
||||
{
|
||||
"vendor/%{prj.name}/imgui.cpp",
|
||||
"vendor/%{prj.name}/imgui_demo.cpp",
|
||||
"vendor/%{prj.name}/imgui_draw.cpp",
|
||||
"vendor/%{prj.name}/imgui_tables.cpp",
|
||||
"vendor/%{prj.name}/imgui_widgets.cpp",
|
||||
"vendor/%{prj.name}/backends/imgui_impl_dx11.cpp",
|
||||
"vendor/%{prj.name}/backends/imgui_impl_win32.cpp"
|
||||
}
|
||||
|
||||
includedirs
|
||||
{
|
||||
"vendor/%{prj.name}"
|
||||
}
|
||||
|
||||
DeclareMSVCOptions()
|
||||
DeclareDebugOptions()
|
||||
|
||||
project "fmtlib"
|
||||
location "vendor/%{prj.name}"
|
||||
kind "StaticLib"
|
||||
language "C++"
|
||||
|
||||
targetdir ("bin/lib/" .. outputdir)
|
||||
objdir ("bin/lib/int/" .. outputdir .. "/%{prj.name}")
|
||||
|
||||
files
|
||||
{
|
||||
"vendor/%{prj.name}/include/**.h",
|
||||
"vendor/%{prj.name}/src/**.cc"
|
||||
}
|
||||
|
||||
includedirs
|
||||
{
|
||||
"vendor/%{prj.name}/include"
|
||||
}
|
||||
|
||||
DeclareMSVCOptions()
|
||||
DeclareDebugOptions()
|
||||
|
||||
project "MinHook"
|
||||
location "vendor/%{prj.name}"
|
||||
kind "StaticLib"
|
||||
language "C"
|
||||
|
||||
targetdir ("bin/lib/" .. outputdir)
|
||||
objdir ("bin/lib/int/" .. outputdir .. "/%{prj.name}")
|
||||
|
||||
files
|
||||
{
|
||||
"vendor/%{prj.name}/include/**.h",
|
||||
"vendor/%{prj.name}/src/**.h",
|
||||
"vendor/%{prj.name}/src/**.c"
|
||||
}
|
||||
|
||||
DeclareMSVCOptions()
|
||||
DeclareDebugOptions()
|
||||
|
||||
project "g3log"
|
||||
location "vendor/%{prj.name}"
|
||||
kind "StaticLib"
|
||||
language "C++"
|
||||
|
||||
targetdir ("bin/lib/" .. outputdir)
|
||||
objdir ("bin/lib/int/" .. outputdir .. "/%{prj.name}")
|
||||
|
||||
includedirs
|
||||
{
|
||||
"vendor/%{prj.name}/src"
|
||||
}
|
||||
|
||||
if(file_exists("vendor\\g3log\\src\\g3log\\generated_definitions.hpp") == false) then
|
||||
file = io.open("vendor\\g3log\\src\\g3log\\generated_definitions.hpp", "w")
|
||||
if(file == nil) then
|
||||
premake.error("Failed to locate vendor directories. Try doing git pull --recurse-submodules.")
|
||||
end
|
||||
file:write("// AUTO GENERATED MACRO DEFINITIONS FOR G3LOG\n\n\n/* ==========================================================================\n*2015 by KjellKod.cc. This is PUBLIC DOMAIN to use at your own risk and comes\n* with no warranties. This code is yours to share, use and modify with no\n\n*strings attached and no restrictions or obligations.\n* \n* For more information see g3log/LICENSE or refer refer to http://unlicense.org\n\n*============================================================================*/\n#pragma once\n\n\n// CMake induced definitions below. See g3log/Options.cmake for details.");
|
||||
end
|
||||
|
||||
files
|
||||
{
|
||||
"vendor/%{prj.name}/src/**.hpp",
|
||||
"vendor/%{prj.name}/src/**.cpp"
|
||||
}
|
||||
|
||||
removefiles
|
||||
configurations
|
||||
{
|
||||
"vendor/%{prj.name}/src/crashhandler_unix.cpp"
|
||||
"Debug",
|
||||
"Release",
|
||||
"Dist"
|
||||
}
|
||||
|
||||
DeclareMSVCOptions()
|
||||
DeclareDebugOptions()
|
||||
outputdir = "%{cfg.buildcfg}"
|
||||
|
||||
project "BigBaseV2"
|
||||
location "BigBaseV2"
|
||||
kind "SharedLib"
|
||||
language "C++"
|
||||
CppVersion = "C++17"
|
||||
MsvcToolset = "v143"
|
||||
WindowsSdkVersion = "10.0"
|
||||
|
||||
targetdir ("bin/" .. outputdir)
|
||||
objdir ("bin/int/" .. outputdir .. "/%{prj.name}")
|
||||
function DeclareMSVCOptions()
|
||||
filter "system:windows"
|
||||
staticruntime "Off"
|
||||
floatingpoint "Fast"
|
||||
systemversion (WindowsSdkVersion)
|
||||
toolset (MsvcToolset)
|
||||
cppdialect (CppVersion)
|
||||
|
||||
PrecompiledHeaderInclude = "common.hpp"
|
||||
PrecompiledHeaderSource = "%{prj.name}/src/common.cpp"
|
||||
defines
|
||||
{
|
||||
"_CRT_SECURE_NO_WARNINGS",
|
||||
"NOMINMAX",
|
||||
"WIN32_LEAN_AND_MEAN",
|
||||
"_WIN32_WINNT=0x601" -- Support Windows 7
|
||||
}
|
||||
|
||||
files
|
||||
{
|
||||
"%{prj.name}/src/**.hpp",
|
||||
"%{prj.name}/src/**.h",
|
||||
"%{prj.name}/src/**.cpp",
|
||||
"%{prj.name}/src/**.asm"
|
||||
}
|
||||
disablewarnings
|
||||
{
|
||||
"4100", -- C4100: unreferenced formal parameter
|
||||
"4201", -- C4201: nameless struct/union
|
||||
"4307", -- C4307: integral constant overflow
|
||||
"4996" -- C4996: deprecated in C++17
|
||||
}
|
||||
end
|
||||
|
||||
includedirs
|
||||
{
|
||||
"%{IncludeDir.fmtlib}",
|
||||
"%{IncludeDir.json}",
|
||||
"%{IncludeDir.MinHook}",
|
||||
"%{IncludeDir.ImGui}",
|
||||
"%{IncludeDir.ImGuiImpl}",
|
||||
"%{IncludeDir.g3log}",
|
||||
"%{IncludeDir.GTAV_Classes}",
|
||||
"%{prj.name}/src"
|
||||
}
|
||||
function file_exists(name)
|
||||
local f=io.open(name,"r")
|
||||
if f~=nil then io.close(f) return true else return false end
|
||||
end
|
||||
|
||||
libdirs
|
||||
{
|
||||
"bin/lib"
|
||||
}
|
||||
function DeclareDebugOptions()
|
||||
filter "configurations:Debug"
|
||||
defines { "_DEBUG" }
|
||||
symbols "On"
|
||||
filter "not configurations:Debug"
|
||||
defines { "NDEBUG" }
|
||||
end
|
||||
|
||||
links
|
||||
{
|
||||
"fmtlib",
|
||||
"MinHook",
|
||||
"ImGui",
|
||||
"g3log"
|
||||
}
|
||||
project "fmtlib"
|
||||
location "vendor/%{prj.name}"
|
||||
kind "StaticLib"
|
||||
language "C++"
|
||||
|
||||
pchheader "%{PrecompiledHeaderInclude}"
|
||||
pchsource "%{PrecompiledHeaderSource}"
|
||||
targetdir ("bin/lib/" .. outputdir)
|
||||
objdir ("bin/lib/int/" .. outputdir .. "/%{prj.name}")
|
||||
|
||||
forceincludes
|
||||
{
|
||||
"%{PrecompiledHeaderInclude}"
|
||||
}
|
||||
files
|
||||
{
|
||||
"vendor/%{prj.name}/include/**.h",
|
||||
"vendor/%{prj.name}/src/**.cc"
|
||||
}
|
||||
|
||||
DeclareMSVCOptions()
|
||||
DeclareDebugOptions()
|
||||
includedirs
|
||||
{
|
||||
"vendor/%{prj.name}/include"
|
||||
}
|
||||
|
||||
flags { "NoImportLib", "Maps" }
|
||||
DeclareMSVCOptions()
|
||||
DeclareDebugOptions()
|
||||
|
||||
filter "configurations:Debug"
|
||||
flags { "LinkTimeOptimization", "MultiProcessorCompile" }
|
||||
editandcontinue "Off"
|
||||
defines { "BIGBASEV2_DEBUG" }
|
||||
project "g3log"
|
||||
location "vendor/%{prj.name}"
|
||||
kind "StaticLib"
|
||||
language "C++"
|
||||
|
||||
filter "configurations:Release"
|
||||
flags { "LinkTimeOptimization", "NoManifest", "MultiProcessorCompile" }
|
||||
defines { "BIGBASEV2_RELEASE" }
|
||||
optimize "speed"
|
||||
filter "configurations:Dist"
|
||||
flags { "LinkTimeOptimization", "FatalWarnings", "NoManifest", "MultiProcessorCompile" }
|
||||
defines { "BIGBASEV2_DIST" }
|
||||
optimize "speed"
|
||||
targetdir ("bin/lib/" .. outputdir)
|
||||
objdir ("bin/lib/int/" .. outputdir .. "/%{prj.name}")
|
||||
|
||||
includedirs
|
||||
{
|
||||
"vendor/%{prj.name}/src"
|
||||
}
|
||||
|
||||
if(file_exists("vendor\\g3log\\src\\g3log\\generated_definitions.hpp") == false) then
|
||||
file = io.open("vendor\\g3log\\src\\g3log\\generated_definitions.hpp", "w")
|
||||
if(file == nil) then
|
||||
premake.error("Failed to locate vendor directories. Try doing git pull --recurse-submodules.")
|
||||
end
|
||||
file:write("#pragma once");
|
||||
end
|
||||
|
||||
files
|
||||
{
|
||||
"vendor/%{prj.name}/src/**.hpp",
|
||||
"vendor/%{prj.name}/src/**.cpp"
|
||||
}
|
||||
|
||||
removefiles
|
||||
{
|
||||
"vendor/%{prj.name}/src/crashhandler_unix.cpp"
|
||||
}
|
||||
|
||||
DeclareMSVCOptions()
|
||||
DeclareDebugOptions()
|
||||
|
||||
project "ImGui"
|
||||
location "vendor/%{prj.name}"
|
||||
kind "StaticLib"
|
||||
language "C++"
|
||||
|
||||
targetdir ("bin/lib/" .. outputdir)
|
||||
objdir ("bin/lib/int/" .. outputdir .. "/%{prj.name}")
|
||||
|
||||
files
|
||||
{
|
||||
"vendor/%{prj.name}/imgui.cpp",
|
||||
"vendor/%{prj.name}/imgui_draw.cpp",
|
||||
"vendor/%{prj.name}/imgui_tables.cpp",
|
||||
"vendor/%{prj.name}/imgui_widgets.cpp",
|
||||
"vendor/%{prj.name}/backends/imgui_impl_dx11.cpp",
|
||||
"vendor/%{prj.name}/backends/imgui_impl_win32.cpp"
|
||||
}
|
||||
|
||||
includedirs
|
||||
{
|
||||
"vendor/%{prj.name}"
|
||||
}
|
||||
|
||||
defines {
|
||||
"IMGUI_DISABLE_DEMO_WINDOWS",
|
||||
"IMGUI_DISABLE_METRICS_WINDOW",
|
||||
"IM_ASSERT(_EXPR) ((void)(_EXPR))"
|
||||
}
|
||||
|
||||
DeclareMSVCOptions()
|
||||
DeclareDebugOptions()
|
||||
|
||||
project "MinHook"
|
||||
location "vendor/%{prj.name}"
|
||||
kind "StaticLib"
|
||||
language "C"
|
||||
|
||||
targetdir ("bin/lib/" .. outputdir)
|
||||
objdir ("bin/lib/int/" .. outputdir .. "/%{prj.name}")
|
||||
|
||||
files
|
||||
{
|
||||
"vendor/%{prj.name}/include/**.h",
|
||||
"vendor/%{prj.name}/src/**.h",
|
||||
"vendor/%{prj.name}/src/**.c"
|
||||
}
|
||||
|
||||
DeclareMSVCOptions()
|
||||
DeclareDebugOptions()
|
||||
|
||||
project "BigBaseV2"
|
||||
location "BigBaseV2"
|
||||
kind "SharedLib"
|
||||
language "C++"
|
||||
|
||||
targetdir ("bin/" .. outputdir)
|
||||
objdir ("bin/int/" .. outputdir .. "/%{prj.name}")
|
||||
|
||||
files
|
||||
{
|
||||
"%{prj.name}/src/**.hpp",
|
||||
"%{prj.name}/src/**.h",
|
||||
"%{prj.name}/src/**.cpp",
|
||||
"%{prj.name}/src/**.asm"
|
||||
}
|
||||
|
||||
includedirs
|
||||
{
|
||||
"%{prj.name}/src/",
|
||||
"vendor/fmtlib/include",
|
||||
"vendor/g3log/src",
|
||||
"vendor/GTAV-Classes",
|
||||
"vendor/ImGui",
|
||||
"vendor/json/single_include",
|
||||
"vendor/MinHook/include"
|
||||
}
|
||||
|
||||
libdirs
|
||||
{
|
||||
"bin/lib"
|
||||
}
|
||||
|
||||
links
|
||||
{
|
||||
"fmtlib",
|
||||
"g3log",
|
||||
"ImGui",
|
||||
"MinHook"
|
||||
}
|
||||
|
||||
pchheader "common.hpp"
|
||||
pchsource "%{prj.name}/src/common.cpp"
|
||||
|
||||
forceincludes { -- microsoft bad
|
||||
"common.hpp"
|
||||
}
|
||||
|
||||
DeclareMSVCOptions()
|
||||
DeclareDebugOptions()
|
||||
|
||||
flags { "NoImportLib", "Maps", "LinkTimeOptimization", "MultiProcessorCompile" }
|
||||
|
||||
filter "configurations:Debug"
|
||||
flags { }
|
||||
editandcontinue "Off"
|
||||
defines { "DEBUG" }
|
||||
|
||||
filter "configurations:Release"
|
||||
flags { "NoManifest" }
|
||||
defines { "RELEASE" }
|
||||
optimize "speed"
|
||||
filter "configurations:Dist"
|
||||
flags { "FatalWarnings", "NoManifest" }
|
||||
defines { "DIST" }
|
||||
optimize "speed"
|
||||
|
2
vendor/ImGui
vendored
2
vendor/ImGui
vendored
@ -1 +1 @@
|
||||
Subproject commit 9779cc2fe273c4ea96b9763fcd54f14b8cbae561
|
||||
Subproject commit ced3b84d96256d66711a7a347968a023ebf04a3e
|
Reference in New Issue
Block a user