clean project
This commit is contained in:
parent
12526fa754
commit
f78bb85033
@ -1,8 +1,10 @@
|
||||
#include <std_include.hpp>
|
||||
#include "loader/component_loader.hpp"
|
||||
#include "scheduler.hpp"
|
||||
|
||||
#include "game/game.hpp"
|
||||
|
||||
#include "scheduler.hpp"
|
||||
|
||||
#include <utils/hook.hpp>
|
||||
|
||||
namespace arxan
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include <std_include.hpp>
|
||||
#include "loader/component_loader.hpp"
|
||||
|
||||
#include "auth.hpp"
|
||||
//#include "command.hpp"
|
||||
//#include "network.hpp"
|
||||
|
||||
#include "game/game.hpp"
|
||||
#include "steam/steam.hpp"
|
||||
|
||||
#include <utils/hook.hpp>
|
||||
#include <utils/string.hpp>
|
||||
@ -11,9 +11,6 @@
|
||||
#include <utils/info_string.hpp>
|
||||
#include <utils/cryptography.hpp>
|
||||
|
||||
#include "game/game.hpp"
|
||||
#include "steam/steam.hpp"
|
||||
|
||||
namespace auth
|
||||
{
|
||||
namespace
|
||||
@ -37,7 +34,7 @@ namespace auth
|
||||
return {};
|
||||
}
|
||||
|
||||
return std::string{info.szHwProfileGuid, sizeof(info.szHwProfileGuid)};
|
||||
return std::string{ info.szHwProfileGuid, sizeof(info.szHwProfileGuid) };
|
||||
}
|
||||
|
||||
std::string get_protected_data()
|
||||
@ -53,7 +50,7 @@ namespace auth
|
||||
}
|
||||
|
||||
const auto size = std::min(data_out.cbData, 52ul);
|
||||
std::string result{reinterpret_cast<char*>(data_out.pbData), size};
|
||||
std::string result{ reinterpret_cast<char*>(data_out.pbData), size };
|
||||
LocalFree(data_out.pbData);
|
||||
|
||||
return result;
|
||||
|
@ -25,12 +25,21 @@ namespace branding
|
||||
public:
|
||||
void post_unpack() override
|
||||
{
|
||||
if (game::environment::is_dedi())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
localized_strings::override("LUA_MENU_LEGAL_COPYRIGHT", "IW7-MOD");
|
||||
|
||||
localized_strings::override("LUA_MENU_MULTIPLAYER_CAPS", "IW7-MOD: MULTIPLAYER");
|
||||
localized_strings::override("LUA_MENU_ALIENS_CAPS", "IW7-MOD: ZOMBIES");
|
||||
//localized_strings::override("MENU_SP_CAMPAIGN", "IW7-MOD: CAMPAIGN");
|
||||
//localized_strings::override("LUA_MENU_MULTIPLAYER_CAPS", "IW7-MOD: MULTIPLAYER");
|
||||
//localized_strings::override("LUA_MENU_ALIENS_CAPS", "IW7-MOD: ZOMBIES");
|
||||
|
||||
scheduler::once([]()
|
||||
{
|
||||
branding = game::Dvar_RegisterBool("branding", true, game::DvarFlags::DVAR_FLAG_SAVED, "Show branding in the top left corner");
|
||||
}, scheduler::pipeline::renderer);
|
||||
|
||||
scheduler::loop([]()
|
||||
{
|
||||
|
@ -1,15 +1,14 @@
|
||||
#include <std_include.hpp>
|
||||
#include "loader/component_loader.hpp"
|
||||
|
||||
#include "command.hpp"
|
||||
#include "console.hpp"
|
||||
#include "game_console.hpp"
|
||||
//#include "fastfiles.hpp"
|
||||
#include "scheduler.hpp"
|
||||
|
||||
#include "game/game.hpp"
|
||||
#include "game/dvars.hpp"
|
||||
|
||||
#include "console.hpp"
|
||||
#include "game_console.hpp"
|
||||
#include "scheduler.hpp"
|
||||
|
||||
#include <utils/hook.hpp>
|
||||
#include <utils/string.hpp>
|
||||
#include <utils/memory.hpp>
|
||||
|
@ -19,14 +19,16 @@ namespace console
|
||||
{
|
||||
bool is_enabled()
|
||||
{
|
||||
return game::environment::is_dedi() || !utils::flags::has_flag("noconsole");
|
||||
static const auto noconsole = utils::flags::has_flag("noconsole");
|
||||
return game::environment::is_dedi() || !noconsole;
|
||||
}
|
||||
|
||||
namespace native
|
||||
{
|
||||
bool is_enabled()
|
||||
{
|
||||
return utils::flags::has_flag("nativeconsole");
|
||||
static const auto nativeconsole = utils::flags::has_flag("nativeconsole");
|
||||
return nativeconsole;
|
||||
}
|
||||
|
||||
static bool ingame = false;
|
||||
@ -55,7 +57,7 @@ namespace console
|
||||
|
||||
namespace sys
|
||||
{
|
||||
//#define COMMAND_HISTORY 64
|
||||
//#define COMMAND_HISTORY 64
|
||||
|
||||
struct WinConData
|
||||
{
|
||||
|
@ -1,6 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
}
|
@ -91,7 +91,7 @@ namespace game_module
|
||||
|
||||
utils::nt::library get_game_module()
|
||||
{
|
||||
static utils::nt::library game{HMODULE(game::base_address)};
|
||||
static utils::nt::library game{ HMODULE(game::base_address) };
|
||||
return game;
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
#include <std_include.hpp>
|
||||
#include "loader/component_loader.hpp"
|
||||
#include "localized_strings.hpp"
|
||||
|
||||
#include "game/game.hpp"
|
||||
|
||||
#include <utils/hook.hpp>
|
||||
#include <utils/string.hpp>
|
||||
#include <utils/concurrency.hpp>
|
||||
#include "game/game.hpp"
|
||||
|
||||
namespace localized_strings
|
||||
{
|
||||
|
@ -16,6 +16,20 @@ namespace logger
|
||||
console::info(msg);
|
||||
}
|
||||
|
||||
void print(const char* msg, ...)
|
||||
{
|
||||
char buffer[2048]{ 0 };
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, msg);
|
||||
|
||||
vsnprintf_s(buffer, sizeof(buffer), _TRUNCATE, msg, ap);
|
||||
|
||||
va_end(ap);
|
||||
|
||||
console::info(buffer);
|
||||
}
|
||||
|
||||
void sys_print_stubs()
|
||||
{
|
||||
utils::hook::call(0xC6E57A_b, sys_print_stub); // SV_SpawnServer: completed\n
|
||||
@ -24,7 +38,7 @@ namespace logger
|
||||
utils::hook::call(0xB712BA_b, sys_print_stub); // G_SaveError
|
||||
}
|
||||
|
||||
void R_WarnOncePerFrame_print_stub(char* buffer, size_t buffer_length, char* msg, va_list va)
|
||||
void r_warn_once_per_frame_print_stub(char* buffer, size_t buffer_length, char* msg, va_list va)
|
||||
{
|
||||
vsnprintf(buffer, buffer_length, msg, va);
|
||||
console::warn(buffer);
|
||||
@ -38,9 +52,12 @@ namespace logger
|
||||
{
|
||||
sys_print_stubs();
|
||||
|
||||
// com_printf
|
||||
utils::hook::jump(0x343080_b, print);
|
||||
|
||||
if (!game::environment::is_dedi())
|
||||
{
|
||||
utils::hook::call(0xE4B121_b, R_WarnOncePerFrame_print_stub);
|
||||
utils::hook::call(0xE4B121_b, r_warn_once_per_frame_print_stub);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <std_include.hpp>
|
||||
#include "loader/component_loader.hpp"
|
||||
|
||||
#include "scheduler.hpp"
|
||||
|
||||
#include "game/game.hpp"
|
||||
|
||||
#include <utils/hook.hpp>
|
||||
@ -186,8 +186,8 @@ namespace scheduler
|
||||
void post_unpack() override
|
||||
{
|
||||
r_end_frame_hook.create(0xE267B0_b, scheduler::r_end_frame_stub);
|
||||
g_run_frame_hook.create(0xB8E2D0_b, scheduler::server_frame_stub);
|
||||
main_frame_hook.create(0xB15E20_b, scheduler::main_frame_stub);
|
||||
g_run_frame_hook.create(0xB15E20_b, scheduler::server_frame_stub);
|
||||
main_frame_hook.create(0xB8E2D0_b, scheduler::main_frame_stub);
|
||||
}
|
||||
|
||||
void pre_destroy() override
|
||||
|
@ -16,9 +16,6 @@ namespace scheduler
|
||||
// The game's main thread
|
||||
main,
|
||||
|
||||
// LUI context
|
||||
lui,
|
||||
|
||||
count,
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
#include <std_include.hpp>
|
||||
#include "loader/component_loader.hpp"
|
||||
#include "steam_proxy.hpp"
|
||||
|
||||
#include "game/game.hpp"
|
||||
|
||||
#include "scheduler.hpp"
|
||||
|
||||
#include <utils/nt.hpp>
|
||||
@ -8,8 +11,6 @@
|
||||
#include <utils/string.hpp>
|
||||
#include <utils/binary_resource.hpp>
|
||||
|
||||
#include "game/game.hpp"
|
||||
|
||||
#include "steam/interface.hpp"
|
||||
#include "steam/steam.hpp"
|
||||
|
||||
@ -132,7 +133,7 @@ namespace steam_proxy
|
||||
|
||||
this->client_utils_.invoke<void>("SetAppIDForCurrentPipe", app_id, false);
|
||||
|
||||
char our_directory[MAX_PATH] = {0};
|
||||
char our_directory[MAX_PATH] = { 0 };
|
||||
GetCurrentDirectoryA(sizeof(our_directory), our_directory);
|
||||
|
||||
const auto path = runner_file.get_extracted_file();
|
||||
@ -171,7 +172,7 @@ namespace steam_proxy
|
||||
this->steam_pipe_ = nullptr;
|
||||
this->global_user_ = nullptr;
|
||||
|
||||
this->steam_client_module_ = utils::nt::library{nullptr};
|
||||
this->steam_client_module_ = utils::nt::library{ nullptr };
|
||||
|
||||
return scheduler::cond_end;
|
||||
});
|
||||
|
@ -56,7 +56,7 @@ FARPROC load_binary(uint64_t* base_address)
|
||||
return loader.load_library(binary, base_address);
|
||||
#else
|
||||
*base_address = 0x140000000;
|
||||
return loader.load(self, data); // this gives memory errors
|
||||
return loader.load(self, data); // not working
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ void remove_crash_file()
|
||||
|
||||
void enable_dpi_awareness()
|
||||
{
|
||||
const utils::nt::library user32{"user32.dll"};
|
||||
const utils::nt::library user32{ "user32.dll" };
|
||||
const auto set_dpi = user32
|
||||
? user32.get_proc<BOOL(WINAPI*)(DPI_AWARENESS_CONTEXT)>("SetProcessDpiAwarenessContext")
|
||||
: nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user