Formatting

This commit is contained in:
Federico Cecchetto 2022-02-23 21:23:00 +01:00
parent 3835dd5544
commit b49aea8ecc
29 changed files with 1036 additions and 1059 deletions

View File

@ -37,7 +37,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 +53,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;
@ -97,7 +97,7 @@ namespace auth
return false;
}
const utils::info_string info_string{ std::string{params[2]} };
const utils::info_string info_string{std::string{params[2]}};
const auto challenge = info_string.get("challenge");
connect_string.clear();
@ -137,7 +137,7 @@ namespace auth
return;
}
const utils::info_string info_string{ std::string{params[2]} };
const utils::info_string info_string{std::string{params[2]}};
const auto steam_id = info_string.get("xuid");
const auto challenge = info_string.get("challenge");

View File

@ -1,16 +1,18 @@
#include <std_include.hpp>
#include "loader/component_loader.hpp"
#include "localized_strings.hpp"
#include "scheduler.hpp"
#include "command.hpp"
#include "version.hpp"
#include "game/game.hpp"
#include "game/dvars.hpp"
#include <utils/hook.hpp>
#include <utils/string.hpp>
#include <game/dvars.hpp>
#include "version.hpp"
// fonts/default.otf, fonts/defaultBold.otf, fonts/fira_mono_regular.ttf, fonts/fira_mono_bold.ttf
namespace branding
{
@ -54,7 +56,7 @@ namespace branding
const auto x = 4;
const auto y = 4;
const auto scale = 1.0f;
float color[4] = { 0.666f, 0.666f, 0.666f, 0.666f };
float color[4] = {0.666f, 0.666f, 0.666f, 0.666f};
const auto* text = "H1-Mod: " VERSION;
@ -72,6 +74,3 @@ namespace branding
}
REGISTER_COMPONENT(branding::component)
// fonts/default.otf, fonts/defaultBold.otf, fonts/fira_mono_regular.ttf, fonts/fira_mono_bold.ttf

View File

@ -118,7 +118,7 @@ namespace colors
}
else if (index == ':')
{
*color = hsv_to_rgb({ static_cast<uint8_t>((game::Sys_Milliseconds() / 100) % 256), 255, 255 });
*color = hsv_to_rgb({static_cast<uint8_t>((game::Sys_Milliseconds() / 100) % 256), 255, 255});
}
else if (index == ';')
{

View File

@ -261,6 +261,7 @@ namespace command
add_commands_mp();
}
add_commands_generic();
}
@ -330,8 +331,7 @@ namespace command
console::info("================================ END COMMAND DUMP =================================\n");
});
/*
add("listassetpool", [](const params& params)
/*add("listassetpool", [](const params& params)
{
if (params.size() < 2)
{
@ -357,7 +357,7 @@ namespace command
const std::string filter = params.get(2);
enum_assets(type, [type, filter](const game::XAssetHeader header)
{
const auto asset = game::XAsset{ type, header };
const auto asset = game::XAsset{type, header};
const auto* const asset_name = game::DB_GetXAssetName(&asset);
//const auto entry = game::DB_FindXAssetEntry(type, asset_name);
//TODO: display which zone the asset is from
@ -658,7 +658,7 @@ namespace command
{
game::G_TakePlayerWeapon(ps, wp);
}
}); */
});*/
}
};
}

View File

@ -41,7 +41,7 @@ namespace console
const auto count = _vsnprintf_s(buffer, sizeof(buffer), sizeof(buffer), message, *ap);
if (count < 0) return {};
return { buffer, static_cast<size_t>(count) };
return {buffer, static_cast<size_t>(count)};
}
void dispatch_message(const int type, const std::string& message)

View File

@ -213,7 +213,7 @@ namespace demonware
if (server)
{
server->handle_input(buf, len, { s, to, tolen });
server->handle_input(buf, len, {s, to, tolen});
return len;
}

View File

@ -12,12 +12,12 @@ namespace fps
{
namespace
{
float fps_color_good[4] = { 0.6f, 1.0f, 0.0f, 1.0f };
float fps_color_ok[4] = { 1.0f, 0.7f, 0.3f, 1.0f };
float fps_color_bad[4] = { 1.0f, 0.3f, 0.3f, 1.0f };
float fps_color_good[4] = {0.6f, 1.0f, 0.0f, 1.0f};
float fps_color_ok[4] = {1.0f, 0.7f, 0.3f, 1.0f};
float fps_color_bad[4] = {1.0f, 0.3f, 0.3f, 1.0f};
//float origin_color[4] = { 1.0f, 0.67f, 0.13f, 1.0f };
float ping_color[4] = { 1.0f, 1.0f, 1.0f, 0.65f };
//float origin_color[4] = {1.0f, 0.67f, 0.13f, 1.0f};
float ping_color[4] = {1.0f, 1.0f, 1.0f, 0.65f};
struct cg_perf_data
{
@ -36,7 +36,7 @@ namespace fps
std::int32_t max{};
};
cg_perf_data cg_perf = cg_perf_data();
cg_perf_data cg_perf{};
void perf_calc_fps(cg_perf_data* data, const std::int32_t value)
{

View File

@ -58,8 +58,8 @@ namespace game_console
std::string fixed_input{};
std::vector<std::string> matches{};
float color_white[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
float color_title[4] = { 0.9f, 0.9f, 0.5f, 1.0f };
float color_white[4] = {1.0f, 1.0f, 1.0f, 1.0f};
float color_title[4] = {0.9f, 0.9f, 0.5f, 1.0f};
void clear()
{
@ -243,7 +243,6 @@ namespace game_console
con.globals.left_x = con.globals.x;
con.globals.auto_complete_choice[0] = 0;
game::R_AddCmdDrawTextWithCursor(con.buffer, 0x7FFFFFFF, console_font, 18, con.globals.x,
con.globals.y + con.globals.font_height, 1.0f, 1.0f, 0, color_white, 0,
con.cursor, '|');
@ -251,7 +250,6 @@ namespace game_console
game::R_AddCmdDrawText(con.buffer, 0x7FFF, console_font, con.globals.x,
con.globals.y + con.globals.font_height, 1.0f, 1.0f, 0.0f, color_white, 0);
// check if using a prefixed '/' or not
const auto input = con.buffer[1] && (con.buffer[0] == '/' || con.buffer[0] == '\\')
? std::string(con.buffer).substr(1)
@ -336,8 +334,6 @@ namespace game_console
}
}
void draw_output_scrollbar(const float x, float y, const float width, const float height, output_queue& output)
{
const auto _x = (x + width) - 10.0f;
@ -423,7 +419,7 @@ namespace game_console
void print_internal(const char* fmt, ...)
{
char va_buffer[0x200] = { 0 };
char va_buffer[0x200] = {0};
va_list ap;
va_start(ap, fmt);

View File

@ -90,7 +90,7 @@ namespace game_module
utils::nt::library get_game_module()
{
static utils::nt::library game{ HMODULE(0x140000000) };
static utils::nt::library game{HMODULE(0x140000000)};
return game;
}

View File

@ -15,7 +15,10 @@ namespace lui
public:
void post_unpack() override
{
if (!game::environment::is_mp()) return;
if (!game::environment::is_mp())
{
return;
}
// Don't show create cod account popup
//utils::hook::set<uint32_t>(0x14017C957, 0); // H1(1.4)

View File

@ -277,7 +277,7 @@ namespace network
utils::hook::set<uint8_t>(0x14025280E, 0xEB); // H1MP64(1.4)
on("print", [](const game::netadr_s&, const std::string_view& data)
{
const std::string message{ data };
const std::string message{data};
console::info(message.data());
});
}

View File

@ -180,11 +180,9 @@ namespace scheduler
void post_unpack() override
{
r_end_frame_hook.create(SELECT_VALUE(0x1404F7310, 0x1405FE470), scheduler::r_end_frame_stub); // H1(1.4)
g_run_frame_hook.create(SELECT_VALUE(0x1402772D0, 0x1402772D0), scheduler::server_frame_stub); // H1(1.4)
main_frame_hook.create(SELECT_VALUE(0x1401CE8D0, 0x1401CE8D0), scheduler::main_frame_stub); // H1(1.4)
}
void pre_destroy() override

View File

@ -132,7 +132,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 +171,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;
});

View File

@ -151,8 +151,6 @@ namespace dvars
}
}
std::vector<std::string> dvar_list =
{
"accessToSubscriberContent",
@ -581,7 +579,8 @@ namespace dvars
return game::Dvar_RegisterVec4(hash, "", x, y, z, w, min, max, flags);
}
namespace override {
namespace override
{
static std::unordered_map<std::string, std::string> set_string_overrides;
game::dvar_t* register_int(const std::string& name, int value, int min, int max,

View File

@ -34,7 +34,8 @@ namespace dvars
game::dvar_t* register_float(const std::string& name, float value, float min, float max, game::DvarFlags flags, bool add_to_list = true);
game::dvar_t* register_vec4(const std::string& name, float x, float y, float z, float w, float min, float max, game::DvarFlags flags, bool add_to_list = true);
namespace override {
namespace override
{
game::dvar_t* register_int(const std::string& name, int value, int min, int max, const unsigned int flags, bool add_to_list = true);
void Dvar_SetString(const std::string& name, const std::string& string);
game::dvar_t* register_float(const std::string& name, float value, float min, float max, game::DvarFlags flags, bool add_to_list = true);

View File

@ -23,7 +23,6 @@ namespace game
return sv_cmd_args->argv[sv_cmd_args->nesting][index];
}
namespace environment
{
launcher::mode mode = launcher::mode::none;

View File

@ -8,238 +8,221 @@ namespace game
* Functions
**************************************************************/
WEAK symbol<void(int localClientNum, const char* text)> Cbuf_AddText{ 0x140342EB0, 0x1404033B0 }; // H1(1.4)
WEAK symbol<void(int localClientNum, int controllerIndex, const char* text)> Cmd_ExecuteSingleCommand{ 0x140343980, 0x140343980 }; // H1SP64[CODEX]
WEAK symbol<void(unsigned int weapon, bool isAlternate,
char* output, unsigned int maxStringLen)> BG_GetWeaponNameComplete{0, 0x140165580};
WEAK symbol<void(const char* cmdName, void(), cmd_function_s* allocedCmd)> Cmd_AddCommandInternal{ 0x1403433E0, 0x140403950 }; // H1(1.4)
WEAK symbol<void(int localClientNum, const char* text)> Cbuf_AddText{0x140342EB0, 0x1404033B0}; // H1(1.4)
WEAK symbol<void(const char* message)> Conbuf_AppendText{0x1403E3300, 0x140513FF0}; // H1(1.4)
WEAK symbol<void(int localClientNum, int controllerIndex, const char* text)> Cmd_ExecuteSingleCommand{0x140343980, 0x140343980}; // H1SP64[CODEX]
WEAK symbol<void(const char* cmdName, void(), cmd_function_s* allocedCmd)> Cmd_AddCommandInternal{0x1403433E0, 0x140403950}; // H1(1.4)
WEAK symbol<void(const char* text_in)> Cmd_TokenizeString{0x140344110, 0x1404046F0}; // H1(1.4)
WEAK symbol<void()> Cmd_EndTokenizeString{0x140343630, 0x140403C20}; // H1(1.4)
WEAK symbol<void()> Com_Frame_Try_Block_Function{ 0, 0x1400D8310 }; //H1MP MWR TEST
WEAK symbol<void()> Com_Frame_Try_Block_Function{0, 0x1400D8310}; //H1MP MWR TEST
WEAK symbol<CodPlayMode()> Com_GetCurrentCoDPlayMode{0, 0x1405039A0}; // H1(1.4)
WEAK symbol<void(float, float, int)> Com_SetSlowMotion{0, 0x1400DB790}; // H1(1.4)
WEAK symbol<void(errorParm code, const char* message, ...)> Com_Error{0x1403509C0, 0x1400D78A0}; // H1(1.4)
WEAK symbol<void()> Com_Quit_f{0x140352BE0, 0x1400DA830}; // H1(1.4)
WEAK symbol<CodPlayMode()> Com_GetCurrentCoDPlayMode{ 0, 0x1405039A0 }; // H1(1.4)
WEAK symbol<const char* (int, int, int)> Key_KeynumToString{0x140187CC0, 0x14024FE10}; // H1(1.4)
WEAK symbol<void(float, float, int)> Com_SetSlowMotion{ 0, 0x1400DB790 }; // H1(1.4)
WEAK symbol<void(int localClientNum, const char* message)> CG_GameMessage{0x1401389A0, 0x140220CC0}; // H1(1.4)
WEAK symbol<void(int localClientNum, const char* message)> CG_GameMessageBold{0x140138750, 0x140220620}; // H1(1.4)
WEAK symbol<void(unsigned int weapon, bool isAlternate, char* output, unsigned int maxStringLen)> BG_GetWeaponNameComplete{ 0, 0x140165580 };
WEAK symbol<void(const char* dvar, const char* buffer)> Dvar_SetCommand{0x1403C72B0, 0x1404FD0A0}; // H1(1.4)
WEAK symbol<dvar_t* (const char* name)> Dvar_FindVar{0x1403C5D50, 0x1404FBB00}; // H1(1.4)
WEAK symbol<void(char* buffer, int index)> Dvar_GetCombinedString{0x140354DF0, 0x14041D830}; // H1(1.4)
//WEAK symbol<const char* (const dvar_t* dvar, dvar_value value, __int64 a3)> Dvar_ValueToString{0x1403C8560,0x1404FE660}; // H1(1.4); different typedef from previous titles
WEAK symbol<const char* (dvar_t* dvar, dvar_value value)> Dvar_ValueToString{0x1403C8560, 0x1404FE660}; // H1(1.4)
//WEAK symbol<void(int hash, const char* name, const char* buffer)> Dvar_SetCommand{0, 0x1404FD0A0}; // H1(1.4)
WEAK symbol<void()> Com_Quit_f{ 0x140352BE0, 0x1400DA830 }; // H1(1.4)
WEAK symbol<dvar_t* (int hash, const char* name, bool value, unsigned int flags)> Dvar_RegisterBool{0x1403C47E0,0x1404FA540}; // H1
WEAK symbol<dvar_t* (int hash, const char* name, int value, int min, int max, unsigned int flags)> Dvar_RegisterInt{0x1403C4CC0, 0x1404FAA20}; // H1
WEAK symbol<dvar_t* (int hash, const char* dvarName, float value, float min, float max, unsigned int flags)> Dvar_RegisterFloat{0x1403C4BB0,0x1404FA910}; // H1(1.4)
WEAK symbol<dvar_t* (int hash, const char* dvarName, const char* value, unsigned int flags)> Dvar_RegisterString{0x1403C4DA0,0x1404FAB00}; // H1(1.4)
WEAK symbol<dvar_t* (int dvarName, const char* a2, float x, float y, float z, float w, float min, float max, unsigned int flags)> Dvar_RegisterVec4{0x1403C5220, 0x1404FAF40}; // H1(1.4)
WEAK symbol<dvar_t* (const char* dvarName, const char** valueList, int defaultIndex, unsigned int flags)> Dvar_RegisterEnum{0x1403C4AC0, 0x1404C0EC0}; // H1(1.4)
WEAK symbol<const char* (int, int, int)> Key_KeynumToString{ 0x140187CC0, 0x14024FE10 }; // H1(1.4)
WEAK symbol<float(int index)> Scr_GetFloat{0x140374D20, 0x140442D10}; // H1(1.4)
WEAK symbol<int()> Scr_GetNumParam{0x140374F30, 0x140442E70}; // H1(1.4)
WEAK symbol<void(const char* text_in)> Cmd_TokenizeString{ 0x140344110, 0x1404046F0 }; // H1(1.4)
WEAK symbol<long long(const char* qpath, char** buffer)> FS_ReadFile{0x1403B9020, 0x1404EE720}; // H1(1.4)
WEAK symbol<void(void* buffer)> FS_FreeFile{0x1403B9010, 0x1404EE710}; // H1(1.4)
WEAK symbol<void(const char* gameName)> FS_Startup{0x1403B85D0, 0x1404EDD30}; // H1(1.4)
WEAK symbol<void(const char* path, const char* dir)> FS_AddLocalizedGameDirectory{0x1403B6030, 0x1404EBE20}; // H1(1.4)
WEAK symbol<void(const char* dvar, const char* buffer)> Dvar_SetCommand{ 0x1403C72B0, 0x1404FD0A0 }; // H1(1.4)
WEAK symbol<int(const char* fname)> generateHashValue{0x1400FE8A0, 0x1401B1010}; // H1(1.4)
WEAK symbol<void(errorParm code, const char* message, ...)> Com_Error{ 0x1403509C0, 0x1400D78A0 }; // H1(1.4)
WEAK symbol<bool()> CL_IsCgameInitialized{0x14017EE30, 0x140245650}; // H1(1.4)
WEAK symbol<unsigned int(int)> Live_SyncOnlineDataFlags{0, 0x14059A700}; // H1(1.4)
WEAK symbol<void(int localClientNum, const char* message)> CG_GameMessage{ 0x1401389A0, 0x140220CC0 }; // H1(1.4)
WEAK symbol<void(int localClientNum, const char* message)> CG_GameMessageBold{ 0x140138750, 0x140220620 }; // H1(1.4)
WEAK symbol<void(const char* message)> Conbuf_AppendText{ 0x1403E3300, 0x140513FF0 }; // H1(1.4)
WEAK symbol<int()> Sys_Milliseconds{0x1403E2B10, 0x140513710}; // H1(1.4)
WEAK symbol<bool()> Sys_IsDatabaseReady2{0, 0x14042B090}; // H1(1.4)
WEAK symbol<void()> Cmd_EndTokenizeString{ 0x140343630, 0x140403C20 }; // H1(1.4)
WEAK symbol<void(netadr_s* from)> SV_DirectConnect{0, 0x140480860}; // H1(1.4)
WEAK symbol<void(const char* text_in)> SV_Cmd_TokenizeString{0x1402EF050, 0x140404D20}; // H1(1.4)
WEAK symbol<void()> SV_Cmd_EndTokenizedString{0x140344700, 0x140404CE0}; // H1(1.4)
WEAK symbol<dvar_t* (const char* name)> Dvar_FindVar{ 0x1403C5D50, 0x1404FBB00 }; // H1(1.4)
WEAK symbol<void(char* buffer, int index)> Dvar_GetCombinedString{ 0x140354DF0, 0x14041D830 }; // H1(1.4)
//WEAK symbol<const char* (const dvar_t* dvar, dvar_value value, __int64 a3)> Dvar_ValueToString{ 0x1403C8560,0x1404FE660 }; // H1(1.4); different typedef from previous titles
WEAK symbol<const char* (dvar_t* dvar, dvar_value value)> Dvar_ValueToString{ 0x1403C8560, 0x1404FE660 }; // H1(1.4)
//WEAK symbol<void(int hash, const char* name, const char* buffer)> Dvar_SetCommand{ 0, 0x1404FD0A0 }; // H1(1.4)
WEAK symbol<bool(int, void const*, const netadr_s*)> Sys_SendPacket{0x1403E2820, 0x1405133B0}; // H1(1.4)
WEAK symbol<dvar_t* (int hash, const char* name, bool value, unsigned int flags)> Dvar_RegisterBool{ 0x1403C47E0,0x1404FA540 }; // H1
WEAK symbol<dvar_t* (int hash, const char* name, int value, int min, int max, unsigned int flags)> Dvar_RegisterInt{ 0x1403C4CC0, 0x1404FAA20 }; // H1
WEAK symbol<dvar_t* (int hash, const char* dvarName, float value, float min, float max, unsigned int flags)> Dvar_RegisterFloat{ 0x1403C4BB0,0x1404FA910 }; // H1(1.4)
WEAK symbol<dvar_t* (int hash, const char* dvarName, const char* value, unsigned int flags)> Dvar_RegisterString{ 0x1403C4DA0,0x1404FAB00 }; // H1(1.4)
WEAK symbol<dvar_t* (int dvarName, const char* a2, float x, float y, float z, float w, float min, float max, unsigned int flags)> Dvar_RegisterVec4{ 0x1403C5220, 0x1404FAF40 }; // H1(1.4)
WEAK symbol<dvar_t* (const char* dvarName, const char** valueList, int defaultIndex, unsigned int flags)> Dvar_RegisterEnum{ 0x1403C4AC0, 0x1404C0EC0 }; // H1(1.4)
WEAK symbol<void(netadr_s*, sockaddr*)> NetadrToSockadr{0x1403C11C0, 0x1404F62F0}; // H1(1.4)
WEAK symbol<void(netsrc_t, netadr_s*, const char*)> NET_OutOfBandPrint{0x140357560, 0x1404255D0}; // H1(1.4)
WEAK symbol<void(netsrc_t sock, int length, const void* data, const netadr_s* to)> NET_SendLoopPacket{0, 0x140425790}; // H1(1.4)
WEAK symbol<float(int index)> Scr_GetFloat{ 0x140374D20, 0x140442D10 }; // H1(1.4)
WEAK symbol<char* (char* string)> I_CleanStr{0x1403CD230, 0}; // H1(1.4)
WEAK symbol<ScreenPlacement* ()> ScrPlace_GetViewPlacement{0x1401981F0, 0x140288550}; // H1(1.4)
WEAK symbol<int()> Scr_GetNumParam{ 0x140374F30, 0x140442E70 }; // H1(1.4)
WEAK symbol<long long(const char* qpath, char** buffer)> FS_ReadFile{ 0x1403B9020, 0x1404EE720 }; // H1(1.4)
WEAK symbol<void(void* buffer)> FS_FreeFile{ 0x1403B9010, 0x1404EE710 }; // H1(1.4)
WEAK symbol<void(const char* gameName)> FS_Startup{ 0x1403B85D0, 0x1404EDD30 }; // H1(1.4)
WEAK symbol<void(const char* path, const char* dir)> FS_AddLocalizedGameDirectory{ 0x1403B6030, 0x1404EBE20 }; // H1(1.4)
WEAK symbol<int(const char* fname)> generateHashValue{ 0x1400FE8A0, 0x1401B1010 }; // H1(1.4)
WEAK symbol<bool()> CL_IsCgameInitialized{ 0x14017EE30, 0x140245650 }; // H1(1.4)
WEAK symbol<unsigned int(int)> Live_SyncOnlineDataFlags{ 0, 0x14059A700 }; // H1(1.4)
WEAK symbol<int()> Sys_Milliseconds{ 0x1403E2B10, 0x140513710 }; // H1(1.4)
WEAK symbol<bool()> Sys_IsDatabaseReady2{ 0, 0x14042B090 }; // H1(1.4)
WEAK symbol<void(netadr_s* from)> SV_DirectConnect{ 0, 0x140480860 }; // H1(1.4)
WEAK symbol<void(const char* text_in)> SV_Cmd_TokenizeString{ 0x1402EF050, 0x140404D20 }; // H1(1.4)
WEAK symbol<void()> SV_Cmd_EndTokenizedString{ 0x140344700, 0x140404CE0 }; // H1(1.4)
WEAK symbol<bool(int, void const*, const netadr_s*)> Sys_SendPacket{ 0x1403E2820, 0x1405133B0 }; // H1(1.4)
WEAK symbol<void(netadr_s*, sockaddr*)> NetadrToSockadr{ 0x1403C11C0, 0x1404F62F0 }; // H1(1.4)
WEAK symbol<void(netsrc_t, netadr_s*, const char*)> NET_OutOfBandPrint{ 0x140357560, 0x1404255D0 }; // H1(1.4)
WEAK symbol<SOCKET> query_socket{ 0, 0x14DDFBF98 }; // H1(1.4)
WEAK symbol<void(netsrc_t sock, int length, const void* data, const netadr_s* to)> NET_SendLoopPacket{ 0, 0x140425790 }; // H1(1.4)
WEAK symbol<char* (char* string)> I_CleanStr{ 0x1403CD230, 0 }; // H1(1.4)
WEAK symbol<ScreenPlacement* ()> ScrPlace_GetViewPlacement{ 0x1401981F0, 0x140288550 }; // H1(1.4)
WEAK symbol<Material* (const char* material)> Material_RegisterHandle{ 0x1404E48B0, 0x1405EAB30 }; // H1(1.4)
WEAK symbol<Material* (const char* material)> Material_RegisterHandle{0x1404E48B0, 0x1405EAB30}; // H1(1.4)
WEAK symbol<void(float x, float y, float width, float height, float s0, float t0, float s1, float t1,
float* color, Material* material)> R_AddCmdDrawStretchPic{ 0x14017E5C0, 0x1402443A0 }; // H1(1.4)
float* color, Material* material)> R_AddCmdDrawStretchPic{0x14017E5C0, 0x1402443A0}; // H1(1.4)
WEAK symbol<Font_s* (const char* font, int size)> R_RegisterFont{ 0x1404D4100, 0x1405D91E0 }; // H1(1.4)
WEAK symbol<int(void* font)> R_GetFontHeight{ 0x1405EA360, 0x1405D92C0 }; // H1(1.4)
WEAK symbol<void* (int a1)> JUST_DO_OUR_DIRTY_WORK{ 0x1404D37B0, 0x1405D8890 }; // H1(1.4)
WEAK symbol<Font_s* (const char* font, int size)> R_RegisterFont{0x1404D4100, 0x1405D91E0}; // H1(1.4)
WEAK symbol<int(void* font)> R_GetFontHeight{0x1405EA360, 0x1405D92C0}; // H1(1.4)
WEAK symbol<void* (int a1)> JUST_DO_OUR_DIRTY_WORK{0x1404D37B0, 0x1405D8890}; // H1(1.4)
WEAK symbol<int(int clientNum)> G_GetClientScore{ 0, 0x140342F90 }; // H1(1.4)
WEAK symbol<const char* (int clientNum)> SV_GetGuid{ 0, 0x140484B90 }; // H1(1.4)
WEAK symbol<int(int clientNum)> SV_GetClientPing{ 0, 0x140484B70 }; // H1(1.4)
WEAK symbol<playerState_s* (int num)> SV_GetPlayerstateForClientNum{ 0x1404426D0, 0 }; // H1SP(1.4)
WEAK symbol<int(int clientNum)> G_GetClientScore{0, 0x140342F90}; // H1(1.4)
WEAK symbol<const char* (int clientNum)> SV_GetGuid{0, 0x140484B90}; // H1(1.4)
WEAK symbol<int(int clientNum)> SV_GetClientPing{0, 0x140484B70}; // H1(1.4)
WEAK symbol<playerState_s* (int num)> SV_GetPlayerstateForClientNum{0x1404426D0, 0}; // H1SP(1.4)
WEAK symbol<void* (const char* text, int maxChars, void* font, int fontHeight, float x, float y, float xScale, float yScale,
float rotation, float* color, int style, int cursor_pos, char cursor_char, void* style_unk)> H1_AddBaseDrawTextCmd{ 0x1404F3DC0,0x1405FB1F0 }; // H1(1.4)
float rotation, float* color, int style, int cursor_pos, char cursor_char, void* style_unk)> H1_AddBaseDrawTextCmd{0x1404F3DC0,0x1405FB1F0}; // H1(1.4)
#define R_AddCmdDrawText(TXT,MC,F,X,Y,XS,YS,R,C,S) H1_AddBaseDrawTextCmd(TXT,MC,F,game::R_GetFontHeight(F),X,Y,XS,YS,R,C,S,-1,0,game::JUST_DO_OUR_DIRTY_WORK(S))
#define R_AddCmdDrawTextWithCursor(TXT,MC,F,UNK,X,Y,XS,YS,R,C,S,CP,CC) H1_AddBaseDrawTextCmd(TXT,MC,F,game::R_GetFontHeight(F),X,Y,XS,YS,R,C,S,CP,CC,game::JUST_DO_OUR_DIRTY_WORK(S))
WEAK symbol<int(const char* text, int maxChars, Font_s* font)> R_TextWidth{ 0x1404D43B0, 0x1405D94A0 }; // H1(1.4)
WEAK symbol<int(const char* text, int maxChars, Font_s* font)> R_TextWidth{0x1404D43B0, 0x1405D94A0}; // H1(1.4)
WEAK symbol<cmd_function_s*> cmd_functions{ 0x14AD99AB8,0x14946BAC8 }; // H1(1.4)
WEAK symbol<int> keyCatchers{ 0x14243DAF0,0x142D0BA9C }; // H1(1.4)
WEAK symbol<PlayerKeyState> playerKeys{ 0x1422A873C,0x142C19AFC }; // H1(1.4)
WEAK symbol<CmdArgs> cmd_args{ 0x14AD99960, 0x14946B970 }; // H1(1.4)
WEAK symbol<cmd_function_s*> cmd_functions{0x14AD99AB8,0x14946BAC8}; // H1(1.4)
WEAK symbol<int> keyCatchers{0x14243DAF0,0x142D0BA9C}; // H1(1.4)
WEAK symbol<PlayerKeyState> playerKeys{0x1422A873C,0x142C19AFC}; // H1(1.4)
WEAK symbol<CmdArgs> cmd_args{0x14AD99960, 0x14946B970}; // H1(1.4)
WEAK symbol<SOCKET> query_socket{0, 0x14DDFBF98}; // H1(1.4)
//###########################################################################################################################################################################
//###########################################################################################################################################################################
//###########################################################################################################################################################################
WEAK symbol<void()> G_Glass_Update{ 0, 0x14033A640 }; // H1(1.4)
WEAK symbol<void(int type, VariableUnion u)> AddRefToValue{ 0, 0x1405C0EB0 };
WEAK symbol<void(unsigned int id)> AddRefToObject{ 0,0x1405C0EA0 };
WEAK symbol<unsigned int(unsigned int id)> AllocThread{ 0,0x1405C1200 };
WEAK symbol<void(int type, VariableUnion u)> RemoveRefToValue{ 0, 0x1405C29B0 };
WEAK symbol<void(unsigned int id)> RemoveRefToObject{ 0,0x1405C28A0 };
WEAK symbol<void()> G_Glass_Update{0, 0x14033A640}; // H1(1.4)
WEAK symbol<void(int type, VariableUnion u)> AddRefToValue{0, 0x1405C0EB0};
WEAK symbol<void(unsigned int id)> AddRefToObject{0,0x1405C0EA0};
WEAK symbol<unsigned int(unsigned int id)> AllocThread{0,0x1405C1200};
WEAK symbol<void(int type, VariableUnion u)> RemoveRefToValue{0, 0x1405C29B0};
WEAK symbol<void(unsigned int id)> RemoveRefToObject{0,0x1405C28A0};
WEAK symbol<void(XAssetType type, void(__cdecl* func)(game::XAssetHeader, void*), const void* inData, bool includeOverride)>
DB_EnumXAssets_Internal{ 0, 0x1404129F0 };
WEAK symbol<const char* (const XAsset* asset)> DB_GetXAssetName{ 0,0x1403E4090 };
WEAK symbol<void(XZoneInfo* zoneInfo, unsigned int zoneCount, DBSyncMode syncMode)> DB_LoadXAssets{ 0,0x140414FF0 };
WEAK symbol<XAssetHeader(XAssetType type, const char* name, int allowCreateDefault)> DB_FindXAssetHeader{ 0, 0x140412F60 };
WEAK symbol<int(const RawFile* rawfile)> DB_GetRawFileLen{ 0,0x140413D80 };
WEAK symbol<int(const RawFile* rawfile, char* buf, int size)> DB_GetRawBuffer{ 0,0x140413C40 };
WEAK symbol<int(XAssetType type)> DB_GetXAssetTypeSize{ 0x14019A3B0, 0x14028BE70 }; // H1(1.4)
DB_EnumXAssets_Internal{0, 0x1404129F0};
WEAK symbol<const char* (const XAsset* asset)> DB_GetXAssetName{0,0x1403E4090};
WEAK symbol<void(XZoneInfo* zoneInfo, unsigned int zoneCount, DBSyncMode syncMode)> DB_LoadXAssets{0,0x140414FF0};
WEAK symbol<XAssetHeader(XAssetType type, const char* name, int allowCreateDefault)> DB_FindXAssetHeader{0, 0x140412F60};
WEAK symbol<int(const RawFile* rawfile)> DB_GetRawFileLen{0,0x140413D80};
WEAK symbol<int(const RawFile* rawfile, char* buf, int size)> DB_GetRawBuffer{0,0x140413C40};
WEAK symbol<int(XAssetType type)> DB_GetXAssetTypeSize{0x14019A3B0, 0x14028BE70}; // H1(1.4)
WEAK symbol<unsigned int(unsigned int parentId, unsigned int name)> FindVariable{ 0,0x1405C1D50 };
WEAK symbol<unsigned int(int entnum, unsigned int classnum)> FindEntityId{ 0, 0x1405C1C50 };
WEAK symbol<void(VariableValue* result, unsigned int classnum, int entnum, int offset)> GetEntityFieldValue{ 0, 0x1405C6100 };
WEAK symbol<unsigned int(unsigned int parentId, unsigned int name)> FindVariable{0,0x1405C1D50};
WEAK symbol<unsigned int(int entnum, unsigned int classnum)> FindEntityId{0, 0x1405C1C50};
WEAK symbol<void(VariableValue* result, unsigned int classnum, int entnum, int offset)> GetEntityFieldValue{0, 0x1405C6100};
WEAK symbol<unsigned int(const char* name)> G_GetWeaponForName{ 0x1402C2A90, 0 }; // H1SP(1.4)
WEAK symbol<unsigned int(const char* name)> G_GetWeaponForName{0x1402C2A90, 0}; // H1SP(1.4)
//WEAK symbol<int(void* ps, unsigned int weapon, int a3, int a4, __int64 a5, int a6)>
//G_GivePlayerWeapon{ 0, 0x14051B660 };
//G_GivePlayerWeapon{0, 0x14051B660};
WEAK symbol<int(playerState_s* ps, unsigned int weapon, int dualWield, int startInAltMode, int, int, int, char,
...)>
G_GivePlayerWeapon{ 0x1402C2DF0, 0x14051B660 }; // h1sp
G_GivePlayerWeapon{0x1402C2DF0, 0x14051B660}; // h1sp
WEAK symbol<void(void* ps, const unsigned int weapon, int hadWeapon)> G_InitializeAmmo{ 0, 0x1404C4110 };
WEAK symbol<void(int clientNum, const unsigned int weapon)> G_SelectWeapon{ 0,0x14051C0D0 };
WEAK symbol<int(playerState_s* ps, unsigned int weapon)> G_TakePlayerWeapon{ 0x1402C3900, 0 }; // H1SP(1.4)
WEAK symbol<void(void* ps, const unsigned int weapon, int hadWeapon)> G_InitializeAmmo{0, 0x1404C4110};
WEAK symbol<void(int clientNum, const unsigned int weapon)> G_SelectWeapon{0,0x14051C0D0};
WEAK symbol<int(playerState_s* ps, unsigned int weapon)> G_TakePlayerWeapon{0x1402C3900, 0}; // H1SP(1.4)
WEAK symbol<char* (GfxImage* image, uint32_t width, uint32_t height, uint32_t depth, uint32_t mipCount,
uint32_t imageFlags, DXGI_FORMAT imageFormat, int a8, const char* name, const void* initData)> Image_Setup{ 0, 0x14074B2A0 };
uint32_t imageFlags, DXGI_FORMAT imageFormat, int a8, const char* name, const void* initData)> Image_Setup{0, 0x14074B2A0};
WEAK symbol<void(int clientNum, const char* menu, int a3, int a4, unsigned int a5)> LUI_OpenMenu{ 0, 0x1404CD210 }; // H1(1.4)
WEAK symbol<void(int clientNum, const char* menu, int a3, int a4, unsigned int a5)> LUI_OpenMenu{0, 0x1404CD210}; // H1(1.4)
WEAK symbol<bool(int clientNum, const char* menu)> Menu_IsMenuOpenAndVisible{ 0, 0x1405EE1A0 };
WEAK symbol<bool(int clientNum, const char* menu)> Menu_IsMenuOpenAndVisible{0, 0x1405EE1A0};
WEAK symbol<const float* (const float* v)> Scr_AllocVector{ 0, 0x1405C3220 };
WEAK symbol<void()> Scr_ClearOutParams{ 0, 0x1405C6E50 };
WEAK symbol<scr_entref_t(unsigned int entId)> Scr_GetEntityIdRef{ 0, 0x1405C56C0 };
WEAK symbol<int(unsigned int classnum, int entnum, int offset)> Scr_SetObjectField{ 0,0x140512190 };
WEAK symbol<void(unsigned int id, scr_string_t stringValue, unsigned int paramcount)> Scr_NotifyId{ 0,0x1405C8240 };
WEAK symbol<const float* (const float* v)> Scr_AllocVector{0, 0x1405C3220};
WEAK symbol<void()> Scr_ClearOutParams{0, 0x1405C6E50};
WEAK symbol<scr_entref_t(unsigned int entId)> Scr_GetEntityIdRef{0, 0x1405C56C0};
WEAK symbol<int(unsigned int classnum, int entnum, int offset)> Scr_SetObjectField{0,0x140512190};
WEAK symbol<void(unsigned int id, scr_string_t stringValue, unsigned int paramcount)> Scr_NotifyId{0,0x1405C8240};
WEAK symbol<unsigned int(unsigned int localId, const char* pos, unsigned int paramcount)> VM_Execute{ 0, 0x1405C8DB0 };
WEAK symbol<unsigned int(unsigned int localId, const char* pos, unsigned int paramcount)> VM_Execute{0, 0x1405C8DB0};
WEAK symbol<void()> R_SyncRenderThread{ 0,0x14076E7D0 };
WEAK symbol<void()> R_SyncRenderThread{0,0x14076E7D0};
WEAK symbol<void(const void* obj, void* pose, unsigned int entnum, unsigned int renderFxFlags, float* lightingOrigin,
float materialTime, __int64 a7, __int64 a8)> R_AddDObjToScene{ 0, 0x140775C40 };
float materialTime, __int64 a7, __int64 a8)> R_AddDObjToScene{0, 0x140775C40};
WEAK symbol<const char* (scr_string_t stringValue)> SL_ConvertToString{ 0x14036D420, 0x1405BFBB0 };
WEAK symbol<scr_string_t(const char* str, unsigned int user)> SL_GetString{ 0x14036D9A0, 0x1405C0170 };
WEAK symbol<const char* (scr_string_t stringValue)> SL_ConvertToString{0x14036D420, 0x1405BFBB0};
WEAK symbol<scr_string_t(const char* str, unsigned int user)> SL_GetString{0x14036D9A0, 0x1405C0170};
WEAK symbol<void(int index, const char* string)> SV_SetConfigstring{ 0, 0x140486720 }; // H1(1.4)
WEAK symbol<void(int index, const char* string)> SV_SetConfigstring{0, 0x140486720}; // H1(1.4)
WEAK symbol<bool()> SV_Loaded{ 0x140442F60, 0x1404864A0 }; // H1(1.4)
WEAK symbol<bool()> SV_Loaded{0x140442F60, 0x1404864A0}; // H1(1.4)
WEAK symbol<bool(const char* map)> SV_MapExists{ 0, 0x14047ED60 }; // H1(1.4)
WEAK symbol<bool(const char* map)> SV_MapExists{0, 0x14047ED60}; // H1(1.4)
WEAK symbol<void()> Sys_ShowConsole{ 0x1403E3B90, 0x140514910 }; // H1(1.4)
WEAK symbol<void()> Sys_ShowConsole{0x1403E3B90, 0x140514910}; // H1(1.4)
WEAK symbol<const char* (const char*)> UI_GetMapDisplayName{ 0, 0x140408CC0 }; // H1(1.4)
WEAK symbol<const char* (const char*)> UI_GetMapDisplayName{0, 0x140408CC0}; // H1(1.4)
WEAK symbol<const char* (const char*)> UI_GetGameTypeDisplayName{ 0, 0x1404086A0 }; // H1(1.4)
WEAK symbol<const char* (const char*)> UI_GetGameTypeDisplayName{0, 0x1404086A0}; // H1(1.4)
WEAK symbol<void(const char* error, ...)> Sys_Error{ 0x1403E0C40, 0x140511520 }; // H1(1.4)
WEAK symbol<void(const char* error, ...)> Sys_Error{0x1403E0C40, 0x140511520}; // H1(1.4)
WEAK symbol<const char* (const char* string)> UI_SafeTranslateString{ 0x140350430, 0x1405A2930 }; // H1(1.4)
WEAK symbol<const char* (const char* string)> UI_SafeTranslateString{0x140350430, 0x1405A2930}; // H1(1.4)
WEAK symbol<void(unsigned int localClientNum, const char** args)> UI_RunMenuScript{ 0, 0x1404CFE60 }; // H1(1.4)
WEAK symbol<void(unsigned int localClientNum, const char** args)> UI_RunMenuScript{0, 0x1404CFE60}; // H1(1.4)
WEAK symbol<void* (jmp_buf* Buf, int Value)> longjmp{ 0x140648FD4, 0x14089EED0 }; // H1(1.4)
WEAK symbol<int(jmp_buf* Buf)> _setjmp{ 0x1406BFDD0, 0x1408EC2E0 }; // H1(1.4)
WEAK symbol<void* (jmp_buf* Buf, int Value)> longjmp{0x140648FD4, 0x14089EED0}; // H1(1.4)
WEAK symbol<int(jmp_buf* Buf)> _setjmp{0x1406BFDD0, 0x1408EC2E0}; // H1(1.4)
WEAK symbol<void(int arg, char* buffer, int bufferLength)> SV_Cmd_ArgvBuffer{ 0x1402EEFD0, 0x1403B05C0 };
WEAK symbol<void(int arg, char* buffer, int bufferLength)> SV_Cmd_ArgvBuffer{0x1402EEFD0, 0x1403B05C0};
WEAK symbol<void(char* path, int pathSize, Sys_Folder folder, const char* filename, const char* ext)>
Sys_BuildAbsPath{ 0x1403CFF90, 0x140507010 }; // H1(1.4)
Sys_BuildAbsPath{0x1403CFF90, 0x140507010}; // H1(1.4)
WEAK symbol<bool(const char* path)> Sys_FileExists{ 0x1403E0CE0, 0x1405115E0 }; // H1(1.4)
WEAK symbol<bool(const char* path)> Sys_FileExists{0x1403E0CE0, 0x1405115E0}; // H1(1.4)
// Variables
WEAK symbol<CmdArgs> sv_cmd_args{ 0, 0x14946BA20 }; // H1(1.4)
WEAK symbol<CmdArgs> sv_cmd_args{0, 0x14946BA20}; // H1(1.4)
WEAK symbol<const char*> command_whitelist{ 0x141079A60, 0x14120C360 }; // H1(1.4)
WEAK symbol<const char*> command_whitelist{0x141079A60, 0x14120C360}; // H1(1.4)
WEAK symbol<const char*> g_assetNames{ 0, 0x140BEF280 };
WEAK symbol<int> g_poolSize{ 0, 0x140FEADF0 }; // H1(1.4)
WEAK symbol<const char*> g_assetNames{0, 0x140BEF280};
WEAK symbol<int> g_poolSize{0, 0x140FEADF0}; // H1(1.4)
WEAK symbol<GfxDrawMethod_s> gfxDrawMethod{ 0,0x14EDF9E00 };
WEAK symbol<GfxDrawMethod_s> gfxDrawMethod{0, 0x14EDF9E00};
WEAK symbol<int> dvarCount{ 0, 0x14D064CF4 }; //h1mp
WEAK symbol<dvar_t*> sortedDvars{ 0,0x14D064D00 }; //h1mp
WEAK symbol<int> dvarCount{0, 0x14D064CF4}; //h1mp
WEAK symbol<dvar_t*> sortedDvars{0, 0x14D064D00}; //h1mp
WEAK symbol<unsigned int> levelEntityId{ 0,0x14B5E0B30 };
WEAK symbol<int> g_script_error_level{ 0,0x14BA9CC24 };
WEAK symbol<jmp_buf> g_script_error{ 0,0x14BA9CD40 };
WEAK symbol<scr_classStruct_t> g_classMap{ 0, 0x140BF95C0 };
WEAK symbol<unsigned int> levelEntityId{0, 0x14B5E0B30};
WEAK symbol<int> g_script_error_level{0, 0x14BA9CC24};
WEAK symbol<jmp_buf> g_script_error{0, 0x14BA9CD40};
WEAK symbol<scr_classStruct_t> g_classMap{0, 0x140BF95C0};
WEAK symbol<scrVarGlob_t> scr_VarGlob{ 0, 0x14B617C00 };
WEAK symbol<scrVmPub_t> scr_VmPub{ 0,0x14BA9EE40 };
WEAK symbol<function_stack_t> scr_function_stack{ 0,0x14BAA93C0 };
WEAK symbol<void*> DB_XAssetPool{ 0x140DE8C80, 0x140FEB5D0 }; // H1(1.4)
WEAK symbol<scrVarGlob_t> scr_VarGlob{0, 0x14B617C00};
WEAK symbol<scrVmPub_t> scr_VmPub{0, 0x14BA9EE40};
WEAK symbol<function_stack_t> scr_function_stack{0, 0x14BAA93C0};
WEAK symbol<void*> DB_XAssetPool{0x140DE8C80, 0x140FEB5D0}; // H1(1.4)
WEAK symbol<DWORD> threadIds{0x14B19B880, 0x149810E00 }; // H1(1.4)
WEAK symbol<DWORD> threadIds{0x14B19B880, 0x149810E00}; // H1(1.4)
namespace mp
{
WEAK symbol<gentity_s> g_entities{ 0, 0x14621E530 }; // H1(1.4)
WEAK symbol<client_t> svs_clients{ 0, 0x14B204A10 }; // H1(1.4)
WEAK symbol<int> gameTime{ 0, 0x14621BDBC }; // H1(1.4)
WEAK symbol<gentity_s> g_entities{0, 0x14621E530}; // H1(1.4)
WEAK symbol<client_t> svs_clients{0, 0x14B204A10}; // H1(1.4)
WEAK symbol<int> gameTime{0, 0x14621BDBC}; // H1(1.4)
}
namespace sp
{
WEAK symbol<gentity_s> g_entities{ 0x14550DD90 , 0 }; // H1(1.4)
WEAK symbol<gentity_s> g_entities{0x14550DD90, 0}; // H1(1.4)
}
}

View File

@ -14,7 +14,6 @@ DECLSPEC_NORETURN void WINAPI exit_hook(const int code)
exit(code);
}
BOOL WINAPI system_parameters_info_a(const UINT uiAction, const UINT uiParam, const PVOID pvParam, const UINT fWinIni)
{
component_loader::post_unpack();