iw4x-client/src/Game/Functions.hpp

841 lines
31 KiB
C++
Raw Normal View History

#pragma once
// Unsorted function definitions
2017-01-19 16:23:59 -05:00
namespace Game
{
typedef void(*AngleVectors_t)(float* angles, float* forward, float* right, float* up);
extern AngleVectors_t AngleVectors;
typedef void(*Cbuf_AddServerText_f_t)();
extern Cbuf_AddServerText_f_t Cbuf_AddServerText_f;
2017-01-19 16:23:59 -05:00
typedef void(*Cbuf_AddText_t)(int localClientNum, const char* text);
2017-01-19 16:23:59 -05:00
extern Cbuf_AddText_t Cbuf_AddText;
typedef void(*Cbuf_InsertText_t)(int localClientNum, const char* text);
2022-02-07 07:28:17 -05:00
extern Cbuf_InsertText_t Cbuf_InsertText;
typedef int(*CG_GetClientNum_t)();
2017-01-19 16:23:59 -05:00
extern CG_GetClientNum_t CG_GetClientNum;
typedef void(*CG_NextWeapon_f_t)();
2021-01-03 03:33:12 -05:00
extern CG_NextWeapon_f_t CG_NextWeapon_f;
typedef void(*CG_PlayBoltedEffect_t)(int localClientNum, FxEffectDef* fxDef, int dobjHandle, unsigned int boneName);
extern CG_PlayBoltedEffect_t CG_PlayBoltedEffect;
typedef const DObj*(*CG_GetBoneIndex_t)(int localClientNum, unsigned int boneName, char* boneIndex);
extern CG_GetBoneIndex_t CG_GetBoneIndex;
typedef void(*CG_ScoresDown_f_t)();
extern CG_ScoresDown_f_t CG_ScoresDown_f;
typedef void(*CG_ScoresUp_f_t)();
extern CG_ScoresUp_f_t CG_ScoresUp_f;
typedef void(*CG_ScrollScoreboardUp_t)(cg_s* cgameGlob);
extern CG_ScrollScoreboardUp_t CG_ScrollScoreboardUp;
typedef void(*CG_ScrollScoreboardDown_t)(cg_s* cgameGlob);
extern CG_ScrollScoreboardDown_t CG_ScrollScoreboardDown;
2022-04-12 08:34:51 -04:00
typedef const char*(*CG_GetTeamName_t)(team_t team);
2022-04-12 08:34:51 -04:00
extern CG_GetTeamName_t CG_GetTeamName;
typedef void(*CG_SetupWeaponDef_t)(int localClientNum, unsigned int weapIndex);
2022-04-12 08:34:51 -04:00
extern CG_SetupWeaponDef_t CG_SetupWeaponDef;
typedef void(*Cmd_AddCommand_t)(const char* cmdName, void(*function), cmd_function_t* allocedCmd, bool isKey);
2017-01-19 16:23:59 -05:00
extern Cmd_AddCommand_t Cmd_AddCommand;
typedef void(*Cmd_AddServerCommand_t)(const char* name, void(*callback), cmd_function_t* data);
2017-01-19 16:23:59 -05:00
extern Cmd_AddServerCommand_t Cmd_AddServerCommand;
typedef void(*Cmd_ExecuteSingleCommand_t)(int localClientNum, int controllerIndex, const char* cmd);
2017-01-19 16:23:59 -05:00
extern Cmd_ExecuteSingleCommand_t Cmd_ExecuteSingleCommand;
typedef void(*Com_ClientPacketEvent_t)();
2017-01-19 16:23:59 -05:00
extern Com_ClientPacketEvent_t Com_ClientPacketEvent;
typedef void(*Com_Error_t)(errorParm_t type, const char* message, ...);
2017-01-19 16:23:59 -05:00
extern Com_Error_t Com_Error;
typedef void(*Com_Printf_t)(int channel, const char* fmt, ...);
2017-01-19 16:23:59 -05:00
extern Com_Printf_t Com_Printf;
typedef void(*Com_PrintError_t)(int channel, const char* fmt, ...);
extern Com_PrintError_t Com_PrintError;
typedef void(*Com_PrintWarning_t)(int channel, const char* fmt, ...);
2022-06-12 17:07:53 -04:00
extern Com_PrintWarning_t Com_PrintWarning;
typedef void(*Com_PrintMessage_t)(int channel, const char* msg, int error);
2017-01-19 16:23:59 -05:00
extern Com_PrintMessage_t Com_PrintMessage;
typedef void(*Com_EndParseSession_t)();
2017-01-19 16:23:59 -05:00
extern Com_EndParseSession_t Com_EndParseSession;
typedef void(*Com_BeginParseSession_t)(const char* filename);
2017-01-19 16:23:59 -05:00
extern Com_BeginParseSession_t Com_BeginParseSession;
typedef char*(*Com_ParseOnLine_t)(const char** data_p);
2022-06-30 15:37:47 -04:00
extern Com_ParseOnLine_t Com_ParseOnLine;
typedef void(*Com_SkipRestOfLine_t)(const char** data);
2022-06-30 15:37:47 -04:00
extern Com_SkipRestOfLine_t Com_SkipRestOfLine;
typedef void(*Com_SetSpaceDelimited_t)(int);
2017-01-19 16:23:59 -05:00
extern Com_SetSpaceDelimited_t Com_SetSpaceDelimited;
typedef char*(*Com_Parse_t)(const char** data_p);
2017-01-19 16:23:59 -05:00
extern Com_Parse_t Com_Parse;
typedef bool (*Com_MatchToken_t)(const char **data_p, const char* token, int size);
extern Com_MatchToken_t Com_MatchToken;
typedef void(*Com_SetSlowMotion_t)(float start, float end, int duration);
2017-01-19 16:23:59 -05:00
extern Com_SetSlowMotion_t Com_SetSlowMotion;
typedef void(*Com_Quitf_t)();
2021-07-18 14:51:33 -04:00
extern Com_Quitf_t Com_Quit_f;
typedef void(*Com_OpenLogFile_t)();
2022-08-02 17:04:02 -04:00
extern Com_OpenLogFile_t Com_OpenLogFile;
typedef char* (*Con_DrawMiniConsole_t)(int localClientNum, int xPos, int yPos, float alpha);
2017-01-19 16:23:59 -05:00
extern Con_DrawMiniConsole_t Con_DrawMiniConsole;
typedef void (*Con_DrawSolidConsole_t)();
2017-01-19 16:23:59 -05:00
extern Con_DrawSolidConsole_t Con_DrawSolidConsole;
typedef bool(*Con_CancelAutoComplete_t)();
extern Con_CancelAutoComplete_t Con_CancelAutoComplete;
typedef bool(*Encode_Init_t)(const char* );
2017-01-19 16:23:59 -05:00
extern Encode_Init_t Encode_Init;
typedef void(*Field_Clear_t)(void* field);
2017-01-19 16:23:59 -05:00
extern Field_Clear_t Field_Clear;
typedef void(*FreeMemory_t)(void* buffer);
2017-01-19 16:23:59 -05:00
extern FreeMemory_t FreeMemory;
typedef void(*Free_String_t)(const char* string);
2021-10-03 16:23:26 -04:00
extern Free_String_t Free_String;
typedef void(*Svcmd_EntityList_f_t)();
2022-04-12 08:34:51 -04:00
extern Svcmd_EntityList_f_t Svcmd_EntityList_f;
typedef void(*GScr_LoadGameTypeScript_t)();
2017-01-19 16:23:59 -05:00
extern GScr_LoadGameTypeScript_t GScr_LoadGameTypeScript;
typedef int(*Reader_t)(char const*, int *);
typedef bool(*Image_LoadFromFileWithReader_t)(GfxImage* image, Reader_t reader);
2017-01-19 16:23:59 -05:00
extern Image_LoadFromFileWithReader_t Image_LoadFromFileWithReader;
typedef void(*Image_Release_t)(GfxImage* image);
2017-01-19 16:23:59 -05:00
extern Image_Release_t Image_Release;
typedef char*(*Info_ValueForKey_t)(const char* s, const char* key);
extern Info_ValueForKey_t Info_ValueForKey;
typedef void(*Key_SetCatcher_t)(int localClientNum, int catcher);
2017-01-19 16:23:59 -05:00
extern Key_SetCatcher_t Key_SetCatcher;
typedef void(*Key_RemoveCatcher_t)(int localClientNum, int andMask);
extern Key_RemoveCatcher_t Key_RemoveCatcher;
typedef bool(*Key_IsKeyCatcherActive_t)(int localClientNum, int catcher);
extern Key_IsKeyCatcherActive_t Key_IsKeyCatcherActive;
typedef void(*Key_SetBinding_t)(int localClientNum, int keyNum, const char* binding);
extern Key_SetBinding_t Key_SetBinding;
typedef void(*LargeLocalInit_t)();
2017-01-19 16:23:59 -05:00
extern LargeLocalInit_t LargeLocalInit;
typedef bool(*Load_Stream_t)(bool atStreamStart, const void* ptr, unsigned int size);
2017-01-19 16:23:59 -05:00
extern Load_Stream_t Load_Stream;
typedef void(*Load_XString_t)(bool atStreamStart);
2017-01-19 16:23:59 -05:00
extern Load_XString_t Load_XString;
typedef void(*Load_XModelPtr_t)(bool atStreamStart);
2017-01-19 16:23:59 -05:00
extern Load_XModelPtr_t Load_XModelPtr;
typedef void(*Load_XModelSurfsFixup_t)(XModelSurfs**, XModelLodInfo*);
2017-01-19 16:23:59 -05:00
extern Load_XModelSurfsFixup_t Load_XModelSurfsFixup;
typedef void(*Load_XStringArray_t)(bool atStreamStart, int count);
2017-01-19 16:23:59 -05:00
extern Load_XStringArray_t Load_XStringArray;
typedef void(*Load_XStringCustom_t)(const char** str);
2017-01-19 16:23:59 -05:00
extern Load_XStringCustom_t Load_XStringCustom;
typedef void(*Load_FxEffectDefHandle_t)(bool atStreamStart);
2017-01-19 16:23:59 -05:00
extern Load_FxEffectDefHandle_t Load_FxEffectDefHandle;
typedef void(*Load_FxElemDef_t)(bool atStreamStart);
2017-01-19 16:23:59 -05:00
extern Load_FxElemDef_t Load_FxElemDef;
typedef void(*Load_GfxImagePtr_t)(bool atStreamStart);
2017-01-19 16:23:59 -05:00
extern Load_GfxImagePtr_t Load_GfxImagePtr;
typedef void(*Load_GfxTextureLoad_t)(bool atStreamStart);
2017-01-19 16:23:59 -05:00
extern Load_GfxTextureLoad_t Load_GfxTextureLoad;
typedef int(*Load_Texture_t)(GfxImageLoadDef** loadDef, GfxImage* image);
2017-01-19 16:23:59 -05:00
extern Load_Texture_t Load_Texture;
typedef void(*Load_SndAliasCustom_t)(snd_alias_list_t** var);
2017-01-19 16:23:59 -05:00
extern Load_SndAliasCustom_t Load_SndAliasCustom;
typedef void(*Load_MaterialHandle_t)(bool atStreamStart);
2017-01-19 16:23:59 -05:00
extern Load_MaterialHandle_t Load_MaterialHandle;
typedef void(*Load_PhysCollmapPtr_t)(bool atStreamStart);
2017-01-19 16:23:59 -05:00
extern Load_PhysCollmapPtr_t Load_PhysCollmapPtr;
typedef void(*Load_PhysPresetPtr_t)(bool atStreamStart);
2017-01-19 16:23:59 -05:00
extern Load_PhysPresetPtr_t Load_PhysPresetPtr;
typedef void(*Load_TracerDefPtr_t)(bool atStreamStart);
2017-01-19 16:23:59 -05:00
extern Load_TracerDefPtr_t Load_TracerDefPtr;
typedef void(*Load_snd_alias_list_nameArray_t)(bool atStreamStart, int count);
2017-01-19 16:23:59 -05:00
extern Load_snd_alias_list_nameArray_t Load_snd_alias_list_nameArray;
typedef void(*Menus_CloseAll_t)(UiContext* dc);
2017-01-19 16:23:59 -05:00
extern Menus_CloseAll_t Menus_CloseAll;
typedef void(*Menus_CloseRequest_t)(UiContext* dc, menuDef_t* menu);
2022-04-15 08:50:22 -04:00
extern Menus_CloseRequest_t Menus_CloseRequest;
typedef int(*Menus_OpenByName_t)(UiContext* dc, const char* p);
2017-01-19 16:23:59 -05:00
extern Menus_OpenByName_t Menus_OpenByName;
typedef menuDef_t *(*Menus_FindByName_t)(UiContext* dc, const char* name);
2017-01-19 16:23:59 -05:00
extern Menus_FindByName_t Menus_FindByName;
typedef bool(*Menu_IsVisible_t)(UiContext* dc, menuDef_t* menu);
2017-01-19 16:23:59 -05:00
extern Menu_IsVisible_t Menu_IsVisible;
typedef bool(*Menus_MenuIsInStack_t)(UiContext* dc, menuDef_t* menu);
2017-01-19 16:23:59 -05:00
extern Menus_MenuIsInStack_t Menus_MenuIsInStack;
typedef menuDef_t*(*Menu_GetFocused_t)(UiContext* ctx);
2021-05-04 09:47:46 -04:00
extern Menu_GetFocused_t Menu_GetFocused;
typedef void(*Menu_HandleKey_t)(UiContext* ctx, menuDef_t* menu, Game::keyNum_t key, int down);
2021-05-04 09:47:46 -04:00
extern Menu_HandleKey_t Menu_HandleKey;
typedef bool(*UI_KeyEvent_t)(int clientNum, int key, int down);
2021-05-04 09:47:46 -04:00
extern UI_KeyEvent_t UI_KeyEvent;
typedef const char*(*UI_SafeTranslateString_t)(const char* reference);
extern UI_SafeTranslateString_t UI_SafeTranslateString;
typedef void(*UI_ReplaceConversions_t)(const char* sourceString, ConversionArguments* arguments, char* outputString, size_t outputStringSize);
extern UI_ReplaceConversions_t UI_ReplaceConversions;
2022-08-24 17:46:07 -04:00
typedef int(*UI_ParseInfos_t)(const char* buf, int max, char** infos);
extern UI_ParseInfos_t UI_ParseInfos;
typedef void(*MSG_Init_t)(msg_t* buf, unsigned char* data, int length);
2017-01-19 16:23:59 -05:00
extern MSG_Init_t MSG_Init;
typedef void(*MSG_ReadData_t)(msg_t* msg, void* data, int len);
2017-01-19 16:23:59 -05:00
extern MSG_ReadData_t MSG_ReadData;
typedef int(*MSG_ReadLong_t)(msg_t* msg);
2017-01-19 16:23:59 -05:00
extern MSG_ReadLong_t MSG_ReadLong;
typedef int(*MSG_ReadBit_t)(msg_t* msg);
extern MSG_ReadBit_t MSG_ReadBit;
typedef int(*MSG_ReadBits_t)(msg_t* msg, int bits);
extern MSG_ReadBits_t MSG_ReadBits;
typedef int(*MSG_ReadShort_t)(msg_t* msg);
2017-01-19 16:23:59 -05:00
extern MSG_ReadShort_t MSG_ReadShort;
typedef __int64(*MSG_ReadInt64_t)(msg_t* msg);
2017-01-19 16:23:59 -05:00
extern MSG_ReadInt64_t MSG_ReadInt64;
typedef char* (*MSG_ReadString_t)(msg_t* msg);
2017-01-19 16:23:59 -05:00
extern MSG_ReadString_t MSG_ReadString;
typedef char* (*MSG_ReadStringLine_t)(msg_t *msg, char *string, unsigned int maxChars);
extern MSG_ReadStringLine_t MSG_ReadStringLine;
typedef int(*MSG_ReadByte_t)(msg_t* msg);
2017-01-19 16:23:59 -05:00
extern MSG_ReadByte_t MSG_ReadByte;
typedef int(*MSG_ReadBitsCompress_t)(const char *from, char *to, int size);
2017-01-19 16:23:59 -05:00
extern MSG_ReadBitsCompress_t MSG_ReadBitsCompress;
typedef void(*MSG_WriteByte_t)(msg_t* msg, int c);
2017-01-19 16:23:59 -05:00
extern MSG_WriteByte_t MSG_WriteByte;
typedef void(*MSG_WriteData_t)(msg_t *buf, const void *data, int length);
2017-01-19 16:23:59 -05:00
extern MSG_WriteData_t MSG_WriteData;
typedef void(*MSG_WriteLong_t)(msg_t *msg, int c);
2017-01-19 16:23:59 -05:00
extern MSG_WriteLong_t MSG_WriteLong;
typedef void(*MSG_WriteShort_t)(msg_t* msg, int s);
extern MSG_WriteShort_t MSG_WriteShort;
typedef void(*MSG_WriteString_t)(msg_t* msg, const char *str);
extern MSG_WriteString_t MSG_WriteString;
typedef bool(*MSG_ReadDeltaUsercmdKey_t)(msg_t* msg, int key, const usercmd_s* from, usercmd_s* to);
2022-08-10 18:21:58 -04:00
extern MSG_ReadDeltaUsercmdKey_t MSG_ReadDeltaUsercmdKey;
typedef int(*MSG_WriteBitsCompress_t)(bool trainHuffman, const char *from, char *to, int size);
2017-01-19 16:23:59 -05:00
extern MSG_WriteBitsCompress_t MSG_WriteBitsCompress;
typedef void(*NetadrToSockadr_t)(netadr_t *a, sockaddr *s);
2017-01-19 16:23:59 -05:00
extern NetadrToSockadr_t NetadrToSockadr;
typedef const char* (*NET_AdrToString_t)(netadr_t adr);
2017-01-19 16:23:59 -05:00
extern NET_AdrToString_t NET_AdrToString;
typedef bool(*NET_CompareAdr_t)(netadr_t a, netadr_t b);
2017-01-19 16:23:59 -05:00
extern NET_CompareAdr_t NET_CompareAdr;
typedef void(*NET_DeferPacketToClient_t)(netadr_t *, msg_t *);
extern NET_DeferPacketToClient_t NET_DeferPacketToClient;
typedef const char* (*NET_ErrorString_t)();
2017-01-19 16:23:59 -05:00
extern NET_ErrorString_t NET_ErrorString;
typedef void(*NET_Init_t)();
2017-01-19 16:23:59 -05:00
extern NET_Init_t NET_Init;
typedef bool(*NET_IsLocalAddress_t)(netadr_t adr);
2017-01-19 16:23:59 -05:00
extern NET_IsLocalAddress_t NET_IsLocalAddress;
typedef int(*NET_StringToAdr_t)(const char *s, netadr_t *a);
2017-01-19 16:23:59 -05:00
extern NET_StringToAdr_t NET_StringToAdr;
typedef void(*NET_OutOfBandPrint_t)(netsrc_t sock, netadr_t adr, const char *data);
2017-01-19 16:23:59 -05:00
extern NET_OutOfBandPrint_t NET_OutOfBandPrint;
typedef void(*NET_OutOfBandData_t)(netsrc_t sock, netadr_t adr, const char *format, int len);
2017-01-19 16:23:59 -05:00
extern NET_OutOfBandData_t NET_OutOfBandData;
typedef int(*NET_OutOfBandVoiceData_t)(netsrc_t sock, netadr_t adr, unsigned char* format, int len, bool voiceData);
2022-08-13 11:19:45 -04:00
extern NET_OutOfBandVoiceData_t NET_OutOfBandVoiceData;
typedef void(*Live_MPAcceptInvite_t)(_XSESSION_INFO *hostInfo, const int controllerIndex, bool fromGameInvite);
2017-01-19 16:23:59 -05:00
extern Live_MPAcceptInvite_t Live_MPAcceptInvite;
typedef int(*Live_GetMapIndex_t)(const char* mapname);
2017-01-19 16:23:59 -05:00
extern Live_GetMapIndex_t Live_GetMapIndex;
typedef int(*Live_GetPrestige_t)(int controllerIndex);
2017-01-29 09:10:54 -05:00
extern Live_GetPrestige_t Live_GetPrestige;
typedef int(*Live_GetXp_t)(int controllerIndex);
2017-01-29 09:10:54 -05:00
extern Live_GetXp_t Live_GetXp;
typedef const char*(*Live_GetLocalClientName_t)(int controllerIndex);
2022-08-02 17:04:02 -04:00
extern Live_GetLocalClientName_t Live_GetLocalClientName;
typedef int(*LiveStorage_GetStat_t)(int controllerIndex, int index);
extern LiveStorage_GetStat_t LiveStorage_GetStat;
typedef char*(*Scr_AddSourceBuffer_t)(const char* filename, const char* extFilename, const char* codePos, bool archive);
2022-07-07 09:32:18 -04:00
extern Scr_AddSourceBuffer_t Scr_AddSourceBuffer;
2017-01-19 16:23:59 -05:00
typedef int(*PC_ReadToken_t)(source_t*, token_t*);
2017-01-19 16:23:59 -05:00
extern PC_ReadToken_t PC_ReadToken;
typedef int(*PC_ReadTokenHandle_t)(int handle, pc_token_s *pc_token);
2017-01-19 16:23:59 -05:00
extern PC_ReadTokenHandle_t PC_ReadTokenHandle;
typedef void(*PC_SourceError_t)(int, const char*, ...);
2017-01-19 16:23:59 -05:00
extern PC_SourceError_t PC_SourceError;
typedef int(*Party_GetMaxPlayers_t)(PartyData* party);
2017-01-19 16:23:59 -05:00
extern Party_GetMaxPlayers_t Party_GetMaxPlayers;
typedef int(*PartyHost_CountMembers_t)(PartyData* party);
2017-01-19 16:23:59 -05:00
extern PartyHost_CountMembers_t PartyHost_CountMembers;
typedef netadr_t *(*PartyHost_GetMemberAddressBySlot_t)(int unk, void *party, const int slot);
2017-01-19 16:23:59 -05:00
extern PartyHost_GetMemberAddressBySlot_t PartyHost_GetMemberAddressBySlot;
typedef const char *(*PartyHost_GetMemberName_t)(PartyData* party, const int clientNum);
2017-01-19 16:23:59 -05:00
extern PartyHost_GetMemberName_t PartyHost_GetMemberName;
typedef int(*Party_InParty_t)(PartyData* party);
2022-08-13 11:19:45 -04:00
extern Party_InParty_t Party_InParty;
typedef void(*Playlist_ParsePlaylists_t)(const char* data);
2017-01-19 16:23:59 -05:00
extern Playlist_ParsePlaylists_t Playlist_ParsePlaylists;
typedef Font_s*(*R_RegisterFont_t)(const char* asset, int safe);
2017-01-19 16:23:59 -05:00
extern R_RegisterFont_t R_RegisterFont;
typedef void(*R_AddCmdDrawText_t)(const char *text, int maxChars, Font_s *font, float x, float y, float xScale, float yScale, float rotation, const float *color, int style);
2017-01-19 16:23:59 -05:00
extern R_AddCmdDrawText_t R_AddCmdDrawText;
typedef void(*R_AddCmdDrawStretchPic_t)(float x, float y, float w, float h, float xScale, float yScale, float xay, float yay, const float *color, Game::Material* material);
2017-01-19 16:23:59 -05:00
extern R_AddCmdDrawStretchPic_t R_AddCmdDrawStretchPic;
typedef void*(*R_AllocStaticIndexBuffer_t)(IDirect3DIndexBuffer9** store, int length);
2017-01-19 16:23:59 -05:00
extern R_AllocStaticIndexBuffer_t R_AllocStaticIndexBuffer;
typedef bool(*R_Cinematic_StartPlayback_Now_t)();
2017-01-19 16:23:59 -05:00
extern R_Cinematic_StartPlayback_Now_t R_Cinematic_StartPlayback_Now;
typedef void(*R_LoadGraphicsAssets_t)();
2017-01-19 16:23:59 -05:00
extern R_LoadGraphicsAssets_t R_LoadGraphicsAssets;
typedef int(*R_TextWidth_t)(const char* text, int maxlength, Font_s* font);
2017-01-19 16:23:59 -05:00
extern R_TextWidth_t R_TextWidth;
typedef int(*R_TextHeight_t)(Font_s* font);
2017-01-19 16:23:59 -05:00
extern R_TextHeight_t R_TextHeight;
typedef void(*R_FlushSun_t)();
2017-01-19 16:23:59 -05:00
extern R_FlushSun_t R_FlushSun;
typedef GfxWorld*(*R_SortWorldSurfaces_t)();
2017-03-27 11:48:52 -04:00
extern R_SortWorldSurfaces_t R_SortWorldSurfaces;
typedef script_t*(*Script_Alloc_t)(int length);
2017-01-19 16:23:59 -05:00
extern Script_Alloc_t Script_Alloc;
typedef void(*Script_SetupTokens_t)(script_t* script, void* tokens);
2017-01-19 16:23:59 -05:00
extern Script_SetupTokens_t Script_SetupTokens;
typedef int(*Script_CleanString_t)(char* buffer);
2017-01-19 16:23:59 -05:00
extern Script_CleanString_t Script_CleanString;
typedef char*(*SE_Load_t)(const char* file, int Unk);
2017-01-19 16:23:59 -05:00
extern SE_Load_t SE_Load;
typedef char*(*SEH_StringEd_GetString_t)(const char* string);
2017-01-19 16:23:59 -05:00
extern SEH_StringEd_GetString_t SEH_StringEd_GetString;
typedef unsigned int(*SEH_ReadCharFromString_t)(const char** text, int* isTrailingPunctuation);
extern SEH_ReadCharFromString_t SEH_ReadCharFromString;
2022-08-31 16:21:26 -04:00
typedef int(*SEH_GetCurrentLanguage_t)();
extern SEH_GetCurrentLanguage_t SEH_GetCurrentLanguage;
typedef const char*(*SL_ConvertToString_t)(scr_string_t stringValue);
2017-01-19 16:23:59 -05:00
extern SL_ConvertToString_t SL_ConvertToString;
typedef short(*SL_GetString_t)(const char *str, unsigned int user);
2017-01-19 16:23:59 -05:00
extern SL_GetString_t SL_GetString;
typedef void(*SL_AddRefToString_t)(unsigned int stringValue);
2022-04-09 12:27:18 -04:00
extern SL_AddRefToString_t SL_AddRefToString;
typedef void(*SL_RemoveRefToString_t)(unsigned int stringValue);
2022-04-09 12:27:18 -04:00
extern SL_RemoveRefToString_t SL_RemoveRefToString;
typedef void(*SND_Init_t)(int a1, int a2, int a3);
2017-01-19 16:23:59 -05:00
extern SND_Init_t SND_Init;
typedef void(*SND_InitDriver_t)();
2017-01-19 16:23:59 -05:00
extern SND_InitDriver_t SND_InitDriver;
typedef void(*SockadrToNetadr_t)(sockaddr *s, netadr_t *a);
2017-01-19 16:23:59 -05:00
extern SockadrToNetadr_t SockadrToNetadr;
typedef void(*Steam_JoinLobby_t)(SteamID, char);
2017-01-19 16:23:59 -05:00
extern Steam_JoinLobby_t Steam_JoinLobby;
typedef const char*(*StringTable_Lookup_t)(const StringTable *table, const int comparisonColumn, const char *value, const int valueColumn);
extern StringTable_Lookup_t StringTable_Lookup;
typedef const char* (*StringTable_GetColumnValueForRow_t)(const StringTable* table, int, int column);
2022-03-21 14:55:35 -04:00
extern StringTable_GetColumnValueForRow_t StringTable_GetColumnValueForRow;
typedef int(*StringTable_HashString_t)(const char* string);
extern StringTable_HashString_t StringTable_HashString;
typedef void(*TeleportPlayer_t)(gentity_t* entity, float* pos, float* orientation);
2017-01-19 16:23:59 -05:00
extern TeleportPlayer_t TeleportPlayer;
typedef void(*UI_AddMenuList_t)(UiContext* dc, MenuList* menuList, int close);
2017-01-19 16:23:59 -05:00
extern UI_AddMenuList_t UI_AddMenuList;
2021-08-23 16:45:22 -04:00
typedef uiMenuCommand_t(*UI_GetActiveMenu_t)(int localClientNum);
2021-08-23 16:45:22 -04:00
extern UI_GetActiveMenu_t UI_GetActiveMenu;
2017-01-19 16:23:59 -05:00
typedef char*(*UI_CheckStringTranslation_t)(char*, char*);
2017-01-19 16:23:59 -05:00
extern UI_CheckStringTranslation_t UI_CheckStringTranslation;
typedef MenuList*(*UI_LoadMenus_t)(const char* menuFile, int imageTrack);
2017-01-19 16:23:59 -05:00
extern UI_LoadMenus_t UI_LoadMenus;
typedef void(*UI_UpdateArenas_t)();
2017-01-19 16:23:59 -05:00
extern UI_UpdateArenas_t UI_UpdateArenas;
typedef void(*UI_SortArenas_t)();
extern UI_SortArenas_t UI_SortArenas;
typedef void(*UI_DrawHandlePic_t)(ScreenPlacement* scrPlace, float x, float y, float w, float h, int horzAlign, int vertAlign, const float* color, Material* material);
2017-01-19 16:23:59 -05:00
extern UI_DrawHandlePic_t UI_DrawHandlePic;
typedef ScreenPlacement*(*ScrPlace_GetActivePlacement_t)(int localClientNum);
2021-09-07 19:53:25 -04:00
extern ScrPlace_GetActivePlacement_t ScrPlace_GetActivePlacement;
2017-01-19 16:23:59 -05:00
typedef int(*UI_TextWidth_t)(const char* text, int maxChars, Font_s* font, float scale);
2017-01-19 16:23:59 -05:00
extern UI_TextWidth_t UI_TextWidth;
typedef int(*UI_TextHeight_t)(Font_s* font, float scale);
2022-04-15 08:50:22 -04:00
extern UI_TextHeight_t UI_TextHeight;
typedef void(*UI_DrawText_t)(const ScreenPlacement* scrPlace, const char* text, int maxChars, Font_s* font, float x, float y, int horzAlign, int vertAlign, float scale, const float* color, int style);
2017-01-19 16:23:59 -05:00
extern UI_DrawText_t UI_DrawText;
2021-09-07 19:53:25 -04:00
typedef Font_s*(*UI_GetFontHandle_t)(ScreenPlacement* scrPlace, int fontEnum, float scale);
extern UI_GetFontHandle_t UI_GetFontHandle;
typedef void(*ScrPlace_ApplyRect_t)(const ScreenPlacement* scrPlace, float* x, float* y, float* w, float* h, int horzAlign, int vertAlign);
2021-09-07 19:53:25 -04:00
extern ScrPlace_ApplyRect_t ScrPlace_ApplyRect;
2017-01-19 16:23:59 -05:00
typedef const char*(*Win_GetLanguage_t)();
2017-01-19 16:23:59 -05:00
extern Win_GetLanguage_t Win_GetLanguage;
typedef void(*Vec3UnpackUnitVec_t)(PackedUnitVec, vec3_t*);
2017-01-19 16:23:59 -05:00
extern Vec3UnpackUnitVec_t Vec3UnpackUnitVec;
2021-08-24 11:20:52 -04:00
typedef float(*vectoyaw_t)(vec2_t* vec);
2021-08-24 11:20:52 -04:00
extern vectoyaw_t vectoyaw;
typedef float(*AngleNormalize360_t)(float val);
2021-08-24 11:20:52 -04:00
extern AngleNormalize360_t AngleNormalize360;
2017-01-19 16:23:59 -05:00
typedef void(*unzClose_t)(void* handle);
2017-04-06 16:22:30 -04:00
extern unzClose_t unzClose;
typedef void(*RB_DrawCursor_t)(Material* material, char cursor, float x, float y, float sinAngle, float cosAngle, Font_s* font, float xScale, float yScale, unsigned int color);
extern RB_DrawCursor_t RB_DrawCursor;
typedef float(*R_NormalizedTextScale_t)(Font_s* font, float scale);
extern R_NormalizedTextScale_t R_NormalizedTextScale;
typedef void(*Material_Process2DTextureCoordsForAtlasing_t)(const Material* material, float* s0, float* s1, float* t0, float* t1);
extern Material_Process2DTextureCoordsForAtlasing_t Material_Process2DTextureCoordsForAtlasing;
typedef void(*Byte4PackRgba_t)(const float* from, char* to);
extern Byte4PackRgba_t Byte4PackRgba;
2017-04-06 16:22:30 -04:00
typedef int(*RandWithSeed_t)(int* seed);
extern RandWithSeed_t RandWithSeed;
typedef void(*GetDecayingLetterInfo_t)(unsigned int letter, int* randSeed, int decayTimeElapsed, int fxBirthTime, int fxDecayDuration, unsigned __int8 alpha, bool* resultSkipDrawing, char* resultAlpha, unsigned int* resultLetter, bool* resultDrawExtraFxChar);
extern GetDecayingLetterInfo_t GetDecayingLetterInfo;
2021-09-07 18:31:56 -04:00
typedef void(*Field_Draw_t)(int localClientNum, field_t* edit, int x, int y, int horzAlign, int vertAlign);
2021-09-07 18:31:56 -04:00
extern Field_Draw_t Field_Draw;
typedef void(*Field_AdjustScroll_t)(ScreenPlacement* scrPlace, field_t* edit);
extern Field_AdjustScroll_t Field_AdjustScroll;
2017-04-06 16:22:30 -04:00
typedef void(*AimAssist_ApplyAutoMelee_t)(const AimInput* input, AimOutput* output);
extern AimAssist_ApplyAutoMelee_t AimAssist_ApplyAutoMelee;
2021-08-23 16:45:22 -04:00
typedef gentity_s*(*Weapon_RocketLauncher_Fire_t)(gentity_s* ent, unsigned int weaponIndex, float spread, weaponParms* wp, const float* gunVel, lockonFireParms* lockParms, bool magicBullet);
2022-02-05 11:24:59 -05:00
extern Weapon_RocketLauncher_Fire_t Weapon_RocketLauncher_Fire;
typedef void(*Jump_ClearState_t)(playerState_s* ps);
2021-12-22 10:25:58 -05:00
extern Jump_ClearState_t Jump_ClearState;
typedef void(*PM_playerTrace_t)(pmove_s* pm, trace_t* results, const float* start, const float* end, const Bounds* bounds, int passEntityNum, int contentMask);
2021-12-22 10:25:58 -05:00
extern PM_playerTrace_t PM_playerTrace;
typedef void(*PM_Trace_t)(pmove_s* pm, trace_t* results, const float* start, const float* end, const Bounds* bounds, int passEntityNum, int contentMask);
2021-12-22 10:25:58 -05:00
extern PM_Trace_t PM_Trace;
typedef EffectiveStance(*PM_GetEffectiveStance_t)(const playerState_s* ps);
2022-01-07 06:20:43 -05:00
extern PM_GetEffectiveStance_t PM_GetEffectiveStance;
typedef void(*PM_UpdateLean_t)(playerState_s* ps, float msec, usercmd_s* cmd, void(*capsuleTrace)(trace_t*, const float*, const float*, const Bounds*, int, int));
2022-08-10 18:21:58 -04:00
extern PM_UpdateLean_t PM_UpdateLean;
typedef void(*IN_RecenterMouse_t)();
2022-04-29 04:56:51 -04:00
extern IN_RecenterMouse_t IN_RecenterMouse;
typedef void(*IN_MouseMove_t)();
2022-04-29 04:56:51 -04:00
extern IN_MouseMove_t IN_MouseMove;
typedef void(*IN_Init_t)();
extern IN_Init_t IN_Init;
typedef void(*IN_Shutdown_t)();
extern IN_Shutdown_t IN_Shutdown;
typedef void(*Touch_Item_t)(gentity_s* ent, gentity_s* other, int touched);
extern Touch_Item_t Touch_Item;
typedef void(*Add_Ammo_t)(gentity_s* ent, unsigned int weaponIndex, unsigned char weaponModel, int count, int fillClip);
extern Add_Ammo_t Add_Ammo;
typedef void(*ClientUserinfoChanged_t)(int clientNum);
2022-06-04 04:56:14 -04:00
extern ClientUserinfoChanged_t ClientUserinfoChanged;
typedef void(*player_die_t)(gentity_s* self, const gentity_s* inflictor, gentity_s* attacker, int damage, int meansOfDeath, int iWeapon, const float* vDir, const hitLocation_t hitLoc, int psTimeOffset);
extern player_die_t player_die;
typedef float(*Vec3Normalize_t)(float* v);
extern Vec3Normalize_t Vec3Normalize;
typedef void(*Vec3NormalizeFast_t)(float* v);
extern Vec3NormalizeFast_t Vec3NormalizeFast;
typedef float(*Vec2Normalize_t)(float* v);
extern Vec2Normalize_t Vec2Normalize;
typedef void(*Vec2NormalizeFast_t)(float* v);
extern Vec2NormalizeFast_t Vec2NormalizeFast;
typedef void*(*Z_VirtualAlloc_t)(int size);
2022-07-07 09:32:18 -04:00
extern Z_VirtualAlloc_t Z_VirtualAlloc;
typedef void(*I_strncpyz_t)(char* dest, const char* src, int destsize);
2022-07-16 18:15:15 -04:00
extern I_strncpyz_t I_strncpyz;
typedef char*(*I_CleanStr_t)(char* string);
2022-08-21 12:52:54 -04:00
extern I_CleanStr_t I_CleanStr;
typedef void(*XNAddrToString_t)(const XNADDR* xnaddr, char* str);
2022-08-08 08:37:24 -04:00
extern XNAddrToString_t XNAddrToString;
typedef int(*Voice_IncomingVoiceData_t)(const SessionData* session, int clientNum, unsigned char* data, int size);
2022-08-13 11:19:45 -04:00
extern Voice_IncomingVoiceData_t Voice_IncomingVoiceData;
typedef bool(*Voice_IsClientTalking_t)(int clientNum);
2022-08-14 11:15:45 -04:00
extern Voice_IsClientTalking_t Voice_IsClientTalking;
typedef int(*LargeLocalBegin_t)(int size);
extern LargeLocalBegin_t LargeLocalBegin;
typedef int(*LargeLocalBeginRight_t)(int size);
extern LargeLocalBeginRight_t LargeLocalBeginRight;
constexpr std::size_t STATIC_MAX_LOCAL_CLIENTS = 1;
constexpr std::size_t MAX_LOCAL_CLIENTS = 1;
constexpr std::size_t MAX_CLIENTS = 18;
2022-03-17 14:50:20 -04:00
constexpr auto CMD_MAX_NESTING = 8;
extern CmdArgs* cmd_args;
extern CmdArgs* sv_cmd_args;
2017-01-19 16:23:59 -05:00
extern cmd_function_t** cmd_functions;
extern float* cgameFOVSensitivityScale;
2017-01-19 16:23:59 -05:00
extern source_t **sourceFiles;
extern keywordHash_t **menuParseKeywordHash;
2022-04-15 08:50:22 -04:00
extern UiContext* uiContext;
2017-01-19 16:23:59 -05:00
extern int* arenaCount;
extern mapArena_t* arenas;
extern int* gameTypeCount;
extern gameTypeName_t* gameTypes;
extern bool* g_lobbyCreateInProgress;
extern PartyData* g_lobbyData;
extern PartyData* g_partyData;
2017-01-19 16:23:59 -05:00
2022-08-13 11:19:45 -04:00
extern SessionData* g_serverSession;
2017-01-19 16:23:59 -05:00
extern int* numIP;
extern netIP_t* localIP;
extern int* demoFile;
extern int* demoPlaying;
extern int* demoRecording;
extern int* serverMessageSequence;
extern netadr_t* connectedHost;
extern SOCKET* ip_socket;
extern uint32_t* com_frameTime;
extern SafeArea* safeArea;
extern SpawnVar* spawnVars;
extern MapEnts** marMapEntsPtr;
extern IDirect3D9** d3d9;
extern IDirect3DDevice9** dx_ptr;
extern mapname_t* mapnames;
extern char*** varXString;
extern TracerDef*** varTracerDefPtr;
extern XModel*** varXModelPtr;
extern XModel** varXModel;
extern PathData** varPathData;
extern const char** varConstChar;
extern Material*** varMaterialHandle;
extern FxEffectDef*** varFxEffectDefHandle;
extern PhysCollmap*** varPhysCollmapPtr;
extern PhysPreset*** varPhysPresetPtr;
extern MaterialPass** varMaterialPass;
2017-01-19 16:23:59 -05:00
extern snd_alias_list_t*** varsnd_alias_list_name;
extern FxElemField* s_elemFields;
2022-06-30 15:37:47 -04:00
extern visField_t* visionDefFields;
2017-04-24 15:13:54 -04:00
extern infoParm_t* infoParams;
extern clientState_t* clcState;
2020-12-04 16:18:30 -05:00
extern GfxScene* scene;
extern Console* con;
2021-09-07 18:31:56 -04:00
extern ConDrawInputGlob* conDrawInputGlob;
extern int* g_console_field_width;
extern float* g_console_char_height;
2021-09-07 18:31:56 -04:00
extern field_t* g_consoleField;
2021-08-23 16:45:22 -04:00
extern sharedUiInfo_t* sharedUiInfo;
extern ScreenPlacement* scrPlaceFull;
extern ScreenPlacement* scrPlaceFullUnsafe;
extern ScreenPlacement* scrPlaceView;
extern clientActive_t* clients;
2021-08-24 11:20:52 -04:00
extern cg_s* cgArray;
extern cgs_t* cgsArray;
2021-08-24 11:20:52 -04:00
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;
2022-04-12 08:34:51 -04:00
extern const char* MY_CMDS;
constexpr auto MAX_MODELS = 512;
extern XModel** cached_models;
extern float (*CorrectSolidDeltas)[26][3];
2021-12-22 10:25:58 -05:00
2022-04-15 08:50:22 -04:00
extern level_locals_t* level;
extern float (*penetrationDepthTable)[PENETRATE_TYPE_COUNT][SURF_TYPE_COUNT];
2022-05-03 12:57:36 -04:00
2022-04-29 04:56:51 -04:00
extern WinMouseVars_t* s_wmv;
extern int* window_center_x;
extern int* window_center_y;
extern DeferredQueue* deferredQueue;
extern int* g_waitingForKey;
extern Material** whiteMaterial;
extern unsigned long* _tls_index;
2022-06-12 17:07:53 -04:00
extern int* cls_uiStarted;
extern int* com_fixedConsolePosition;
extern int* com_errorPrintsCount;
constexpr std::size_t PLAYER_CARD_UI_STRING_COUNT = 18;
extern unsigned int* playerCardUIStringIndex;
extern char (*playerCardUIStringBuf)[PLAYER_CARD_UI_STRING_COUNT][38];
2022-08-24 10:38:14 -04:00
extern uiInfo_s* uiInfoArray;
extern int* logfile;
2022-08-02 17:04:02 -04:00
extern GamerSettingState* gamerSettings;
extern unsigned char* g_largeLocalBuf;
extern int* g_largeLocalPos;
extern int* g_largeLocalRightPos;
2022-08-24 17:46:07 -04:00
extern char** ui_arenaInfos;
extern int* ui_numArenas;
extern int* ui_arenaBufPos;
ScreenPlacement* ScrPlace_GetFullPlacement();
2022-04-15 08:50:22 -04:00
ScreenPlacement* ScrPlace_GetUnsafeFullPlacement();
void UI_FilterStringForButtonAnimation(char* str, unsigned int strMaxSize);
void Menu_FreeItemMemory(itemDef_s* item);
void Menu_SetNextCursorItem(UiContext* ctx, menuDef_t* currentMenu, int unk = 1);
void Menu_SetPrevCursorItem(UiContext* ctx, menuDef_t* currentMenu, int unk = 1);
2017-01-19 16:23:59 -05:00
const char* TableLookup(StringTable* stringtable, int row, int column);
const char* UI_LocalizeMapName(const char* mapName);
const char* UI_LocalizeGameType(const char* gameType);
float UI_GetScoreboardLeft(void*);
2022-04-09 08:29:58 -04:00
bool PM_IsAdsAllowed(playerState_s* ps);
2018-12-17 08:29:18 -05:00
void ShowMessageBox(const std::string& message, const std::string& title);
2017-01-19 16:23:59 -05:00
unsigned int R_HashString(const char* string);
2021-09-07 18:31:56 -04:00
unsigned int R_HashString(const char* string, size_t maxLen);
2017-01-19 16:23:59 -05:00
void R_LoadSunThroughDvars(const char* mapname, sunflare_t* sun);
void R_SetSunFromDvars(sunflare_t* sun);
void IN_KeyUp(kbutton_t* button);
void IN_KeyDown(kbutton_t* button);
void Load_IndexBuffer(void* data, IDirect3DIndexBuffer9** storeHere, int count);
void Load_VertexBuffer(void* data, IDirect3DVertexBuffer9** where, int len);
char* Com_GetParseThreadInfo();
void Com_SetParseNegativeNumbers(int parse);
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
2019-12-28 05:43:41 -05:00
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);
void QuatMultiply(const vec4_t* q1, const vec4_t* q2, vec4_t* res);
2019-12-28 05:43:41 -05:00
2017-03-27 11:48:52 -04:00
void SortWorldSurfaces(GfxWorld* world);
void R_AddDebugLine(float* color, float* v1, float* v2);
2017-03-28 02:57:14 -04:00
void R_AddDebugString(float *color, float *pos, float scale, const char *str);
2017-04-05 18:33:01 -04:00
void R_AddDebugBounds(float* color, Bounds* b);
void R_AddDebugBounds(float* color, Bounds* b, const float(*quat)[4]);
Glyph* R_GetCharacterGlyph(Font_s* font, unsigned int letter);
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);
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);
2021-08-23 16:45:22 -04:00
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);
2021-10-04 16:03:56 -04:00
2022-06-30 15:37:47 -04:00
bool ApplyTokenToField(unsigned int fieldNum, const char* token, visionSetVars_t* settings);
2022-08-31 16:21:26 -04:00
int SEH_GetLocalizedTokenReference(char* token, const char* reference, const char* messageType, msgLocErrType_t errType);
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);
void I_strcpy(char* dest, std::size_t destsize, const char* src);
2017-01-19 16:23:59 -05:00
}