#include "shared/shared.h"
Go to the source code of this file.
Functions | |
void | AngleVectors (vec3_t angles, vec3_t forward, vec3_t right, vec3_t up) |
vec_t | VectorNormalize (vec3_t v) |
vec_t | VectorNormalize2 (vec3_t v, vec3_t out) |
void | ClearBounds (vec3_t mins, vec3_t maxs) |
void | AddPointToBounds (const vec3_t v, vec3_t mins, vec3_t maxs) |
void | UnionBounds (vec3_t a[2], vec3_t b[2], vec3_t c[2]) |
vec_t | RadiusFromBounds (const vec3_t mins, const vec3_t maxs) |
char * | COM_SkipPath (const char *pathname) |
void | COM_StripExtension (const char *in, char *out, size_t size) |
char * | COM_FileExtension (const char *in) |
void | COM_FileBase (char *in, char *out) |
void | COM_FilePath (const char *in, char *out, size_t size) |
size_t | COM_DefaultExtension (char *path, const char *ext, size_t size) |
qboolean | COM_IsFloat (const char *s) |
qboolean | COM_IsUint (const char *s) |
qboolean | COM_IsPath (const char *s) |
qboolean | COM_IsWhite (const char *s) |
int | SortStrcmp (const void *p1, const void *p2) |
int | SortStricmp (const void *p1, const void *p2) |
size_t | COM_strclr (char *s) |
char * | va (const char *format,...) |
char * | COM_Parse (const char **data_p) |
size_t | COM_Compress (char *data) |
int | Q_strncasecmp (const char *s1, const char *s2, size_t n) |
int | Q_strcasecmp (const char *s1, const char *s2) |
char * | Q_strcasestr (const char *s1, const char *s2) |
size_t | Q_strlcpy (char *dst, const char *src, size_t size) |
size_t | Q_strlcat (char *dst, const char *src, size_t size) |
size_t | Q_concat (char *dest, size_t size,...) |
size_t | Q_vsnprintf (char *dest, size_t size, const char *fmt, va_list argptr) |
size_t | Q_vscnprintf (char *dest, size_t size, const char *fmt, va_list argptr) |
size_t | Q_snprintf (char *dest, size_t size, const char *fmt,...) |
size_t | Q_scnprintf (char *dest, size_t size, const char *fmt,...) |
char * | Q_strchrnul (const char *s, int c) |
void * | Q_memccpy (void *dst, const void *src, int c, size_t size) |
void | Q_setenv (const char *name, const char *value) |
char * | Info_ValueForKey (const char *s, const char *key) |
void | Info_RemoveKey (char *s, const char *key) |
qboolean | Info_Validate (const char *s) |
size_t | Info_SubValidate (const char *s) |
qboolean | Info_SetValueForKey (char *s, const char *key, const char *value) |
void | Info_NextPair (const char **string, char *key, char *value) |
void | Info_Print (const char *infostring) |
Variables | |
vec3_t | vec3_origin = { 0, 0, 0 } |
static char | com_token [4][MAX_TOKEN_CHARS] |
static int | com_tokidx |
void AddPointToBounds | ( | const vec3_t | v, |
vec3_t | mins, | ||
vec3_t | maxs | ||
) |
void AngleVectors | ( | vec3_t | angles, |
vec3_t | forward, | ||
vec3_t | right, | ||
vec3_t | up | ||
) |
Definition at line 23 of file shared.c.
Referenced by actorMachineGun(), ai_run(), Blaster_Fire(), boss2_firebullet_left(), boss2_firebullet_right(), Boss2Rocket(), Chaingun_Fire(), CheckPowerArmor(), ChickRocket(), CL_AddExplosionLight(), CL_AddPacketEntities(), CL_AddPlayerBeams(), CL_AddViewWeapon(), CL_CalcViewValues(), CL_MuzzleFlash(), CL_MuzzleFlash2(), CL_SetupThirdPersionView(), CL_TrackerTrail(), ClientEndServerFrame(), CM_TransformedPointContents(), Drop_Item(), fire_flaregun(), fire_grenade(), fire_grenade2(), fire_hit(), fire_lead(), flare_sparks(), floater_fire_blaster(), floater_zap(), flyer_fire(), G_SetMovedir(), gib_touch(), GladiatorGun(), GunnerFire(), GunnerGrenade(), hover_fire_blaster(), InfantryMachineGun(), infront(), jorg_firebullet_left(), jorg_firebullet_right(), jorgBFG(), Machinegun_Fire(), makronBFG(), MakronHyperblaster(), MakronRailgun(), medic_cable_attack(), medic_fire_blaster(), mutant_jump_takeoff(), MVD_HitPlayer(), parasite_drain_attack(), PM_ClampAngles(), Pmove(), R_AliasSetUpLerpData(), R_AliasSetUpTransform(), R_SetupFrame(), RotatedBBox(), soldier_fire(), SP_func_door_secret(), supertankMachineGun(), supertankRocket(), SV_Push(), TankBlaster(), TankMachineGun(), TankRocket(), Touch_Multi(), turret_breach_fire(), UpdateChaseCam(), vkpt_freecam_update(), weapon_bfg_fire(), weapon_flaregun_fire(), weapon_grenade_fire(), weapon_grenadelauncher_fire(), weapon_railgun_fire(), Weapon_RocketLauncher_Fire(), weapon_shotgun_fire(), and weapon_supershotgun_fire().
void ClearBounds | ( | vec3_t | mins, |
vec3_t | maxs | ||
) |
Definition at line 91 of file shared.c.
Referenced by MOD_LoadMD2_GL(), and MOD_LoadMD2_RTX().
size_t COM_Compress | ( | char * | data | ) |
size_t COM_DefaultExtension | ( | char * | path, |
const char * | ext, | ||
size_t | size | ||
) |
void COM_FileBase | ( | char * | in, |
char * | out | ||
) |
char* COM_FileExtension | ( | const char * | in | ) |
Definition at line 199 of file shared.c.
Referenced by check_file_len(), Com_MapList_m(), FS_ListFiles(), and Sys_ListFiles_r().
void COM_FilePath | ( | const char * | in, |
char * | out, | ||
size_t | size | ||
) |
qboolean COM_IsFloat | ( | const char * | s | ) |
qboolean COM_IsPath | ( | const char * | s | ) |
Definition at line 348 of file shared.c.
Referenced by CL_ParsePlayerSkin(), fs_game_changed(), SV_Loadgame_f(), and SV_Savegame_f().
qboolean COM_IsUint | ( | const char * | s | ) |
Definition at line 330 of file shared.c.
Referenced by AC_Info_f(), cl_chat_sound_changed(), Com_ParseColor(), gtv_set_conn(), MVD_SetChannel(), MVD_SetPlayer(), NET_StringPairToAdr(), SV_DelFilterCmd_f(), SV_DelMatch_f(), SV_GetPlayer(), and UI_StatusEvent().
qboolean COM_IsWhite | ( | const char * | s | ) |
Definition at line 366 of file shared.c.
Referenced by parse_userinfo(), SV_UpdateUserinfo(), and UI_StatusEvent().
char* COM_Parse | ( | const char ** | data_p | ) |
Definition at line 455 of file shared.c.
Referenced by CL_ParseStatusResponse(), ED_ParseEdict(), MVD_ParseEntityString(), SCR_ExecuteLayoutString(), SpawnEntities(), and TH_DrawLayoutString().
char* COM_SkipPath | ( | const char * | pathname | ) |
Definition at line 152 of file shared.c.
Referenced by CL_PlayDemo_f(), demo_play_next(), and FS_ListFiles().
size_t COM_strclr | ( | char * | s | ) |
Definition at line 398 of file shared.c.
Referenced by CL_CheckForIgnore(), CL_Name_g(), CL_ParseCenterPrint(), and CL_ParsePrint().
void COM_StripExtension | ( | const char * | in, |
char * | out, | ||
size_t | size | ||
) |
void Info_NextPair | ( | const char ** | string, |
char * | key, | ||
char * | value | ||
) |
void Info_Print | ( | const char * | infostring | ) |
Definition at line 1235 of file shared.c.
Referenced by CL_DumpStatusResponse(), CL_Userinfo_f(), SV_DumpUser_f(), SV_Serverinfo_f(), and SV_ShowServerInfo_f().
void Info_RemoveKey | ( | char * | s, |
const char * | key | ||
) |
Definition at line 991 of file shared.c.
Referenced by Com_TestInfo_f(), Info_SetValueForKey(), and parse_userinfo().
qboolean Info_SetValueForKey | ( | char * | s, |
const char * | key, | ||
const char * | value | ||
) |
Definition at line 1137 of file shared.c.
Referenced by ClientConnect(), Com_TestInfo_f(), parse_userinfo(), SV_ParseDeltaUserinfo(), and SV_UpdateUserinfo().
size_t Info_SubValidate | ( | const char * | s | ) |
Definition at line 1112 of file shared.c.
Referenced by Info_SetValueForKey(), and validate_info_cvar().
qboolean Info_Validate | ( | const char * | s | ) |
Definition at line 1040 of file shared.c.
Referenced by CL_ParseStatusResponse(), ClientUserinfoChanged(), Com_TestInfo_f(), parse_userinfo(), and SV_UpdateUserinfo().
char* Info_ValueForKey | ( | const char * | s, |
const char * | key | ||
) |
Definition at line 945 of file shared.c.
Referenced by ClientConnect(), ClientTeam(), ClientUserinfoChanged(), ColorForStatus(), dummy_create(), IsFemale(), IsNeutral(), MVD_GameClientUserinfoChanged(), parse_userinfo(), PutClientInServer(), spectator_respawn(), SV_UpdateUserinfo(), SV_UserinfoChanged(), SVC_DirectConnect(), and UI_StatusEvent().
size_t Q_concat | ( | char * | dest, |
size_t | size, | ||
... | |||
) |
Definition at line 758 of file shared.c.
Referenced by bsp_mesh_register_textures(), BuildName(), check_player(), CL_AddPacketEntities(), CL_LoadClientinfo(), CL_RequestNextDownload(), Cmd_PrintHelp(), Cvar_BitInfo(), easy_open_read(), easy_open_write(), FS_LastModified(), FS_WhereIs_f(), GL_LoadWorld(), Keybind_Draw(), LoadCache(), LOC_LoadLocations(), MOD_LoadMD2_RTX(), open_file_read(), open_file_write(), override_entity_string(), parseMaterialsTable(), PlayerModel_Load(), Pop(), ProcessTexinfo(), Prompt_CompleteCommand(), q_printf(), R_BeginRegistration(), R_BeginRegistration_GL(), R_BeginRegistration_RTX(), R_RegisterImage(), R_SetSky(), R_SetSky_GL(), R_SetSky_RTX(), ReloadMedia(), S_RegisterSexedSound(), S_RegisterSound(), SCR_DrawInventory(), SV_LoadGameLibrary(), SV_ParseMapCmd(), SV_SpawnServer(), Sys_ListFiles_r(), V_Gun_Model_f(), vkpt_textures_prefetch(), and WriteCache().
Definition at line 895 of file shared.c.
Referenced by check_skins(), MOD_LoadMD2(), MOD_LoadMD2_GL(), MOD_LoadMD2_RTX(), and MOD_LoadSP2().
size_t Q_scnprintf | ( | char * | dest, |
size_t | size, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 867 of file shared.c.
Referenced by BuildList(), CL_Ammo_m(), CL_Armor_m(), CL_Cluster_m(), CL_ClusterThere_m(), CL_DemoPos_m(), CL_Fps_m(), CL_HdrColor_m(), CL_Health_m(), CL_Lag_m(), CL_Material_m(), CL_Material_Override_m(), CL_Mps_m(), CL_NumLightPolys_m(), CL_Ping_m(), CL_Pps_m(), CL_ResolutionScale_m(), CL_Timer_m(), CL_Ups_m(), CL_ViewDir_m(), CL_ViewPos_m(), CL_WeaponModel_m(), Com_FormatSize(), Com_FormatSizeLong(), Com_FormatTime(), Com_FormatTimeLong(), Com_Random_m(), Com_TestSnprintf_f(), draw_percent_bar(), format_demo_status(), GL_ViewCluster_m(), HUD_DrawNumber(), MVD_LayoutChannels(), MVD_LayoutFollow(), MVD_LayoutMenu(), NET_DnRate_m(), NET_UpRate_m(), R_Fps_m(), SVC_Info(), TH_DrawLayoutString(), TH_DrawNumber(), and VID_GetDefaultModeList().
size_t Q_snprintf | ( | char * | dest, |
size_t | size, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 846 of file shared.c.
Referenced by AC_LoadChecks(), AC_ParseViolation(), append_extra_userinfo(), bsp_mesh_create_from_bsp(), bsp_mesh_load_custom_sky(), CL_CheckForResend(), CL_IgnoreNick_f(), CL_InitLocal(), CL_MuzzleFlash(), CL_MuzzleFlash2(), CL_RegisterTEntSounds(), CL_UnIgnoreNick_f(), Cmd_PlayerList_f(), Cmd_Players_f(), Cmd_Say_f(), Com_Quit(), Com_TestSnprintf_f(), Con_DrawSolidConsole(), copy_file(), create_screenshot(), CreateTargetChangeLevel(), Cvar_ClampInteger(), Cvar_ClampValue(), Cvar_Inc_f(), Cvar_SetInteger(), Cvar_SetValue(), DeathmatchScoreboardMessage(), evaluate_reference_mode(), ExitLevel(), finish_download(), format_mask(), FS_Restart(), func_clock_format_countdown(), func_clock_think(), HelpComputer(), HTTP_QueueDownload(), HTTP_SetServer(), http_strerror(), inet_ntop4(), Key_Event(), load_sky_and_lava_clusters(), MVD_Connect_f(), MVD_GameInit(), MVD_LayoutChannels(), MVD_LayoutClients(), MVD_Play_f(), MVD_Say_f(), NET_AdrToString(), PlayDemo(), qvk_result_to_string(), read_level_file(), read_server_file(), remove_file(), scr_crosshair_changed(), SCR_DrawFPS(), SCR_DrawInventory(), SCR_ExecuteLayoutString(), SCR_PlayCinematic(), SCR_ScoreShot_f(), SkyLoadScatterParameters(), SP_target_speaker(), start_download(), SV_GetSaveInfo(), SV_ListMasters_f(), SV_StatusString(), SVCmd_WriteIP_f(), TCP_OpenSocket(), UDP_OpenSocket(), UI_Init(), UpdateStatus(), userinfo_ip_string(), VID_SetGeometry(), vtos(), write_level_file(), and write_server_file().
int Q_strcasecmp | ( | const char * | s1, |
const char * | s2 | ||
) |
Definition at line 666 of file shared.c.
Referenced by CL_AddPacketEntities(), CL_InitLocal(), find_dup(), MAT_FindPBRMaterial(), and validateMaterialsTable().
char* Q_strchrnul | ( | const char * | s, |
int | c | ||
) |
Definition at line 879 of file shared.c.
Referenced by AC_SimpleParse(), and CL_ParseStatusResponse().
size_t Q_strlcat | ( | char * | dst, |
const char * | src, | ||
size_t | size | ||
) |
Definition at line 735 of file shared.c.
Referenced by Cmd_Exec_f(), COM_DefaultExtension(), easy_open_read(), and IconOfSkinExists().
size_t Q_strlcpy | ( | char * | dst, |
const char * | src, | ||
size_t | size | ||
) |
Definition at line 715 of file shared.c.
Referenced by AC_ParseHash(), BuildName(), CL_Changing_f(), CL_CheckForIgnore(), CL_Connect_f(), CL_ConnectionlessPacket(), CL_FixUpGender(), CL_Mapname_m(), CL_Name_g(), CL_ParseStatusResponse(), CL_PlayDemo_f(), CL_RequestNextDownload(), CL_Server_m(), Cmd_ArgsBuffer(), Cmd_ArgvBuffer(), Cmd_PrintHelp(), Cmd_TokenizeString(), COM_FilePath(), Com_SetLastError(), COM_StripExtension(), Com_TestInfo_f(), create_channel(), demo_play_next(), dummy_create(), easy_open_read(), HTTP_SetServer(), IF_Replace(), LOC_Here_m(), LOC_There_m(), MOD_LoadMD2_RTX(), MVD_Connect_f(), MVD_Control_f(), MVD_GameInit(), MVD_ParseEntityString(), MVD_Play_f(), MVD_Spawn(), NET_StringToAdr(), parse_info_string(), parse_userinfo(), PlayerModel_Load(), Push(), Q_strlcat(), ReadLevel(), S_RegisterSound(), SCR_AddToChatHUD(), SCR_CenterPrint(), set_player_name(), SV_NextServer_f(), SV_SpawnServer(), SV_UserinfoChanged(), SVC_DirectConnect(), VID_GetDefaultModeList(), and vkpt_textures_prefetch().
int Q_strncasecmp | ( | const char * | s1, |
const char * | s2, | ||
size_t | n | ||
) |
Definition at line 642 of file shared.c.
Referenced by CL_Connect_f(), Prompt_AddMatch(), and Q_strcasestr().
size_t Q_vscnprintf | ( | char * | dest, |
size_t | size, | ||
const char * | fmt, | ||
va_list | argptr | ||
) |
Definition at line 823 of file shared.c.
Referenced by Com_Error(), Com_LPrintf(), and Q_scnprintf().
size_t Q_vsnprintf | ( | char * | dest, |
size_t | size, | ||
const char * | fmt, | ||
va_list | argptr | ||
) |
Definition at line 791 of file shared.c.
Referenced by AC_Announce(), Com_Error(), Com_LPrintf(), Con_Printf(), FS_FPrintf(), MVD_BroadcastPrintf(), MVD_Destroyf(), Netchan_OutOfBand(), PF_bprintf(), PF_centerprintf(), PF_cprintf(), PF_dprintf(), PF_error(), q_printf(), Q_snprintf(), Q_vscnprintf(), SV_BroadcastCommand(), SV_BroadcastPrintf(), SV_ClientCommand(), SV_ClientPrintf(), Sys_Error(), and va().
vec_t RadiusFromBounds | ( | const vec3_t | mins, |
const vec3_t | maxs | ||
) |
Definition at line 127 of file shared.c.
Referenced by LOAD(), MOD_LoadMD2_GL(), and MOD_LoadMD2_RTX().
Definition at line 380 of file shared.c.
Referenced by Prompt_CompleteCommand(), and Prompt_ShowIndividualMatches().
Definition at line 385 of file shared.c.
Referenced by Prompt_CompleteCommand().
void UnionBounds | ( | vec3_t | a[2], |
vec3_t | b[2], | ||
vec3_t | c[2] | ||
) |
char* va | ( | const char * | format, |
... | |||
) |
Definition at line 429 of file shared.c.
Referenced by Activate(), CheckNeedPass(), CL_Begin(), CL_FollowIP_f(), CL_InitDemos(), CL_InitLocal(), CL_PingServers_f(), CL_PlayDemo_f(), CL_Seek_f(), ClientUserinfoChanged(), Cmd_Option_c(), Com_Address_g(), Com_Error(), Con_Say(), Connect(), Expose(), InitGame(), InitialiseSkyCVars(), insane_die(), insane_pain(), list_save_dir(), MVD_ChangeLevel(), MVD_GameInit(), MVD_GameRunFrame(), MVD_SwitchChannel(), NET_OpenServer(), Netchan_Init(), P_DamageFeedback(), Parse_Bitmap(), ParseAddressBook(), player_die(), Pop(), Q_setenv(), QAL_Init(), R_BeginRegistration_RTX(), R_InterceptKey_RTX(), redirect(), Savegame_Push(), SCR_FinishCinematic(), SCR_PlayCinematic(), SCR_ReadNextFrame(), SCR_StopCinematic(), SP_worldspawn(), SpawnEntities(), start_udp_download(), SV_GetSaveInfo(), SV_Init(), SV_Loadgame_f(), SV_ParseMapCmd(), Sys_GetProcAddress(), Sys_LoadLibrary(), UI_Draw(), UI_ErrorEvent(), UI_StatusEvent(), vkpt_freecam_reset(), vkpt_freecam_update(), and vkpt_next_sun_preset().
vec_t VectorNormalize | ( | vec3_t | v | ) |
Definition at line 55 of file shared.c.
Referenced by actorMachineGun(), AL_AddLoopSounds(), bfg_think(), boss2_firebullet_left(), boss2_firebullet_right(), Boss2Rocket(), CheckPowerArmor(), ChickRocket(), CL_AddBeams(), CL_AddPlayerBeams(), CL_BlasterTrail(), CL_BlasterTrail2(), CL_BubbleTrail(), CL_BubbleTrail2(), CL_DebugTrail(), CL_DiminishingTrail(), CL_FlagTrail(), CL_ForceWall(), CL_Heatbeam(), CL_IonripperTrail(), CL_MonsterPlasma_Shell(), CL_Nukeblast(), CL_OldRailTrail(), CL_ParticleEffect(), CL_ParticleEffectWaterSplash(), CL_QuadTrail(), CL_RailLights(), CL_RailSpiral(), CL_RocketTrail(), CL_SmokeTrail(), CL_TagTrail(), CL_TeleportParticles(), CL_Tracker_Explode(), CL_Tracker_Shell(), CL_TrackerTrail(), CL_TrapParticles(), CL_Widowbeamout(), CL_WidowSplash(), collect_ligth_polys(), compute_world_tangents(), fire_blaster(), fire_hit(), fire_lead(), func_explosive_explode(), get_triangle_off_center(), GladiatorGun(), GunnerFire(), InfantryMachineGun(), infront(), jorg_firebullet_left(), jorg_firebullet_right(), jorgBFG(), light_affects_cluster(), makronBFG(), MakronRailgun(), MakronSpawn(), MOD_LoadMD2_RTX(), Move_Calc(), mutant_jump_touch(), P_DamageFeedback(), PM_AirMove(), PM_CheckSpecialMovement(), PM_DeadMove(), PM_FlyMove(), PM_WaterMove(), prepare_camera(), R_DrawBeam(), R_IMFlatShadedQuad(), R_ViewChanged(), soldier_fire(), supertankMachineGun(), supertankRocket(), T_Damage(), TankRocket(), target_laser_think(), UpdateChaseCam(), vkpt_build_beam_lights(), vkpt_build_cylinder_light(), vkpt_normalize_normal_map(), vkpt_physical_sky_update_ubo(), vkpt_shadow_map_setup(), write_beam_geometry(), write_particle_geometry(), and write_sprite_geometry().
vec_t VectorNormalize2 | ( | vec3_t | v, |
vec3_t | out | ||
) |
Definition at line 73 of file shared.c.
Referenced by compute_world_tangents(), computeTangents(), create_look_at_matrix(), R_SetSky_GL(), and R_SetSky_RTX().
|
static |
Definition at line 444 of file shared.c.
Referenced by COM_Parse(), and SpawnEntities().
|
static |
Definition at line 445 of file shared.c.
Referenced by COM_Parse().
vec3_t vec3_origin = { 0, 0, 0 } |
Definition at line 21 of file shared.c.
Referenced by AngleMove_Final(), bfg_explode(), bfg_think(), blaster_touch(), CanDamage(), CL_AddPlayerBeams(), CL_WidowSplash(), Cmd_Kill_f(), CopyToBodyQue(), D_DrawSurfaces(), door_blocked(), door_secret_blocked(), door_secret_move6(), door_secret_use(), fire_hit(), flare_sparks(), floater_zap(), func_explosive_use(), func_object_touch(), Grenade_Explode(), hurt_touch(), InitTrigger(), KillBox(), LOC_FindClosest(), LOC_There_m(), M_CheckBottom(), M_WorldEffects(), MakronSpawn(), MVD_HitPlayer(), P_FallingDamage(), P_WorldEffects(), parasite_drain_attack(), plat_blocked(), PM_FlyMove(), PM_StepSlideMove_(), R_DrawEntities(), rotating_blocked(), rotating_touch(), rotating_use(), SP_trigger_multiple(), SV_FlyMove(), SV_Physics_Toss(), SV_Push(), SV_Trace(), T_RadiusDamage(), target_laser_think(), Touch_Multi(), train_blocked(), turret_blocked(), UpdateChaseCam(), use_target_changelevel(), visible(), and Weapon_Blaster_Fire().