OpenMoHAA ..
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 clientChallenge; // local challenge echoed to stop connect hijack
190 int checksumFeed; // from the server for checksum calculations
191
192 // these are our reliable messages that go to the server
193 int reliableSequence;
194 int reliableAcknowledge; // the last one the server has executed
195 char reliableCommands[MAX_RELIABLE_COMMANDS][MAX_STRING_CHARS];
196
197 // server message (unreliable) and command (reliable) sequence
198 // numbers are NOT cleared at level changes, but continue to
199 // increase as long as the connection is valid
200
201 // message sequence is used by both the network layer and the
202 // delta compression layer
203 int serverMessageSequence;
204
205 // reliable messages received from server
206 int serverCommandSequence;
207 int lastExecutedServerCommand; // last server command grabbed or executed with CL_GetServerCommand
208 char serverCommands[MAX_RELIABLE_COMMANDS][MAX_STRING_CHARS];
209
210 // file transfer from server
211 fileHandle_t download;
212 char downloadTempName[MAX_OSPATH];
213 char downloadName[MAX_OSPATH];
214#ifdef USE_CURL
215 qboolean cURLEnabled;
216 qboolean cURLUsed;
217 qboolean cURLDisconnected;
218 char downloadURL[MAX_OSPATH];
219 CURL *downloadCURL;
220 CURLM *downloadCURLM;
221#endif /* USE_CURL */
222 int sv_allowDownload;
223 char sv_dlURL[MAX_CVAR_VALUE_STRING];
224 int downloadNumber;
225 int downloadBlock; // block we are waiting for
226 size_t downloadCount; // how many bytes we got
227 size_t downloadSize; // how many bytes we got
228 char downloadList[MAX_INFO_STRING]; // list of paks we need to download
229 qboolean downloadRestart; // if true, we need to do another FS_Restart because we downloaded a pak
230
231 // demo information
232 char demoName[MAX_QPATH];
233 qboolean spDemoRecording;
234 qboolean demorecording;
235 qboolean demoplaying;
236 qboolean demowaiting; // don't record until a non-delta message is received
237 qboolean firstDemoFrameSkipped;
238 fileHandle_t demofile;
239
240 int timeDemoFrames; // counter of rendered frames
241 int timeDemoStart; // cls.realtime before first frame
242 int timeDemoBaseTime; // each frame will be at this time + frameNum * 50
243 int timeDemoLastFrame;// time the last frame was rendered
244 int timeDemoMinDuration; // minimum frame duration
245 int timeDemoMaxDuration; // maximum frame duration
246 unsigned char timeDemoDurations[ MAX_TIMEDEMO_DURATIONS ]; // log of frame durations
247
248 float aviVideoFrameRemainder;
249 float aviSoundFrameRemainder;
250
251#ifdef USE_VOIP
252 qboolean voipEnabled;
253 qboolean voipCodecInitialized;
254
255 // incoming data...
256 // !!! FIXME: convert from parallel arrays to array of a struct.
257 OpusDecoder *opusDecoder[MAX_CLIENTS];
258 byte voipIncomingGeneration[MAX_CLIENTS];
259 int voipIncomingSequence[MAX_CLIENTS];
260 float voipGain[MAX_CLIENTS];
261 qboolean voipIgnore[MAX_CLIENTS];
262 qboolean voipMuteAll;
263
264 // outgoing data...
265 // if voipTargets[i / 8] & (1 << (i % 8)),
266 // then we are sending to clientnum i.
267 uint8_t voipTargets[(MAX_CLIENTS + 7) / 8];
268 uint8_t voipFlags;
269 OpusEncoder *opusEncoder;
270 int voipOutgoingDataSize;
271 int voipOutgoingDataFrames;
272 int voipOutgoingSequence;
273 byte voipOutgoingGeneration;
274 byte voipOutgoingData[1024];
275 float voipPower;
276#endif
277
278#ifdef LEGACY_PROTOCOL
279 qboolean compat;
280#endif
281
282 // big stuff at end of structure so most offsets are 15 bits or less
283 netchan_t netchan;
285
286extern clientConnection_t clc;
287
288/*
289==================================================================
290
291the clientStatic_t structure is never wiped, and is used even when
292no client connection is active at all
293
294==================================================================
295*/
296
297typedef struct {
298 netadr_t adr;
299 int start;
300 int time;
301 char info[MAX_INFO_STRING];
302} ping_t;
303
304typedef struct {
305 netadr_t adr;
306 char hostName[MAX_HOSTNAME_LENGTH];
307 char mapName[MAX_NAME_LENGTH];
308 char game[MAX_NAME_LENGTH];
309 char gameTypeString[ MAX_NAME_LENGTH ];
310 int netType;
311 int gameType;
312 int clients;
313 int maxClients;
314 int minPing;
315 int maxPing;
316 int ping;
317 qboolean visible;
319
320typedef struct {
321 byte ip[4];
322 unsigned short port;
324
325typedef enum loadProgress_e {
327 LOAD_PROGRESS_FALSE,
329 LOAD_PROGRESS_DEFAULT,
331 LOAD_PROGRESS_LOAD,
333 LOAD_PROGRESS_SAVE
334} loadProgress_t;
335
336typedef struct {
337 int startStage;
338 loadProgress_t loading;
339 int keyCatchers;
340 qboolean vid_restart;
341 qboolean cddialog; // bring up the cd needed dialog next frame
342 qboolean no_menus;
343
344 // when the server clears the hunk, all of these must be restarted
345 qboolean rendererRegistered;
346 qboolean cgameStarted;
347 qboolean uiStarted;
348 qboolean timeScaled;
349
350 int framecount;
351 int frametime; // msec since last frame
352 float serverFrameTime;
353
354 int realtime; // ignores pause
355 int realFrametime; // ignoring pause, so console always works
356
357 int numlocalservers;
358 serverInfo_t localServers[ MAX_OTHER_SERVERS ];
359 qboolean bNewLocalServerInfo;
360
361 int numglobalservers;
362 serverInfo_t globalServers[MAX_GLOBAL_SERVERS];
363 // additional global servers
364 int numGlobalServerAddresses;
365 netadr_t globalServerAddresses[MAX_GLOBAL_SERVERS];
366
367 int numfavoriteservers;
368 serverInfo_t favoriteServers[MAX_OTHER_SERVERS];
369
370 int nummplayerservers;
371 serverInfo_t mplayerServers[MAX_OTHER_SERVERS];
372
373 int pingUpdateSource; // source currently pinging or updating
374
375 int masterNum;
376
377 // update server info
378 netadr_t updateServer;
379 char updateChallenge[MAX_TOKEN_CHARS];
380 char updateInfoString[MAX_INFO_STRING];
381
382 netadr_t authorizeServer;
383
384 // rendering info
385 glconfig_t glconfig;
386 int total_tris;
387 int total_verts;
388 int total_texels;
389 int world_tris;
390 int world_verts;
391 int character_lights;
392 hdelement_t HudDrawElements[ MAX_HUDDRAW_ELEMENTS ];
393 clientAnim_t anim;
394 stopWatch_t stopwatch;
395 void* savedCgameState;
396 size_t savedCgameStateSize;
397 char gcdResponse[73];
398 // Added in 2.0
399 netprofclient_t netprofile;
400 qhandle_t charSetShader;
401 qhandle_t whiteShader;
402 qhandle_t consoleShader;
403 fontInfo_t consoleFont;
404
405 int refSequence;
407
408extern clientStatic_t cls;
409
410//=============================================================================
411
412//extern vm_t *cgvm; // interface to cgame dll or vm
413extern clientGameExport_t *cge;
414extern refexport_t re; // interface to refresh .dll
415
416
417extern qboolean scr_initialized;
418
419//
420// cvars
421//
422extern cvar_t *cl_nodelta;
423extern cvar_t *cl_debugMove;
424extern cvar_t *cl_noprint;
425extern cvar_t *cl_timegraph;
426extern cvar_t *cl_debuggraph;
427extern cvar_t *cl_timeout;
428extern cvar_t *cl_connect_timeout;
429extern cvar_t *cl_maxpackets;
430extern cvar_t *cl_packetdup;
431extern cvar_t *cl_shownet;
432extern cvar_t *cl_netprofile;
433extern cvar_t *cl_netprofileoverlay;
434extern cvar_t *cl_showSend;
435extern cvar_t *cl_timeNudge;
436extern cvar_t *cl_showTimeDelta;
437extern cvar_t *cl_freezeDemo;
438
439extern cvar_t *cl_yawspeed;
440extern cvar_t *cl_pitchspeed;
441extern cvar_t *cl_run;
442extern cvar_t *cl_anglespeedkey;
443
444extern cvar_t *cl_sensitivity;
445extern cvar_t *cl_freelook;
446
447extern cvar_t *cl_mouseAccel;
448extern cvar_t *cl_mouseAccelOffset;
449extern cvar_t *cl_mouseAccelStyle;
450extern cvar_t *cl_showMouseRate;
451
452extern cvar_t *cl_altbindings;
453extern cvar_t *cl_ctrlbindings;
454
455extern cvar_t *m_pitch;
456extern cvar_t *m_yaw;
457extern cvar_t *m_forward;
458extern cvar_t *m_side;
459extern cvar_t *m_filter;
460
461extern cvar_t *j_pitch;
462extern cvar_t *j_yaw;
463extern cvar_t *j_forward;
464extern cvar_t *j_side;
465extern cvar_t *j_up;
466extern cvar_t *j_pitch_axis;
467extern cvar_t *j_yaw_axis;
468extern cvar_t *j_forward_axis;
469extern cvar_t *j_side_axis;
470extern cvar_t *j_up_axis;
471
472extern cvar_t *cl_timedemo;
473extern cvar_t *cl_aviFrameRate;
474extern cvar_t *cl_aviMotionJpeg;
475
476extern cvar_t *cl_activeAction;
477
478extern cvar_t *cl_allowDownload;
479extern cvar_t *cl_downloadMethod;
480extern cvar_t *cl_conXOffset;
481extern cvar_t *cl_inGameVideo;
482
483extern cvar_t *cl_lanForcePackets;
484extern cvar_t *cl_langamerefreshstatus;
485extern cvar_t *cl_radar_icon_size;
486extern cvar_t *cl_radar_speak_time;
487extern cvar_t *cl_radar_blink_time;
488extern cvar_t *cl_autoRecordDemo;
489
490extern cvar_t *cl_r_fullscreen;
491
492extern cvar_t *cl_consoleKeys;
493
494#ifdef USE_MUMBLE
495extern cvar_t *cl_useMumble;
496extern cvar_t *cl_mumbleScale;
497#endif
498
499#ifdef USE_VOIP
500// cl_voipSendTarget is a string: "all" to broadcast to everyone, "none" to
501// send to no one, or a comma-separated list of client numbers:
502// "0,7,2,23" ... an empty string is treated like "all".
503extern cvar_t *cl_voipUseVAD;
504extern cvar_t *cl_voipVADThreshold;
505extern cvar_t *cl_voipSend;
506extern cvar_t *cl_voipSendTarget;
507extern cvar_t *cl_voipGainDuringCapture;
508extern cvar_t *cl_voipCaptureMult;
509extern cvar_t *cl_voipShowMeter;
510extern cvar_t *cl_voip;
511
512// 20ms at 48k
513#define VOIP_MAX_FRAME_SAMPLES ( 20 * 48 )
514
515// 3 frame is 60ms of audio, the max opus will encode at once
516#define VOIP_MAX_PACKET_FRAMES 3
517#define VOIP_MAX_PACKET_SAMPLES ( VOIP_MAX_FRAME_SAMPLES * VOIP_MAX_PACKET_FRAMES )
518#endif
519
520extern cvar_t *cg_gametype;
521
522extern cvar_t* j_pitch;
523extern cvar_t* j_yaw;
524extern cvar_t* j_forward;
525extern cvar_t* j_side;
526extern cvar_t* j_up;
527extern cvar_t* j_pitch_axis;
528extern cvar_t* j_yaw_axis;
529extern cvar_t* j_forward_axis;
530extern cvar_t* j_side_axis;
531extern cvar_t* j_up_axis;
532
533//=================================================
534
535//
536// cl_main
537//
538
539void CL_Init (void);
540void CL_InitClientSavedData(void);
541void CL_AddReliableCommand(const char *cmd, qboolean isDisconnectCmd);
542
543void CL_StartHunkUsers( qboolean rendererOnly );
544
545void CL_Connect( const char *server, netadrtype_t family );
546
547void CL_Disconnect_f (void);
548void CL_GetChallengePacket (void);
549void CL_Vid_Restart_f( void );
550void CL_Snd_Restart_f (void);
551const char *CL_ConfigString( int index );
552void CL_StartDemoLoop( void );
553void CL_NextDemo( void );
554void CL_ReadDemoMessage( void );
555void CL_StopRecord_f(void);
556
557void CL_InitDownloads(void);
558void CL_NextDownload(void);
559
560void CL_GetPing( int n, char *buf, int buflen, int *pingtime );
561void CL_GetPingInfo( int n, char *buf, int buflen );
562void CL_ClearPing( int n );
563int CL_GetPingQueueCount( void );
564
565void CL_ShutdownRef( void );
566void CL_InitRef( void );
567qboolean CL_CDKeyValidate( const char *key, const char *checksum );
568int CL_ServerStatus( const char *serverAddress, char *serverStatusString, int maxLen );
569void UI_ClearResource( void );
570void UI_LoadResource( const char *name );
571
572qboolean CL_CheckPaused(void);
573
574int CL_GetRefSequence(void);
575qboolean CL_IsRendererLoaded(void);
576void CL_ApplyOriginalConfigTweaks();
577
578//
579// cl_input
580//
581typedef struct {
582 int down[2]; // key nums holding it down
583 unsigned downtime; // msec timestamp
584 unsigned msec; // msec down this frame if both a down and up happened
585 qboolean active; // current state
586 qboolean wasPressed; // set when down, not cleared when up
587} kbutton_t;
588
589extern kbutton_t in_mlook, in_klook;
590extern kbutton_t in_strafe;
591extern kbutton_t in_speed;
592extern qboolean in_guimouse;
593
594void IN_ToggleMouse( void );
595void IN_MouseOn( void );
596void IN_MouseOff( void );
597void CL_UpdateMouse();
598
599void CL_InitInput (void);
600void CL_ShutdownInput(void);
601void CL_SendCmd (void);
602void CL_ClearState (void);
603void CL_ReadPackets (void);
604
605void CL_WritePacket( void );
606void IN_CenterView (void);
607
608void CL_VerifyCode( void );
609
610float CL_KeyState (kbutton_t *key);
611const char *Key_KeynumToString( int keynum );
612const char *Key_KeynumToBindString( int keynum );
613void Key_GetKeysForCommand( const char *command, int *key1, int *key2 );
614int Key_GetCatcher( void );
615void Key_SetCatcher( int catcher );
616
617void CL_EyeInfo(usereyes_t *info);
618
619//
620// cl_parse.c
621//
622extern int cl_connectedToPureServer;
623extern int cl_connectedToCheatServer;
624extern msg_t *cl_currentMSG;
625
626#ifdef USE_VOIP
627void CL_Voip_f( void );
628#endif
629
630void CL_SystemInfoChanged( void );
631void CL_ParseServerMessage( msg_t *msg );
632
633int CL_MSG_ReadBits( int bits );
634int CL_MSG_ReadChar( void );
635int CL_MSG_ReadByte( void );
636int CL_MSG_ReadSVC( void );
637int CL_MSG_ReadShort( void );
638int CL_MSG_ReadLong( void );
639float CL_MSG_ReadFloat( void );
640char *CL_MSG_ReadString( void );
641char *CL_MSG_ReadStringLine( void );
642float CL_MSG_ReadAngle8( void );
643float CL_MSG_ReadAngle16( void );
644void CL_MSG_ReadData( void *data, int len );
645float CL_MSG_ReadCoord( void );
646void CL_MSG_ReadDir( vec3_t dir );
647
648//====================================================================
649
650void CL_ServerInfoPacket( netadr_t from, msg_t *msg );
651void CL_LocalServers_f( void );
652void CL_GlobalServers_f( void );
653void CL_FavoriteServers_f( void );
654void CL_Ping_f( void );
655void CL_SaveShot_f( void );
656void CL_Dialog_f( void );
657void CL_ServerRestarted( void );
658qboolean CL_UpdateVisiblePings_f( int source );
659
660
661//
662// console
663//
664void Con_DrawCharacter (int cx, int line, int num);
665
666void Con_CheckResize (void);
667void Con_Init (void);
668void Con_Shutdown (void);
669void Con_Clear_f (void);
670void Con_ToggleConsole_f (void);
671void Con_DrawNotify (void);
672void Con_ClearNotify (void);
673void Con_RunConsole (void);
674void Con_DrawConsole (void);
675void Con_PageUp( void );
676void Con_PageDown( void );
677void Con_Top( void );
678void Con_Bottom( void );
679
680//
681// cl_scrn.c
682//
683void SCR_Init (void);
684void SCR_DrawDebugGraph(void);
685void SCR_DrawScreenField(void);
686void SCR_UpdateScreen (void);
687
688void SCR_DebugGraph (float value);
689
690int SCR_GetBigStringWidth( const char *str ); // returns in virtual 640x480 coordinates
691
692void SCR_AdjustFrom640( float *x, float *y, float *w, float *h );
693void SCR_FillRect( float x, float y, float width, float height,
694 const float *color );
695void SCR_DrawPic( float x, float y, float width, float height, qhandle_t hShader );
696void SCR_DrawNamedPic( float x, float y, float width, float height, const char *picname );
697
698void SCR_DrawBigString( int x, int y, const char *s, float alpha, qboolean noColorEscape ); // draws a string with embedded color control characters with fade
699void SCR_DrawBigStringColor( int x, int y, const char *s, vec4_t color, qboolean noColorEscape ); // ignores embedded color control characters
700void SCR_DrawSmallStringExt( int x, int y, const char *string, float *setColor, qboolean forceColor, qboolean noColorEscape );
701void SCR_DrawSmallChar( int x, int y, int ch );
702
703void UpdateStereoSide( stereoFrame_t s );
704
705//
706// cl_cin.c
707//
708
709void CL_PlayCinematic_f( void );
710void SCR_DrawCinematic (void);
711void SCR_RunCinematic (void);
712void SCR_StopCinematic (void);
713int CIN_PlayCinematic( const char *arg0, int xpos, int ypos, int width, int height, int bits);
714e_status CIN_StopCinematic(int handle);
715e_status CIN_RunCinematic (int handle);
716void CIN_DrawCinematic (int handle);
717void CIN_SetExtents (int handle, int x, int y, int w, int h);
718void CIN_SetLooping (int handle, qboolean loop);
719void CIN_UploadCinematic(int handle);
720void CIN_CloseAllVideos(void);
721
722//
723// cl_cgame.cpp
724//
725void CL_InitCGame( void );
726void CL_InitCGameDLL( void );
727void CL_ShutdownCGame( void );
728qboolean CL_GameCommand( void );
729void CL_CGameRendering( stereoFrame_t stereo );
730void CL_CGame2D( stereoFrame_t stereo );
731void CL_UpdateSnapFlags( void );
732void CL_SetCGameTime( void );
733void CL_FirstSnapshot( void );
734void CL_ShaderStateChanged( void );
735baseshader_t *CL_GetShaderPointer( int iShaderNum );
736
737//
738// cl_ui.c
739//
740/*
741void CL_InitializeUI( void );
742void CL_ShutdownUI( void );
743int Key_GetCatcher( void );
744void Key_SetCatcher( int catcher );
745void LAN_LoadCachedServers( void );
746void LAN_SaveServersToCache( void );
747*/
748
749
750//
751// cl_net_chan.c
752//
753void CL_Netchan_Transmit( netchan_t *chan, msg_t* msg); //int length, const byte *data );
754void CL_Netchan_TransmitNextFragment( netchan_t *chan );
755qboolean CL_Netchan_Process( netchan_t *chan, msg_t *msg );
756void CL_NET_OutOfBandPrint( netadr_t adr, const char* format, ... );
757
758//
759// cl_avi.c
760//
761qboolean CL_OpenAVIForWriting( const char *filename );
762void CL_TakeVideoFrame( void );
763void CL_WriteAVIVideoFrame( const byte *imageBuffer, int size );
764void CL_WriteAVIAudioFrame( const byte *pcmBuffer, int size );
765qboolean CL_CloseAVI( void );
766qboolean CL_VideoRecording( void );
767
768//
769// cl_consolecmds.cpp
770//
771void CL_InitConsoleCommands( void );
772
773#ifdef __cplusplus
774}
775#endif
Definition client.h:54
Definition client.h:104
Definition q_shared.h:2144
Definition client.h:174
Definition cg_public.h:458
Definition client.h:336
Definition q_shared.h:2182
Definition q_shared.h:1695
Definition tr_types.h:244
Definition client.h:581
Definition qcommon.h:218
Definition qcommon.h:265
Definition qcommon.h:344
Definition client.h:88
Definition client.h:297
Definition tr_public.h:40
Definition client.h:320
Definition client.h:304