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 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_HOSTNAME_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 enum loadProgress_e {
326 LOAD_PROGRESS_FALSE,
328 LOAD_PROGRESS_DEFAULT,
330 LOAD_PROGRESS_LOAD,
332 LOAD_PROGRESS_SAVE
333} loadProgress_t;
334
335typedef struct {
336 int startStage;
337 loadProgress_t loading;
338 int keyCatchers;
339 qboolean vid_restart;
340 qboolean cddialog; // bring up the cd needed dialog next frame
341 qboolean no_menus;
342
343 // when the server clears the hunk, all of these must be restarted
344 qboolean rendererRegistered;
345 qboolean cgameStarted;
346 qboolean uiStarted;
347 qboolean timeScaled;
348
349 int framecount;
350 int frametime; // msec since last frame
351 float serverFrameTime;
352
353 int realtime; // ignores pause
354 int realFrametime; // ignoring pause, so console always works
355
356 int numlocalservers;
357 serverInfo_t localServers[ MAX_OTHER_SERVERS ];
358 qboolean bNewLocalServerInfo;
359
360 int numglobalservers;
361 serverInfo_t globalServers[MAX_GLOBAL_SERVERS];
362 // additional global servers
363 int numGlobalServerAddresses;
364 netadr_t globalServerAddresses[MAX_GLOBAL_SERVERS];
365
366 int numfavoriteservers;
367 serverInfo_t favoriteServers[MAX_OTHER_SERVERS];
368
369 int nummplayerservers;
370 serverInfo_t mplayerServers[MAX_OTHER_SERVERS];
371
372 int pingUpdateSource; // source currently pinging or updating
373
374 int masterNum;
375
376 // update server info
377 netadr_t updateServer;
378 char updateChallenge[MAX_TOKEN_CHARS];
379 char updateInfoString[MAX_INFO_STRING];
380
381 netadr_t authorizeServer;
382
383 // rendering info
384 glconfig_t glconfig;
385 int total_tris;
386 int total_verts;
387 int total_texels;
388 int world_tris;
389 int world_verts;
390 int character_lights;
391 hdelement_t HudDrawElements[ MAX_HUDDRAW_ELEMENTS ];
392 clientAnim_t anim;
393 stopWatch_t stopwatch;
394 void* savedCgameState;
395 size_t savedCgameStateSize;
396 char gcdResponse[73];
397 // Added in 2.0
398 netprofclient_t netprofile;
399 qhandle_t charSetShader;
400 qhandle_t whiteShader;
401 qhandle_t consoleShader;
402 fontInfo_t consoleFont;
403
404 int refSequence;
406
407extern clientStatic_t cls;
408
409//=============================================================================
410
411//extern vm_t *cgvm; // interface to cgame dll or vm
412extern clientGameExport_t *cge;
413extern refexport_t re; // interface to refresh .dll
414
415
416extern qboolean scr_initialized;
417
418//
419// cvars
420//
421extern cvar_t *cl_nodelta;
422extern cvar_t *cl_debugMove;
423extern cvar_t *cl_noprint;
424extern cvar_t *cl_timegraph;
425extern cvar_t *cl_debuggraph;
426extern cvar_t *cl_timeout;
427extern cvar_t *cl_connect_timeout;
428extern cvar_t *cl_maxpackets;
429extern cvar_t *cl_packetdup;
430extern cvar_t *cl_shownet;
431extern cvar_t *cl_netprofile;
432extern cvar_t *cl_netprofileoverlay;
433extern cvar_t *cl_showSend;
434extern cvar_t *cl_timeNudge;
435extern cvar_t *cl_showTimeDelta;
436extern cvar_t *cl_freezeDemo;
437
438extern cvar_t *cl_yawspeed;
439extern cvar_t *cl_pitchspeed;
440extern cvar_t *cl_run;
441extern cvar_t *cl_anglespeedkey;
442
443extern cvar_t *cl_sensitivity;
444extern cvar_t *cl_freelook;
445
446extern cvar_t *cl_mouseAccel;
447extern cvar_t *cl_mouseAccelOffset;
448extern cvar_t *cl_mouseAccelStyle;
449extern cvar_t *cl_showMouseRate;
450
451extern cvar_t *cl_altbindings;
452extern cvar_t *cl_ctrlbindings;
453
454extern cvar_t *m_pitch;
455extern cvar_t *m_yaw;
456extern cvar_t *m_forward;
457extern cvar_t *m_side;
458extern cvar_t *m_filter;
459
460extern cvar_t *j_pitch;
461extern cvar_t *j_yaw;
462extern cvar_t *j_forward;
463extern cvar_t *j_side;
464extern cvar_t *j_up;
465extern cvar_t *j_pitch_axis;
466extern cvar_t *j_yaw_axis;
467extern cvar_t *j_forward_axis;
468extern cvar_t *j_side_axis;
469extern cvar_t *j_up_axis;
470
471extern cvar_t *cl_timedemo;
472extern cvar_t *cl_aviFrameRate;
473extern cvar_t *cl_aviMotionJpeg;
474
475extern cvar_t *cl_activeAction;
476
477extern cvar_t *cl_allowDownload;
478extern cvar_t *cl_downloadMethod;
479extern cvar_t *cl_conXOffset;
480extern cvar_t *cl_inGameVideo;
481
482extern cvar_t *cl_lanForcePackets;
483extern cvar_t *cl_langamerefreshstatus;
484extern cvar_t *cl_radar_icon_size;
485extern cvar_t *cl_radar_speak_time;
486extern cvar_t *cl_radar_blink_time;
487extern cvar_t *cl_autoRecordDemo;
488
489extern cvar_t *cl_r_fullscreen;
490
491extern cvar_t *cl_consoleKeys;
492
493#ifdef USE_MUMBLE
494extern cvar_t *cl_useMumble;
495extern cvar_t *cl_mumbleScale;
496#endif
497
498#ifdef USE_VOIP
499// cl_voipSendTarget is a string: "all" to broadcast to everyone, "none" to
500// send to no one, or a comma-separated list of client numbers:
501// "0,7,2,23" ... an empty string is treated like "all".
502extern cvar_t *cl_voipUseVAD;
503extern cvar_t *cl_voipVADThreshold;
504extern cvar_t *cl_voipSend;
505extern cvar_t *cl_voipSendTarget;
506extern cvar_t *cl_voipGainDuringCapture;
507extern cvar_t *cl_voipCaptureMult;
508extern cvar_t *cl_voipShowMeter;
509extern cvar_t *cl_voip;
510
511// 20ms at 48k
512#define VOIP_MAX_FRAME_SAMPLES ( 20 * 48 )
513
514// 3 frame is 60ms of audio, the max opus will encode at once
515#define VOIP_MAX_PACKET_FRAMES 3
516#define VOIP_MAX_PACKET_SAMPLES ( VOIP_MAX_FRAME_SAMPLES * VOIP_MAX_PACKET_FRAMES )
517#endif
518
519extern cvar_t *cg_gametype;
520
521extern cvar_t* j_pitch;
522extern cvar_t* j_yaw;
523extern cvar_t* j_forward;
524extern cvar_t* j_side;
525extern cvar_t* j_up;
526extern cvar_t* j_pitch_axis;
527extern cvar_t* j_yaw_axis;
528extern cvar_t* j_forward_axis;
529extern cvar_t* j_side_axis;
530extern cvar_t* j_up_axis;
531
532//=================================================
533
534//
535// cl_main
536//
537
538void CL_Init (void);
539void CL_InitClientSavedData(void);
540void CL_AddReliableCommand(const char *cmd, qboolean isDisconnectCmd);
541
542void CL_StartHunkUsers( qboolean rendererOnly );
543
544void CL_Connect( const char *server, netadrtype_t family );
545
546void CL_Disconnect_f (void);
547void CL_GetChallengePacket (void);
548void CL_Vid_Restart_f( void );
549void CL_Snd_Restart_f (void);
550const char *CL_ConfigString( int index );
551void CL_StartDemoLoop( void );
552void CL_NextDemo( void );
553void CL_ReadDemoMessage( void );
554void CL_StopRecord_f(void);
555
556void CL_InitDownloads(void);
557void CL_NextDownload(void);
558
559void CL_GetPing( int n, char *buf, int buflen, int *pingtime );
560void CL_GetPingInfo( int n, char *buf, int buflen );
561void CL_ClearPing( int n );
562int CL_GetPingQueueCount( void );
563
564void CL_ShutdownRef( void );
565void CL_InitRef( void );
566qboolean CL_CDKeyValidate( const char *key, const char *checksum );
567int CL_ServerStatus( const char *serverAddress, char *serverStatusString, int maxLen );
568void UI_ClearResource( void );
569void UI_LoadResource( const char *name );
570
571qboolean CL_CheckPaused(void);
572
573int CL_GetRefSequence(void);
574qboolean CL_IsRendererLoaded(void);
575void CL_ApplyOriginalConfigTweaks();
576
577//
578// cl_input
579//
580typedef struct {
581 int down[2]; // key nums holding it down
582 unsigned downtime; // msec timestamp
583 unsigned msec; // msec down this frame if both a down and up happened
584 qboolean active; // current state
585 qboolean wasPressed; // set when down, not cleared when up
586} kbutton_t;
587
588extern kbutton_t in_mlook, in_klook;
589extern kbutton_t in_strafe;
590extern kbutton_t in_speed;
591extern qboolean in_guimouse;
592
593void IN_ToggleMouse( void );
594void IN_MouseOn( void );
595void IN_MouseOff( void );
596void CL_UpdateMouse();
597
598void CL_InitInput (void);
599void CL_ShutdownInput(void);
600void CL_SendCmd (void);
601void CL_ClearState (void);
602void CL_ReadPackets (void);
603
604void CL_WritePacket( void );
605void IN_CenterView (void);
606
607void CL_VerifyCode( void );
608
609float CL_KeyState (kbutton_t *key);
610const char *Key_KeynumToString( int keynum );
611const char *Key_KeynumToBindString( int keynum );
612void Key_GetKeysForCommand( const char *command, int *key1, int *key2 );
613int Key_GetCatcher( void );
614void Key_SetCatcher( int catcher );
615
616void CL_EyeInfo(usereyes_t *info);
617
618//
619// cl_parse.c
620//
621extern int cl_connectedToPureServer;
622extern int cl_connectedToCheatServer;
623extern msg_t *cl_currentMSG;
624
625#ifdef USE_VOIP
626void CL_Voip_f( void );
627#endif
628
629void CL_SystemInfoChanged( void );
630void CL_ParseServerMessage( msg_t *msg );
631
632int CL_MSG_ReadBits( int bits );
633int CL_MSG_ReadChar( void );
634int CL_MSG_ReadByte( void );
635int CL_MSG_ReadSVC( void );
636int CL_MSG_ReadShort( void );
637int CL_MSG_ReadLong( void );
638float CL_MSG_ReadFloat( void );
639char *CL_MSG_ReadString( void );
640char *CL_MSG_ReadStringLine( void );
641float CL_MSG_ReadAngle8( void );
642float CL_MSG_ReadAngle16( void );
643void CL_MSG_ReadData( void *data, int len );
644float CL_MSG_ReadCoord( void );
645void CL_MSG_ReadDir( vec3_t dir );
646
647//====================================================================
648
649void CL_ServerInfoPacket( netadr_t from, msg_t *msg );
650void CL_LocalServers_f( void );
651void CL_GlobalServers_f( void );
652void CL_FavoriteServers_f( void );
653void CL_Ping_f( void );
654void CL_SaveShot_f( void );
655void CL_Dialog_f( void );
656void CL_ServerRestarted( void );
657qboolean CL_UpdateVisiblePings_f( int source );
658
659
660//
661// console
662//
663void Con_DrawCharacter (int cx, int line, int num);
664
665void Con_CheckResize (void);
666void Con_Init (void);
667void Con_Shutdown (void);
668void Con_Clear_f (void);
669void Con_ToggleConsole_f (void);
670void Con_DrawNotify (void);
671void Con_ClearNotify (void);
672void Con_RunConsole (void);
673void Con_DrawConsole (void);
674void Con_PageUp( void );
675void Con_PageDown( void );
676void Con_Top( void );
677void Con_Bottom( void );
678
679//
680// cl_scrn.c
681//
682void SCR_Init (void);
683void SCR_DrawDebugGraph(void);
684void SCR_DrawScreenField(void);
685void SCR_UpdateScreen (void);
686
687void SCR_DebugGraph (float value);
688
689int SCR_GetBigStringWidth( const char *str ); // returns in virtual 640x480 coordinates
690
691void SCR_AdjustFrom640( float *x, float *y, float *w, float *h );
692void SCR_FillRect( float x, float y, float width, float height,
693 const float *color );
694void SCR_DrawPic( float x, float y, float width, float height, qhandle_t hShader );
695void SCR_DrawNamedPic( float x, float y, float width, float height, const char *picname );
696
697void SCR_DrawBigString( int x, int y, const char *s, float alpha, qboolean noColorEscape ); // draws a string with embedded color control characters with fade
698void SCR_DrawBigStringColor( int x, int y, const char *s, vec4_t color, qboolean noColorEscape ); // ignores embedded color control characters
699void SCR_DrawSmallStringExt( int x, int y, const char *string, float *setColor, qboolean forceColor, qboolean noColorEscape );
700void SCR_DrawSmallChar( int x, int y, int ch );
701
702void UpdateStereoSide( stereoFrame_t s );
703
704//
705// cl_cin.c
706//
707
708void CL_PlayCinematic_f( void );
709void SCR_DrawCinematic (void);
710void SCR_RunCinematic (void);
711void SCR_StopCinematic (void);
712int CIN_PlayCinematic( const char *arg0, int xpos, int ypos, int width, int height, int bits);
713e_status CIN_StopCinematic(int handle);
714e_status CIN_RunCinematic (int handle);
715void CIN_DrawCinematic (int handle);
716void CIN_SetExtents (int handle, int x, int y, int w, int h);
717void CIN_SetLooping (int handle, qboolean loop);
718void CIN_UploadCinematic(int handle);
719void CIN_CloseAllVideos(void);
720
721//
722// cl_cgame.cpp
723//
724void CL_InitCGame( void );
725void CL_InitCGameDLL( void );
726void CL_ShutdownCGame( void );
727qboolean CL_GameCommand( void );
728void CL_CGameRendering( stereoFrame_t stereo );
729void CL_CGame2D( stereoFrame_t stereo );
730void CL_UpdateSnapFlags( void );
731void CL_SetCGameTime( void );
732void CL_FirstSnapshot( void );
733void CL_ShaderStateChanged( void );
734baseshader_t *CL_GetShaderPointer( int iShaderNum );
735
736//
737// cl_ui.c
738//
739/*
740void CL_InitializeUI( void );
741void CL_ShutdownUI( void );
742int Key_GetCatcher( void );
743void Key_SetCatcher( int catcher );
744void LAN_LoadCachedServers( void );
745void LAN_SaveServersToCache( void );
746*/
747
748
749//
750// cl_net_chan.c
751//
752void CL_Netchan_Transmit( netchan_t *chan, msg_t* msg); //int length, const byte *data );
753void CL_Netchan_TransmitNextFragment( netchan_t *chan );
754qboolean CL_Netchan_Process( netchan_t *chan, msg_t *msg );
755void CL_NET_OutOfBandPrint( netadr_t adr, const char* format, ... );
756
757//
758// cl_avi.c
759//
760qboolean CL_OpenAVIForWriting( const char *filename );
761void CL_TakeVideoFrame( void );
762void CL_WriteAVIVideoFrame( const byte *imageBuffer, int size );
763void CL_WriteAVIAudioFrame( const byte *pcmBuffer, int size );
764qboolean CL_CloseAVI( void );
765qboolean CL_VideoRecording( void );
766
767//
768// cl_consolecmds.cpp
769//
770void CL_InitConsoleCommands( void );
771
772#ifdef __cplusplus
773}
774#endif
Definition client.h:54
Definition client.h:104
Definition q_shared.h:2142
Definition client.h:174
Definition cg_public.h:458
Definition client.h:335
Definition q_shared.h:2180
Definition q_shared.h:1693
Definition tr_types.h:244
Definition client.h:580
Definition qcommon.h:218
Definition qcommon.h:265
Definition qcommon.h:344
Definition client.h:88
Definition client.h:296
Definition tr_public.h:40
Definition client.h:319
Definition client.h:303