things
Singleplayer is now supported Logo now appear on top of console App about fix
This commit is contained in:
parent
7ac0de9f86
commit
d6afb4254c
@ -204,20 +204,20 @@ namespace auth
|
|||||||
// Patch steam id bit check
|
// Patch steam id bit check
|
||||||
if (game::environment::is_sp())
|
if (game::environment::is_sp())
|
||||||
{
|
{
|
||||||
utils::hook::jump(0x1404267F0, 0x140426846); // S1SP
|
utils::hook::jump(0x140475C17, 0x140475C6A); // H1(1.4)
|
||||||
utils::hook::jump(0x14042760F, 0x140427650); // S1SP
|
utils::hook::jump(0x140476AFF, 0x140476B40); // H1(1.4)
|
||||||
utils::hook::jump(0x140427AB4, 0x140427B02); // S1SP
|
utils::hook::jump(0x140476FA4, 0x140476FF2); // H1(1.4)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
utils::hook::jump(0x140571E07, 0x140571E5A); // H1MP64[1.4]
|
utils::hook::jump(0x140571E07, 0x140571E5A); // H1(1.4)
|
||||||
utils::hook::jump(0x14004B223, 0x14004B4F2); // H1MP64[1.4]
|
utils::hook::jump(0x14004B223, 0x14004B4F2); // H1(1.4)
|
||||||
utils::hook::jump(0x14004B4AD, 0x140009B48); // H1MP64[1.4]
|
utils::hook::jump(0x14004B4AD, 0x140009B48); // H1(1.4)
|
||||||
utils::hook::jump(0x140572F6F, 0x140572FB0); // H1MP64[1.4]
|
utils::hook::jump(0x140572F6F, 0x140572FB0); // H1(1.4)
|
||||||
utils::hook::jump(0x140573470, 0x1405734B6); // H1MP64[1.4]
|
utils::hook::jump(0x140573470, 0x1405734B6); // H1(1.4)
|
||||||
|
|
||||||
utils::hook::jump(0x140488BC1, get_direct_connect_stub(), true); // H1MP64[1.4]
|
utils::hook::jump(0x140488BC1, get_direct_connect_stub(), true); // H1(1.4)
|
||||||
utils::hook::call(0x140250ED2, send_connect_data_stub); // H1MP64[1.4]
|
utils::hook::call(0x140250ED2, send_connect_data_stub); // H1(1.4)
|
||||||
}
|
}
|
||||||
|
|
||||||
command::add("guid", []()
|
command::add("guid", []()
|
||||||
|
@ -113,7 +113,7 @@ namespace console
|
|||||||
void post_unpack() override
|
void post_unpack() override
|
||||||
{
|
{
|
||||||
// Redirect input (]command)
|
// Redirect input (]command)
|
||||||
utils::hook::jump(SELECT_VALUE(0x000000000, 0x1405141E0), append_text); // H1MP1.4
|
utils::hook::jump(SELECT_VALUE(0x1403E34C0, 0x1405141E0), append_text); // H1(1.4)
|
||||||
|
|
||||||
this->initialize();
|
this->initialize();
|
||||||
}
|
}
|
||||||
@ -202,7 +202,7 @@ namespace console
|
|||||||
static void log_message(const std::string& message)
|
static void log_message(const std::string& message)
|
||||||
{
|
{
|
||||||
OutputDebugStringA(message.data());
|
OutputDebugStringA(message.data());
|
||||||
game::Conbuf_AppendText(message.data()); //0x140513FF0
|
game::Conbuf_AppendText(message.data());
|
||||||
FILE* pFile = fopen("debug.log", "a");
|
FILE* pFile = fopen("debug.log", "a");
|
||||||
fprintf(pFile, "%s\n", message.data());
|
fprintf(pFile, "%s\n", message.data());
|
||||||
fclose(pFile);
|
fclose(pFile);
|
||||||
@ -232,7 +232,7 @@ namespace console
|
|||||||
|
|
||||||
HWND get_window()
|
HWND get_window()
|
||||||
{
|
{
|
||||||
return *reinterpret_cast<HWND*>((SELECT_VALUE(0x000000000, 0x14DDFC2D0))); // H1MP1.4
|
return *reinterpret_cast<HWND*>((SELECT_VALUE(0x14CF56C00, 0x14DDFC2D0))); // H1(1.4)
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_title(std::string title)
|
void set_title(std::string title)
|
||||||
@ -247,7 +247,7 @@ namespace console
|
|||||||
|
|
||||||
SetWindowPos(get_window(), nullptr, rect.left, rect.top, width, height, 0);
|
SetWindowPos(get_window(), nullptr, rect.left, rect.top, width, height, 0);
|
||||||
|
|
||||||
auto* const logo_window = *reinterpret_cast<HWND*>(SELECT_VALUE(0x000000000, 0x14DDFC2E0)); // H1MP64(1.4)
|
auto* const logo_window = *reinterpret_cast<HWND*>(SELECT_VALUE(0x14CF56C10, 0x14DDFC2E0)); // H1(1.4)
|
||||||
SetWindowPos(logo_window, nullptr, 5, 5, width - 25, 60, 0);
|
SetWindowPos(logo_window, nullptr, 5, 5, width - 25, 60, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
70
src/client/component/resources.cpp
Normal file
70
src/client/component/resources.cpp
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
#include <std_include.hpp>
|
||||||
|
#include "loader/component_loader.hpp"
|
||||||
|
#include <utils/nt.hpp>
|
||||||
|
|
||||||
|
namespace resources
|
||||||
|
{
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
HICON icon;
|
||||||
|
HANDLE splash, logo;
|
||||||
|
|
||||||
|
HANDLE WINAPI load_image_a(const HINSTANCE handle, LPCSTR name, const UINT type, const int c_x, const int c_y,
|
||||||
|
const UINT load)
|
||||||
|
{
|
||||||
|
const utils::nt::library self;
|
||||||
|
if (!IS_INTRESOURCE(name) && name == "logo.bmp"s) return logo;
|
||||||
|
if (self.get_handle() == handle && name == LPCSTR(0x64)) return splash;
|
||||||
|
|
||||||
|
return LoadImageA(handle, name, type, c_x, c_y, load);
|
||||||
|
}
|
||||||
|
|
||||||
|
HICON WINAPI load_icon_a(const HINSTANCE handle, const LPCSTR name)
|
||||||
|
{
|
||||||
|
const utils::nt::library self;
|
||||||
|
if (self.get_handle() == handle && name == LPCSTR(2)) return icon;
|
||||||
|
|
||||||
|
return LoadIconA(handle, name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class component final : public component_interface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~component() override
|
||||||
|
{
|
||||||
|
if (icon) DestroyIcon(icon);
|
||||||
|
if (logo) DeleteObject(logo);
|
||||||
|
if (splash) DeleteObject(splash);
|
||||||
|
}
|
||||||
|
|
||||||
|
void post_start() override
|
||||||
|
{
|
||||||
|
const utils::nt::library self;
|
||||||
|
|
||||||
|
icon = LoadIconA(self.get_handle(), MAKEINTRESOURCEA(ID_ICON));
|
||||||
|
logo = LoadImageA(self.get_handle(), MAKEINTRESOURCEA(IMAGE_LOGO), 0, 0, 0, LR_COPYFROMRESOURCE);
|
||||||
|
splash = LoadImageA(self.get_handle(), MAKEINTRESOURCEA(IMAGE_SPLASH), 0, 0, 0, LR_COPYFROMRESOURCE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void* load_import(const std::string& library, const std::string& function) override
|
||||||
|
{
|
||||||
|
if (library == "USER32.dll")
|
||||||
|
{
|
||||||
|
if (function == "LoadIconA")
|
||||||
|
{
|
||||||
|
return load_icon_a;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (function == "LoadImageA")
|
||||||
|
{
|
||||||
|
return load_image_a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
REGISTER_COMPONENT(resources::component)
|
@ -19,7 +19,7 @@ namespace game
|
|||||||
|
|
||||||
WEAK symbol<void()> Com_Quit_f{ 0x140352BE0, 0x1400DA640 }; // H1(1.4)
|
WEAK symbol<void()> Com_Quit_f{ 0x140352BE0, 0x1400DA640 }; // H1(1.4)
|
||||||
|
|
||||||
WEAK symbol<void(const char* text_in)> Cmd_TokenizeString{ 0, 0x1404046F0 }; // H1(1.4)
|
WEAK symbol<void(const char* text_in)> Cmd_TokenizeString{ 0x140344110, 0x1404046F0 }; // H1(1.4)
|
||||||
|
|
||||||
WEAK symbol<void(const char* dvar, const char* buffer)> Dvar_SetCommand{ 0x1403C72B0, 0x1404FD0A0 }; // H1(1.4)
|
WEAK symbol<void(const char* dvar, const char* buffer)> Dvar_SetCommand{ 0x1403C72B0, 0x1404FD0A0 }; // H1(1.4)
|
||||||
|
|
||||||
@ -27,9 +27,9 @@ namespace game
|
|||||||
|
|
||||||
WEAK symbol<void(int localClientNum, const char* message)> CG_GameMessage{ 0x1401389A0, 0x140220CC0 }; // 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(int localClientNum, const char* message)> CG_GameMessageBold{ 0x140138750, 0x140220620 }; // H1(1.4)
|
||||||
WEAK symbol<void(const char* message)> Conbuf_AppendText{ 0, 0x140513FF0 }; // H1(1.4)
|
WEAK symbol<void(const char* message)> Conbuf_AppendText{ 0x1403E3300, 0x140513FF0 }; // H1(1.4)
|
||||||
|
|
||||||
WEAK symbol<void()> Cmd_EndTokenizeString{ 0, 0x140403C20 }; // H1(1.4)
|
WEAK symbol<void()> Cmd_EndTokenizeString{ 0x140343630, 0x140403C20 }; // H1(1.4)
|
||||||
|
|
||||||
WEAK symbol<dvar_t* (const char* name)> Dvar_FindVar{ 0x1403C5D50, 0x1404FBB00 }; // H1(1.4)
|
WEAK symbol<dvar_t* (const char* name)> Dvar_FindVar{ 0x1403C5D50, 0x1404FBB00 }; // 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* (const dvar_t* dvar, dvar_value value, __int64 a3)> Dvar_ValueToString{ 0x1403C8560,0x1404FE660 }; // H1(1.4); different typedef from previous titles
|
||||||
@ -46,22 +46,24 @@ namespace game
|
|||||||
WEAK symbol<bool()> CL_IsCgameInitialized{ 0x14017EE30, 0x140245650 }; // 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<unsigned int(int)> Live_SyncOnlineDataFlags{ 0, 0x14059A700 }; // H1(1.4)
|
||||||
|
|
||||||
WEAK symbol<void()> Sys_Milliseconds{ 0, 0x140513710 }; // H1(1.4)
|
WEAK symbol<void()> Sys_Milliseconds{ 0x1403E2B10, 0x140513710 }; // H1(1.4)
|
||||||
WEAK symbol<bool()> Sys_IsDatabaseReady2{ 0, 0x14042B090 }; // H1(1.4)
|
WEAK symbol<bool()> Sys_IsDatabaseReady2{ 0, 0x14042B090 }; // H1(1.4)
|
||||||
|
|
||||||
WEAK symbol<void(netadr_s* from)> SV_DirectConnect{ 0, 0x140480860 };
|
WEAK symbol<void(netadr_s* from)> SV_DirectConnect{ 0, 0x140480860 }; // H1(1.4)
|
||||||
WEAK symbol<void(const char* text_in)> SV_Cmd_TokenizeString{ 0, 0x140404D20 };
|
|
||||||
WEAK symbol<void()> SV_Cmd_EndTokenizedString{ 0, 0x140404CE0 };
|
|
||||||
WEAK symbol<bool(int, void const*, const netadr_s*)> Sys_SendPacket{ 0, 0x1405133B0 };
|
|
||||||
WEAK symbol<void(netadr_s*, sockaddr*)> NetadrToSockadr{ 0, 0x1404F62F0 };
|
|
||||||
WEAK symbol<void(netsrc_t, netadr_s*, const char*)> NET_OutOfBandPrint{ 0, 0x1404255D0 };
|
|
||||||
WEAK symbol<SOCKET> query_socket{ 0, 0x14DDFBF98 };
|
|
||||||
WEAK symbol<void(netsrc_t sock, int length, const void* data, const netadr_s* to)> NET_SendLoopPacket{ 0, 0x140425790 };
|
|
||||||
|
|
||||||
//WEAK symbol<dvar_t* (const char* dvarName, int value, int min, int max, unsigned int flags, const char* desc)>
|
WEAK symbol<void(const char* text_in)> SV_Cmd_TokenizeString{ 0x1402EF050, 0x140404D20 }; // H1(1.4)
|
||||||
//Dvar_RegisterInt{ 0, 0x140 };
|
|
||||||
|
|
||||||
WEAK symbol<bool(int clientNum)> SV_BotIsBot{ 0, 0x14046E6C0 };
|
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<char* (char* string)> I_CleanStr{ 0x1403CD230, 0 }; // H1(1.4)
|
||||||
WEAK symbol<ScreenPlacement* ()> ScrPlace_GetViewPlacement{ 0x1401981F0, 0x140288550 }; // H1(1.4)
|
WEAK symbol<ScreenPlacement* ()> ScrPlace_GetViewPlacement{ 0x1401981F0, 0x140288550 }; // H1(1.4)
|
||||||
@ -142,17 +144,17 @@ namespace game
|
|||||||
WEAK symbol<void(const void* obj, void* pose, unsigned int entnum, unsigned int renderFxFlags, float* lightingOrigin,
|
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{ 0,0x1405BFBB0 };
|
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{ 0, 0x1405C0170 };
|
WEAK symbol<scr_string_t(const char* str, unsigned int user)> SL_GetString{ 0x14036D9A0, 0x1405C0170 };
|
||||||
|
|
||||||
WEAK symbol<bool()> SV_Loaded{ 0,0x140442F60 };
|
WEAK symbol<bool()> SV_Loaded{ 0x140442F60, 0x140442F60 };
|
||||||
|
|
||||||
WEAK symbol<void()> Sys_ShowConsole{ 0,0x140514910 };
|
WEAK symbol<void()> Sys_ShowConsole{ 0x1403E3B90, 0x140514910 }; // H1(1.4)
|
||||||
|
|
||||||
WEAK symbol<const char* (const char* string)> UI_SafeTranslateString{ 0, 0x5A2930 };
|
WEAK symbol<const char* (const char* string)> UI_SafeTranslateString{ 0x140350430, 0x1405A2930 }; // H1(1.4)
|
||||||
|
|
||||||
WEAK symbol<void* (jmp_buf* Buf, int Value)> longjmp{ 0, 0x14089EED0 };
|
WEAK symbol<void* (jmp_buf* Buf, int Value)> longjmp{ 0x140648FD4, 0x14089EED0 }; // H1(1.4)
|
||||||
WEAK symbol<int(jmp_buf* Buf)> _setjmp{ 0, 0x1408EC2E0 };
|
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 };
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
p a:hover {
|
p a:hover {
|
||||||
color: #20c5ff;
|
color: #c2c2c282;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
@ -114,7 +114,7 @@
|
|||||||
|
|
||||||
nav .nav-link:hover,
|
nav .nav-link:hover,
|
||||||
nav .nav-link.active {
|
nav .nav-link.active {
|
||||||
text-shadow: 0px 0px 8px rgba(255, 255, 255, 0.5);
|
text-shadow: 0px 0px 8px rgba(255, 255, 255, 0.748);
|
||||||
}
|
}
|
||||||
|
|
||||||
nav .nav-link:first-child {
|
nav .nav-link:first-child {
|
||||||
@ -274,7 +274,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.card:hover .card-content {
|
.card:hover .card-content {
|
||||||
background-color: white;
|
background-color: rgba(255, 255, 255, 0.652);
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
/*.card:hover img {
|
/*.card:hover img {
|
||||||
@ -393,7 +393,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a class="nav-link _play" onClick="showMenu('play')">
|
<a class="nav-link _play" onClick="showMenu('play')">
|
||||||
Gamemode
|
Gamemodes
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<!--<li>
|
<!--<li>
|
||||||
@ -403,7 +403,7 @@
|
|||||||
</li>-->
|
</li>-->
|
||||||
<li>
|
<li>
|
||||||
<a class="nav-link _about" onClick="showMenu('about')">
|
<a class="nav-link _about" onClick="showMenu('about')">
|
||||||
H1 ?
|
About
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -435,8 +435,7 @@
|
|||||||
<div class="card" onClick="window.external.selectMode(2)">
|
<div class="card" onClick="window.external.selectMode(2)">
|
||||||
<div class="card-container">
|
<div class="card-container">
|
||||||
<div class="card-img">
|
<div class="card-img">
|
||||||
<!-- Also we can use image incoder https://www.base64-image.de/ -->
|
<img src="https://cdn.discordapp.com/attachments/895680402142941194/936320652389015653/call-of-duty-modern-warfare-remastered-durmaplay-wallpaper.jpg"/>
|
||||||
<img src="https://cdn.discordapp.com/attachments/895680402142941194/936320652389015653/call-of-duty-modern-warfare-remastered-durmaplay-wallpaper.jpg" />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span>Multiplayer</span>
|
<span>Multiplayer</span>
|
||||||
@ -463,14 +462,12 @@
|
|||||||
|
|
||||||
<div class="container full full-row">
|
<div class="container full full-row">
|
||||||
<div style="text-align: center; width: 100%;">
|
<div style="text-align: center; width: 100%;">
|
||||||
<!--<h1>H1-Mod</h1>-->
|
<center><img src="https://cdn.discordapp.com/attachments/895680402142941194/939094056020099112/h1-header.png"></center>
|
||||||
<!-- Also we can use image incoder https://www.base64-image.de/ -->
|
<p>Made by <a onClick="window.external.openUrl('https://github.com/skkuull');">Skull</a>.</p>
|
||||||
<center><img src="https://mstcimecbootstrapper.000webhostapp.com/h1/h1-header.png"></center>
|
<p>Special thanks to <a onClick="window.external.openUrl('https://github.com/Joelrau');">quaK</a>.</p>
|
||||||
<br>Made by <a onClick="window.external.openUrl('');">Skull</a>.<br>Special thanks to <a onClick="window.external.openUrl('https://github.com/Joelrau');">quaK</a>.
|
|
||||||
<p>
|
<p>
|
||||||
<br>This Project based on <a onClick="window.external.openUrl('https://xlabs.dev/support_s1x_client');">XLabs-S1x</a>.
|
This Project based on <a onClick="window.external.openUrl('https://xlabs.dev/support_s1x_client');">XLabs-S1x</a>.
|
||||||
|
</p>
|
||||||
<br>XLabsProject <a onClick="window.external.openUrl('https://xlabs.dev');">Website</a>, <a onClick="window.external.openUrl('https://xlabs.dev');">Patreon</a>, <a onClick="window.external.openUrl('https://xlabs.dev');">Github</a></br>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user