Quake II RTX doxygen
1.0 dev
|
|
Go to the documentation of this file.
21 #include "shared/shared.h"
22 #include "shared/list.h"
24 #include "common/bsp.h"
25 #include "common/cmd.h"
26 #include "common/cmodel.h"
27 #include "common/common.h"
28 #include "common/cvar.h"
29 #include "common/field.h"
30 #include "common/files.h"
31 #include "common/pmove.h"
32 #include "common/math.h"
33 #include "common/msg.h"
34 #include "common/net/chan.h"
35 #include "common/net/net.h"
36 #include "common/prompt.h"
37 #include "common/protocol.h"
38 #include "common/sizebuf.h"
39 #include "common/zone.h"
41 #include "system/system.h"
42 #include "refresh/refresh.h"
46 #include "client/input.h"
47 #include "client/keys.h"
49 #include "client/ui.h"
50 #include "client/video.h"
58 #define MAX_EXPLOSIONS 32
110 #define MAX_CLIENTWEAPONMODELS 20 // PGM -- upped from 16 to fit the chainfist vwep
134 byte areabits[MAX_MAP_AREA_BYTES];
145 #define FF_SERVERDROP (1<<4)
146 #define FF_BADFRAME (1<<5)
147 #define FF_OLDFRAME (1<<6)
148 #define FF_OLDENT (1<<7)
149 #define FF_NODELTA (1<<8)
153 #define CL_FRAMETIME cl.frametime
154 #define CL_1_FRAMETIME cl.frametime_inv
155 #define CL_FRAMEDIV cl.framediv
156 #define CL_FRAMESYNC !(cl.frame.number % cl.framediv)
157 #define CL_KEYPS &cl.keyframe.ps
158 #define CL_OLDKEYPS &cl.oldkeyframe.ps
159 #define CL_KEYLERPFRAC cl.keylerpfrac
161 #define CL_FRAMETIME BASE_FRAMETIME
162 #define CL_1_FRAMETIME BASE_1_FRAMETIME
163 #define CL_FRAMEDIV 1
164 #define CL_FRAMESYNC 1
165 #define CL_KEYPS &cl.frame.ps
166 #define CL_OLDKEYPS &cl.oldframe.ps
167 #define CL_KEYLERPFRAC cl.lerpfrac
223 byte dcs[CS_BITMAP_BYTES];
240 #if USE_SMOOTH_DELTA_ANGLES
241 short delta_angles[3];
294 unsigned reply_delta;
327 #define CONNECT_DELAY 3000u
329 #define CONNECT_INSTANT CONNECT_DELAY
330 #define CONNECT_FAST (CONNECT_DELAY - 1000u)
344 #define FOR_EACH_DLQ(q) \
345 LIST_FOR_EACH(dlqueue_t, q, &cls.download.queue, entry)
346 #define FOR_EACH_DLQ_SAFE(q, n) \
347 LIST_FOR_EACH_SAFE(dlqueue_t, q, n, &cls.download.queue, entry)
393 #define C_FPS cls.measure.fps[0]
394 #define R_FPS cls.measure.fps[1]
395 #define C_MPS cls.measure.fps[2]
396 #define C_PPS cls.measure.fps[3]
397 #define C_FRAMES cls.measure.frames[0]
398 #define R_FRAMES cls.measure.frames[1]
399 #define M_FRAMES cls.measure.frames[2]
400 #define P_FRAMES cls.measure.frames[3]
428 qboolean errorReceived;
431 #define RECENT_ADDR 4
432 #define RECENT_MASK (RECENT_ADDR - 1)
481 entity_packed_t entities[MAX_EDICTS];
495 #define NOPART_GRENADE_EXPLOSION 1
496 #define NOPART_GRENADE_TRAIL 2
497 #define NOPART_ROCKET_EXPLOSION 4
498 #define NOPART_ROCKET_TRAIL 8
499 #define NOPART_BLOOD 16
501 #define NOEXP_GRENADE 1
502 #define NOEXP_ROCKET 2
518 #define SHOWNET(level, ...) \
519 if (cl_shownet->integer > level) \
520 Com_LPrintf(PRINT_DEVELOPER, __VA_ARGS__)
521 #define SHOWCLAMP(level, ...) \
522 if (cl_showclamp->integer > level) \
523 Com_LPrintf(PRINT_DEVELOPER, __VA_ARGS__)
524 #define SHOWMISS(...) \
525 if (cl_showmiss->integer) \
526 Com_LPrintf(PRINT_DEVELOPER, __VA_ARGS__)
527 extern cvar_t *cl_shownet;
528 extern cvar_t *cl_showmiss;
529 extern cvar_t *cl_showclamp;
532 #define SHOWCLAMP(...)
533 #define SHOWMISS(...)
553 #define CL_PLAYER_MODEL_DISABLED 0
554 #define CL_PLAYER_MODEL_ONLY_GUN 1
555 #define CL_PLAYER_MODEL_FIRST_PERSON 2
556 #define CL_PLAYER_MODEL_THIRD_PERSON 3
594 void CL_SendRcon(
const netadr_t *adr,
const char *pass,
const char *cmd);
595 const char *
CL_Server_g(
const char *partial,
int argnum,
int state);
705 void CL_CheckEntityPresent(
int entnum,
const char *what);
728 #define V_AddLight(org, intensity, r, g, b)
729 #define V_AddLightEx(org, intensity, r, g, b, radius)
732 void V_AddLightStyle(
int style, vec4_t value);
776 #define PARTICLE_GRAVITY 120
777 #define BLASTER_PARTICLE_COLOR 0xe0
778 #define INSTANT_PARTICLE -10000.0
796 typedef struct cdlight_s {
836 cdlight_t *CL_AllocDlight(
int key);
837 void CL_RunDLights(
void);
838 void CL_AddDLights(
void);
841 void CL_ClearLightStyles(
void);
842 void CL_SetLightStyle(
int index,
const char *s);
843 void CL_RunLightStyles(
void);
844 void CL_AddLightStyles(
void);
854 void CL_SmokeTrail(vec3_t start, vec3_t end,
int colorStart,
int colorRun,
int spacing);
856 void CL_Flashlight(
int ent, vec3_t pos);
867 void CL_ColorFlash(vec3_t pos,
int ent,
int intensity,
float r,
float g,
float b);
964 float SCR_FadeAlpha(
unsigned startTime,
unsigned visTime,
unsigned fadeTime);
965 int SCR_DrawStringEx(
int x,
int y,
int flags,
size_t maxlen,
const char *s, qhandle_t font);
966 void SCR_DrawStringMulti(
int x,
int y,
int flags,
size_t maxlen,
const char *s, qhandle_t font);
972 void CL_AddNetgraph(
void);
993 #define HTTP_Init() (void)0
994 #define HTTP_Shutdown() (void)0
995 #define HTTP_SetServer(url) (void)0
996 #define HTTP_QueueDownload(path, type) Q_ERR_NOSYS
997 #define HTTP_RunDownloads() (void)0
998 #define HTTP_CleanupDownloads() (void)0
1015 #define CL_GTV_EmitFrame() (void)0
1016 #define CL_GTV_WriteMessage(data, len) (void)0
1017 #define CL_GTV_Resume() (void)0
1018 #define CL_GTV_Suspend() (void)0
1019 #define CL_GTV_Transmit() (void)0
1020 #define CL_GTV_Run() (void)0
1021 #define CL_GTV_Init() (void)0
1022 #define CL_GTV_Shutdown() (void)0
1036 #define CL_RTX_SHADERBALLS 1
float SCR_FadeAlpha(unsigned startTime, unsigned visTime, unsigned fadeTime)
void CL_Tracker_Shell(vec3_t origin)
void LOC_FreeLocations(void)
void CL_SmokeTrail(vec3_t start, vec3_t end, int colorStart, int colorRun, int spacing)
void CL_GenericParticleEffect(vec3_t org, vec3_t dir, int color, int count, int numcolors, int dirspread, float alphavel)
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
cvar_t * cl_disconnectcmd
void CL_ParticleEffect(vec3_t org, vec3_t dir, int color, int count)
void CL_IonripperTrail(vec3_t start, vec3_t end)
void CL_FlagTrail(vec3_t start, vec3_t end, int color)
void CL_MuzzleFlash2(void)
void CL_UpdateRecordingSetting(void)
entity_state_t entityStates[MAX_PARSE_ENTITIES]
qhandle_t image_precache[MAX_IMAGES]
cvar_t * cl_disable_explosions
void CL_Widowbeamout(cl_sustain_t *self)
#define CL_GTV_WriteMessage(data, len)
const char * CL_Server_g(const char *partial, int argnum, int state)
struct client_static_s::@3 demo
qboolean CL_CheckDownloadExtension(const char *ext)
centity_t * solidEntities[MAX_PACKET_ENTITIES]
demoInfo_t * CL_GetDemoInfo(const char *path, demoInfo_t *info)
mmodel_t * model_clip[MAX_MODELS]
void CL_BlasterTrail2(vec3_t start, vec3_t end)
qboolean CL_IgnoreDownload(const char *path)
void CL_RegisterVWepModels(void)
void CL_RegisterInput(void)
void Key_Console(int key)
void Con_SkipNotify(qboolean skip)
void CL_CheckPredictionError(void)
#define CL_GTV_Transmit()
void SCR_SetCrosshairColor(void)
void Con_RunConsole(void)
void SCR_UpdateScreen(void)
#define HTTP_SetServer(url)
void CL_GetEntitySoundOrigin(int ent, vec3_t org)
vec3_t predicted_velocity
void CL_SmokeAndFlash(vec3_t origin)
void CL_InitRefresh(void)
void CL_RegisterTEntModels(void)
void CL_TagTrail(vec3_t start, vec3_t end, int color)
cvar_t * cl_disable_particles
void CL_TeleporterParticles(vec3_t org)
#define HTTP_CleanupDownloads()
void CL_Nukeblast(cl_sustain_t *self)
void CL_HandleDownload(byte *data, int size, int percent, int compressed)
void CL_RocketTrail(vec3_t start, vec3_t end, centity_t *old)
byte dcs[CS_BITMAP_BYTES]
void CL_WriteConfig(void)
void CL_UpdateBlendSetting(void)
void LOC_AddLocationsToScene(void)
void CL_TrapParticles(entity_t *ent)
void CL_MuzzleFlash(void)
void CL_RegisterTEntSounds(void)
void CL_EmitDemoSnapshot(void)
void SCR_EndLoadingPlaque(void)
struct client_static_s client_static_t
void CL_SeekDemoMessage(void)
void CL_UpdateCmd(int msec)
void CL_EmitDemoFrame(void)
void CL_LoadDownloadIgnores(void)
char weaponModels[MAX_CLIENTWEAPONMODELS][MAX_QPATH]
void CL_OldRailTrail(void)
qhandle_t sound_precache[MAX_SOUNDS]
void V_AddEntity(entity_t *ent)
char baseconfigstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
void SCR_DebugGraph(float value, int color)
struct cl_sustain_s cl_sustain_t
cvar_t * cl_explosion_frametime
struct cparticle_s * next
void CL_Disconnect(error_type_t type)
void Con_ToggleConsole_f(void)
void CL_InitDownloads(void)
void CL_ParticleSmokeEffect(vec3_t org, vec3_t dir, int color, int count, int magnitude)
void CL_FinishDownload(dlqueue_t *q)
void CL_BlasterParticles(vec3_t org, vec3_t dir)
qhandle_t SCR_GetFont(void)
void CL_RegisterBspModels(void)
cvar_t * userinfo_updates[MAX_PACKET_USERINFOS]
void CL_FirstDemoFrame(void)
void Con_ClearTyping(void)
#define CL_GTV_EmitFrame()
void CL_Tracker_Explode(vec3_t origin)
vec3_t playerEntityOrigin
void CL_ForceWall(vec3_t start, vec3_t end, int color)
void CL_ParsePlayerSkin(char *name, char *model, char *skin, const char *s)
void CL_DebugTrail(vec3_t start, vec3_t end)
void CL_ExplosionParticles(vec3_t org)
void CL_ShutdownRefresh(void)
void CL_BfgParticles(entity_t *ent)
cvar_t * cl_thirdperson_angle
void CL_WidowSplash(void)
void SCR_RegisterMedia(void)
void CL_ParticleEffect2(vec3_t org, vec3_t dir, int color, int count)
entity_state_t baselines[MAX_EDICTS]
void SCR_PlayCinematic(const char *name)
void CL_DemoFrame(int msec)
unsigned predicted_step_frame
qhandle_t model_draw[MAX_MODELS]
void CL_ClearEffects(void)
#define HTTP_RunDownloads()
qhandle_t weaponmodel[MAX_CLIENTWEAPONMODELS]
void Con_Print(const char *txt)
char layout[MAX_NET_STRING]
explosion_t cl_explosions[MAX_EXPLOSIONS]
char model_name[MAX_QPATH]
clientinfo_t baseclientinfo
usercmd_t cmds[CMD_BACKUP]
void CL_AddParticles(void)
void CL_RunParticles(void)
void SCR_FinishCinematic(void)
void CL_MonsterPlasma_Shell(vec3_t origin)
void CL_CheckForPause(void)
void CL_PredictMovement(void)
void(APIENTRY *qwglDrawBuffer)(GLenum mode)
char servername[MAX_OSPATH]
void CL_BlasterTrail(vec3_t start, vec3_t end)
void Con_Close(qboolean force)
void CL_StartNextDownload(void)
unsigned lastTransmitCmdNumber
#define V_AddLight(org, intensity, r, g, b)
void Key_Message(int key)
clientinfo_t clientinfo[MAX_CLIENTS]
void CL_BlasterParticles2(vec3_t org, vec3_t dir, unsigned int color)
void Char_Console(int key)
void SCR_CenterPrint(const char *str)
struct client_state_s client_state_t
void CL_UpdateConfigstring(int index)
void CL_BloodParticleEffect(vec3_t org, vec3_t dir, int color, int count)
void SCR_SetHudAlpha(float alpha)
void CL_AddEntities(void)
unsigned predicted_step_time
void SCR_DrawStringMulti(int x, int y, int flags, size_t maxlen, const char *s, qhandle_t font)
server_frame_t frames[UPDATE_BACKUP]
struct clientinfo_s clientinfo_t
void CL_ParticleSteamEffect2(cl_sustain_t *self)
char cl_cmdbuf_text[MAX_STRING_CHARS]
void CL_PrepRefresh(void)
void CL_RestartFilesystem(qboolean total)
void CL_RequestNextDownload(void)
void CL_Heatbeam(vec3_t start, vec3_t end)
void SCR_ModeChanged(void)
#define V_AddLightEx(org, intensity, r, g, b, radius)
qboolean CL_WriteDemoMessage(sizebuf_t *buf)
void V_AddParticle(particle_t *p)
struct centity_s centity_t
netadr_t recent_addr[RECENT_ADDR]
short predicted_origins[CMD_BACKUP][3]
#define MAX_CLIENTWEAPONMODELS
void CL_SendRcon(const netadr_t *adr, const char *pass, const char *cmd)
struct client_static_s::@2 download
void CL_TeleportParticles(vec3_t org)
void LOC_UpdateCvars(void)
void CL_CalcViewValues(void)
void CL_FlyEffect(centity_t *ent, vec3_t origin)
void CL_CheckForResend(void)
void CL_FinalizeCmd(void)
struct client_static_s::@1 measure
void CL_RegisterSounds(void)
void Con_CheckResize(void)
void CL_ResetPrecacheCheck(void)
char skin_name[MAX_QPATH]
void Con_Popup(qboolean force)
qboolean CL_CheckForIgnore(const char *s)
void CL_ItemRespawnParticles(vec3_t org)
void CL_BFGExplosionParticles(vec3_t org)
void CL_ParticleEffectWaterSplash(vec3_t org, vec3_t dir, int color, int count)
void SCR_ClearChatHUD_f(void)
void SCR_BeginLoadingPlaque(void)
void CL_BubbleTrail(vec3_t start, vec3_t end)
void CL_ClientCommand(const char *string)
unsigned lastTransmitTime
void CL_CleanupDownloads(void)
client_history_t history[CMD_BACKUP]
void CL_UpdateFrameTimes(void)
void CL_LoadState(load_state_t state)
void CL_LoadClientinfo(clientinfo_t *ci, const char *s)
vec3_t playerEntityAngles
byte COM_BlockSequenceCRCByte(byte *base, size_t length, int sequence)
void CL_ColorExplosionParticles(vec3_t org, int color, int run)
void LOC_LoadLocations(void)
void Con_ClearNotify_f(void)
void CL_DiminishingTrail(vec3_t start, vec3_t end, centity_t *old, int flags)
centity_t cl_entities[MAX_EDICTS]
void CL_PredictAngles(void)
#define CL_GTV_Shutdown()
void CL_BubbleTrail2(vec3_t start, vec3_t end, int dist)
struct cparticle_s cparticle_t
void CL_RestartRefresh(qboolean total)
qerror_t CL_QueueDownload(const char *path, dltype_t type)
void CL_CleanupDemos(void)
void CL_TrackerTrail(vec3_t start, vec3_t end, int particleColor)
void CL_ParticleSteamEffect(vec3_t org, vec3_t dir, int color, int count, int magnitude)
void Con_DrawConsole(void)
void Char_Message(int key)
void SCR_AddToChatHUD(const char *text)
void CL_ParticleEffect3(vec3_t org, vec3_t dir, int color, int count)
void CL_QuadTrail(vec3_t start, vec3_t end)
cvar_t * cl_explosion_sprites
void CL_BigTeleportParticles(vec3_t org)
void CL_ParseServerMessage(void)
void Con_RegisterMedia(void)
cparticle_t * CL_AllocParticle(void)
#define HTTP_QueueDownload(path, type)
unsigned lastTransmitCmdNumberReal
void(* think)(struct cl_sustain_s *self)
cvar_t * cl_thirdperson_range
void CL_InitEffects(void)
int SCR_DrawStringEx(int x, int y, int flags, size_t maxlen, const char *s, qhandle_t font)