OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
client.h
1/*
2===========================================================================
3Copyright (C) 1999-2005 Id Software, Inc.
4
5This file is part of Quake III Arena source code.
6
7Quake III Arena source code is free software; you can redistribute it
8and/or modify it under the terms of the GNU General Public License as
9published by the Free Software Foundation; either version 2 of the License,
10or (at your option) any later version.
11
12Quake III Arena source code is distributed in the hope that it will be
13useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with Quake III Arena source code; if not, write to the Free Software
19Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20===========================================================================
21*/
22// client.h -- primary header for client
23
24#pragma once
25
26#include "../qcommon/q_shared.h"
27#include "../qcommon/qcommon.h"
28#include "../cgame/tr_types.h"
29#include "../renderercommon/tr_public.h"
30#include "keys.h"
31#include "snd_public.h"
32#include "../cgame/cg_public.h"
33#include "../fgame/bg_public.h"
34
35#ifdef USE_CURL
36#include "cl_curl.h"
37#endif /* USE_CURL */
38
39#ifdef USE_VOIP
40#include <opus.h>
41#endif
42
43// file full of random crap that gets used to create cl_guid
44#define QKEY_FILE "qkey"
45#define QKEY_SIZE 2048
46
47#define RETRANSMIT_TIMEOUT 3000 // time between connection packet retransmits
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52
53// snapshots are a view of the server at a given time
54typedef struct {
55 qboolean valid; // cleared if delta parsing was invalid
56 int snapFlags; // rate delayed and dropped commands
57
58 int serverTime; // server time the message is valid for (in msec)
59int serverTimeResidual;
60 int messageNum; // copied from netchan->incoming_sequence
61 int deltaNum; // messageNum the delta is from
62 int ping; // time from when cmdNum-1 was sent to time packet was reeceived
63 byte areamask[MAX_MAP_AREA_BYTES]; // portalarea visibility bits
64
65 int cmdNum; // the next cmdNum the server is expecting
66 playerState_t ps; // complete information about the current player at this time
67
68 int numEntities; // all of the entities that need to be presented
69 int parseEntitiesNum; // at the time of this snapshot
70
71 int serverCommandNum; // execute all commands up to this before
72 // making the snapshot current
73 int number_of_sounds;
74 server_sound_t sounds[64];
76
77
78
79/*
80=============================================================================
81
82the clientActive_t structure is wiped completely at every
83new gamestate_t, potentially several times during an established connection
84
85=============================================================================
86*/
87
88typedef struct {
89 int p_cmdNumber; // cl.cmdNumber when packet was sent
90 int p_serverTime; // usercmd->serverTime when packet was sent
91 int p_realtime; // cls.realtime when packet was sent
92 usereyes_t p_eyeinfo; // eyeInfo when packet was sent
94
95// the parseEntities array must be large enough to hold PACKET_BACKUP frames of
96// entities, so that when a delta compressed message arives from the server
97// it can be un-deltad from the original
98#define MAX_PARSE_ENTITIES 2048
99
100extern int g_console_field_width;
101extern int g_console_charWidth;
102extern int g_console_charHeight;
103
104typedef struct {
105 int timeoutcount; // it requres several frames in a timeout condition
106 // to disconnect, preventing debugging breaks from
107 // causing immediate disconnects on continue
108 clSnapshot_t snap; // latest received from server
109
110 int serverTime; // may be paused during play
111 int oldServerTime; // to prevent time from flowing bakcwards
112 int serverStartTime;
113 int oldFrameServerTime; // to check tournament restarts
114 int serverTimeDelta; // cl.serverTime = cls.realtime + cl.serverTimeDelta
115 // this value changes as net lag varies
116 qboolean extrapolatedSnapshot; // set if any cgame frame has been forced to extrapolate
117 // cleared when CL_AdjustTimeDelta looks at it
118 qboolean newSnapshots; // set on parse of any valid packet
119
120 gameState_t gameState; // configstrings
121 char mapname[MAX_QPATH]; // extracted from CS_SERVERINFO
122
123 int parseEntitiesNum; // index (not anded off) into cl_parse_entities[]
124
125 int mouseDx[2], mouseDy[2]; // added to by mouse events
126 int mouseIndex;
127
128 int mousex, mousey;
129 unsigned int mouseButtons;
130
131 int joystickAxis[MAX_JOYSTICK_AXIS]; // set by joystick events
132
133 // cmds[cmdNumber] is the predicted command, [cmdNumber-1] is the last
134 // properly generated command
135 usercmd_t cmds[CMD_BACKUP]; // each mesage will send several old cmds
136 int cmdNumber; // incremented each frame, because multiple
137 // frames may need to be packed into a single packet
138
139 outPacket_t outPackets[PACKET_BACKUP]; // information about each packet we have sent out
140
141 // the client maintains its own idea of view angles, which are
142 // sent to the server each frame. It is cleared to 0 upon entering each level.
143 // the server sends a delta each frame which is added to the locally
144 // tracked view angles to account for standing on rotating objects,
145 // and teleport direction changes
146 vec3_t viewangles;
147
148 int serverId; // included in each client message so the server
149 // can tell if it is for a prior map_restart
150 // big stuff at end of structure so most offsets are 15 bits or less
151 clSnapshot_t snapshots[PACKET_BACKUP];
152
153 entityState_t entityBaselines[MAX_GENTITIES]; // for delta compression when not in previous frame
154
155 entityState_t parseEntities[MAX_PARSE_ENTITIES];
157
158extern clientActive_t cl;
159
160/*
161=============================================================================
162
163the clientConnection_t structure is wiped when disconnecting from a server,
164either to go to a full screen console, play a demo, or connect to a different server
165
166A connection can be to either a server through the network layer or a
167demo through a file.
168
169=============================================================================
170*/
171
172#define MAX_TIMEDEMO_DURATIONS 4096
173
174typedef struct {
175
176 connstate_t state; // connection status
177 int clientNum;
178 int lastPacketSentTime; // for retransmits during connection
179 int lastPacketTime; // for timeouts
180
181 char servername[MAX_OSPATH]; // name of server from original connect (used by reconnect)
182 netadr_t serverAddress;
183 int connectTime; // for connection retransmits
184 int connectStartTime;
185 int connectPacketCount; // for display on connection dialog
186 char serverMessage[MAX_STRING_TOKENS]; // for display on connection dialog
187
188 int challenge; // from the server to use for connecting
189 int checksumFeed; // from the server for checksum calculations
190
191 // these are our reliable messages that go to the server
192 int reliableSequence;
193 int reliableAcknowledge; // the last one the server has executed
194 char reliableCommands[MAX_RELIABLE_COMMANDS][MAX_STRING_CHARS];
195
196 // server message (unreliable) and command (reliable) sequence
197 // numbers are NOT cleared at level changes, but continue to
198 // increase as long as the connection is valid
199
200 // message sequence is used by both the network layer and the
201 // delta compression layer
202 int serverMessageSequence;
203
204 // reliable messages received from server
205 int serverCommandSequence;
206 int lastExecutedServerCommand; // last server command grabbed or executed with CL_GetServerCommand
207 char serverCommands[MAX_RELIABLE_COMMANDS][MAX_STRING_CHARS];
208
209 // file transfer from server
210 fileHandle_t download;
211 char downloadTempName[MAX_OSPATH];
212 char downloadName[MAX_OSPATH];
213#ifdef USE_CURL
214 qboolean cURLEnabled;
215 qboolean cURLUsed;
216 qboolean cURLDisconnected;
217 char downloadURL[MAX_OSPATH];
218 CURL *downloadCURL;
219 CURLM *downloadCURLM;
220#endif /* USE_CURL */
221 int sv_allowDownload;
222 char sv_dlURL[MAX_CVAR_VALUE_STRING];
223 int downloadNumber;
224 int downloadBlock; // block we are waiting for
225 size_t downloadCount; // how many bytes we got
226 size_t downloadSize; // how many bytes we got
227 char downloadList[MAX_INFO_STRING]; // list of paks we need to download
228 qboolean downloadRestart; // if true, we need to do another FS_Restart because we downloaded a pak
229
230 // demo information
231 char demoName[MAX_QPATH];
232 qboolean spDemoRecording;
233 qboolean demorecording;
234 qboolean demoplaying;
235 qboolean demowaiting; // don't record until a non-delta message is received
236 qboolean firstDemoFrameSkipped;
237 fileHandle_t demofile;
238
239 int timeDemoFrames; // counter of rendered frames
240 int timeDemoStart; // cls.realtime before first frame
241 int timeDemoBaseTime; // each frame will be at this time + frameNum * 50
242 int timeDemoLastFrame;// time the last frame was rendered
243 int timeDemoMinDuration; // minimum frame duration
244 int timeDemoMaxDuration; // maximum frame duration
245 unsigned char timeDemoDurations[ MAX_TIMEDEMO_DURATIONS ]; // log of frame durations
246
247 float aviVideoFrameRemainder;
248 float aviSoundFrameRemainder;
249
250#ifdef USE_VOIP
251 qboolean voipEnabled;
252 qboolean voipCodecInitialized;
253
254 // incoming data...
255 // !!! FIXME: convert from parallel arrays to array of a struct.
256 OpusDecoder *opusDecoder[MAX_CLIENTS];
257 byte voipIncomingGeneration[MAX_CLIENTS];
258 int voipIncomingSequence[MAX_CLIENTS];
259 float voipGain[MAX_CLIENTS];
260 qboolean voipIgnore[MAX_CLIENTS];
261 qboolean voipMuteAll;
262
263 // outgoing data...
264 // if voipTargets[i / 8] & (1 << (i % 8)),
265 // then we are sending to clientnum i.
266 uint8_t voipTargets[(MAX_CLIENTS + 7) / 8];
267 uint8_t voipFlags;
268 OpusEncoder *opusEncoder;
269 int voipOutgoingDataSize;
270 int voipOutgoingDataFrames;
271 int voipOutgoingSequence;
272 byte voipOutgoingGeneration;
273 byte voipOutgoingData[1024];
274 float voipPower;
275#endif
276
277#ifdef LEGACY_PROTOCOL
278 qboolean compat;
279#endif
280
281 // big stuff at end of structure so most offsets are 15 bits or less
282 netchan_t netchan;
284
285extern clientConnection_t clc;
286
287/*
288==================================================================
289
290the clientStatic_t structure is never wiped, and is used even when
291no client connection is active at all
292
293==================================================================
294*/
295
296typedef struct {
297 netadr_t adr;
298 int start;
299 int time;
300 char info[MAX_INFO_STRING];
301} ping_t;
302
303typedef struct {
304 netadr_t adr;
305 char hostName[ MAX_NAME_LENGTH ];
306 char mapName[ MAX_NAME_LENGTH ];
307 char game[ MAX_NAME_LENGTH ];
308 char gameTypeString[ MAX_NAME_LENGTH ];
309 int netType;
310 int gameType;
311 int clients;
312 int maxClients;
313 int minPing;
314 int maxPing;
315 int ping;
316 qboolean visible;
318
319typedef struct {
320 byte ip[4];
321 unsigned short port;
323
324typedef struct {
325 int startStage;
326 int loading;
327 int keyCatchers;
328 qboolean vid_restart;
329 qboolean cddialog; // bring up the cd needed dialog next frame
330 qboolean no_menus;
331
332 // when the server clears the hunk, all of these must be restarted
333 qboolean rendererRegistered;
334 qboolean cgameStarted;
335 qboolean uiStarted;
336 qboolean timeScaled;
337
338 int framecount;
339 int frametime; // msec since last frame
340 float serverFrameTime;
341
342 int realtime; // ignores pause
343 int realFrametime; // ignoring pause, so console always works
344
345 int numlocalservers;
346 serverInfo_t localServers[ MAX_OTHER_SERVERS ];
347 qboolean bNewLocalServerInfo;
348
349 int numglobalservers;
350 serverInfo_t globalServers[MAX_GLOBAL_SERVERS];
351 // additional global servers
352 int numGlobalServerAddresses;
353 netadr_t globalServerAddresses[MAX_GLOBAL_SERVERS];
354
355 int numfavoriteservers;
356 serverInfo_t favoriteServers[MAX_OTHER_SERVERS];
357
358 int nummplayerservers;
359 serverInfo_t mplayerServers[MAX_OTHER_SERVERS];
360
361 int pingUpdateSource; // source currently pinging or updating
362
363 int masterNum;
364
365 // update server info
366 netadr_t updateServer;
367 char updateChallenge[MAX_TOKEN_CHARS];
368 char updateInfoString[MAX_INFO_STRING];
369
370 netadr_t authorizeServer;
371
372 // rendering info
373 glconfig_t glconfig;
374 int total_tris;
375 int total_verts;
376 int total_texels;
377 int world_tris;
378 int world_verts;
379 int character_lights;
380 hdelement_t HudDrawElements[ MAX_HUDDRAW_ELEMENTS ];
381 clientAnim_t anim;
382 stopWatch_t stopwatch;
383 void* savedCgameState;
384 size_t savedCgameStateSize;
385 char gcdResponse[73];
386 // Added in 2.0
387 netprofclient_t netprofile;
388 qhandle_t charSetShader;
389 qhandle_t whiteShader;
390 qhandle_t consoleShader;
391 fontInfo_t consoleFont;
392
393 int refSequence;
395
396extern clientStatic_t cls;
397
398//=============================================================================
399
400//extern vm_t *cgvm; // interface to cgame dll or vm
401extern clientGameExport_t *cge;
402extern refexport_t re; // interface to refresh .dll
403
404
405extern qboolean scr_initialized;
406
407//
408// cvars
409//
410extern cvar_t *cl_nodelta;
411extern cvar_t *cl_debugMove;
412extern cvar_t *cl_noprint;
413extern cvar_t *cl_timegraph;
414extern cvar_t *cl_debuggraph;
415extern cvar_t *cl_timeout;
416extern cvar_t *cl_connect_timeout;
417extern cvar_t *cl_maxpackets;
418extern cvar_t *cl_packetdup;
419extern cvar_t *cl_shownet;
420extern cvar_t *cl_netprofile;
421extern cvar_t *cl_netprofileoverlay;
422extern cvar_t *cl_showSend;
423extern cvar_t *cl_timeNudge;
424extern cvar_t *cl_showTimeDelta;
425extern cvar_t *cl_freezeDemo;
426
427extern cvar_t *cl_yawspeed;
428extern cvar_t *cl_pitchspeed;
429extern cvar_t *cl_run;
430extern cvar_t *cl_anglespeedkey;
431
432extern cvar_t *cl_sensitivity;
433extern cvar_t *cl_freelook;
434
435extern cvar_t *cl_mouseAccel;
436extern cvar_t *cl_mouseAccelOffset;
437extern cvar_t *cl_mouseAccelStyle;
438extern cvar_t *cl_showMouseRate;
439
440extern cvar_t *cl_altbindings;
441extern cvar_t *cl_ctrlbindings;
442
443extern cvar_t *m_pitch;
444extern cvar_t *m_yaw;
445extern cvar_t *m_forward;
446extern cvar_t *m_side;
447extern cvar_t *m_filter;
448
449extern cvar_t *j_pitch;
450extern cvar_t *j_yaw;
451extern cvar_t *j_forward;
452extern cvar_t *j_side;
453extern cvar_t *j_up;
454extern cvar_t *j_pitch_axis;
455extern cvar_t *j_yaw_axis;
456extern cvar_t *j_forward_axis;
457extern cvar_t *j_side_axis;
458extern cvar_t *j_up_axis;
459
460extern cvar_t *cl_timedemo;
461extern cvar_t *cl_aviFrameRate;
462extern cvar_t *cl_aviMotionJpeg;
463
464extern cvar_t *cl_activeAction;
465
466extern cvar_t *cl_allowDownload;
467extern cvar_t *cl_downloadMethod;
468extern cvar_t *cl_conXOffset;
469extern cvar_t *cl_inGameVideo;
470
471extern cvar_t *cl_lanForcePackets;
472extern cvar_t *cl_langamerefreshstatus;
473extern cvar_t *cl_radar_icon_size;
474extern cvar_t *cl_radar_speak_time;
475extern cvar_t *cl_radar_blink_time;
476extern cvar_t *cl_autoRecordDemo;
477
478extern cvar_t *cl_r_fullscreen;
479
480extern cvar_t *cl_consoleKeys;
481
482#ifdef USE_MUMBLE
483extern cvar_t *cl_useMumble;
484extern cvar_t *cl_mumbleScale;
485#endif
486
487#ifdef USE_VOIP
488// cl_voipSendTarget is a string: "all" to broadcast to everyone, "none" to
489// send to no one, or a comma-separated list of client numbers:
490// "0,7,2,23" ... an empty string is treated like "all".
491extern cvar_t *cl_voipUseVAD;
492extern cvar_t *cl_voipVADThreshold;
493extern cvar_t *cl_voipSend;
494extern cvar_t *cl_voipSendTarget;
495extern cvar_t *cl_voipGainDuringCapture;
496extern cvar_t *cl_voipCaptureMult;
497extern cvar_t *cl_voipShowMeter;
498extern cvar_t *cl_voip;
499
500// 20ms at 48k
501#define VOIP_MAX_FRAME_SAMPLES ( 20 * 48 )
502
503// 3 frame is 60ms of audio, the max opus will encode at once
504#define VOIP_MAX_PACKET_FRAMES 3
505#define VOIP_MAX_PACKET_SAMPLES ( VOIP_MAX_FRAME_SAMPLES * VOIP_MAX_PACKET_FRAMES )
506#endif
507
508extern cvar_t *cg_gametype;
509
510extern cvar_t* j_pitch;
511extern cvar_t* j_yaw;
512extern cvar_t* j_forward;
513extern cvar_t* j_side;
514extern cvar_t* j_up;
515extern cvar_t* j_pitch_axis;
516extern cvar_t* j_yaw_axis;
517extern cvar_t* j_forward_axis;
518extern cvar_t* j_side_axis;
519extern cvar_t* j_up_axis;
520
521//=================================================
522
523//
524// cl_main
525//
526
527void CL_Init (void);
528void CL_InitClientSavedData(void);
529void CL_AddReliableCommand(const char *cmd, qboolean isDisconnectCmd);
530
531void CL_StartHunkUsers( qboolean rendererOnly );
532
533void CL_Connect( const char *server, netadrtype_t family );
534
535void CL_Disconnect_f (void);
536void CL_GetChallengePacket (void);
537void CL_Vid_Restart_f( void );
538void CL_Snd_Restart_f (void);
539const char *CL_ConfigString( int index );
540void CL_StartDemoLoop( void );
541void CL_NextDemo( void );
542void CL_ReadDemoMessage( void );
543void CL_StopRecord_f(void);
544
545void CL_InitDownloads(void);
546void CL_NextDownload(void);
547
548void CL_GetPing( int n, char *buf, int buflen, int *pingtime );
549void CL_GetPingInfo( int n, char *buf, int buflen );
550void CL_ClearPing( int n );
551int CL_GetPingQueueCount( void );
552
553void CL_ShutdownRef( void );
554void CL_InitRef( void );
555qboolean CL_CDKeyValidate( const char *key, const char *checksum );
556int CL_ServerStatus( const char *serverAddress, char *serverStatusString, int maxLen );
557void UI_ClearResource( void );
558void UI_LoadResource( const char *name );
559
560qboolean CL_CheckPaused(void);
561
562int CL_GetRefSequence(void);
563qboolean CL_IsRendererLoaded(void);
564void CL_ApplyOriginalConfigTweaks();
565
566//
567// cl_input
568//
569typedef struct {
570 int down[2]; // key nums holding it down
571 unsigned downtime; // msec timestamp
572 unsigned msec; // msec down this frame if both a down and up happened
573 qboolean active; // current state
574 qboolean wasPressed; // set when down, not cleared when up
575} kbutton_t;
576
577extern kbutton_t in_mlook, in_klook;
578extern kbutton_t in_strafe;
579extern kbutton_t in_speed;
580extern qboolean in_guimouse;
581
582void IN_ToggleMouse( void );
583void IN_MouseOn( void );
584void IN_MouseOff( void );
585void CL_UpdateMouse();
586
587void CL_InitInput (void);
588void CL_ShutdownInput(void);
589void CL_SendCmd (void);
590void CL_ClearState (void);
591void CL_ReadPackets (void);
592
593void CL_WritePacket( void );
594void IN_CenterView (void);
595
596void CL_VerifyCode( void );
597
598float CL_KeyState (kbutton_t *key);
599const char *Key_KeynumToString( int keynum );
600const char *Key_KeynumToBindString( int keynum );
601void Key_GetKeysForCommand( const char *command, int *key1, int *key2 );
602int Key_GetCatcher( void );
603void Key_SetCatcher( int catcher );
604
605void CL_EyeInfo(usereyes_t *info);
606
607//
608// cl_parse.c
609//
610extern int cl_connectedToPureServer;
611extern int cl_connectedToCheatServer;
612extern msg_t *cl_currentMSG;
613
614#ifdef USE_VOIP
615void CL_Voip_f( void );
616#endif
617
618void CL_SystemInfoChanged( void );
619void CL_ParseServerMessage( msg_t *msg );
620
621int CL_MSG_ReadBits( int bits );
622int CL_MSG_ReadChar( void );
623int CL_MSG_ReadByte( void );
624int CL_MSG_ReadSVC( void );
625int CL_MSG_ReadShort( void );
626int CL_MSG_ReadLong( void );
627float CL_MSG_ReadFloat( void );
628char *CL_MSG_ReadString( void );
629char *CL_MSG_ReadStringLine( void );
630float CL_MSG_ReadAngle8( void );
631float CL_MSG_ReadAngle16( void );
632void CL_MSG_ReadData( void *data, int len );
633float CL_MSG_ReadCoord( void );
634void CL_MSG_ReadDir( vec3_t dir );
635
636//====================================================================
637
638void CL_ServerInfoPacket( netadr_t from, msg_t *msg );
639void CL_LocalServers_f( void );
640void CL_GlobalServers_f( void );
641void CL_FavoriteServers_f( void );
642void CL_Ping_f( void );
643void CL_SaveShot_f( void );
644void CL_Dialog_f( void );
645void CL_ServerRestarted( void );
646qboolean CL_UpdateVisiblePings_f( int source );
647
648
649//
650// console
651//
652void Con_DrawCharacter (int cx, int line, int num);
653
654void Con_CheckResize (void);
655void Con_Init (void);
656void Con_Shutdown (void);
657void Con_Clear_f (void);
658void Con_ToggleConsole_f (void);
659void Con_DrawNotify (void);
660void Con_ClearNotify (void);
661void Con_RunConsole (void);
662void Con_DrawConsole (void);
663void Con_PageUp( void );
664void Con_PageDown( void );
665void Con_Top( void );
666void Con_Bottom( void );
667
668//
669// cl_scrn.c
670//
671void SCR_Init (void);
672void SCR_DrawDebugGraph(void);
673void SCR_DrawScreenField(void);
674void SCR_UpdateScreen (void);
675
676void SCR_DebugGraph (float value);
677
678int SCR_GetBigStringWidth( const char *str ); // returns in virtual 640x480 coordinates
679
680void SCR_AdjustFrom640( float *x, float *y, float *w, float *h );
681void SCR_FillRect( float x, float y, float width, float height,
682 const float *color );
683void SCR_DrawPic( float x, float y, float width, float height, qhandle_t hShader );
684void SCR_DrawNamedPic( float x, float y, float width, float height, const char *picname );
685
686void SCR_DrawBigString( int x, int y, const char *s, float alpha, qboolean noColorEscape ); // draws a string with embedded color control characters with fade
687void SCR_DrawBigStringColor( int x, int y, const char *s, vec4_t color, qboolean noColorEscape ); // ignores embedded color control characters
688void SCR_DrawSmallStringExt( int x, int y, const char *string, float *setColor, qboolean forceColor, qboolean noColorEscape );
689void SCR_DrawSmallChar( int x, int y, int ch );
690
691void UpdateStereoSide( stereoFrame_t s );
692
693//
694// cl_cin.c
695//
696
697void CL_PlayCinematic_f( void );
698void SCR_DrawCinematic (void);
699void SCR_RunCinematic (void);
700void SCR_StopCinematic (void);
701int CIN_PlayCinematic( const char *arg0, int xpos, int ypos, int width, int height, int bits);
702e_status CIN_StopCinematic(int handle);
703e_status CIN_RunCinematic (int handle);
704void CIN_DrawCinematic (int handle);
705void CIN_SetExtents (int handle, int x, int y, int w, int h);
706void CIN_SetLooping (int handle, qboolean loop);
707void CIN_UploadCinematic(int handle);
708void CIN_CloseAllVideos(void);
709
710//
711// cl_cgame.cpp
712//
713void CL_InitCGame( void );
714void CL_InitCGameDLL( void );
715void CL_ShutdownCGame( void );
716qboolean CL_GameCommand( void );
717void CL_CGameRendering( stereoFrame_t stereo );
718void CL_CGame2D( stereoFrame_t stereo );
719void CL_UpdateSnapFlags( void );
720void CL_SetCGameTime( void );
721void CL_FirstSnapshot( void );
722void CL_ShaderStateChanged( void );
723baseshader_t *CL_GetShaderPointer( int iShaderNum );
724
725//
726// cl_ui.c
727//
728/*
729void CL_InitializeUI( void );
730void CL_ShutdownUI( void );
731int Key_GetCatcher( void );
732void Key_SetCatcher( int catcher );
733void LAN_LoadCachedServers( void );
734void LAN_SaveServersToCache( void );
735*/
736
737
738//
739// cl_net_chan.c
740//
741void CL_Netchan_Transmit( netchan_t *chan, msg_t* msg); //int length, const byte *data );
742void CL_Netchan_TransmitNextFragment( netchan_t *chan );
743qboolean CL_Netchan_Process( netchan_t *chan, msg_t *msg );
744void CL_NET_OutOfBandPrint( netadr_t adr, const char* format, ... );
745
746//
747// cl_avi.c
748//
749qboolean CL_OpenAVIForWriting( const char *filename );
750void CL_TakeVideoFrame( void );
751void CL_WriteAVIVideoFrame( const byte *imageBuffer, int size );
752void CL_WriteAVIAudioFrame( const byte *pcmBuffer, int size );
753qboolean CL_CloseAVI( void );
754qboolean CL_VideoRecording( void );
755
756//
757// cl_consolecmds.cpp
758//
759void CL_InitConsoleCommands( void );
760
761#ifdef __cplusplus
762}
763#endif
Definition str.h:77
Definition client.h:54
Definition client.h:104
Definition q_shared.h:2143
Definition client.h:174
Definition cg_public.h:455
Definition client.h:324
Definition q_shared.h:2181
Definition q_shared.h:1693
Definition tr_types.h:244
Definition client.h:569
Definition qcommon.h:225
Definition qcommon.h:272
Definition qcommon.h:342
Definition client.h:88
Definition client.h:296
Definition tr_public.h:40
Definition client.h:319
Definition client.h:303