2022-02-27 07:53:44 -05:00
|
|
|
#include <STDInclude.hpp>
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2022-08-23 06:58:33 -04:00
|
|
|
// Unsorted function definitions
|
2017-01-19 16:23:59 -05:00
|
|
|
namespace Game
|
|
|
|
{
|
2017-03-28 08:09:24 -04:00
|
|
|
AngleVectors_t AngleVectors = AngleVectors_t(0x4691A0);
|
|
|
|
|
2022-08-27 17:19:09 -04:00
|
|
|
Cbuf_AddServerText_f_t Cbuf_AddServerText_f = Cbuf_AddServerText_f_t(0x4BB9B0);
|
2017-01-20 16:41:03 -05:00
|
|
|
Cbuf_AddText_t Cbuf_AddText = Cbuf_AddText_t(0x404B20);
|
2022-02-07 07:28:17 -05:00
|
|
|
Cbuf_InsertText_t Cbuf_InsertText = Cbuf_InsertText_t(0x4940B0);
|
2017-01-20 16:41:03 -05:00
|
|
|
|
2022-11-03 20:28:44 -04:00
|
|
|
CG_DrawDisconnect_t CG_DrawDisconnect = CG_DrawDisconnect_t(0x454A70);
|
2021-01-03 03:33:12 -05:00
|
|
|
CG_NextWeapon_f_t CG_NextWeapon_f = CG_NextWeapon_f_t(0x449DE0);
|
2017-01-20 16:41:03 -05:00
|
|
|
CG_GetClientNum_t CG_GetClientNum = CG_GetClientNum_t(0x433700);
|
2022-08-23 06:58:33 -04:00
|
|
|
CG_PlayBoltedEffect_t CG_PlayBoltedEffect = CG_PlayBoltedEffect_t(0x430E10);
|
|
|
|
CG_GetBoneIndex_t CG_GetBoneIndex = CG_GetBoneIndex_t(0x504F20);
|
2021-09-04 05:15:34 -04:00
|
|
|
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);
|
2022-04-12 08:34:51 -04:00
|
|
|
CG_GetTeamName_t CG_GetTeamName = CG_GetTeamName_t(0x4B6210);
|
|
|
|
CG_SetupWeaponDef_t CG_SetupWeaponDef = CG_SetupWeaponDef_t(0x4BD520);
|
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
Cmd_AddCommand_t Cmd_AddCommand = Cmd_AddCommand_t(0x470090);
|
|
|
|
Cmd_AddServerCommand_t Cmd_AddServerCommand = Cmd_AddServerCommand_t(0x4DCE00);
|
|
|
|
Cmd_ExecuteSingleCommand_t Cmd_ExecuteSingleCommand = Cmd_ExecuteSingleCommand_t(0x609540);
|
|
|
|
|
|
|
|
Con_DrawMiniConsole_t Con_DrawMiniConsole = Con_DrawMiniConsole_t(0x464F30);
|
|
|
|
Con_DrawSolidConsole_t Con_DrawSolidConsole = Con_DrawSolidConsole_t(0x5A5040);
|
2021-09-21 16:04:19 -04:00
|
|
|
Con_CancelAutoComplete_t Con_CancelAutoComplete = Con_CancelAutoComplete_t(0x435580);
|
2017-01-20 16:41:03 -05:00
|
|
|
|
|
|
|
DB_AllocStreamPos_t DB_AllocStreamPos = DB_AllocStreamPos_t(0x418380);
|
|
|
|
DB_PushStreamPos_t DB_PushStreamPos = DB_PushStreamPos_t(0x458A20);
|
|
|
|
DB_PopStreamPos_t DB_PopStreamPos = DB_PopStreamPos_t(0x4D1D60);
|
|
|
|
|
|
|
|
Encode_Init_t Encode_Init = Encode_Init_t(0x462AB0);
|
|
|
|
|
|
|
|
Field_Clear_t Field_Clear = Field_Clear_t(0x437EB0);
|
|
|
|
|
|
|
|
FreeMemory_t FreeMemory = FreeMemory_t(0x4D6640);
|
2021-10-03 16:23:26 -04:00
|
|
|
Free_String_t Free_String = Free_String_t(0x470E80);
|
2017-01-20 16:41:03 -05:00
|
|
|
|
2022-04-12 08:34:51 -04:00
|
|
|
Svcmd_EntityList_f_t Svcmd_EntityList_f = Svcmd_EntityList_f_t(0x4B6A70);
|
2017-01-20 16:41:03 -05:00
|
|
|
|
|
|
|
GScr_LoadGameTypeScript_t GScr_LoadGameTypeScript = GScr_LoadGameTypeScript_t(0x4ED9A0);
|
|
|
|
|
|
|
|
Image_LoadFromFileWithReader_t Image_LoadFromFileWithReader = Image_LoadFromFileWithReader_t(0x53ABF0);
|
|
|
|
Image_Release_t Image_Release = Image_Release_t(0x51F010);
|
|
|
|
|
2017-05-30 18:27:08 -04:00
|
|
|
Info_ValueForKey_t Info_ValueForKey = Info_ValueForKey_t(0x47C820);
|
2022-11-08 20:31:46 -05:00
|
|
|
Info_Validate_t Info_Validate = Info_Validate_t(0x436AE0);
|
2017-05-30 18:27:08 -04:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
Key_SetCatcher_t Key_SetCatcher = Key_SetCatcher_t(0x43BD00);
|
2021-09-21 16:04:19 -04:00
|
|
|
Key_RemoveCatcher_t Key_RemoveCatcher = Key_RemoveCatcher_t(0x408260);
|
2022-11-28 17:04:57 -05:00
|
|
|
Key_IsCatcherActive_t Key_IsCatcherActive = Key_IsCatcherActive_t(0x4DA010);
|
2022-05-05 15:36:27 -04:00
|
|
|
Key_SetBinding_t Key_SetBinding = Key_SetBinding_t(0x494C90);
|
2017-01-20 16:41:03 -05:00
|
|
|
|
|
|
|
LargeLocalInit_t LargeLocalInit = LargeLocalInit_t(0x4A62A0);
|
|
|
|
|
|
|
|
Load_Stream_t Load_Stream = Load_Stream_t(0x470E30);
|
|
|
|
Load_XString_t Load_XString = Load_XString_t(0x47FDA0);
|
|
|
|
Load_XModelPtr_t Load_XModelPtr = Load_XModelPtr_t(0x4FCA70);
|
|
|
|
Load_XModelSurfsFixup_t Load_XModelSurfsFixup = Load_XModelSurfsFixup_t(0x40D7A0);
|
|
|
|
Load_XStringArray_t Load_XStringArray = Load_XStringArray_t(0x4977F0);
|
|
|
|
Load_XStringCustom_t Load_XStringCustom = Load_XStringCustom_t(0x4E0DD0);
|
|
|
|
Load_FxEffectDefHandle_t Load_FxEffectDefHandle = Load_FxEffectDefHandle_t(0x4D9B90);
|
|
|
|
Load_FxElemDef_t Load_FxElemDef = Load_FxElemDef_t(0x45AD90);
|
|
|
|
Load_GfxImagePtr_t Load_GfxImagePtr = Load_GfxImagePtr_t(0x4C13D0);
|
|
|
|
Load_Texture_t Load_Texture = Load_Texture_t(0x51F4E0);
|
|
|
|
Load_GfxTextureLoad_t Load_GfxTextureLoad = Load_GfxTextureLoad_t(0x4D3210);
|
|
|
|
Load_SndAliasCustom_t Load_SndAliasCustom = Load_SndAliasCustom_t(0x49B6B0);
|
|
|
|
Load_MaterialHandle_t Load_MaterialHandle = Load_MaterialHandle_t(0x403960);
|
|
|
|
Load_PhysCollmapPtr_t Load_PhysCollmapPtr = Load_PhysCollmapPtr_t(0x47E990);
|
|
|
|
Load_PhysPresetPtr_t Load_PhysPresetPtr = Load_PhysPresetPtr_t(0x4FAD30);
|
|
|
|
Load_TracerDefPtr_t Load_TracerDefPtr = Load_TracerDefPtr_t(0x493090);
|
|
|
|
Load_snd_alias_list_nameArray_t Load_snd_alias_list_nameArray = Load_snd_alias_list_nameArray_t(0x4499F0);
|
|
|
|
|
|
|
|
Menus_CloseAll_t Menus_CloseAll = Menus_CloseAll_t(0x4BA5B0);
|
2022-04-15 08:50:22 -04:00
|
|
|
Menus_CloseRequest_t Menus_CloseRequest = Menus_CloseRequest_t(0x430D50);
|
2017-01-20 16:41:03 -05:00
|
|
|
Menus_OpenByName_t Menus_OpenByName = Menus_OpenByName_t(0x4CCE60);
|
|
|
|
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);
|
2021-05-04 09:47:46 -04:00
|
|
|
Menu_HandleKey_t Menu_HandleKey = Menu_HandleKey_t(0x4C4A00);
|
|
|
|
Menu_GetFocused_t Menu_GetFocused = Menu_GetFocused_t(0x4AFF10);
|
2022-11-30 19:00:18 -05:00
|
|
|
Menu_Setup_t Menu_Setup = Menu_Setup_t(0x415AD0);
|
2017-01-20 16:41:03 -05:00
|
|
|
|
|
|
|
MSG_Init_t MSG_Init = MSG_Init_t(0x45FCA0);
|
2021-01-02 20:06:40 -05:00
|
|
|
MSG_ReadBit_t MSG_ReadBit = MSG_ReadBit_t(0x476D20);
|
|
|
|
MSG_ReadBits_t MSG_ReadBits = MSG_ReadBits_t(0x4C3900);
|
2017-01-20 16:41:03 -05:00
|
|
|
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);
|
|
|
|
MSG_ReadInt64_t MSG_ReadInt64 = MSG_ReadInt64_t(0x4F1850);
|
|
|
|
MSG_ReadString_t MSG_ReadString = MSG_ReadString_t(0x60E2B0);
|
2017-05-30 15:49:13 -04:00
|
|
|
MSG_ReadStringLine_t MSG_ReadStringLine = MSG_ReadStringLine_t(0x4FEF30);
|
2017-01-20 16:41:03 -05:00
|
|
|
MSG_WriteByte_t MSG_WriteByte = MSG_WriteByte_t(0x48C520);
|
|
|
|
MSG_WriteData_t MSG_WriteData = MSG_WriteData_t(0x4F4120);
|
|
|
|
MSG_WriteLong_t MSG_WriteLong = MSG_WriteLong_t(0x41CA20);
|
2017-02-25 19:36:37 -05:00
|
|
|
MSG_WriteShort_t MSG_WriteShort = MSG_WriteShort_t(0x503B90);
|
|
|
|
MSG_WriteString_t MSG_WriteString = MSG_WriteString_t(0x463820);
|
2022-08-10 18:21:58 -04:00
|
|
|
MSG_ReadDeltaUsercmdKey_t MSG_ReadDeltaUsercmdKey = MSG_ReadDeltaUsercmdKey_t(0x491F00);
|
2017-01-20 16:41:03 -05:00
|
|
|
MSG_WriteBitsCompress_t MSG_WriteBitsCompress = MSG_WriteBitsCompress_t(0x4319D0);
|
|
|
|
MSG_ReadByte_t MSG_ReadByte = MSG_ReadByte_t(0x4C1C20);
|
|
|
|
MSG_ReadBitsCompress_t MSG_ReadBitsCompress = MSG_ReadBitsCompress_t(0x4DCC30);
|
|
|
|
|
|
|
|
NetadrToSockadr_t NetadrToSockadr = NetadrToSockadr_t(0x4B4B40);
|
|
|
|
|
|
|
|
NET_AdrToString_t NET_AdrToString = NET_AdrToString_t(0x469880);
|
|
|
|
NET_CompareAdr_t NET_CompareAdr = NET_CompareAdr_t(0x4D0AA0);
|
2020-11-14 01:54:29 -05:00
|
|
|
NET_DeferPacketToClient_t NET_DeferPacketToClient = NET_DeferPacketToClient_t(0x4C8AA0);
|
2017-01-20 16:41:03 -05:00
|
|
|
NET_ErrorString_t NET_ErrorString = NET_ErrorString_t(0x4E7720);
|
|
|
|
NET_Init_t NET_Init = NET_Init_t(0x491860);
|
|
|
|
NET_IsLocalAddress_t NET_IsLocalAddress = NET_IsLocalAddress_t(0x402BD0);
|
|
|
|
NET_StringToAdr_t NET_StringToAdr = NET_StringToAdr_t(0x409010);
|
|
|
|
NET_OutOfBandPrint_t NET_OutOfBandPrint = NET_OutOfBandPrint_t(0x4AEF00);
|
|
|
|
NET_OutOfBandData_t NET_OutOfBandData = NET_OutOfBandData_t(0x49C7E0);
|
2022-08-13 11:19:45 -04:00
|
|
|
NET_OutOfBandVoiceData_t NET_OutOfBandVoiceData = NET_OutOfBandVoiceData_t(0x4FCC90);
|
2017-01-20 16:41:03 -05:00
|
|
|
|
|
|
|
Live_MPAcceptInvite_t Live_MPAcceptInvite = Live_MPAcceptInvite_t(0x420A6D);
|
|
|
|
Live_GetMapIndex_t Live_GetMapIndex = Live_GetMapIndex_t(0x4F6440);
|
2017-01-29 09:10:54 -05:00
|
|
|
Live_GetPrestige_t Live_GetPrestige = Live_GetPrestige_t(0x430F90);
|
|
|
|
Live_GetXp_t Live_GetXp = Live_GetXp_t(0x404C60);
|
2022-08-02 17:04:02 -04:00
|
|
|
Live_GetLocalClientName_t Live_GetLocalClientName = Live_GetLocalClientName_t(0x441FC0);
|
2017-01-20 16:41:03 -05:00
|
|
|
|
2022-07-16 17:24:26 -04:00
|
|
|
LiveStorage_GetStat_t LiveStorage_GetStat = LiveStorage_GetStat_t(0x471F60);
|
2022-09-13 14:39:45 -04:00
|
|
|
LiveStorage_SetStat_t LiveStorage_SetStat = LiveStorage_SetStat_t(0x4CC5D0);
|
2022-07-16 17:24:26 -04:00
|
|
|
|
2022-07-07 09:32:18 -04:00
|
|
|
Scr_AddSourceBuffer_t Scr_AddSourceBuffer = Scr_AddSourceBuffer_t(0x61ABC0);
|
2017-01-20 16:41:03 -05:00
|
|
|
|
|
|
|
PC_ReadToken_t PC_ReadToken = PC_ReadToken_t(0x4ACCD0);
|
|
|
|
PC_ReadTokenHandle_t PC_ReadTokenHandle = PC_ReadTokenHandle_t(0x4D2060);
|
|
|
|
PC_SourceError_t PC_SourceError = PC_SourceError_t(0x467A00);
|
|
|
|
|
|
|
|
Party_GetMaxPlayers_t Party_GetMaxPlayers = Party_GetMaxPlayers_t(0x4F5D60);
|
|
|
|
PartyHost_CountMembers_t PartyHost_CountMembers = PartyHost_CountMembers_t(0x497330);
|
|
|
|
PartyHost_GetMemberAddressBySlot_t PartyHost_GetMemberAddressBySlot = PartyHost_GetMemberAddressBySlot_t(0x44E100);
|
|
|
|
PartyHost_GetMemberName_t PartyHost_GetMemberName = PartyHost_GetMemberName_t(0x44BE90);
|
2022-08-13 11:19:45 -04:00
|
|
|
Party_InParty_t Party_InParty = Party_InParty_t(0x4F10C0);
|
2017-01-20 16:41:03 -05:00
|
|
|
|
|
|
|
Playlist_ParsePlaylists_t Playlist_ParsePlaylists = Playlist_ParsePlaylists_t(0x4295A0);
|
|
|
|
|
|
|
|
R_AddCmdDrawStretchPic_t R_AddCmdDrawStretchPic = R_AddCmdDrawStretchPic_t(0x509770);
|
|
|
|
R_AllocStaticIndexBuffer_t R_AllocStaticIndexBuffer = R_AllocStaticIndexBuffer_t(0x51E7A0);
|
|
|
|
R_Cinematic_StartPlayback_Now_t R_Cinematic_StartPlayback_Now = R_Cinematic_StartPlayback_Now_t(0x51C5B0);
|
|
|
|
R_RegisterFont_t R_RegisterFont = R_RegisterFont_t(0x505670);
|
|
|
|
R_AddCmdDrawText_t R_AddCmdDrawText = R_AddCmdDrawText_t(0x509D80);
|
|
|
|
R_LoadGraphicsAssets_t R_LoadGraphicsAssets = R_LoadGraphicsAssets_t(0x506AC0);
|
|
|
|
R_TextWidth_t R_TextWidth = R_TextWidth_t(0x5056C0);
|
|
|
|
R_TextHeight_t R_TextHeight = R_TextHeight_t(0x505770);
|
|
|
|
R_FlushSun_t R_FlushSun = R_FlushSun_t(0x53FB50);
|
2017-03-27 11:48:52 -04:00
|
|
|
R_SortWorldSurfaces_t R_SortWorldSurfaces = R_SortWorldSurfaces_t(0x53DC10);
|
2017-01-20 16:41:03 -05:00
|
|
|
|
|
|
|
Script_Alloc_t Script_Alloc = Script_Alloc_t(0x422E70);
|
|
|
|
Script_SetupTokens_t Script_SetupTokens = Script_SetupTokens_t(0x4E6950);
|
|
|
|
Script_CleanString_t Script_CleanString = Script_CleanString_t(0x498220);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
SE_Load_t SE_Load = SE_Load_t(0x502A30);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
SEH_StringEd_GetString_t SEH_StringEd_GetString = SEH_StringEd_GetString_t(0x44BB30);
|
2021-09-04 20:25:24 -04:00
|
|
|
SEH_ReadCharFromString_t SEH_ReadCharFromString = SEH_ReadCharFromString_t(0x486560);
|
2022-06-13 12:08:44 -04:00
|
|
|
SEH_GetCurrentLanguage_t SEH_GetCurrentLanguage = SEH_GetCurrentLanguage_t(0x4F6110);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-02-18 05:39:01 -05:00
|
|
|
Dvar_SetFromStringByName_t Dvar_SetFromStringByName = Dvar_SetFromStringByName_t(0x4F52E0);
|
|
|
|
Dvar_SetFromStringByNameFromSource_t Dvar_SetFromStringByNameFromSource = Dvar_SetFromStringByNameFromSource_t(0x4FC770);
|
2017-01-20 16:41:03 -05:00
|
|
|
Dvar_SetStringByName_t Dvar_SetStringByName = Dvar_SetStringByName_t(0x44F060);
|
2021-08-31 12:12:25 -04:00
|
|
|
Dvar_SetString_t Dvar_SetString = Dvar_SetString_t(0x4A9580);
|
2021-09-01 17:19:44 -04:00
|
|
|
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);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
SND_Init_t SND_Init = SND_Init_t(0x46A630);
|
|
|
|
SND_InitDriver_t SND_InitDriver = SND_InitDriver_t(0x4F5090);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
SockadrToNetadr_t SockadrToNetadr = SockadrToNetadr_t(0x4F8460);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
Steam_JoinLobby_t Steam_JoinLobby = Steam_JoinLobby_t(0x49CF70);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-02-28 05:40:33 -05:00
|
|
|
StringTable_Lookup_t StringTable_Lookup = StringTable_Lookup_t(0x42F0E0);
|
2022-03-21 14:55:35 -04:00
|
|
|
StringTable_GetColumnValueForRow_t StringTable_GetColumnValueForRow = StringTable_GetColumnValueForRow_t(0x4F2C80);
|
2017-06-29 18:35:04 -04:00
|
|
|
StringTable_HashString_t StringTable_HashString = StringTable_HashString_t(0x475EB0);
|
2017-02-28 05:40:33 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
TeleportPlayer_t TeleportPlayer = TeleportPlayer_t(0x496850);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
UI_AddMenuList_t UI_AddMenuList = UI_AddMenuList_t(0x4533C0);
|
2021-08-23 16:45:22 -04:00
|
|
|
UI_GetActiveMenu_t UI_GetActiveMenu = UI_GetActiveMenu_t(0x4BE790);
|
2017-01-20 16:41:03 -05:00
|
|
|
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);
|
2017-01-21 16:14:23 -05:00
|
|
|
UI_SortArenas_t UI_SortArenas = UI_SortArenas_t(0x630AE0);
|
2017-01-20 16:41:03 -05:00
|
|
|
UI_DrawHandlePic_t UI_DrawHandlePic = UI_DrawHandlePic_t(0x4D0EA0);
|
2021-09-07 19:53:25 -04:00
|
|
|
ScrPlace_GetActivePlacement_t ScrPlace_GetActivePlacement = ScrPlace_GetActivePlacement_t(0x4F8940);
|
2017-01-20 16:41:03 -05:00
|
|
|
UI_TextWidth_t UI_TextWidth = UI_TextWidth_t(0x6315C0);
|
2022-04-15 08:50:22 -04:00
|
|
|
UI_TextHeight_t UI_TextHeight = UI_TextHeight_t(0x4C8630);
|
2017-01-20 16:41:03 -05:00
|
|
|
UI_DrawText_t UI_DrawText = UI_DrawText_t(0x49C0D0);
|
2021-09-08 09:53:05 -04:00
|
|
|
UI_GetFontHandle_t UI_GetFontHandle = UI_GetFontHandle_t(0x4AEA60);
|
2021-09-07 19:53:25 -04:00
|
|
|
ScrPlace_ApplyRect_t ScrPlace_ApplyRect = ScrPlace_ApplyRect_t(0x454E20);
|
2021-05-04 09:47:46 -04:00
|
|
|
UI_KeyEvent_t UI_KeyEvent = UI_KeyEvent_t(0x4970F0);
|
2021-09-21 14:05:30 -04:00
|
|
|
UI_SafeTranslateString_t UI_SafeTranslateString = UI_SafeTranslateString_t(0x4F1700);
|
|
|
|
UI_ReplaceConversions_t UI_ReplaceConversions = UI_ReplaceConversions_t(0x4E9740);
|
2022-08-24 17:46:07 -04:00
|
|
|
UI_ParseInfos_t UI_ParseInfos = UI_ParseInfos_t(0x4027A0);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
Win_GetLanguage_t Win_GetLanguage = Win_GetLanguage_t(0x45CBA0);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
Vec3UnpackUnitVec_t Vec3UnpackUnitVec = Vec3UnpackUnitVec_t(0x45CA90);
|
2021-08-24 11:20:52 -04:00
|
|
|
vectoyaw_t vectoyaw = vectoyaw_t(0x45AD10);
|
|
|
|
AngleNormalize360_t AngleNormalize360 = AngleNormalize360_t(0x438DC0);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-04-06 16:22:30 -04:00
|
|
|
unzClose_t unzClose = unzClose_t(0x41BF20);
|
|
|
|
|
2021-09-04 20:25:24 -04:00
|
|
|
RB_DrawCursor_t RB_DrawCursor = RB_DrawCursor_t(0x534EA0);
|
|
|
|
|
2021-09-08 09:53:05 -04:00
|
|
|
R_NormalizedTextScale_t R_NormalizedTextScale = R_NormalizedTextScale_t(0x5056A0);
|
|
|
|
|
2021-09-08 10:44:39 -04:00
|
|
|
Material_Process2DTextureCoordsForAtlasing_t Material_Process2DTextureCoordsForAtlasing = Material_Process2DTextureCoordsForAtlasing_t(0x506090);
|
|
|
|
|
2021-09-04 20:25:24 -04:00
|
|
|
Byte4PackRgba_t Byte4PackRgba = Byte4PackRgba_t(0x4FE910);
|
2021-09-05 08:50:56 -04:00
|
|
|
RandWithSeed_t RandWithSeed = RandWithSeed_t(0x495580);
|
|
|
|
GetDecayingLetterInfo_t GetDecayingLetterInfo = GetDecayingLetterInfo_t(0x5351C0);
|
2021-09-04 20:25:24 -04:00
|
|
|
|
2021-09-07 18:31:56 -04:00
|
|
|
Field_Draw_t Field_Draw = Field_Draw_t(0x4F5B40);
|
2021-09-08 07:08:49 -04:00
|
|
|
Field_AdjustScroll_t Field_AdjustScroll = Field_AdjustScroll_t(0x488C10);
|
2021-08-25 13:42:41 -04:00
|
|
|
AimAssist_ApplyAutoMelee_t AimAssist_ApplyAutoMelee = AimAssist_ApplyAutoMelee_t(0x56A360);
|
2021-09-07 18:31:56 -04:00
|
|
|
|
2022-02-05 11:24:59 -05:00
|
|
|
Weapon_RocketLauncher_Fire_t Weapon_RocketLauncher_Fire = Weapon_RocketLauncher_Fire_t(0x424680);
|
|
|
|
|
2021-12-22 10:25:58 -05:00
|
|
|
Jump_ClearState_t Jump_ClearState = Jump_ClearState_t(0x04B3890);
|
|
|
|
PM_playerTrace_t PM_playerTrace = PM_playerTrace_t(0x458980);
|
|
|
|
PM_Trace_t PM_Trace = PM_Trace_t(0x441F60);
|
2022-01-07 06:20:43 -05:00
|
|
|
PM_GetEffectiveStance_t PM_GetEffectiveStance = PM_GetEffectiveStance_t(0x412540);
|
2022-08-10 18:21:58 -04:00
|
|
|
PM_UpdateLean_t PM_UpdateLean = PM_UpdateLean_t(0x43DED0);
|
2022-11-24 10:30:06 -05:00
|
|
|
PM_IsSprinting_t PM_IsSprinting = PM_IsSprinting_t(0x4B3830);
|
2021-12-22 10:25:58 -05:00
|
|
|
|
2022-04-29 04:56:51 -04:00
|
|
|
IN_RecenterMouse_t IN_RecenterMouse = IN_RecenterMouse_t(0x463D80);
|
|
|
|
|
|
|
|
IN_MouseMove_t IN_MouseMove = IN_MouseMove_t(0x64C490);
|
2022-04-29 10:26:14 -04:00
|
|
|
IN_Init_t IN_Init = IN_Init_t(0x45D620);
|
|
|
|
IN_Shutdown_t IN_Shutdown = IN_Shutdown_t(0x426360);
|
2022-04-29 04:56:51 -04:00
|
|
|
|
2022-06-04 13:59:52 -04:00
|
|
|
Touch_Item_t Touch_Item = Touch_Item_t(0x44FA20);
|
|
|
|
|
|
|
|
Add_Ammo_t Add_Ammo = Add_Ammo_t(0x4E1480);
|
|
|
|
|
2022-06-04 04:56:14 -04:00
|
|
|
ClientUserinfoChanged_t ClientUserinfoChanged = ClientUserinfoChanged_t(0x445240);
|
|
|
|
|
2022-05-27 06:30:43 -04:00
|
|
|
player_die_t player_die = player_die_t(0x42BC70);
|
|
|
|
|
2022-06-26 09:40:57 -04:00
|
|
|
Vec3Normalize_t Vec3Normalize = Vec3Normalize_t(0x453500);
|
|
|
|
Vec3NormalizeFast_t Vec3NormalizeFast = Vec3NormalizeFast_t(0x478F80);
|
|
|
|
Vec2Normalize_t Vec2Normalize = Vec2Normalize_t(0x416F70);
|
|
|
|
Vec2NormalizeFast_t Vec2NormalizeFast = Vec2NormalizeFast_t(0x5FC830);
|
|
|
|
|
2022-07-07 09:32:18 -04:00
|
|
|
Z_VirtualAlloc_t Z_VirtualAlloc = Z_VirtualAlloc_t(0x4CFBA0);
|
|
|
|
|
2022-07-16 18:15:15 -04:00
|
|
|
I_strncpyz_t I_strncpyz = I_strncpyz_t(0x4D6F80);
|
2022-08-21 12:52:54 -04:00
|
|
|
I_CleanStr_t I_CleanStr = I_CleanStr_t(0x4AD470);
|
2022-07-16 18:15:15 -04:00
|
|
|
|
2022-08-08 08:37:24 -04:00
|
|
|
XNAddrToString_t XNAddrToString = XNAddrToString_t(0x452690);
|
2022-08-14 11:15:45 -04:00
|
|
|
|
2022-08-13 11:19:45 -04:00
|
|
|
Voice_IncomingVoiceData_t Voice_IncomingVoiceData = Voice_IncomingVoiceData_t(0x5001A0);
|
2022-08-14 11:15:45 -04:00
|
|
|
Voice_IsClientTalking_t Voice_IsClientTalking = Voice_IsClientTalking_t(0x4D9D20);
|
2022-08-08 08:37:24 -04:00
|
|
|
|
2022-08-22 10:06:00 -04:00
|
|
|
LargeLocalBegin_t LargeLocalBegin = LargeLocalBegin_t(0x4127A0);
|
|
|
|
LargeLocalBeginRight_t LargeLocalBeginRight = LargeLocalBeginRight_t(0x644140);
|
|
|
|
|
2022-03-17 14:50:20 -04:00
|
|
|
CmdArgs* cmd_args = reinterpret_cast<CmdArgs*>(0x1AAC5D0);
|
|
|
|
CmdArgs* sv_cmd_args = reinterpret_cast<CmdArgs*>(0x1ACF8A0);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
cmd_function_t** cmd_functions = reinterpret_cast<cmd_function_t**>(0x1AAC658);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
source_t **sourceFiles = reinterpret_cast<source_t **>(0x7C4A98);
|
|
|
|
keywordHash_t **menuParseKeywordHash = reinterpret_cast<keywordHash_t **>(0x63AE928);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2021-01-04 02:16:31 -05:00
|
|
|
float* cgameFOVSensitivityScale = reinterpret_cast<float*>(0xB2F884);
|
2021-01-03 01:32:58 -05:00
|
|
|
|
2022-04-15 08:50:22 -04:00
|
|
|
UiContext* uiContext = reinterpret_cast<UiContext*>(0x62E2858);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
int* arenaCount = reinterpret_cast<int*>(0x62E6930);
|
|
|
|
mapArena_t* arenas = reinterpret_cast<mapArena_t*>(0x62E6934);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
int* gameTypeCount = reinterpret_cast<int*>(0x62E50A0);
|
|
|
|
gameTypeName_t* gameTypes = reinterpret_cast<gameTypeName_t*>(0x62E50A4);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
bool* g_lobbyCreateInProgress = reinterpret_cast<bool*>(0x66C9BC2);
|
2022-07-16 17:24:26 -04:00
|
|
|
PartyData* g_lobbyData = reinterpret_cast<PartyData*>(0x1081C00);
|
|
|
|
PartyData* g_partyData = reinterpret_cast<PartyData*>(0x107E500);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2022-08-13 11:19:45 -04:00
|
|
|
SessionData* g_serverSession = reinterpret_cast<SessionData*>(0x66B7008);
|
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
int* numIP = reinterpret_cast<int*>(0x64A1E68);
|
|
|
|
netIP_t* localIP = reinterpret_cast<netIP_t*>(0x64A1E28);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
int* demoFile = reinterpret_cast<int*>(0xA5EA1C);
|
|
|
|
int* demoPlaying = reinterpret_cast<int*>(0xA5EA0C);
|
|
|
|
int* demoRecording = reinterpret_cast<int*>(0xA5EA08);
|
|
|
|
int* serverMessageSequence = reinterpret_cast<int*>(0xA3E9B4);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
netadr_t* connectedHost = reinterpret_cast<netadr_t*>(0xA1E888);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
SOCKET* ip_socket = reinterpret_cast<SOCKET*>(0x64A3008);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
SafeArea* safeArea = reinterpret_cast<SafeArea*>(0xA15F3C);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
SpawnVar* spawnVars = reinterpret_cast<SpawnVar*>(0x1A83DE8);
|
|
|
|
MapEnts** marMapEntsPtr = reinterpret_cast<MapEnts**>(0x112AD34);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
IDirect3D9** d3d9 = reinterpret_cast<IDirect3D9**>(0x66DEF84);
|
|
|
|
IDirect3DDevice9** dx_ptr = reinterpret_cast<IDirect3DDevice9**>(0x66DEF88);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
mapname_t* mapnames = reinterpret_cast<mapname_t*>(0x7471D0);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
char*** varXString = reinterpret_cast<char***>(0x112B340);
|
|
|
|
TracerDef*** varTracerDefPtr = reinterpret_cast<TracerDef***>(0x112B3BC);
|
|
|
|
XModel*** varXModelPtr = reinterpret_cast<XModel***>(0x112A934);
|
|
|
|
XModel** varXModel = reinterpret_cast<XModel**>(0x112AE14);
|
|
|
|
PathData** varPathData = reinterpret_cast<PathData**>(0x112AD7C);
|
|
|
|
const char** varConstChar = reinterpret_cast<const char**>(0x112A774);
|
|
|
|
Material*** varMaterialHandle = reinterpret_cast<Material***>(0x112A878);
|
|
|
|
FxEffectDef*** varFxEffectDefHandle = reinterpret_cast<FxEffectDef***>(0x112ACC0);
|
|
|
|
PhysCollmap*** varPhysCollmapPtr = reinterpret_cast<PhysCollmap***>(0x112B440);
|
|
|
|
PhysPreset*** varPhysPresetPtr = reinterpret_cast<PhysPreset***>(0x112B378);
|
2022-06-04 16:16:55 -04:00
|
|
|
MaterialPass** varMaterialPass = reinterpret_cast<MaterialPass**>(0x112A960);
|
2017-01-20 16:41:03 -05:00
|
|
|
snd_alias_list_t*** varsnd_alias_list_name = reinterpret_cast<snd_alias_list_t***>(0x112AF38);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-01-20 16:41:03 -05:00
|
|
|
FxElemField* s_elemFields = reinterpret_cast<FxElemField*>(0x73B848);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2022-06-30 15:37:47 -04:00
|
|
|
visField_t* visionDefFields = reinterpret_cast<visField_t*>(0x7982F0); // Count 21
|
|
|
|
|
2017-04-24 15:13:54 -04:00
|
|
|
infoParm_t* infoParams = reinterpret_cast<infoParm_t*>(0x79D260); // Count 0x1E
|
|
|
|
|
2022-07-16 17:24:26 -04:00
|
|
|
clientState_t* clcState = reinterpret_cast<clientState_t*>(0xB2C540);
|
2020-12-04 16:18:30 -05:00
|
|
|
|
2021-04-02 09:23:18 -04:00
|
|
|
GfxScene* scene = reinterpret_cast<GfxScene*>(0x6944914);
|
|
|
|
|
2022-07-23 09:49:56 -04:00
|
|
|
Console* con = reinterpret_cast<Console*>(0x9FCCF8);
|
2021-09-07 18:31:56 -04:00
|
|
|
ConDrawInputGlob* conDrawInputGlob = reinterpret_cast<ConDrawInputGlob*>(0x9FD6F8);
|
2022-07-23 09:49:56 -04:00
|
|
|
|
|
|
|
int* g_console_field_width = reinterpret_cast<int*>(0x79854C);
|
|
|
|
float* g_console_char_height = reinterpret_cast<float*>(0x798550);
|
2021-09-07 18:31:56 -04:00
|
|
|
field_t* g_consoleField = reinterpret_cast<field_t*>(0xA1B6B0);
|
|
|
|
|
2021-09-08 07:08:49 -04:00
|
|
|
sharedUiInfo_t* sharedUiInfo = reinterpret_cast<sharedUiInfo_t*>(0x62E4B78);
|
|
|
|
ScreenPlacement* scrPlaceFull = reinterpret_cast<ScreenPlacement*>(0x10843F0);
|
2022-07-23 09:49:56 -04:00
|
|
|
ScreenPlacement* scrPlaceFullUnsafe = reinterpret_cast<ScreenPlacement*>(0x1084460);
|
2021-09-08 07:08:49 -04:00
|
|
|
ScreenPlacement* scrPlaceView = reinterpret_cast<ScreenPlacement*>(0x1084378);
|
2021-09-12 09:09:36 -04:00
|
|
|
|
|
|
|
clientActive_t* clients = reinterpret_cast<clientActive_t*>(0xB2C698);
|
|
|
|
|
2021-08-24 11:20:52 -04:00
|
|
|
cg_s* cgArray = reinterpret_cast<cg_s*>(0x7F0F78);
|
2021-09-19 09:49:12 -04:00
|
|
|
cgs_t* cgsArray = reinterpret_cast<cgs_t*>(0x7ED3B8);
|
2021-09-08 07:08:49 -04:00
|
|
|
|
|
|
|
PlayerKeyState* playerKeys = reinterpret_cast<PlayerKeyState*>(0xA1B7D0);
|
2021-09-11 10:34:04 -04:00
|
|
|
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);
|
2021-09-08 07:08:49 -04:00
|
|
|
|
2022-04-12 08:34:51 -04:00
|
|
|
const char* MY_CMDS = reinterpret_cast<const char*>(0x73C9C4); // Count 5
|
|
|
|
|
|
|
|
XModel** cached_models = reinterpret_cast<XModel**>(0x1AA20C8);
|
|
|
|
|
2022-05-05 05:20:10 -04:00
|
|
|
float (*CorrectSolidDeltas)[26][3] = reinterpret_cast<float(*)[26][3]>(0x739BB8); // Count 26
|
2021-12-22 10:25:58 -05:00
|
|
|
|
2022-04-15 06:16:12 -04:00
|
|
|
level_locals_t* level = reinterpret_cast<level_locals_t*>(0x1A831A8);
|
|
|
|
|
2022-05-05 05:20:10 -04:00
|
|
|
float (*penetrationDepthTable)[PENETRATE_TYPE_COUNT][SURF_TYPE_COUNT] = reinterpret_cast<float(*)[PENETRATE_TYPE_COUNT][SURF_TYPE_COUNT]>(0x7C4878);
|
2022-05-03 12:57:36 -04:00
|
|
|
|
2022-04-29 04:56:51 -04:00
|
|
|
WinMouseVars_t* s_wmv = reinterpret_cast<WinMouseVars_t*>(0x649D640);
|
|
|
|
|
2022-04-29 10:26:14 -04:00
|
|
|
int* window_center_x = reinterpret_cast<int*>(0x649D638);
|
|
|
|
int* window_center_y = reinterpret_cast<int*>(0x649D630);
|
|
|
|
|
2022-05-11 11:24:19 -04:00
|
|
|
DeferredQueue* deferredQueue = reinterpret_cast<DeferredQueue*>(0x1CC2CE8);
|
|
|
|
|
2022-05-05 15:24:25 -04:00
|
|
|
int* g_waitingForKey = reinterpret_cast<int*>(0x63A50FC);
|
|
|
|
|
2022-06-13 12:08:44 -04:00
|
|
|
Material** whiteMaterial = reinterpret_cast<Material**>(0x8EE4B8);
|
|
|
|
|
2022-06-04 16:16:55 -04:00
|
|
|
unsigned long* _tls_index = reinterpret_cast<unsigned long*>(0x66D94A8);
|
|
|
|
|
2022-06-12 17:07:53 -04:00
|
|
|
int* cls_uiStarted = reinterpret_cast<int*>(0xA7FFA0);
|
|
|
|
|
2022-07-16 17:24:26 -04:00
|
|
|
unsigned int* playerCardUIStringIndex = reinterpret_cast<unsigned int*>(0x62CD7A8);
|
|
|
|
char (*playerCardUIStringBuf)[PLAYER_CARD_UI_STRING_COUNT][38] = reinterpret_cast<char(*)[PLAYER_CARD_UI_STRING_COUNT][38]>(0x62CB4F8);
|
|
|
|
|
2022-08-24 10:38:14 -04:00
|
|
|
uiInfo_s* uiInfoArray = reinterpret_cast<uiInfo_s*>(0x62E2858);
|
|
|
|
|
2022-08-22 13:46:47 -04:00
|
|
|
int* logfile = reinterpret_cast<int*>(0x1AD8F28);
|
2022-08-02 17:04:02 -04:00
|
|
|
|
2022-07-16 17:24:26 -04:00
|
|
|
GamerSettingState* gamerSettings = reinterpret_cast<GamerSettingState*>(0x107D3E8);
|
|
|
|
|
2022-08-22 10:06:00 -04:00
|
|
|
unsigned char* g_largeLocalBuf = reinterpret_cast<unsigned char*>(0x63D9790);
|
|
|
|
int* g_largeLocalPos = reinterpret_cast<int*>(0x63D97B4);
|
|
|
|
int* g_largeLocalRightPos = reinterpret_cast<int*>(0x63D9780);
|
|
|
|
|
2022-08-24 17:46:07 -04:00
|
|
|
char** ui_arenaInfos = reinterpret_cast<char**>(0x62D2688);
|
|
|
|
int* ui_numArenas = reinterpret_cast<int*>(0x62D2788);
|
|
|
|
int* ui_arenaBufPos = reinterpret_cast<int*>(0x62D278C);
|
|
|
|
|
2017-01-19 16:23:59 -05:00
|
|
|
const char* TableLookup(StringTable* stringtable, int row, int column)
|
|
|
|
{
|
|
|
|
if (!stringtable || !stringtable->values || row >= stringtable->rowCount || column >= stringtable->columnCount) return "";
|
|
|
|
|
|
|
|
const char* value = stringtable->values[row * stringtable->columnCount + column].string;
|
|
|
|
if (!value) value = "";
|
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* UI_LocalizeMapName(const char* mapName)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < *arenaCount; ++i)
|
|
|
|
{
|
|
|
|
if (!_stricmp(Components::ArenaLength::NewArenas[i].mapName, mapName))
|
|
|
|
{
|
|
|
|
char* uiName = &Components::ArenaLength::NewArenas[i].uiName[0];
|
|
|
|
if ((uiName[0] == 'M' && uiName[1] == 'P') || (uiName[0] == 'P' && uiName[1] == 'A')) // MPUI/PATCH
|
|
|
|
{
|
|
|
|
return SEH_StringEd_GetString(uiName);
|
|
|
|
}
|
|
|
|
|
|
|
|
return uiName;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return mapName;
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* UI_LocalizeGameType(const char* gameType)
|
|
|
|
{
|
|
|
|
if (!gameType || !*gameType)
|
|
|
|
{
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int i = 0; i < *gameTypeCount; ++i)
|
|
|
|
{
|
|
|
|
if (!_stricmp(gameTypes[i].gameType, gameType))
|
|
|
|
{
|
|
|
|
return SEH_StringEd_GetString(gameTypes[i].uiName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return gameType;
|
|
|
|
}
|
|
|
|
|
2017-06-05 06:53:26 -04:00
|
|
|
// this cant be MessageBox because windows.h has a define that converts it to MessageBoxW. which is just stupid
|
2018-12-17 08:29:18 -05:00
|
|
|
void ShowMessageBox(const std::string& message, const std::string& title)
|
2017-06-05 06:53:26 -04:00
|
|
|
{
|
2022-08-23 06:58:33 -04:00
|
|
|
if (!CL_IsCgameInitialized())
|
2017-06-05 06:53:26 -04:00
|
|
|
{
|
|
|
|
Dvar_SetStringByName("com_errorMessage", message.data());
|
|
|
|
Dvar_SetStringByName("com_errorTitle", title.data());
|
2022-02-07 07:28:17 -05:00
|
|
|
Cbuf_AddText(0, "openmenu error_popmenu_lobby\n");
|
2017-06-05 06:53:26 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int R_HashString(const char* string)
|
|
|
|
{
|
|
|
|
unsigned int hash = 0;
|
|
|
|
|
|
|
|
while (*string)
|
|
|
|
{
|
|
|
|
hash = (*string | 0x20) ^ (33 * hash);
|
|
|
|
++string;
|
|
|
|
}
|
|
|
|
|
|
|
|
return hash;
|
|
|
|
}
|
|
|
|
|
2021-09-07 18:31:56 -04:00
|
|
|
unsigned int R_HashString(const char* string, size_t maxLen)
|
|
|
|
{
|
|
|
|
unsigned int hash = 0;
|
|
|
|
|
|
|
|
while (*string && maxLen > 0)
|
|
|
|
{
|
|
|
|
hash = (*string | 0x20) ^ (33 * hash);
|
|
|
|
++string;
|
|
|
|
maxLen--;
|
|
|
|
}
|
|
|
|
|
|
|
|
return hash;
|
|
|
|
}
|
|
|
|
|
2017-06-05 06:53:26 -04:00
|
|
|
void Load_IndexBuffer(void* data, IDirect3DIndexBuffer9** storeHere, int count)
|
|
|
|
{
|
|
|
|
if (Components::Dvar::Var("r_loadForRenderer").get<bool>())
|
|
|
|
{
|
|
|
|
void* buffer = R_AllocStaticIndexBuffer(storeHere, 2 * count);
|
|
|
|
std::memcpy(buffer, data, 2 * count);
|
|
|
|
|
|
|
|
if (storeHere && *storeHere)
|
|
|
|
{
|
|
|
|
(*storeHere)->Unlock();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-28 05:43:41 -05:00
|
|
|
void Vec2UnpackTexCoords(const PackedTexCoords in, vec2_t* out)
|
|
|
|
{
|
|
|
|
unsigned int v3; // xmm1_4
|
|
|
|
|
|
|
|
if (LOWORD(in.packed))
|
|
|
|
v3 = ((in.packed & 0x8000) << 16) | (((((in.packed & 0x3FFF) << 14) - (~(LOWORD(in.packed) << 14) & 0x10000000)) ^ 0x80000001) >> 1);
|
|
|
|
else
|
|
|
|
v3 = 0;
|
|
|
|
|
|
|
|
(*out)[0] = *reinterpret_cast<float*>(&v3);
|
|
|
|
|
|
|
|
if (HIWORD(in.packed))
|
|
|
|
v3 = ((HIWORD(in.packed) & 0x8000) << 16) | (((((HIWORD(in.packed) & 0x3FFF) << 14)
|
|
|
|
- (~(HIWORD(in.packed) << 14) & 0x10000000)) ^ 0x80000001) >> 1);
|
|
|
|
else
|
|
|
|
v3 = 0;
|
|
|
|
|
|
|
|
(*out)[1] = *reinterpret_cast<float*>(&v3);
|
|
|
|
}
|
|
|
|
|
|
|
|
void MatrixVecMultiply(const float (& mulMat)[3][3], const vec3_t& mulVec, vec3_t& solution)
|
|
|
|
{
|
|
|
|
vec3_t res;
|
|
|
|
res[0] = mulMat[0][0] * mulVec[0] + mulMat[1][0] * mulVec[1] + mulMat[2][0] * mulVec[2];
|
|
|
|
res[1] = mulMat[0][1] * mulVec[0] + mulMat[1][1] * mulVec[1] + mulMat[2][1] * mulVec[2];
|
|
|
|
res[2] = mulMat[0][2] * mulVec[0] + mulMat[1][2] * mulVec[1] + mulMat[2][2] * mulVec[2];
|
|
|
|
std::memmove(&solution[0], &res[0], sizeof(res));
|
|
|
|
}
|
|
|
|
|
2021-04-02 09:23:18 -04:00
|
|
|
void QuatRot(vec3_t* vec, const vec4_t* quat)
|
|
|
|
{
|
|
|
|
vec4_t q{ (*quat)[3],(*quat)[0],(*quat)[1],(*quat)[2] };
|
|
|
|
|
|
|
|
vec4_t res{ 0, (*vec)[0], (*vec)[1], (*vec)[2] };
|
|
|
|
vec4_t res2;
|
|
|
|
vec4_t quat_conj{ q[0], -q[1], -q[2], -q[3] };
|
|
|
|
QuatMultiply(&q, &res, &res2);
|
|
|
|
QuatMultiply(&res2, &quat_conj, &res);
|
|
|
|
|
|
|
|
(*vec)[0] = res[1];
|
|
|
|
(*vec)[1] = res[2];
|
|
|
|
(*vec)[2] = res[3];
|
|
|
|
}
|
|
|
|
|
|
|
|
void QuatMultiply(const vec4_t* q1, const vec4_t* q2, vec4_t* res)
|
|
|
|
{
|
|
|
|
(*res)[0] = (*q2)[0] * (*q1)[0] - (*q2)[1] * (*q1)[1] - (*q2)[2] * (*q1)[2] - (*q2)[3] * (*q1)[3];
|
|
|
|
(*res)[1] = (*q2)[0] * (*q1)[1] + (*q2)[1] * (*q1)[0] - (*q2)[2] * (*q1)[3] + (*q2)[3] * (*q1)[2];
|
|
|
|
(*res)[2] = (*q2)[0] * (*q1)[2] + (*q2)[1] * (*q1)[3] + (*q2)[2] * (*q1)[0] - (*q2)[3] * (*q1)[1];
|
|
|
|
(*res)[3] = (*q2)[0] * (*q1)[3] - (*q2)[1] * (*q1)[2] + (*q2)[2] * (*q1)[1] + (*q2)[3] * (*q1)[0];
|
|
|
|
}
|
|
|
|
|
2017-06-05 06:53:26 -04:00
|
|
|
void SortWorldSurfaces(GfxWorld* world)
|
|
|
|
{
|
|
|
|
DWORD* specular1 = reinterpret_cast<DWORD*>(0x69F105C);
|
|
|
|
DWORD* specular2 = reinterpret_cast<DWORD*>(0x69F92D4);
|
|
|
|
DWORD saveSpecular1 = *specular1;
|
|
|
|
DWORD saveSpecular2 = *specular2;
|
|
|
|
|
|
|
|
GfxWorld** gameWorld = reinterpret_cast<GfxWorld**>(0x66DEE94);
|
|
|
|
GfxWorld* saveWorld = *gameWorld;
|
|
|
|
|
|
|
|
*specular1 = 1;
|
|
|
|
*specular2 = 1;
|
|
|
|
*gameWorld = world;
|
|
|
|
|
|
|
|
R_SortWorldSurfaces();
|
|
|
|
|
|
|
|
*gameWorld = saveWorld;
|
|
|
|
*specular1 = saveSpecular1;
|
|
|
|
*specular2 = saveSpecular2;
|
|
|
|
}
|
|
|
|
|
|
|
|
void R_AddDebugBounds(float* color, Bounds* b)
|
|
|
|
{
|
2022-08-23 06:58:33 -04:00
|
|
|
vec3_t v1, v2, v3, v4, v5, v6, v7, v8;
|
2017-06-05 06:53:26 -04:00
|
|
|
float* center = b->midPoint;
|
|
|
|
float* halfSize = b->halfSize;
|
|
|
|
|
|
|
|
v1[0] = center[0] - halfSize[0];
|
|
|
|
v1[1] = center[1] - halfSize[1];
|
|
|
|
v1[2] = center[2] - halfSize[2];
|
|
|
|
|
|
|
|
v2[0] = center[0] + halfSize[0];
|
|
|
|
v2[1] = center[1] - halfSize[1];
|
|
|
|
v2[2] = center[2] - halfSize[2];
|
|
|
|
|
|
|
|
v3[0] = center[0] - halfSize[0];
|
|
|
|
v3[1] = center[1] + halfSize[1];
|
|
|
|
v3[2] = center[2] - halfSize[2];
|
|
|
|
|
|
|
|
v4[0] = center[0] + halfSize[0];
|
|
|
|
v4[1] = center[1] + halfSize[1];
|
|
|
|
v4[2] = center[2] - halfSize[2];
|
|
|
|
|
|
|
|
v5[0] = center[0] - halfSize[0];
|
|
|
|
v5[1] = center[1] - halfSize[1];
|
|
|
|
v5[2] = center[2] + halfSize[2];
|
|
|
|
|
|
|
|
v6[0] = center[0] + halfSize[0];
|
|
|
|
v6[1] = center[1] - halfSize[1];
|
|
|
|
v6[2] = center[2] + halfSize[2];
|
|
|
|
|
|
|
|
v7[0] = center[0] - halfSize[0];
|
|
|
|
v7[1] = center[1] + halfSize[1];
|
|
|
|
v7[2] = center[2] + halfSize[2];
|
|
|
|
|
|
|
|
v8[0] = center[0] + halfSize[0];
|
|
|
|
v8[1] = center[1] + halfSize[1];
|
|
|
|
v8[2] = center[2] + halfSize[2];
|
|
|
|
|
|
|
|
// bottom
|
2022-08-23 06:58:33 -04:00
|
|
|
R_AddDebugLine(color, v1, v2);
|
|
|
|
R_AddDebugLine(color, v2, v4);
|
|
|
|
R_AddDebugLine(color, v4, v3);
|
|
|
|
R_AddDebugLine(color, v3, v1);
|
2017-06-05 06:53:26 -04:00
|
|
|
|
|
|
|
// top
|
2022-08-23 06:58:33 -04:00
|
|
|
R_AddDebugLine(color, v5, v6);
|
|
|
|
R_AddDebugLine(color, v6, v8);
|
|
|
|
R_AddDebugLine(color, v8, v7);
|
|
|
|
R_AddDebugLine(color, v7, v5);
|
2017-06-05 06:53:26 -04:00
|
|
|
|
|
|
|
// verticals
|
2022-08-23 06:58:33 -04:00
|
|
|
R_AddDebugLine(color, v1, v5);
|
|
|
|
R_AddDebugLine(color, v2, v6);
|
|
|
|
R_AddDebugLine(color, v3, v7);
|
|
|
|
R_AddDebugLine(color, v4, v8);
|
2017-06-05 06:53:26 -04:00
|
|
|
}
|
|
|
|
|
2021-04-02 09:23:18 -04:00
|
|
|
void R_AddDebugBounds(float* color, Bounds* b, const float(*quat)[4])
|
|
|
|
{
|
|
|
|
vec3_t v[8];
|
|
|
|
auto* center = b->midPoint;
|
|
|
|
auto* halfSize = b->halfSize;
|
|
|
|
|
|
|
|
v[0][0] = -halfSize[0];
|
|
|
|
v[0][1] = -halfSize[1];
|
|
|
|
v[0][2] = -halfSize[2];
|
|
|
|
|
|
|
|
v[1][0] = halfSize[0];
|
|
|
|
v[1][1] = -halfSize[1];
|
|
|
|
v[1][2] = -halfSize[2];
|
|
|
|
|
|
|
|
v[2][0] = -halfSize[0];
|
|
|
|
v[2][1] = halfSize[1];
|
|
|
|
v[2][2] = -halfSize[2];
|
|
|
|
|
|
|
|
v[3][0] = halfSize[0];
|
|
|
|
v[3][1] = halfSize[1];
|
|
|
|
v[3][2] = -halfSize[2];
|
|
|
|
|
|
|
|
v[4][0] = -halfSize[0];
|
|
|
|
v[4][1] = -halfSize[1];
|
|
|
|
v[4][2] = halfSize[2];
|
|
|
|
|
|
|
|
v[5][0] = halfSize[0];
|
|
|
|
v[5][1] = -halfSize[1];
|
|
|
|
v[5][2] = halfSize[2];
|
|
|
|
|
|
|
|
v[6][0] = -halfSize[0];
|
|
|
|
v[6][1] = halfSize[1];
|
|
|
|
v[6][2] = halfSize[2];
|
|
|
|
|
|
|
|
v[7][0] = halfSize[0];
|
|
|
|
v[7][1] = halfSize[1];
|
|
|
|
v[7][2] = halfSize[2];
|
|
|
|
|
|
|
|
for(auto& vec : v)
|
|
|
|
{
|
|
|
|
QuatRot(&vec, quat);
|
|
|
|
vec[0] += center[0];
|
|
|
|
vec[1] += center[1];
|
|
|
|
vec[2] += center[2];
|
|
|
|
}
|
|
|
|
|
|
|
|
// bottom
|
2022-08-23 06:58:33 -04:00
|
|
|
R_AddDebugLine(color, v[0], v[1]);
|
|
|
|
R_AddDebugLine(color, v[1], v[3]);
|
|
|
|
R_AddDebugLine(color, v[3], v[2]);
|
|
|
|
R_AddDebugLine(color, v[2], v[0]);
|
2021-04-02 09:23:18 -04:00
|
|
|
|
|
|
|
// top
|
2022-08-23 06:58:33 -04:00
|
|
|
R_AddDebugLine(color, v[4], v[5]);
|
|
|
|
R_AddDebugLine(color, v[5], v[7]);
|
|
|
|
R_AddDebugLine(color, v[7], v[6]);
|
|
|
|
R_AddDebugLine(color, v[6], v[4]);
|
2021-04-02 09:23:18 -04:00
|
|
|
|
|
|
|
// verticals
|
2022-08-23 06:58:33 -04:00
|
|
|
R_AddDebugLine(color, v[0], v[4]);
|
|
|
|
R_AddDebugLine(color, v[1], v[5]);
|
|
|
|
R_AddDebugLine(color, v[2], v[6]);
|
|
|
|
R_AddDebugLine(color, v[3], v[7]);
|
2021-04-02 09:23:18 -04:00
|
|
|
}
|
|
|
|
|
2021-08-23 16:45:22 -04:00
|
|
|
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]);
|
2021-04-02 09:23:18 -04:00
|
|
|
|
2021-08-23 16:45:22 -04:00
|
|
|
return (knots[knotIndex][1] - knots[knotIndex - 1][1]) * adjustedFraction + knots[knotIndex - 1][1];
|
|
|
|
}
|
|
|
|
}
|
2021-04-02 09:23:18 -04:00
|
|
|
|
2021-08-23 16:45:22 -04:00
|
|
|
return -1.0f;
|
|
|
|
}
|
|
|
|
|
|
|
|
float GraphFloat_GetValue(const GraphFloat* graph, const float fraction)
|
|
|
|
{
|
|
|
|
return GraphGetValueFromFraction(graph->knotCount, graph->knots, fraction) * graph->scale;
|
|
|
|
}
|
2021-04-02 09:23:18 -04:00
|
|
|
|
2022-07-23 09:49:56 -04:00
|
|
|
ScreenPlacement* ScrPlace_GetFullPlacement()
|
|
|
|
{
|
|
|
|
return scrPlaceFull;
|
|
|
|
}
|
|
|
|
|
2022-04-15 08:50:22 -04:00
|
|
|
ScreenPlacement* ScrPlace_GetUnsafeFullPlacement()
|
|
|
|
{
|
|
|
|
return scrPlaceFullUnsafe;
|
|
|
|
}
|
|
|
|
|
2022-06-13 12:08:44 -04:00
|
|
|
void UI_FilterStringForButtonAnimation(char* str, unsigned int strMaxSize)
|
|
|
|
{
|
2022-08-04 08:06:17 -04:00
|
|
|
if (SEH_GetCurrentLanguage() == 8)
|
2022-06-13 12:08:44 -04:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2022-08-04 08:06:17 -04:00
|
|
|
const auto remainder = Sys_Milliseconds() % 1000;
|
|
|
|
if (remainder <= 800)
|
2022-06-13 12:08:44 -04:00
|
|
|
{
|
2022-08-04 08:06:17 -04:00
|
|
|
return;
|
|
|
|
}
|
2022-06-13 12:08:44 -04:00
|
|
|
|
2022-08-04 08:06:17 -04:00
|
|
|
for (std::size_t idx = 0; str[idx] && idx < strMaxSize; ++idx)
|
|
|
|
{
|
|
|
|
if (str[idx] == 16)
|
2022-06-13 12:08:44 -04:00
|
|
|
{
|
2022-08-04 08:06:17 -04:00
|
|
|
str[idx] = -68;
|
2022-06-13 12:08:44 -04:00
|
|
|
}
|
2022-08-04 08:06:17 -04:00
|
|
|
else if (str[idx] == 17)
|
2022-06-13 12:08:44 -04:00
|
|
|
{
|
2022-08-04 08:06:17 -04:00
|
|
|
str[idx] = -67;
|
2022-06-13 12:08:44 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-02 04:27:44 -04:00
|
|
|
void I_strncpyz_s(char* dest, std::size_t destsize, const char* src, std::size_t count)
|
|
|
|
{
|
|
|
|
if (!destsize && !dest)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (!src || !count)
|
|
|
|
{
|
|
|
|
*dest = '\0';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
const auto* p = reinterpret_cast<const unsigned char*>(src - 1);
|
|
|
|
auto* q = reinterpret_cast<unsigned char*>(dest - 1);
|
|
|
|
auto n = count + 1;
|
|
|
|
auto s = count;
|
|
|
|
if (destsize <= count)
|
|
|
|
{
|
|
|
|
n = destsize + 1;
|
|
|
|
s = destsize - 1;
|
|
|
|
}
|
|
|
|
do
|
|
|
|
{
|
|
|
|
if (!--n)
|
|
|
|
{
|
|
|
|
dest[s] = '\0';
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
*++q = *++p;
|
|
|
|
} while (*q);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void I_strcpy(char* dest, std::size_t destsize, const char* src)
|
|
|
|
{
|
|
|
|
I_strncpyz_s(dest, destsize, src, destsize);
|
|
|
|
}
|
|
|
|
|
2017-06-05 06:53:26 -04:00
|
|
|
#pragma optimize("", off)
|
|
|
|
__declspec(naked) float UI_GetScoreboardLeft(void* /*a1*/)
|
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
|
|
|
push eax
|
|
|
|
pushad
|
|
|
|
|
|
|
|
mov ecx, 590390h
|
|
|
|
mov eax, [esp + 28h]
|
|
|
|
call ecx
|
2017-06-14 06:06:04 -04:00
|
|
|
mov [esp + 20h], eax
|
2017-06-05 06:53:26 -04:00
|
|
|
popad
|
|
|
|
pop eax
|
|
|
|
|
|
|
|
retn
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-09 08:29:58 -04:00
|
|
|
__declspec(naked) bool PM_IsAdsAllowed(playerState_s* /*ps*/)
|
2021-05-04 15:45:47 -04:00
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
2022-04-09 08:29:58 -04:00
|
|
|
push eax
|
|
|
|
pushad
|
2021-05-04 15:45:47 -04:00
|
|
|
|
2022-04-09 08:29:58 -04:00
|
|
|
mov esi, [esp + 0x24 + 0x4] // ps
|
|
|
|
mov ecx, 0x5755A0
|
|
|
|
call ecx
|
|
|
|
|
|
|
|
mov [esp + 0x20], eax
|
|
|
|
popad
|
|
|
|
pop eax
|
|
|
|
|
|
|
|
ret
|
|
|
|
}
|
2021-05-04 15:45:47 -04:00
|
|
|
}
|
|
|
|
|
2017-02-01 07:44:25 -05:00
|
|
|
__declspec(naked) void R_LoadSunThroughDvars(const char* /*mapname*/, sunflare_t* /*sun*/)
|
2017-01-19 16:23:59 -05:00
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
2017-02-01 07:44:25 -05:00
|
|
|
pushad
|
|
|
|
push [esp + 28h]
|
|
|
|
mov eax, [esp + 28h]
|
2017-01-19 16:23:59 -05:00
|
|
|
|
|
|
|
mov ecx, 53F990h
|
|
|
|
call ecx
|
|
|
|
|
|
|
|
add esp, 4h
|
2017-02-01 07:44:25 -05:00
|
|
|
popad
|
|
|
|
retn
|
2017-01-19 16:23:59 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-01 07:44:25 -05:00
|
|
|
__declspec(naked) void R_SetSunFromDvars(sunflare_t* /*sun*/)
|
2017-01-19 16:23:59 -05:00
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
2017-02-01 07:44:25 -05:00
|
|
|
pushad
|
|
|
|
mov esi, [esp + 24h]
|
2017-01-19 16:23:59 -05:00
|
|
|
|
|
|
|
mov eax, 53F6D0h
|
2017-02-01 07:44:25 -05:00
|
|
|
call eax
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-02-01 07:44:25 -05:00
|
|
|
popad
|
|
|
|
retn
|
2017-01-19 16:23:59 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-01 07:44:25 -05:00
|
|
|
__declspec(naked) void IN_KeyUp(kbutton_t* /*button*/)
|
2017-01-19 16:23:59 -05:00
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
2017-02-01 07:44:25 -05:00
|
|
|
pushad
|
|
|
|
mov esi, [esp + 24h]
|
2017-01-19 16:23:59 -05:00
|
|
|
mov eax, 5A5580h
|
|
|
|
call eax
|
2017-02-01 07:44:25 -05:00
|
|
|
popad
|
|
|
|
retn
|
2017-01-19 16:23:59 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-01 07:44:25 -05:00
|
|
|
__declspec(naked) void IN_KeyDown(kbutton_t* /*button*/)
|
2017-01-19 16:23:59 -05:00
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
2017-02-01 07:44:25 -05:00
|
|
|
pushad
|
|
|
|
mov esi, [esp + 24h]
|
2017-01-19 16:23:59 -05:00
|
|
|
mov eax, 5A54E0h
|
|
|
|
call eax
|
2017-02-01 07:44:25 -05:00
|
|
|
popad
|
|
|
|
retn
|
2017-01-19 16:23:59 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-01 07:44:25 -05:00
|
|
|
__declspec(naked) void Load_VertexBuffer(void* /*data*/, IDirect3DVertexBuffer9** /*where*/, int /*len*/)
|
2017-01-19 16:23:59 -05:00
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
2017-02-01 07:44:25 -05:00
|
|
|
pushad
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2017-02-01 07:44:25 -05:00
|
|
|
mov eax, [esp + 2Ch]
|
|
|
|
mov edi, [esp + 28h]
|
2017-03-28 02:57:14 -04:00
|
|
|
push [esp + 24h]
|
2017-01-19 16:23:59 -05:00
|
|
|
|
|
|
|
mov ebx, 5112C0h
|
|
|
|
call ebx
|
|
|
|
add esp, 4
|
|
|
|
|
2017-02-01 07:44:25 -05:00
|
|
|
popad
|
|
|
|
|
|
|
|
retn
|
2017-01-19 16:23:59 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-06-05 06:53:26 -04:00
|
|
|
__declspec(naked) void Image_Setup(GfxImage* /*image*/, unsigned int /*width*/, unsigned int /*height*/, unsigned int /*depth*/, unsigned int /*flags*/, _D3DFORMAT /*format*/)
|
2017-06-04 18:00:46 -04:00
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
|
|
|
pushad
|
|
|
|
|
2017-06-05 06:53:26 -04:00
|
|
|
mov eax, [esp + 24h] // image
|
|
|
|
mov edi, [esp + 28h] // width
|
|
|
|
push [esp + 38h] // format
|
|
|
|
push [esp + 38h] // flags
|
|
|
|
push [esp + 38h] // depth
|
|
|
|
push [esp + 38h] // height
|
2017-06-04 18:00:46 -04:00
|
|
|
|
|
|
|
mov ecx, 54AF50h
|
|
|
|
call ecx
|
|
|
|
|
2017-06-05 06:53:26 -04:00
|
|
|
add esp, 10h
|
2017-06-04 18:00:46 -04:00
|
|
|
|
|
|
|
popad
|
|
|
|
retn
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-09 08:33:52 -04:00
|
|
|
__declspec(naked) void Menu_FreeItemMemory(itemDef_s* /*item*/)
|
2017-03-27 11:48:52 -04:00
|
|
|
{
|
2017-06-05 06:53:26 -04:00
|
|
|
__asm
|
|
|
|
{
|
|
|
|
pushad
|
|
|
|
mov edi, [esp + 24h]
|
|
|
|
mov eax, 63D880h
|
|
|
|
call eax
|
|
|
|
popad
|
|
|
|
retn
|
|
|
|
}
|
2017-03-27 11:48:52 -04:00
|
|
|
}
|
2017-03-27 21:25:58 -04:00
|
|
|
|
2022-08-23 06:58:33 -04:00
|
|
|
void Menu_SetNextCursorItem(UiContext* a1, menuDef_t* a2, int unk)
|
2021-05-04 09:47:46 -04:00
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
|
|
|
push unk
|
|
|
|
push a2
|
|
|
|
mov eax, a1
|
|
|
|
mov ebx, 0x639FE0
|
|
|
|
call ebx
|
|
|
|
add esp, 0x8 // 2 args = 2x4
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-23 06:58:33 -04:00
|
|
|
void Menu_SetPrevCursorItem(UiContext* a1, menuDef_t* a2, int unk)
|
2021-05-04 09:47:46 -04:00
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
|
|
|
push unk
|
|
|
|
push a2
|
|
|
|
mov eax, a1
|
|
|
|
mov ebx, 0x639F20
|
|
|
|
call ebx
|
|
|
|
add esp, 0x8 // 2 args = 2x4
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-28 02:57:14 -04:00
|
|
|
__declspec(naked) void R_AddDebugLine(float* /*color*/, float* /*v1*/, float* /*v2*/)
|
2017-03-27 21:25:58 -04:00
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
2017-03-28 02:57:14 -04:00
|
|
|
pushad
|
|
|
|
|
|
|
|
mov eax, [esp + 2Ch] // v2
|
2017-03-27 21:25:58 -04:00
|
|
|
push eax
|
2017-03-28 02:57:14 -04:00
|
|
|
|
|
|
|
mov eax, [esp + 2Ch] // v1
|
2017-03-27 21:25:58 -04:00
|
|
|
push eax
|
2017-03-28 02:57:14 -04:00
|
|
|
|
|
|
|
// debugglobals
|
2017-03-29 10:44:05 -04:00
|
|
|
mov esi, ds:66DAD78h
|
|
|
|
add esi, 268772
|
2017-03-28 02:57:14 -04:00
|
|
|
|
|
|
|
mov edi, [esp + 2Ch] // color
|
|
|
|
|
|
|
|
mov eax, 51CEB0h
|
|
|
|
call eax
|
|
|
|
|
|
|
|
add esp, 8h
|
|
|
|
|
|
|
|
popad
|
|
|
|
retn
|
2017-03-27 21:25:58 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-28 02:57:14 -04:00
|
|
|
__declspec(naked) void R_AddDebugString(float* /*color*/, float* /*pos*/, float /*scale*/, const char* /*string*/)
|
2017-03-27 21:25:58 -04:00
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
2017-03-28 02:57:14 -04:00
|
|
|
pushad
|
|
|
|
|
|
|
|
mov eax, [esp + 30h] // string
|
2017-03-27 21:25:58 -04:00
|
|
|
push eax
|
2017-03-28 02:57:14 -04:00
|
|
|
|
|
|
|
mov eax, [esp + 30h] // scale
|
2017-03-27 21:25:58 -04:00
|
|
|
push eax
|
2017-03-28 02:57:14 -04:00
|
|
|
|
|
|
|
mov eax, [esp + 2Ch] // color
|
2017-03-27 21:25:58 -04:00
|
|
|
push eax
|
2017-03-28 02:57:14 -04:00
|
|
|
|
|
|
|
mov eax, [esp + 34h] // pos
|
2017-03-27 21:25:58 -04:00
|
|
|
push eax
|
2017-03-28 02:57:14 -04:00
|
|
|
|
|
|
|
// debugglobals
|
|
|
|
mov edi, ds:66DAD78h
|
|
|
|
add edi, 268772
|
|
|
|
|
|
|
|
mov eax, 51D0A0h
|
|
|
|
call eax
|
|
|
|
|
|
|
|
add esp, 10h
|
|
|
|
|
|
|
|
popad
|
|
|
|
retn
|
2017-03-27 21:25:58 -04:00
|
|
|
}
|
|
|
|
}
|
2021-09-04 20:25:24 -04:00
|
|
|
|
2022-07-02 05:52:52 -04:00
|
|
|
Glyph* R_GetCharacterGlyph(Font_s* font, unsigned int letter)
|
2021-09-04 20:25:24 -04:00
|
|
|
{
|
2022-08-23 06:58:33 -04:00
|
|
|
static auto R_GetCharacterGlyph_t = 0x5055C0;
|
|
|
|
Glyph* result;
|
2022-07-02 05:52:52 -04:00
|
|
|
|
2021-09-20 12:21:38 -04:00
|
|
|
__asm
|
2021-09-04 20:25:24 -04:00
|
|
|
{
|
2021-09-06 08:45:47 -04:00
|
|
|
pushad
|
|
|
|
|
2022-07-02 05:52:52 -04:00
|
|
|
mov edi, letter
|
|
|
|
push font
|
2022-08-23 06:58:33 -04:00
|
|
|
call R_GetCharacterGlyph_t
|
2021-09-04 20:25:24 -04:00
|
|
|
add esp, 4
|
2022-08-23 06:58:33 -04:00
|
|
|
mov result, eax
|
2021-09-06 08:45:47 -04:00
|
|
|
|
|
|
|
popad
|
2021-09-04 20:25:24 -04:00
|
|
|
}
|
2022-07-02 05:52:52 -04:00
|
|
|
|
2022-08-23 06:58:33 -04:00
|
|
|
return result;
|
2021-09-04 20:25:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
__declspec(naked) bool SetupPulseFXVars(const char* /*text*/, int /*maxLength*/, int /*fxBirthTime*/, int /*fxLetterTime*/, int /*fxDecayStartTime*/, int /*fxDecayDuration*/, bool* /*resultDrawRandChar*/, int* /*resultRandSeed*/, int* /*resultMaxLength*/, bool* /*resultDecaying*/, int* /*resultDecayTimeElapsed*/)
|
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
2021-09-06 08:45:47 -04:00
|
|
|
push eax
|
|
|
|
pushad
|
|
|
|
|
|
|
|
mov eax, [esp + 0x08 + 0x24] // maxLength
|
|
|
|
push [esp + 0x2C + 0x24] // resultDecayTimeElapsed
|
|
|
|
push [esp + 0x2C + 0x24] // resultDecaying
|
|
|
|
push [esp + 0x2C + 0x24] // resultMaxLength
|
|
|
|
push [esp + 0x2C + 0x24] // resultRandSeed
|
|
|
|
push [esp + 0x2C + 0x24] // resultDrawRandChar
|
|
|
|
push [esp + 0x2C + 0x24] // fxDecayDuration
|
|
|
|
push [esp + 0x2C + 0x24] // fxDecayStartTime
|
|
|
|
push [esp + 0x2C + 0x24] // fxLetterTime
|
|
|
|
push [esp + 0x2C + 0x24] // fxBirthTime
|
|
|
|
push [esp + 0x28 + 0x24] // text
|
2021-09-04 20:25:24 -04:00
|
|
|
mov ebx, 0x535050
|
|
|
|
call ebx
|
|
|
|
add esp, 0x28
|
2021-09-06 08:45:47 -04:00
|
|
|
mov [esp + 0x20],eax
|
|
|
|
|
|
|
|
popad
|
|
|
|
pop eax
|
2021-09-04 20:25:24 -04:00
|
|
|
ret
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
__declspec(naked) void RB_DrawChar(Material* /*material*/, float /*x*/, float /*y*/, float /*w*/, float /*h*/, float /*sinAngle*/, float /*cosAngle*/, Glyph* /*glyph*/, unsigned int /*color*/)
|
|
|
|
{
|
2021-09-20 12:21:38 -04:00
|
|
|
__asm
|
2021-09-04 20:25:24 -04:00
|
|
|
{
|
2021-09-06 08:45:47 -04:00
|
|
|
pushad
|
|
|
|
|
|
|
|
mov eax, [esp + 0x4 + 0x20] // material
|
|
|
|
mov edx, [esp + 0x20 + 0x20] // glyph
|
|
|
|
push [esp + 0x24 + 0x20] // color
|
|
|
|
push [esp + 0x20 + 0x20] // cosAngle
|
|
|
|
push [esp + 0x20 + 0x20] // sinAngle
|
|
|
|
push [esp + 0x20 + 0x20] // h
|
|
|
|
push [esp + 0x20 + 0x20] // w
|
|
|
|
push [esp + 0x20 + 0x20] // y
|
|
|
|
push [esp + 0x20 + 0x20] // x
|
|
|
|
|
|
|
|
mov ecx, 0x534E20
|
|
|
|
call ecx
|
2021-09-04 20:25:24 -04:00
|
|
|
add esp, 0x1C
|
|
|
|
|
2021-09-06 08:45:47 -04:00
|
|
|
popad
|
2021-09-04 20:25:24 -04:00
|
|
|
ret
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
__declspec(naked) 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*/)
|
|
|
|
{
|
2021-09-20 12:21:38 -04:00
|
|
|
__asm
|
2021-09-04 20:25:24 -04:00
|
|
|
{
|
2021-09-06 08:45:47 -04:00
|
|
|
pushad
|
|
|
|
|
|
|
|
mov eax, [esp + 0x4 + 0x20] // material
|
|
|
|
push [esp + 0x30 + 0x20] // color
|
|
|
|
push [esp + 0x30 + 0x20] // cosAngle
|
|
|
|
push [esp + 0x30 + 0x20] // sinAngle
|
|
|
|
push [esp + 0x30 + 0x20] // t1
|
|
|
|
push [esp + 0x30 + 0x20] // s1
|
|
|
|
push [esp + 0x30 + 0x20] // t0
|
|
|
|
push [esp + 0x30 + 0x20] // s0
|
|
|
|
push [esp + 0x30 + 0x20] // h
|
|
|
|
push [esp + 0x30 + 0x20] // w
|
|
|
|
push [esp + 0x30 + 0x20] // y
|
|
|
|
push [esp + 0x30 + 0x20] // x
|
2021-09-04 20:25:24 -04:00
|
|
|
mov ebx, 0x5310F0
|
|
|
|
call ebx
|
|
|
|
add esp, 0x2C
|
2021-09-06 08:45:47 -04:00
|
|
|
|
|
|
|
popad
|
2021-09-04 20:25:24 -04:00
|
|
|
ret
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
__declspec(naked) char ModulateByteColors(char /*colorA*/, char /*colorB*/)
|
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
2021-09-06 08:45:47 -04:00
|
|
|
push eax
|
|
|
|
pushad
|
|
|
|
|
|
|
|
mov eax, [esp + 0x4 + 0x24] // colorA
|
|
|
|
mov ecx, [esp + 0x8 + 0x24] // colorB
|
2021-09-04 20:25:24 -04:00
|
|
|
mov ebx, 0x5353C0
|
|
|
|
call ebx
|
2021-09-06 08:45:47 -04:00
|
|
|
mov [esp + 0x20], eax
|
|
|
|
|
|
|
|
popad
|
|
|
|
pop eax
|
2021-09-04 20:25:24 -04:00
|
|
|
ret
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-23 16:45:22 -04:00
|
|
|
__declspec(naked) void AimAssist_UpdateTweakables(int /*localClientNum*/)
|
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
2022-06-30 15:37:47 -04:00
|
|
|
mov eax, [esp+0x4]
|
|
|
|
mov ebx, 0x569950
|
2021-08-23 16:45:22 -04:00
|
|
|
call ebx
|
|
|
|
retn
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
__declspec(naked) void AimAssist_UpdateAdsLerp(const AimInput* /*aimInput*/)
|
|
|
|
{
|
2022-04-15 08:50:22 -04:00
|
|
|
__asm
|
2021-08-23 16:45:22 -04:00
|
|
|
{
|
|
|
|
mov eax, [esp + 0x4]
|
|
|
|
mov ebx, 0x569AA0
|
|
|
|
call ebx
|
|
|
|
retn
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-30 15:37:47 -04:00
|
|
|
constexpr auto ApplyTokenToField_Func = 0x59A760;
|
|
|
|
__declspec(naked) bool ApplyTokenToField(unsigned int /*fieldNum*/, const char* /*token*/, visionSetVars_t* /*settings*/)
|
|
|
|
{
|
|
|
|
__asm
|
|
|
|
{
|
|
|
|
push eax
|
|
|
|
pushad
|
|
|
|
|
|
|
|
mov eax, [esp + 0x24 + 0x4] // fieldNum
|
|
|
|
mov ecx, [esp + 0x24 + 0x8] // token
|
|
|
|
push [esp + 0x24 + 0xC] // settings
|
|
|
|
call ApplyTokenToField_Func
|
|
|
|
add esp, 0x4
|
|
|
|
|
|
|
|
movzx eax, al // Zero extend eax
|
|
|
|
mov [esp + 0x20], eax
|
|
|
|
popad
|
|
|
|
pop eax
|
|
|
|
|
|
|
|
ret
|
|
|
|
}
|
|
|
|
}
|
2022-08-31 16:21:26 -04:00
|
|
|
|
|
|
|
int SEH_GetLocalizedTokenReference(char* token, const char* reference, const char* messageType, msgLocErrType_t errType)
|
|
|
|
{
|
|
|
|
static DWORD SEH_GetLocalizedTokenReference_t = 0x629BB0;
|
|
|
|
auto answer = 0;
|
|
|
|
|
|
|
|
__asm
|
|
|
|
{
|
|
|
|
pushad
|
|
|
|
mov esi, reference
|
|
|
|
mov edi, messageType
|
|
|
|
mov ebx, errType
|
|
|
|
push token
|
|
|
|
call SEH_GetLocalizedTokenReference_t
|
|
|
|
add esp, 0x4
|
|
|
|
mov answer, eax
|
|
|
|
popad
|
|
|
|
}
|
|
|
|
|
|
|
|
return answer;
|
|
|
|
}
|
|
|
|
|
2017-06-05 06:53:26 -04:00
|
|
|
#pragma optimize("", on)
|
2017-01-19 16:23:59 -05:00
|
|
|
}
|