t7x/src/client/game/symbols.hpp

91 lines
3.0 KiB
C++
Raw Normal View History

#pragma once
2022-10-25 14:42:37 -04:00
#include "structs.hpp"
2022-09-17 02:13:06 -04:00
#define WEAK __declspec(selectany)
namespace game
{
2022-11-11 11:19:26 -05:00
#define Com_Error(code, fmt, ...) \
Com_Error_(__FILE__, __LINE__, code, fmt, ##__VA_ARGS__)
2022-10-25 14:42:37 -04:00
// CL
2022-10-28 16:16:14 -04:00
WEAK symbol<void(int controllerIndex, XSESSION_INFO* hostInfo, const netadr_t* addr, int numPublicSlots,
2022-10-25 14:42:37 -04:00
int numPrivateSlots, const char* mapname, const char* gametype)> CL_ConnectFromLobby
2022-11-09 11:10:08 -05:00
{0x14134C570};
2022-10-25 14:42:37 -04:00
2022-08-10 05:26:19 -04:00
// Com
2022-11-09 11:10:08 -05:00
WEAK symbol<void(int channel, unsigned int label, const char* fmt, ...)> Com_Printf{0x1421499C0};
WEAK symbol<void(const char* file, int line, int code, const char* fmt, ...)> Com_Error_{0x1420F8BD0};
WEAK symbol<bool(eModes mode)> Com_SessionMode_IsMode{0x1420F7DD0};
2022-08-10 05:26:19 -04:00
2022-11-09 11:10:08 -05:00
WEAK symbol<void(int localClientNum, const char* text)> Cbuf_AddText{0x1420EC8B0};
2022-09-16 14:55:36 -04:00
WEAK symbol<void(const char* cmdName, xcommand_t function, cmd_function_s* allocedCmd)> Cmd_AddCommandInternal{
2022-11-09 12:10:34 -05:00
0x1420ED530
2022-09-16 14:55:36 -04:00
};
2022-11-09 11:10:08 -05:00
WEAK symbol<void(char* text, int maxSize)> Con_GetTextCopy{0x14133A7D0};
2022-08-10 05:26:19 -04:00
2022-09-24 09:09:48 -04:00
// DB
2022-10-25 14:42:37 -04:00
WEAK symbol<void(XZoneInfo* zoneInfo, uint32_t zoneCount, bool sync, bool suppressSync)> DB_LoadXAssets{
2022-11-09 12:10:34 -05:00
0x1414236A0
2022-10-25 14:42:37 -04:00
};
2022-09-24 09:09:48 -04:00
2022-09-21 13:32:40 -04:00
// Live
2022-11-09 11:10:08 -05:00
WEAK symbol<bool(uint64_t, int*, bool)> Live_GetConnectivityInformation{0x141E0C410};
2022-09-21 13:32:40 -04:00
// MSG
2022-11-09 11:10:08 -05:00
WEAK symbol<uint8_t(msg_t* msg)> MSG_ReadByte{0x142155EB0};
2022-10-23 13:56:03 -04:00
// NET
2022-11-09 11:10:08 -05:00
WEAK symbol<bool(netsrc_t sock, int length, const void* data, const netadr_t* to)> NET_SendPacket{0x142332F70};
WEAK symbol<bool(char const*, netadr_t*)> NET_StringToAdr{0x1421731E0};
WEAK symbol<bool(netadr_t*, char const*)> NetAdr_InitFromString{0x142332F70};
2022-08-10 05:26:19 -04:00
// Sys
2022-11-09 11:10:08 -05:00
WEAK symbol<int()> Sys_Milliseconds{0x142333430};
WEAK symbol<void()> Sys_ShowConsole{0x142333F80};
WEAK symbol<TLSData*()> Sys_GetTLS{0x142184210};
2022-08-10 05:26:19 -04:00
// Dvar
2022-11-09 11:10:08 -05:00
WEAK symbol<const dvar_t*(const char* dvarName)> Dvar_FindVar{0x1422BD730};
WEAK symbol<unsigned int(const char* str)> Dvar_GenerateHash{0x14133DBF0};
WEAK symbol<dvar_t*(unsigned int hash)> Dvar_FindMalleableVar{0x1422BD6A0};
WEAK symbol<const char*(const dvar_t* dvar)> Dvar_GetDebugName{0x1422BDCB0};
WEAK symbol<const char*(const dvar_t* dvar)> Dvar_GetString{0x1422BFFF0};
2022-10-25 14:42:37 -04:00
WEAK symbol<void(const char* dvarName, const char* string, bool createIfMissing)> Dvar_SetFromStringByName{
2022-11-09 12:10:34 -05:00
0x1422C7F60
2022-10-25 14:42:37 -04:00
};
2022-08-10 05:26:19 -04:00
2022-09-16 14:55:36 -04:00
// Rendering
WEAK symbol<void(const char*, int, void*, float, float, float, float, float, float*, int)> R_AddCmdDrawText{
2022-11-09 12:10:34 -05:00
0x141CD98D0
2022-09-16 14:55:36 -04:00
};
2022-10-23 14:57:44 -04:00
// Variables
2022-11-12 02:07:51 -05:00
2022-11-09 11:10:08 -05:00
WEAK symbol<cmd_function_s> cmd_functions{0x15689FF58};
WEAK symbol<CmdArgs> sv_cmd_args{0x15689CE30};
2022-10-23 14:57:44 -04:00
2022-11-09 11:10:08 -05:00
WEAK symbol<SOCKET> ip_socket{0x157E77818};
2022-10-23 14:57:44 -04:00
2022-11-09 11:10:08 -05:00
WEAK symbol<Join> s_join{0x15574C640};
2022-10-29 14:05:22 -04:00
namespace s_wcd
{
2022-11-09 11:10:08 -05:00
WEAK symbol<HWND> codLogo{0x157E77A50};
WEAK symbol<HFONT> hfBufferFont{0x157E77A58};
WEAK symbol<HWND> hWnd{0x157E77A40};
WEAK symbol<HWND> hwndBuffer{0x157E77A48};
WEAK symbol<HWND> hwndInputLine{0x157E77A60};
WEAK symbol<int> windowHeight{0x157E7806C};
WEAK symbol<int> windowWidth{0x157E78068};
WEAK symbol<WNDPROC> SysInputLineWndProc{0x157E78070};
}
2022-11-11 11:19:26 -05:00
2022-11-12 02:07:51 -05:00
// Global game definitions
constexpr auto CMD_MAX_NESTING = 8;
2022-11-11 11:19:26 -05:00
// Reimplementations
eModes Com_SessionMode_GetMode();
}