Merge branch 'develop' into feature/fonticons
# Conflicts: # src/Components/Loader.cpp # src/Components/Modules/Colors.cpp # src/Components/Modules/Colors.hpp # src/Game/Functions.cpp # src/Game/Functions.hpp # src/Game/Structs.hpp
This commit is contained in:
@ -30,13 +30,19 @@ namespace Game
|
||||
BG_GetNumWeapons_t BG_GetNumWeapons = BG_GetNumWeapons_t(0x4F5CC0);
|
||||
BG_GetWeaponName_t BG_GetWeaponName = BG_GetWeaponName_t(0x4E6EC0);
|
||||
BG_LoadWeaponDef_LoadObj_t BG_LoadWeaponDef_LoadObj = BG_LoadWeaponDef_LoadObj_t(0x57B5F0);
|
||||
BG_GetWeaponDef_t BG_GetWeaponDef = BG_GetWeaponDef_t(0x440EB0);
|
||||
|
||||
Cbuf_AddServerText_t Cbuf_AddServerText = Cbuf_AddServerText_t(0x4BB9B0);
|
||||
Cbuf_AddText_t Cbuf_AddText = Cbuf_AddText_t(0x404B20);
|
||||
|
||||
CG_NextWeapon_f_t CG_NextWeapon_f = CG_NextWeapon_f_t(0x449DE0);
|
||||
CG_GetClientNum_t CG_GetClientNum = CG_GetClientNum_t(0x433700);
|
||||
CG_PlayBoltedEffect_t CG_PlayBoltedEffect = CG_PlayBoltedEffect_t(0x00430E10);
|
||||
CG_GetBoneIndex_t CG_GetBoneIndex = CG_GetBoneIndex_t(0x00504F20);
|
||||
CG_ScoresDown_f_t CG_ScoresDown_f = CG_ScoresDown_f_t(0x580370);
|
||||
CG_ScoresUp_f_t CG_ScoresUp_f = CG_ScoresUp_f_t(0x5802C0);
|
||||
CG_ScrollScoreboardUp_t CG_ScrollScoreboardUp = CG_ScrollScoreboardUp_t(0x47A5C0);
|
||||
CG_ScrollScoreboardDown_t CG_ScrollScoreboardDown = CG_ScrollScoreboardDown_t(0x493B50);
|
||||
|
||||
CL_GetClientName_t CL_GetClientName = CL_GetClientName_t(0x4563D0);
|
||||
CL_IsCgameInitialized_t CL_IsCgameInitialized = CL_IsCgameInitialized_t(0x43EB20);
|
||||
@ -129,6 +135,7 @@ namespace Game
|
||||
FS_FCloseFile_t FS_FCloseFile = FS_FCloseFile_t(0x462000);
|
||||
FS_WriteFile_t FS_WriteFile = FS_WriteFile_t(0x426450);
|
||||
FS_Write_t FS_Write = FS_Write_t(0x4C06E0);
|
||||
FS_Printf_t FS_Printf = FS_Printf_t(0x459320);
|
||||
FS_Read_t FS_Read = FS_Read_t(0x4A04C0);
|
||||
FS_Seek_t FS_Seek = FS_Seek_t(0x4A63D0);
|
||||
FS_FTell_t FS_FTell = FS_FTell_t(0x4E6760);
|
||||
@ -148,6 +155,7 @@ namespace Game
|
||||
Info_ValueForKey_t Info_ValueForKey = Info_ValueForKey_t(0x47C820);
|
||||
|
||||
Key_SetCatcher_t Key_SetCatcher = Key_SetCatcher_t(0x43BD00);
|
||||
Key_IsKeyCatcherActive_t Key_IsKeyCatcherActive = Key_IsKeyCatcherActive_t(0x4DA010);
|
||||
|
||||
LargeLocalInit_t LargeLocalInit = LargeLocalInit_t(0x4A62A0);
|
||||
|
||||
@ -175,8 +183,12 @@ namespace Game
|
||||
Menus_FindByName_t Menus_FindByName = Menus_FindByName_t(0x487240);
|
||||
Menu_IsVisible_t Menu_IsVisible = Menu_IsVisible_t(0x4D77D0);
|
||||
Menus_MenuIsInStack_t Menus_MenuIsInStack = Menus_MenuIsInStack_t(0x47ACB0);
|
||||
Menu_HandleKey_t Menu_HandleKey = Menu_HandleKey_t(0x4C4A00);
|
||||
Menu_GetFocused_t Menu_GetFocused = Menu_GetFocused_t(0x4AFF10);
|
||||
|
||||
MSG_Init_t MSG_Init = MSG_Init_t(0x45FCA0);
|
||||
MSG_ReadBit_t MSG_ReadBit = MSG_ReadBit_t(0x476D20);
|
||||
MSG_ReadBits_t MSG_ReadBits = MSG_ReadBits_t(0x4C3900);
|
||||
MSG_ReadData_t MSG_ReadData = MSG_ReadData_t(0x4527C0);
|
||||
MSG_ReadLong_t MSG_ReadLong = MSG_ReadLong_t(0x4C9550);
|
||||
MSG_ReadShort_t MSG_ReadShort = MSG_ReadShort_t(0x40BDD0);
|
||||
@ -277,6 +289,10 @@ namespace Game
|
||||
Dvar_SetFromStringByName_t Dvar_SetFromStringByName = Dvar_SetFromStringByName_t(0x4F52E0);
|
||||
Dvar_SetFromStringByNameFromSource_t Dvar_SetFromStringByNameFromSource = Dvar_SetFromStringByNameFromSource_t(0x4FC770);
|
||||
Dvar_SetStringByName_t Dvar_SetStringByName = Dvar_SetStringByName_t(0x44F060);
|
||||
Dvar_SetString_t Dvar_SetString = Dvar_SetString_t(0x4A9580);
|
||||
Dvar_SetBool_t Dvar_SetBool = Dvar_SetBool_t(0x4A9510);
|
||||
Dvar_SetFloat_t Dvar_SetFloat = Dvar_SetFloat_t(0x40BB20);
|
||||
Dvar_SetInt_t Dvar_SetInt = Dvar_SetInt_t(0x421DA0);
|
||||
|
||||
SL_ConvertToString_t SL_ConvertToString = SL_ConvertToString_t(0x4EC1D0);
|
||||
SL_GetString_t SL_GetString = SL_GetString_t(0x4CDC10);
|
||||
@ -318,6 +334,7 @@ namespace Game
|
||||
TeleportPlayer_t TeleportPlayer = TeleportPlayer_t(0x496850);
|
||||
|
||||
UI_AddMenuList_t UI_AddMenuList = UI_AddMenuList_t(0x4533C0);
|
||||
UI_GetActiveMenu_t UI_GetActiveMenu = UI_GetActiveMenu_t(0x4BE790);
|
||||
UI_CheckStringTranslation_t UI_CheckStringTranslation = UI_CheckStringTranslation_t(0x4FB010);
|
||||
UI_LoadMenus_t UI_LoadMenus = UI_LoadMenus_t(0x641460);
|
||||
UI_UpdateArenas_t UI_UpdateArenas = UI_UpdateArenas_t(0x4A95B0);
|
||||
@ -328,10 +345,13 @@ namespace Game
|
||||
UI_DrawText_t UI_DrawText = UI_DrawText_t(0x49C0D0);
|
||||
UI_GetFontHandle_t UI_GetFontHandle = UI_GetFontHandle_t(0x4AEA60);
|
||||
ScrPlace_ApplyRect_t ScrPlace_ApplyRect = ScrPlace_ApplyRect_t(0x454E20);
|
||||
UI_KeyEvent_t UI_KeyEvent = UI_KeyEvent_t(0x4970F0);
|
||||
|
||||
Win_GetLanguage_t Win_GetLanguage = Win_GetLanguage_t(0x45CBA0);
|
||||
|
||||
Vec3UnpackUnitVec_t Vec3UnpackUnitVec = Vec3UnpackUnitVec_t(0x45CA90);
|
||||
vectoyaw_t vectoyaw = vectoyaw_t(0x45AD10);
|
||||
AngleNormalize360_t AngleNormalize360 = AngleNormalize360_t(0x438DC0);
|
||||
|
||||
unzClose_t unzClose = unzClose_t(0x41BF20);
|
||||
|
||||
@ -347,6 +367,7 @@ namespace Game
|
||||
|
||||
Field_Draw_t Field_Draw = Field_Draw_t(0x4F5B40);
|
||||
Field_AdjustScroll_t Field_AdjustScroll = Field_AdjustScroll_t(0x488C10);
|
||||
AimAssist_ApplyAutoMelee_t AimAssist_ApplyAutoMelee = AimAssist_ApplyAutoMelee_t(0x56A360);
|
||||
|
||||
XAssetHeader* DB_XAssetPool = reinterpret_cast<XAssetHeader*>(0x7998A8);
|
||||
unsigned int* g_poolSize = reinterpret_cast<unsigned int*>(0x7995E8);
|
||||
@ -364,6 +385,9 @@ namespace Game
|
||||
source_t **sourceFiles = reinterpret_cast<source_t **>(0x7C4A98);
|
||||
keywordHash_t **menuParseKeywordHash = reinterpret_cast<keywordHash_t **>(0x63AE928);
|
||||
|
||||
float* cl_angles = reinterpret_cast<float*>(0xB2F8D0);
|
||||
float* cgameFOVSensitivityScale = reinterpret_cast<float*>(0xB2F884);
|
||||
|
||||
int* svs_time = reinterpret_cast<int*>(0x31D9384);
|
||||
int* svs_numclients = reinterpret_cast<int*>(0x31D938C);
|
||||
client_t* svs_clients = reinterpret_cast<client_t*>(0x31D9390);
|
||||
@ -446,8 +470,19 @@ namespace Game
|
||||
sharedUiInfo_t* sharedUiInfo = reinterpret_cast<sharedUiInfo_t*>(0x62E4B78);
|
||||
ScreenPlacement* scrPlaceFull = reinterpret_cast<ScreenPlacement*>(0x10843F0);
|
||||
ScreenPlacement* scrPlaceView = reinterpret_cast<ScreenPlacement*>(0x1084378);
|
||||
|
||||
clientActive_t* clients = reinterpret_cast<clientActive_t*>(0xB2C698);
|
||||
|
||||
cg_s* cgArray = reinterpret_cast<cg_s*>(0x7F0F78);
|
||||
|
||||
PlayerKeyState* playerKeys = reinterpret_cast<PlayerKeyState*>(0xA1B7D0);
|
||||
kbutton_t* playersKb = reinterpret_cast<kbutton_t*>(0xA1A9A8);
|
||||
AimAssistGlobals* aaGlobArray = reinterpret_cast<AimAssistGlobals*>(0x7A2110);
|
||||
|
||||
keyname_t* keyNames = reinterpret_cast<keyname_t*>(0x798580);
|
||||
keyname_t* localizedKeyNames = reinterpret_cast<keyname_t*>(0x798880);
|
||||
|
||||
GraphFloat* aaInputGraph = reinterpret_cast<GraphFloat*>(0x7A2FC0);
|
||||
|
||||
XAssetHeader ReallocateAssetPool(XAssetType type, unsigned int newSize)
|
||||
{
|
||||
@ -642,7 +677,7 @@ namespace Game
|
||||
{
|
||||
if (client->state < 5)
|
||||
{
|
||||
Components::Network::SendCommand(client->addr, "error", reason);
|
||||
Components::Network::SendCommand(client->netchan.remoteAddress, "error", reason);
|
||||
}
|
||||
|
||||
SV_KickClient(client, reason.data());
|
||||
@ -730,12 +765,31 @@ namespace Game
|
||||
return atoi(StringTable_Lookup(rankTable, 0, maxrank, 7));
|
||||
}
|
||||
|
||||
void Vec3Normalize(vec3_t& vec)
|
||||
float Vec2Normalize(vec2_t& vec)
|
||||
{
|
||||
const float length = static_cast<float>(std::sqrt(std::pow(vec[0], 2) + std::pow(vec[1], 2) + std::pow(vec[2], 2)));
|
||||
vec[0] /= length;
|
||||
vec[1] /= length;
|
||||
vec[2] /= length;
|
||||
const float length = std::sqrt((vec[0] * vec[0]) + (vec[1] * vec[1]));
|
||||
|
||||
if(length > 0.0f)
|
||||
{
|
||||
vec[0] /= length;
|
||||
vec[1] /= length;
|
||||
}
|
||||
|
||||
return length;
|
||||
}
|
||||
|
||||
float Vec3Normalize(vec3_t& vec)
|
||||
{
|
||||
const float length = std::sqrt(std::pow(vec[0], 2.0f) + std::pow(vec[1], 2.0f) + std::pow(vec[2], 2.0f));
|
||||
|
||||
if(length > 0.0f)
|
||||
{
|
||||
vec[0] /= length;
|
||||
vec[1] /= length;
|
||||
vec[2] /= length;
|
||||
}
|
||||
|
||||
return length;
|
||||
}
|
||||
|
||||
void Vec2UnpackTexCoords(const PackedTexCoords in, vec2_t* out)
|
||||
@ -933,7 +987,25 @@ namespace Game
|
||||
Game::R_AddDebugLine(color, v[3], v[7]);
|
||||
}
|
||||
|
||||
float GraphGetValueFromFraction(const int knotCount, const float(*knots)[2], const float fraction)
|
||||
{
|
||||
for (auto knotIndex = 1; knotIndex < knotCount; ++knotIndex)
|
||||
{
|
||||
if (knots[knotIndex][0] >= fraction)
|
||||
{
|
||||
const auto adjustedFraction = (fraction - knots[knotIndex - 1][0]) / (knots[knotIndex][0] - knots[knotIndex - 1][0]);
|
||||
|
||||
return (knots[knotIndex][1] - knots[knotIndex - 1][1]) * adjustedFraction + knots[knotIndex - 1][1];
|
||||
}
|
||||
}
|
||||
|
||||
return -1.0f;
|
||||
}
|
||||
|
||||
float GraphFloat_GetValue(const GraphFloat* graph, const float fraction)
|
||||
{
|
||||
return GraphGetValueFromFraction(graph->knotCount, graph->knots, fraction) * graph->scale;
|
||||
}
|
||||
|
||||
#pragma optimize("", off)
|
||||
__declspec(naked) float UI_GetScoreboardLeft(void* /*a1*/)
|
||||
@ -998,6 +1070,21 @@ namespace Game
|
||||
}
|
||||
}
|
||||
|
||||
bool PM_IsAdsAllowed(Game::playerState_s* playerState)
|
||||
{
|
||||
bool result;
|
||||
|
||||
__asm
|
||||
{
|
||||
mov esi, playerState
|
||||
mov ebx, 0x5755A0
|
||||
call ebx
|
||||
mov result, al // AL
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
__declspec(naked) void FS_AddLocalizedGameDirectory(const char* /*path*/, const char* /*dir*/)
|
||||
{
|
||||
__asm
|
||||
@ -1172,6 +1259,32 @@ namespace Game
|
||||
}
|
||||
}
|
||||
|
||||
void Menu_SetNextCursorItem(Game::UiContext* a1, Game::menuDef_t* a2, int unk)
|
||||
{
|
||||
__asm
|
||||
{
|
||||
push unk
|
||||
push a2
|
||||
mov eax, a1
|
||||
mov ebx, 0x639FE0
|
||||
call ebx
|
||||
add esp, 0x8 // 2 args = 2x4
|
||||
}
|
||||
}
|
||||
|
||||
void Menu_SetPrevCursorItem(Game::UiContext* a1, Game::menuDef_t* a2, int unk)
|
||||
{
|
||||
__asm
|
||||
{
|
||||
push unk
|
||||
push a2
|
||||
mov eax, a1
|
||||
mov ebx, 0x639F20
|
||||
call ebx
|
||||
add esp, 0x8 // 2 args = 2x4
|
||||
}
|
||||
}
|
||||
|
||||
__declspec(naked) void R_AddDebugLine(float* /*color*/, float* /*v1*/, float* /*v2*/)
|
||||
{
|
||||
__asm
|
||||
@ -1232,7 +1345,6 @@ namespace Game
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__declspec(naked) Glyph* R_GetCharacterGlyph(Font_s* /*font*/, unsigned int /*letter*/)
|
||||
{
|
||||
__asm
|
||||
@ -1353,5 +1465,27 @@ namespace Game
|
||||
}
|
||||
}
|
||||
|
||||
__declspec(naked) void AimAssist_UpdateTweakables(int /*localClientNum*/)
|
||||
{
|
||||
__asm
|
||||
{
|
||||
mov eax,[esp+0x4]
|
||||
mov ebx,0x569950
|
||||
call ebx
|
||||
retn
|
||||
}
|
||||
}
|
||||
|
||||
__declspec(naked) void AimAssist_UpdateAdsLerp(const AimInput* /*aimInput*/)
|
||||
{
|
||||
__asm
|
||||
{
|
||||
mov eax, [esp + 0x4]
|
||||
mov ebx, 0x569AA0
|
||||
call ebx
|
||||
retn
|
||||
}
|
||||
}
|
||||
|
||||
#pragma optimize("", on)
|
||||
}
|
||||
|
@ -40,6 +40,9 @@ namespace Game
|
||||
typedef void*(__cdecl * BG_LoadWeaponDef_LoadObj_t)(const char* filename);
|
||||
extern BG_LoadWeaponDef_LoadObj_t BG_LoadWeaponDef_LoadObj;
|
||||
|
||||
typedef WeaponDef* (__cdecl * BG_GetWeaponDef_t)(int weaponIndex);
|
||||
extern BG_GetWeaponDef_t BG_GetWeaponDef;
|
||||
|
||||
typedef void(__cdecl * Cbuf_AddServerText_t)();
|
||||
extern Cbuf_AddServerText_t Cbuf_AddServerText;
|
||||
|
||||
@ -49,11 +52,26 @@ namespace Game
|
||||
typedef int(__cdecl * CG_GetClientNum_t)();
|
||||
extern CG_GetClientNum_t CG_GetClientNum;
|
||||
|
||||
typedef std::int32_t(__cdecl* CG_PlayBoltedEffect_t) (std::int32_t, FxEffectDef*, std::int32_t, std::uint32_t);
|
||||
typedef void(__cdecl * CG_NextWeapon_f_t)();
|
||||
extern CG_NextWeapon_f_t CG_NextWeapon_f;
|
||||
|
||||
typedef std::int32_t(__cdecl * CG_PlayBoltedEffect_t) (std::int32_t, FxEffectDef*, std::int32_t, std::uint32_t);
|
||||
extern CG_PlayBoltedEffect_t CG_PlayBoltedEffect;
|
||||
|
||||
typedef std::int32_t(__cdecl* CG_GetBoneIndex_t)(std::int32_t, std::uint32_t name, char* index);
|
||||
typedef std::int32_t(__cdecl * CG_GetBoneIndex_t)(std::int32_t, std::uint32_t name, char* index);
|
||||
extern CG_GetBoneIndex_t CG_GetBoneIndex;
|
||||
|
||||
typedef void(__cdecl * CG_ScoresDown_f_t)();
|
||||
extern CG_ScoresDown_f_t CG_ScoresDown_f;
|
||||
|
||||
typedef void(__cdecl * CG_ScoresUp_f_t)();
|
||||
extern CG_ScoresUp_f_t CG_ScoresUp_f;
|
||||
|
||||
typedef void(__cdecl * CG_ScrollScoreboardUp_t)(cg_s* cgameGlob);
|
||||
extern CG_ScrollScoreboardUp_t CG_ScrollScoreboardUp;
|
||||
|
||||
typedef void(__cdecl * CG_ScrollScoreboardDown_t)(cg_s* cgameGlob);
|
||||
extern CG_ScrollScoreboardDown_t CG_ScrollScoreboardDown;
|
||||
|
||||
typedef char*(__cdecl * CL_GetClientName_t)(int localClientNum, int index, char *buf, size_t size);
|
||||
extern CL_GetClientName_t CL_GetClientName;
|
||||
@ -235,15 +253,27 @@ namespace Game
|
||||
typedef dvar_t* (__cdecl * Dvar_RegisterColor_t)(const char* name, float r, float g, float b, float a, int flags, const char* description);
|
||||
extern Dvar_RegisterColor_t Dvar_RegisterColor;
|
||||
|
||||
typedef dvar_t*(__cdecl * Dvar_SetFromStringByName_t)(const char* cvar, const char* value);
|
||||
typedef dvar_t* (__cdecl * Dvar_SetFromStringByName_t)(const char* cvar, const char* value);
|
||||
extern Dvar_SetFromStringByName_t Dvar_SetFromStringByName;
|
||||
|
||||
typedef dvar_t*(__cdecl * Dvar_SetFromStringByNameFromSource_t)(const char* cvar, const char* value, DvarSetSource source);
|
||||
typedef dvar_t* (__cdecl * Dvar_SetFromStringByNameFromSource_t)(const char* cvar, const char* value, DvarSetSource source);
|
||||
extern Dvar_SetFromStringByNameFromSource_t Dvar_SetFromStringByNameFromSource;
|
||||
|
||||
typedef void(__cdecl * Dvar_SetStringByName_t)(const char* cvar, const char* value);
|
||||
typedef void (__cdecl * Dvar_SetStringByName_t)(const char* cvar, const char* value);
|
||||
extern Dvar_SetStringByName_t Dvar_SetStringByName;
|
||||
|
||||
typedef void (__cdecl * Dvar_SetString_t)(dvar_t* cvar, const char* value);
|
||||
extern Dvar_SetString_t Dvar_SetString;
|
||||
|
||||
typedef void (__cdecl * Dvar_SetBool_t)(dvar_t* cvar, bool enabled);
|
||||
extern Dvar_SetBool_t Dvar_SetBool;
|
||||
|
||||
typedef void (__cdecl * Dvar_SetFloat_t)(dvar_t* cvar, float value);
|
||||
extern Dvar_SetFloat_t Dvar_SetFloat;
|
||||
|
||||
typedef void (__cdecl * Dvar_SetInt_t)(dvar_t* cvar, int integer);
|
||||
extern Dvar_SetInt_t Dvar_SetInt;
|
||||
|
||||
typedef void(__cdecl * Dvar_GetUnpackedColorByName_t)(const char* name, float* color);
|
||||
extern Dvar_GetUnpackedColorByName_t Dvar_GetUnpackedColorByName;
|
||||
|
||||
@ -299,6 +329,9 @@ namespace Game
|
||||
typedef int(__cdecl * FS_Write_t)(const void* buffer, size_t size, int file);
|
||||
extern FS_Write_t FS_Write;
|
||||
|
||||
typedef int(__cdecl * FS_Printf_t)(int file, const char* fmt, ...);
|
||||
extern FS_Printf_t FS_Printf;
|
||||
|
||||
typedef int(__cdecl * FS_Read_t)(void* buffer, size_t size, int file);
|
||||
extern FS_Read_t FS_Read;
|
||||
|
||||
@ -342,6 +375,9 @@ namespace Game
|
||||
typedef void(__cdecl * Key_SetCatcher_t)(int localClientNum, int catcher);
|
||||
extern Key_SetCatcher_t Key_SetCatcher;
|
||||
|
||||
typedef bool(__cdecl * Key_IsKeyCatcherActive_t)(int localClientNum, int catcher);
|
||||
extern Key_IsKeyCatcherActive_t Key_IsKeyCatcherActive;
|
||||
|
||||
typedef void(__cdecl * LargeLocalInit_t)();
|
||||
extern LargeLocalInit_t LargeLocalInit;
|
||||
|
||||
@ -414,6 +450,15 @@ namespace Game
|
||||
typedef bool(__cdecl * Menus_MenuIsInStack_t)(UiContext *dc, menuDef_t *menu);
|
||||
extern Menus_MenuIsInStack_t Menus_MenuIsInStack;
|
||||
|
||||
typedef menuDef_t*(__cdecl * Menu_GetFocused_t)(UiContext* ctx);
|
||||
extern Menu_GetFocused_t Menu_GetFocused;
|
||||
|
||||
typedef void(__cdecl * Menu_HandleKey_t)(UiContext* ctx, menuDef_t* menu, Game::keyNum_t key, int down);
|
||||
extern Menu_HandleKey_t Menu_HandleKey;
|
||||
|
||||
typedef bool(__cdecl * UI_KeyEvent_t)(int clientNum, int key, int down);
|
||||
extern UI_KeyEvent_t UI_KeyEvent;
|
||||
|
||||
typedef void(__cdecl * MSG_Init_t)(msg_t *buf, char *data, int length);
|
||||
extern MSG_Init_t MSG_Init;
|
||||
|
||||
@ -423,6 +468,12 @@ namespace Game
|
||||
typedef int(__cdecl * MSG_ReadLong_t)(msg_t* msg);
|
||||
extern MSG_ReadLong_t MSG_ReadLong;
|
||||
|
||||
typedef int(__cdecl * MSG_ReadBit_t)(msg_t* msg);
|
||||
extern MSG_ReadBit_t MSG_ReadBit;
|
||||
|
||||
typedef int(__cdecl * MSG_ReadBits_t)(msg_t* msg, int bits);
|
||||
extern MSG_ReadBits_t MSG_ReadBits;
|
||||
|
||||
typedef short(__cdecl * MSG_ReadShort_t)(msg_t* msg);
|
||||
extern MSG_ReadShort_t MSG_ReadShort;
|
||||
|
||||
@ -450,10 +501,10 @@ namespace Game
|
||||
typedef void(__cdecl * MSG_WriteLong_t)(msg_t *msg, int c);
|
||||
extern MSG_WriteLong_t MSG_WriteLong;
|
||||
|
||||
typedef void(*MSG_WriteShort_t)(msg_t* msg, short s);
|
||||
typedef void(__cdecl * MSG_WriteShort_t)(msg_t* msg, short s);
|
||||
extern MSG_WriteShort_t MSG_WriteShort;
|
||||
|
||||
typedef void(*MSG_WriteString_t)(msg_t* msg, const char *str);
|
||||
typedef void(__cdecl * MSG_WriteString_t)(msg_t* msg, const char *str);
|
||||
extern MSG_WriteString_t MSG_WriteString;
|
||||
|
||||
typedef int(__cdecl * MSG_WriteBitsCompress_t)(bool trainHuffman, const char *from, char *to, int size);
|
||||
@ -743,6 +794,9 @@ namespace Game
|
||||
|
||||
typedef void(__cdecl * UI_AddMenuList_t)(UiContext *dc, MenuList *menuList, int close);
|
||||
extern UI_AddMenuList_t UI_AddMenuList;
|
||||
|
||||
typedef uiMenuCommand_t(__cdecl * UI_GetActiveMenu_t)(int localClientNum);
|
||||
extern UI_GetActiveMenu_t UI_GetActiveMenu;
|
||||
|
||||
typedef char* (__cdecl * UI_CheckStringTranslation_t)(char*, char*);
|
||||
extern UI_CheckStringTranslation_t UI_CheckStringTranslation;
|
||||
@ -779,6 +833,12 @@ namespace Game
|
||||
|
||||
typedef void (__cdecl * Vec3UnpackUnitVec_t)(PackedUnitVec, vec3_t *);
|
||||
extern Vec3UnpackUnitVec_t Vec3UnpackUnitVec;
|
||||
|
||||
typedef float(__cdecl * vectoyaw_t)(vec2_t* vec);
|
||||
extern vectoyaw_t vectoyaw;
|
||||
|
||||
typedef float(__cdecl * AngleNormalize360_t)(float val);
|
||||
extern AngleNormalize360_t AngleNormalize360;
|
||||
|
||||
typedef void(__cdecl * unzClose_t)(void* handle);
|
||||
extern unzClose_t unzClose;
|
||||
@ -807,6 +867,9 @@ namespace Game
|
||||
typedef void(__cdecl * Field_AdjustScroll_t)(ScreenPlacement* scrPlace, field_t* edit);
|
||||
extern Field_AdjustScroll_t Field_AdjustScroll;
|
||||
|
||||
typedef void(__cdecl * AimAssist_ApplyAutoMelee_t)(const AimInput* input, AimOutput* output);
|
||||
extern AimAssist_ApplyAutoMelee_t AimAssist_ApplyAutoMelee;
|
||||
|
||||
extern XAssetHeader* DB_XAssetPool;
|
||||
extern unsigned int* g_poolSize;
|
||||
|
||||
@ -820,6 +883,9 @@ namespace Game
|
||||
|
||||
extern cmd_function_t** cmd_functions;
|
||||
|
||||
extern float* cl_angles;
|
||||
extern float* cgameFOVSensitivityScale;
|
||||
|
||||
extern int* svs_time;
|
||||
extern int* svs_numclients;
|
||||
extern client_t* svs_clients;
|
||||
@ -904,11 +970,27 @@ namespace Game
|
||||
extern sharedUiInfo_t* sharedUiInfo;
|
||||
extern ScreenPlacement* scrPlaceFull;
|
||||
extern ScreenPlacement* scrPlaceView;
|
||||
|
||||
extern clientActive_t* clients;
|
||||
|
||||
extern cg_s* cgArray;
|
||||
|
||||
extern PlayerKeyState* playerKeys;
|
||||
extern kbutton_t* playersKb;
|
||||
extern AimAssistGlobals* aaGlobArray;
|
||||
|
||||
constexpr auto KEY_NAME_COUNT = 95;
|
||||
constexpr auto LOCALIZED_KEY_NAME_COUNT = 95;
|
||||
extern keyname_t* keyNames;
|
||||
extern keyname_t* localizedKeyNames;
|
||||
|
||||
constexpr auto AIM_ASSIST_GRAPH_COUNT = 4u;
|
||||
extern GraphFloat* aaInputGraph;
|
||||
|
||||
XAssetHeader ReallocateAssetPool(XAssetType type, unsigned int newSize);
|
||||
void Menu_FreeItemMemory(Game::itemDef_s* item);
|
||||
void Menu_SetNextCursorItem(Game::UiContext* ctx, Game::menuDef_t* currentMenu, int unk = 1);
|
||||
void Menu_SetPrevCursorItem(Game::UiContext* ctx, Game::menuDef_t* currentMenu, int unk = 1);
|
||||
const char* TableLookup(StringTable* stringtable, int row, int column);
|
||||
const char* UI_LocalizeMapName(const char* mapName);
|
||||
const char* UI_LocalizeGameType(const char* gameType);
|
||||
@ -924,6 +1006,8 @@ namespace Game
|
||||
|
||||
void FS_AddLocalizedGameDirectory(const char *path, const char *dir);
|
||||
|
||||
bool PM_IsAdsAllowed(Game::playerState_s* playerState);
|
||||
|
||||
void ShowMessageBox(const std::string& message, const std::string& title);
|
||||
|
||||
unsigned int R_HashString(const char* string);
|
||||
@ -953,7 +1037,8 @@ namespace Game
|
||||
|
||||
void Image_Setup(GfxImage* image, unsigned int width, unsigned int height, unsigned int depth, unsigned int flags, _D3DFORMAT format);
|
||||
|
||||
void Vec3Normalize(vec3_t& vec);
|
||||
float Vec2Normalize(vec2_t& vec);
|
||||
float Vec3Normalize(vec3_t& vec);
|
||||
void Vec2UnpackTexCoords(const PackedTexCoords in, vec2_t* out);
|
||||
void MatrixVecMultiply(const float(&mulMat)[3][3], const vec3_t& mulVec, vec3_t& solution);
|
||||
void QuatRot(vec3_t* vec, const vec4_t* quat);
|
||||
@ -970,4 +1055,10 @@ namespace Game
|
||||
void RB_DrawChar(Material* material, float x, float y, float w, float h, float sinAngle, float cosAngle, Glyph* glyph, unsigned int color);
|
||||
void RB_DrawStretchPicRotate(Material* material, float x, float y, float w, float h, float s0, float t0, float s1, float t1, float sinAngle, float cosAngle, unsigned int color);
|
||||
char ModulateByteColors(char colorA, char colorB);
|
||||
|
||||
float GraphGetValueFromFraction(int knotCount, const float(*knots)[2], float fraction);
|
||||
float GraphFloat_GetValue(const GraphFloat* graph, const float fraction);
|
||||
|
||||
void AimAssist_UpdateTweakables(int localClientNum);
|
||||
void AimAssist_UpdateAdsLerp(const AimInput* input);
|
||||
}
|
||||
|
1446
src/Game/Structs.hpp
1446
src/Game/Structs.hpp
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user