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
|
||||
|
@ -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;
|
||||
|
@ -1,6 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
namespace demonware
|
||||
{
|
||||
|
||||
}
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user