UFO: Alien Invasion
Loading...
Searching...
No Matches
client.h
Go to the documentation of this file.
1
5
6/*
7All original material Copyright (C) 2002-2025 UFO: Alien Invasion.
8
9Original file from Quake 2 v3.21: quake2-2.31/client/client.h
10Copyright (C) 1997-2001 Id Software, Inc.
11
12This program is free software; you can redistribute it and/or
13modify it under the terms of the GNU General Public License
14as published by the Free Software Foundation; either version 2
15of the License, or (at your option) any later version.
16
17This program is distributed in the hope that it will be useful,
18but WITHOUT ANY WARRANTY; without even the implied warranty of
19MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
21See the GNU General Public License for more details.
22
23You should have received a copy of the GNU General Public License
24along with this program; if not, write to the Free Software
25Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
27*/
28
29#pragma once
30
31#include "cl_shared.h"
32#include "cl_renderer.h"
33#include "cl_video.h"
34#include "cl_team.h"
35#include "sound/s_main.h"
36#include "input/cl_input.h"
37#include "input/cl_keys.h"
41#include "../game/inventory.h"
42#include "renderer/r_model.h"
43#include "../common/http.h"
44
45struct cgame_export_s;
46
54typedef struct client_static_s {
57
59 float frametime;
60 float framerate;
61
64
65 const struct cgame_export_s* gametype;
66
67 /* connection information */
69 char serverport[16];
73
75
77 int team;
79
81
85
87#ifndef NO_HTTP
90 CURL* curl;
91#endif
92 char downloadServer[512];
93 char downloadReferer[32];
94
97
98 /* unique character id */
100
102
104 unsigned int numActorSkins;
105
106 inline bool isOurRound () const
107 {
108 return team == cl.actTeam;
109 }
110
111#ifndef HARD_LINKED_CGAME
113#endif
114
115 SDL_Window* window;
116 SDL_GLContext context;
118
119extern client_static_t cls;
120
121/*============================================================================= */
122
123/* cvars */
124extern cvar_t* cl_fps;
125extern cvar_t* cl_selected;
126extern cvar_t* cl_teamnum;
127
128extern cvar_t* s_language;
129
130/* cl_main.c */
131int CL_GetClientState(void);
133void CL_Disconnect(void);
134void CL_Init(void);
clientBattleScape_t cl
External (non-keyboard) input devices.
Header file for keyboard handler.
keydest_t
Definition cl_keys.h:181
cvar_t * cl_fps
Definition cl_main.cpp:71
client_static_t cls
Definition cl_main.cpp:83
cvar_t * cl_selected
Definition cl_main.cpp:73
cvar_t * cl_teamnum
Definition cl_main.cpp:81
Share stuff between the different cgame implementations.
connstate_t
Definition cl_shared.h:75
Video driver defs.
int CL_GetClientState(void)
Definition cl_main.cpp:1007
cvar_t * s_language
Definition common.cpp:54
void CL_SetClientState(connstate_t state)
Sets the client state.
Definition cl_main.cpp:1015
void CL_Disconnect(void)
Sets the cls.state to ca_disconnected and informs the server.
Definition cl_main.cpp:256
void CL_Init(void)
Definition cl_main.cpp:1141
#define MAX_OSPATH
Definition filesys.h:44
#define MAX_OBJDEFS
Definition inv_shared.h:37
Brush model header file.
#define MAX_ACTORSKINNAME
Definition r_model.h:66
Specifies sound API?
#define MAX_VAR
Definition shared.h:36
Not cleared on a map change (static data).
Definition client.h:54
float frametime
Definition client.h:59
int waitingForStart
Definition client.h:72
size_t downloadPosition
Definition client.h:83
int reconnectTime
Definition client.h:71
char downloadServer[512]
Definition client.h:92
keydest_t keyDest
Definition client.h:56
connstate_t state
Definition client.h:55
int nextUniqueCharacterNumber
Definition client.h:99
model_t * modelPool[MAX_OBJDEFS]
Definition client.h:96
struct net_stream * netStream
Definition client.h:74
int downloadPercent
Definition client.h:84
int connectTime
Definition client.h:70
bool isOurRound() const
Definition client.h:106
const struct cgame_export_s * gametype
Definition client.h:65
SDL_GLContext context
Definition client.h:116
dlqueue_t * downloadQueue
Definition client.h:88
unsigned int numActorSkins
Definition client.h:104
int teamSaveSlotIndex
Definition client.h:78
int currentSelectedMap
Definition client.h:80
int disableScreen
Definition client.h:63
char serverport[16]
Definition client.h:69
char downloadName[MAX_OSPATH]
Definition client.h:82
void * cgameLibrary
Definition client.h:112
InventoryInterface i
Definition client.h:101
actorSkin_t actorSkins[MAX_ACTORSKINNAME]
Definition client.h:103
CURL * curl
Definition client.h:90
char servername[MAX_VAR]
Definition client.h:68
char downloadReferer[32]
Definition client.h:93
float framerate
Definition client.h:60
bool downloadMaps
Definition client.h:86
dlhandle_t HTTPHandles[4]
Definition client.h:89
SDL_Window * window
Definition client.h:115
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
Definition cvar.h:71