UFO: Alien Invasion
Doxygen documentation generating
cgame.h
Go to the documentation of this file.
1 
6 /*
7 Copyright (C) 2002-2023 UFO: Alien Invasion.
8 
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 
18 See the GNU General Public License for more details.
19 
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 
24 */
25 
26 #pragma once
27 
28 #include "../../common/xml.h"
29 #include "../../common/http.h"
30 
31 #include "../cl_inventory.h"
32 #include "../../common/binaryexpressionparser.h"
33 
34 struct cgame_import_s;
35 
36 typedef struct cgame_export_s {
38  const char* name;
39  const char* menu;
41  void (EXPORT* Init) (void);
42  void (EXPORT* Shutdown) (void);
44  bool (EXPORT* Spawn) (linkedList_t** chrList);
46  const mapDef_t* (EXPORT* MapInfo) (int step);
48  void (EXPORT* Results) (dbuffer* msg, int, int*, int*, int[][MAX_TEAMS], int[][MAX_TEAMS], bool nextmap);
50  bool (EXPORT* IsItemUseable) (const objDef_t* od);
52  const char* (EXPORT* GetModelForItem) (const char* string);
54  equipDef_t* (EXPORT* GetEquipmentDefinition) (void);
56  void (EXPORT* UpdateCharacterValues) (const character_t* chr);
58  bool (EXPORT* IsTeamKnown) (const teamDef_t* teamDef);
60  character_t* (EXPORT* GetSelectedChr) (void);
62  int (EXPORT* GetChrMaxLoad) (const character_t* chr);
64  void (EXPORT* Drop) (void);
66  void (EXPORT* InitializeBattlescape) (dbuffer* msg, const linkedList_t* team);
68  void (EXPORT* RunFrame) (float secondsSinceLastFrame);
69  void (EXPORT* DrawBaseLayout) (int baseIdx, int x, int y, int totalMarge, int w, int h, int padding, const vec4_t bgcolor, const vec4_t color);
70  void (EXPORT* DrawBaseLayoutTooltip) (int baseIdx, int x, int y);
71  void (EXPORT* EndRoundAnnounce) (int playerNum, int team);
72  void (EXPORT* StartBattlescape) (bool isTeamPlay);
73  void (EXPORT* InitMissionBriefing) (const char** title, linkedList_t** victoryConditionsMsgIDs, linkedList_t** missionBriefingMsgIDs);
74  const char* (EXPORT* GetTeamDef) (void);
75  void (EXPORT* NotifyEvent) (event_t eventType);
76  void (EXPORT* AddChatMessage) (const char* message);
77  bool (EXPORT* HandleServerCommand) (const char* command, dbuffer* msg);
78 
79  void (EXPORT* MapDraw) (geoscapeData_t* data);
80  void (EXPORT* MapDrawMarkers) (const uiNode_t* node);
81  bool (EXPORT* MapClick) (const uiNode_t* node, int x, int y, const vec2_t pos);
83 
84 typedef struct cgameType_s {
85  char id[MAX_VAR];
86  char window[MAX_VAR];
87  char name[MAX_VAR];
90 } cgameType_t;
91 
92 typedef enum {
97 
99 typedef struct cgame_import_s {
103 
104  /* UI functions */
105  void (IMPORT* UI_ExecuteConfunc) (const char* fmt, ...) __attribute__((format(__printf__, 1, 2)));
106  void (IMPORT* UI_PopWindow) (bool all);
107  void (IMPORT* UI_PushWindow) (const char* name);
108  void (IMPORT* UI_InitStack) (const char* activeMenu, const char* mainMenu);
109  void (IMPORT* UI_Popup) (const char* title, const char* format, ...);
110  uiNode_t* (IMPORT* UI_AddOption) (uiNode_t** tree, const char* name, const char* label, const char* value);
112  void (IMPORT* UI_RegisterText) (int textId, const char* text);
113  void (IMPORT* UI_ResetData) (int dataId);
118  void (IMPORT* UI_TextScrollEnd) (const char* nodePath);
120  uiNode_t* (IMPORT* UI_PopupList) (const char* title, const char* headline, linkedList_t* entries, const char* clickAction);
122  void (IMPORT* HUD_InitUI) (const char* optionWindowName);
123  void (IMPORT* HUD_DisplayMessage) (const char* text);
124  uiNode_t* (IMPORT* UI_GetOption) (int dataId);
125  void (IMPORT* UI_SortOptions) (uiNode_t** first);
128  int (IMPORT* UI_DrawString) (const char* fontID, align_t align, int x, int y, const char* c);
129  const char* (IMPORT* UI_GetFontFromNode) (const uiNode_t* const node);
130  void (IMPORT* UI_DrawNormImageByName) (bool flip, float x, float y, float w, float h, float sh, float th, float sl, float tl, const char* name);
131  void (IMPORT* UI_DrawRect) (int x, int y, int w, int h, const vec4_t color, float lineWidth, int pattern);
132  void (IMPORT* UI_DrawFill) (int x, int y, int w, int h, const vec4_t color);
133  int (IMPORT* UI_DrawTooltip) (const char* string, int x, int y, int maxWidth);
135  void (IMPORT* UI_PopupButton) (const char* title, const char* text, const char* clickAction1, const char* clickText1, const char* tooltip1,
136  const char* clickAction2, const char* clickText2, const char* tooltip2, const char* clickAction3, const char* clickText3, const char* tooltip3);
137  uiSprite_t* (IMPORT* UI_GetSpriteByName) (const char* name);
139  uiNode_t* (IMPORT* UI_GetNodeByPath) (const char* path);
140  void (IMPORT* UI_DisplayNotice) (const char* text, int time, const char* windowName);
141  const char* (IMPORT* UI_GetActiveWindowName) (void);
142 
143  const char* (IMPORT* CL_Translate) (const char* t);
144 
145  void (IMPORT* LIST_PrependString) (linkedList_t** listDest, const char* data);
146  void (IMPORT* LIST_AddString) (linkedList_t** list, const char* data);
147  void (IMPORT* LIST_AddStringSorted) (linkedList_t** listDest, const char* data);
148  void (IMPORT* LIST_AddPointer) (linkedList_t** listDest, void* data);
149  linkedList_t* (IMPORT* LIST_Add) (linkedList_t** list, void const* data, size_t length);
150  const linkedList_t* (IMPORT* LIST_ContainsString) (const linkedList_t* list, const char* string);
151  linkedList_t* (IMPORT* LIST_GetPointer) (linkedList_t* list, const void* data);
152  void (IMPORT* LIST_Delete) (linkedList_t** list);
154  bool (IMPORT* LIST_IsEmpty) (const linkedList_t* list);
155  int (IMPORT* LIST_Count) (const linkedList_t* list);
157  void* (IMPORT* LIST_GetByIdx) (linkedList_t* list, int index);
158  bool (IMPORT* LIST_Remove) (linkedList_t** list, const void* data);
159  void (IMPORT* LIST_Sort) (linkedList_t** list, linkedListSort_t sorter, const void* userData);
160  void* (IMPORT* LIST_GetRandom) (linkedList_t* list);
161 
163  void (IMPORT* SV_Shutdown) (const char* finalmsg, bool reconnect);
164 
166  const char* (IMPORT* CL_PlayerGetName) (unsigned int player);
168  void (IMPORT* CL_Drop) (void);
173 
175  const mapDef_t* (IMPORT* GAME_GetCurrentSelectedMap) (void);
177  char* (IMPORT* GAME_StrDup) (const char* string);
178  void (IMPORT* GAME_AutoTeam) (const char* equipmentDefinitionID, int teamMembers);
179  const equipDef_t* (IMPORT* GAME_ChangeEquip) (const linkedList_t* equipmentList, changeEquipType_t changeType, const char* equipID);
181  bool (IMPORT* GAME_IsTeamEmpty) (void);
182  bool (IMPORT* GAME_LoadDefaultTeam) (bool force);
183  void (IMPORT* GAME_SetServerInfo) (const char* server, const char* serverport);
184  void (IMPORT* GAME_AppendTeamMember) (int memberIndex, const char* teamDefID, const equipDef_t* ed);
186  int (IMPORT* GAME_GetChrMaxLoad) (const character_t* chr);
189 
190  /* Mem functions */
191  void* (IMPORT* Alloc) (size_t size, bool zeroFill, memPool_t* pool, const int tagNum, const char* fileName, const int fileLine);
192  void (IMPORT* Free) (void* ptr);
193  memPool_t* (IMPORT* CreatePool) (const char* name);
194  void (IMPORT* FreePool) (memPool_t* pool);
195  char* (IMPORT* PoolStrDup) (const char* in, memPool_t* pool, const int tagNum);
196 
197  /* sound functions */
198  void (IMPORT* S_StartLocalSample) (const char* s, float volume);
199  void (IMPORT* S_SetSampleRepeatRate) (int sampleRepeatRate);
200 
201  /* renderer functions */
202  void (IMPORT* R_SoftenTexture) (byte* in, int width, int height, int bpp);
203  void (IMPORT* R_LoadImage) (const char* name, byte** pic, int* width, int* height);
204  bool (IMPORT* R_ImageExists) (const char* pname, ...) __attribute__((format(__printf__, 1, 2)));
205  void (IMPORT* R_Color) (const vec4_t rgba);
206  void (IMPORT* R_DrawLineStrip) (int points, int* verts);
207  void (IMPORT* R_DrawLine) (int* verts, float thickness);
208  void (IMPORT* R_DrawRect) (int x, int y, int w, int h, const vec4_t color, float lineWidth, int pattern);
209  void (IMPORT* R_DrawFill) (int x, int y, int w, int h, const vec4_t color);
210  void (IMPORT* R_Draw2DMapMarkers) (const vec2_t screenPos, float direction, const char* model, int skin);
211  void (IMPORT* R_Draw3DMapMarkers) (const vec2_t nodePos, const vec2_t nodeSize, const vec3_t rotate, const vec2_t pos, float direction, float earthRadius, const char* model, int skin);
213  void (IMPORT* R_UploadAlpha) (const char* name, const byte* alphaData);
214  void (IMPORT* R_DrawImageCentered) (int x, int y, const char* name);
215 
216  dbuffer* (IMPORT* NET_ReadMsg) (struct net_stream* s);
221  int (IMPORT* NET_ReadString) (dbuffer* buf, char* string, size_t length);
224  struct net_stream* (IMPORT* NET_Connect) (const char* node, const char* service, stream_onclose_func* onclose);
226  void (IMPORT* NET_OOB_Printf) (struct net_stream* s, const char* format, ...) __attribute__((format(__printf__,2,3)));
227  void (IMPORT* NET_OOB_Printf2) (const char* format, ...) __attribute__((format(__printf__,1,2)));
228  void* (IMPORT* NET_StreamGetData) (struct net_stream* s);
229  void (IMPORT* NET_StreamSetData) (struct net_stream* s, void* data);
230  void (IMPORT* NET_StreamFree) (struct net_stream* s);
231  const char* (IMPORT* NET_StreamPeerToName) (struct net_stream* s, char* dst, int len, bool appendPort);
232  void (IMPORT* NET_SockaddrToStrings) (struct datagram_socket* s, struct sockaddr* addr, char* node, size_t nodelen, char* service, size_t servicelen);
233  struct datagram_socket* (IMPORT* NET_DatagramSocketNew) (const char* node, const char* service, datagram_callback_func* func);
234  void (IMPORT* NET_DatagramBroadcast) (struct datagram_socket* s, const char* buf, int len, int port);
236 
237  /* xml functions */
238  xmlNode_t* (IMPORT* XML_AddNode) (xmlNode_t* parent, const char* name);
239  void (IMPORT* XML_AddString) (xmlNode_t* parent, const char* name, const char* value);
240  void (IMPORT* XML_AddBool) (xmlNode_t* parent, const char* name, bool value);
241  void (IMPORT* XML_AddFloat) (xmlNode_t* parent, const char* name, float value);
242  void (IMPORT* XML_AddDouble) (xmlNode_t* parent, const char* name, double value);
243  void (IMPORT* XML_AddByte) (xmlNode_t* parent, const char* name, byte value);
244  void (IMPORT* XML_AddShort) (xmlNode_t* parent, const char* name, short value);
245  void (IMPORT* XML_AddInt) (xmlNode_t* parent, const char* name, int value);
246  void (IMPORT* XML_AddLong) (xmlNode_t* parent, const char* name, long value);
247  void (IMPORT* XML_AddPos3) (xmlNode_t* parent, const char* name, const vec3_t pos);
248  void (IMPORT* XML_AddPos2) (xmlNode_t* parent, const char* name, const vec2_t pos);
249  void (IMPORT* XML_AddDate) (xmlNode_t* parent, const char* name, const int day, const int sec);
250  void (IMPORT* XML_AddStringValue) (xmlNode_t* parent, const char* name, const char* value);
251  void (IMPORT* XML_AddBoolValue) (xmlNode_t* parent, const char* name, bool value);
252  void (IMPORT* XML_AddFloatValue) (xmlNode_t* parent, const char* name, float value);
253  void (IMPORT* XML_AddDoubleValue) (xmlNode_t* parent, const char* name, double value);
254  void (IMPORT* XML_AddByteValue) (xmlNode_t* parent, const char* name, byte value);
255  void (IMPORT* XML_AddShortValue) (xmlNode_t* parent, const char* name, short value);
256  void (IMPORT* XML_AddIntValue) (xmlNode_t* parent, const char* name, int value);
257  void (IMPORT* XML_AddLongValue) (xmlNode_t* parent, const char* name, long value);
258 
259  bool (IMPORT* XML_GetBool) (xmlNode_t* parent, const char* name, const bool defaultval);
260  int (IMPORT* XML_GetInt) (xmlNode_t* parent, const char* name, const int defaultval);
261  short (IMPORT* XML_GetShort) (xmlNode_t* parent, const char* name, const short defaultval);
262  long (IMPORT* XML_GetLong) (xmlNode_t* parent, const char* name, const long defaultval);
263  const char* (IMPORT* XML_GetString) (xmlNode_t* parent, const char* name);
264  float (IMPORT* XML_GetFloat) (xmlNode_t* parent, const char* name, const float defaultval);
265  double (IMPORT* XML_GetDouble) (xmlNode_t* parent, const char* name, const double defaultval);
266  xmlNode_t* (IMPORT* XML_Parse) (const char* buffer);
267  xmlNode_t* (IMPORT* XML_GetPos2) (xmlNode_t* parent, const char* name, vec2_t pos);
268  xmlNode_t* (IMPORT* XML_GetNextPos2) (xmlNode_t* actual, xmlNode_t* parent, const char* name, vec2_t pos);
269  xmlNode_t* (IMPORT* XML_GetPos3) (xmlNode_t* parent, const char* name, vec3_t pos);
270  xmlNode_t* (IMPORT* XML_GetNextPos3) (xmlNode_t* actual, xmlNode_t* parent, const char* name, vec3_t pos);
271  xmlNode_t* (IMPORT* XML_GetDate) (xmlNode_t* parent, const char* name, int* day, int* sec);
272  xmlNode_t* (IMPORT* XML_GetNode) (xmlNode_t* parent, const char* name);
273  xmlNode_t* (IMPORT* XML_GetNextNode) (xmlNode_t* current, xmlNode_t* parent, const char* name);
274 
275  /* filesystem functions */
276  int (IMPORT* FS_OpenFile) (const char* filename, qFILE* file, filemode_t mode);
277  int (IMPORT* FS_LoadFile) (const char* path, byte** buffer);
279  void (IMPORT* FS_FreeFile) (void* buffer);
280  int (IMPORT* FS_CheckFile) (const char* fmt, ...) __attribute__((format(__printf__, 1, 2)));
281  int (IMPORT* FS_WriteFile) (const void* buffer, size_t len, const char* filename);
282  void (IMPORT* FS_RemoveFile) (const char* osPath);
283  int (IMPORT* FS_Read) (void* buffer, int len, qFILE* f);
284  int (IMPORT* FS_BuildFileList) (const char* files);
285  const char* (IMPORT* FS_NextFileFromFileList) (const char* files);
286  char* (IMPORT* FS_NextScriptHeader) (const char* files, const char** name, const char** text);
287 
288  /* console variable interaction */
289  cvar_t* (IMPORT* Cvar_Get) (const char* varName, const char* value, int flags, const char* desc);
290  cvar_t* (IMPORT* Cvar_Set) (const char* varName, const char* value, ...) __attribute__((format(__printf__, 2, 3)));
291  void (IMPORT* Cvar_SetValue) (const char* varName, float value);
292  const char* (IMPORT* Cvar_GetString) (const char* varName);
293  int (IMPORT* Cvar_GetInteger) (const char* varName);
294  const char* (IMPORT* Cvar_VariableStringOld) (const char* varName);
295  float (IMPORT* Cvar_GetValue) (const char* varName);
296  bool (IMPORT* Cvar_Delete) (const char* varName);
297  cvar_t* (IMPORT* Cvar_ForceSet) (const char* varName, const char* value);
298 
299  /* ClientCommand and ServerCommand parameter access */
300  int (IMPORT* Cmd_Argc) (void);
301  const char* (IMPORT* Cmd_Argv) (int n);
302  const char* (IMPORT* Cmd_Args) (void);
303  void (IMPORT* Cmd_AddCommand) (const char* cmdName, xcommand_t function, const char* desc);
304  void (IMPORT* Cmd_RemoveCommand) (const char* cmdName);
305  void (IMPORT* Cmd_TableAddList) (const cmdList_t* cmdList);
306  void (IMPORT* Cmd_TableRemoveList) (const cmdList_t* cmdList);
307  void (IMPORT* Cmd_ExecuteString) (const char* text, ...) __attribute__((format(__printf__, 1, 2)));
308  void (IMPORT* Cmd_AddParamCompleteFunction) (const char* cmd_name, int (*function)(const char* partial, const char** match));
309  bool (IMPORT* Cmd_GenericCompleteFunction) (char const* candidate, char const* partial, char const** match);
310  mapDef_t* (IMPORT* Com_GetMapDefinitionByID) (const char* mapDefID);
311 
312  void (IMPORT* Cbuf_AddText) (const char* format, ...) __attribute__((format(__printf__, 1, 2)));
313  void (IMPORT* Cbuf_Execute) (void);
314 
315  void (IMPORT* Sys_Error) (const char* error, ...) __attribute__((noreturn, format(__printf__, 1, 2)));
316  int (IMPORT* Com_ServerState) (void);
317  void (IMPORT* Com_SetGameType) (void);
318  void (IMPORT* Com_Error) (int code, const char* fmt, ...) __attribute__((noreturn, format(__printf__, 2, 3)));
319  void (IMPORT* Com_Printf) (const char* msg, ...) __attribute__((format(__printf__, 1, 2)));
320  void (IMPORT* Com_DPrintf) (int level, const char* msg, ...) __attribute__((format(__printf__, 2, 3)));
323  const char* (IMPORT* Com_UFOTypeToShortName) (ufoType_t type);
324  const char* (IMPORT* Com_GetRandomMapAssemblyNameForCraft) (const char* craftID);
325  void (IMPORT* Com_RegisterConstInt) (const char* name, int value);
326  bool (IMPORT* Com_UnregisterConstVariable) (const char* name);
327  void (IMPORT* Com_RegisterConstList) (const constListEntry_t constList[]);
328  bool (IMPORT* Com_UnregisterConstList) (const constListEntry_t constList[]);
329  const char* (IMPORT* Com_GetConstVariable) (const char* space, int value);
330  bool (IMPORT* Com_GetConstIntFromNamespace) (const char* space, const char* variable, int* value);
331  bool (IMPORT* Com_GetConstInt) (const char* name, int* value);
332  const char* (IMPORT* Com_EParse) (const char** text, const char* errhead, const char* errinfo);
333  int (IMPORT* Com_EParseValue) (void* base, const char* token, valueTypes_t type, int ofs, size_t size);
334  bool (IMPORT* Com_ParseBoolean) (const char* token);
335  bool (IMPORT* Com_ParseList) (const char** text, linkedList_t** list);
336  bool (IMPORT* Com_ParseBlock) (const char* name, const char** text, void* base, const value_t* values, memPool_t* mempool);
337  bool (IMPORT* Com_ParseBlockToken) (const char* name, const char** text, void* base, const value_t* values, memPool_t* mempool, const char* token);
338  const char* (IMPORT* Com_ValueToStr) (const void* base, const valueTypes_t type, const int ofs);
339  const teamDef_t* (IMPORT* Com_GetTeamDefinitionByID) (const char* team);
340  ufoType_t (IMPORT* Com_UFOShortNameToID) (const char* token);
341  short (IMPORT* Com_GetUFOIdsNum) (void);
342  short (IMPORT* Com_GetDropShipIdsNum) (void);
343  short (IMPORT* Com_GetHumanAircraftIdsNum) (void);
344  const char* (IMPORT* Com_GetRandomMapAssemblyNameForCrashedCraft) (const char* craftID);
345  void (IMPORT* Com_Drop) (void);
346  const ugv_t* (IMPORT* Com_GetUGVByID) (const char* ugvID);
347  const ugv_t* (IMPORT* Com_GetUGVByIDSilent) (const char* ugvID);
349 
350  void (IMPORT* CL_GenerateCharacter) (character_t* chr, const char* teamDefName);
351  bool (IMPORT* CL_OnBattlescape) (void);
352 
353  const char* (IMPORT* CL_ActorGetSkillString) (const int skill);
354  void (IMPORT* CL_UpdateCharacterValues) (const character_t* chr);
355 
356  void (IMPORT* SetNextUniqueCharacterNumber) (int ucn);
357  int (IMPORT* GetNextUniqueCharacterNumber) (void);
358 
359  void (IMPORT* CollectItems) (void* target, int won, void (*item)(void*, const objDef_t*, int), void (*ammo) (void* , const Item* ), void (*ownitems) (const Inventory*));
360  void (IMPORT* CollectAliens) (void* data, void (*collect)(void*, const teamDef_t*, int, bool));
361 
362  const equipDef_t* (IMPORT* INV_GetEquipmentDefinitionByID) (const char* name);
363  void (IMPORT* INV_DestroyInventory) (Inventory* const i) __attribute__((nonnull(1)));
364  void (IMPORT* INV_EquipActor) (character_t* const chr, const equipDef_t* ed, const objDef_t* weapon, int maxWeight);
365  bool (IMPORT* INV_RemoveFromInventory) (Inventory* const i, const invDef_t* container, Item* fItem);
366 
367  void (IMPORT* INV_ItemDescription) (const objDef_t* od);
368  bool (IMPORT* INV_ItemMatchesFilter) (const objDef_t* obj, const itemFilterTypes_t filterType);
369  const char* (IMPORT* INV_GetFilterType) (itemFilterTypes_t id);
370  itemFilterTypes_t (IMPORT* INV_GetFilterTypeID) (const char* filterTypeID);
371 
372  void (IMPORT* WEB_Upload) (int category, const char* filename);
373  void (IMPORT* WEB_Delete) (int category, const char* filename);
374  void (IMPORT* WEB_DownloadFromUser) (int category, const char* filename, int userId);
375  void (IMPORT* WEB_ListForUser) (int category, int userId);
376 
377  const char* (IMPORT* GetRelativeSavePath) (char* buf, size_t bufSize);
378  const char* (IMPORT* GetAbsoluteSavePath) (char* buf, size_t bufSize);
379 
380  bool (IMPORT* BEP_Evaluate) (const char* expr, BEPEvaluteCallback_t varFuncParam, const void* userdata);
382  byte* r_xviAlpha;
383  byte* r_radarPic;
384  byte* r_radarSourcePic;
386 
387 extern "C" const cgame_export_t* GetCGameAPI(const cgame_import_t* import);
388 
389 typedef const cgame_export_t* (*cgame_api_t) (const cgame_import_t*);
const char float value
Definition: cgame.h:241
#define IMPORT
Definition: shared.h:75
char * string
Definition: cgame.h:220
bool Com_ParseBlock(const char *name, const char **text, void *base, const value_t *values, memPool_t *mempool)
Definition: scripts.cpp:1393
const linkedList_t * team
Definition: cgame.h:66
const char * Cmd_Argv(int arg)
Returns a given argument.
Definition: cmd.cpp:516
void Cmd_AddCommand(const char *cmdName, xcommand_t function, const char *desc)
Add a new command to the script interface.
Definition: cmd.cpp:744
xmlNode_t * XML_GetPos2(xmlNode_t *parent, const char *name, vec2_t pos)
retrieve the first Pos2 data from an XML Node
Definition: xml.cpp:394
void CL_UpdateCharacterValues(const character_t *chr)
Definition: cl_team.cpp:218
short XML_GetShort(xmlNode_t *parent, const char *name, const short defaultval)
retrieve a Short attribute from an XML Node
Definition: xml.cpp:322
const char * FS_NextFileFromFileList(const char *files)
Returns the next file that is found in the virtual filesystem identified by the given file pattern...
Definition: files.cpp:1081
void R_SoftenTexture(byte *in, int width, int height, int bpp)
Applies blurring to a texture.
Definition: r_image.cpp:391
bool Com_UnregisterConstVariable(const char *name)
Removes a registered constant from the script mapping hash table.
Definition: scripts.cpp:147
void Sys_Error(const char *error,...)
Definition: g_main.cpp:421
const byte * alphaData
Definition: cgame.h:213
csi_t * csi
Definition: cgame.h:100
void * data
Definition: cgame.h:148
short Com_GetDropShipIdsNum(void)
Definition: scripts.cpp:576
void NET_SockaddrToStrings(struct datagram_socket *s, struct sockaddr *addr, char *node, size_t nodelen, char *service, size_t servicelen)
Convert sockaddr to string.
Definition: net.cpp:1212
int int y
Definition: cgame.h:133
Definition: filesys.h:54
bool Com_GetConstIntFromNamespace(const char *space, const char *variable, int *value)
Searches whether a given value was registered as a string to int mapping.
Definition: scripts.cpp:103
bool GAME_SaveCharacter(xmlNode_t *p, const character_t *chr)
saves a character to a given xml node
int FS_CheckFile(const char *fmt,...)
Just returns the filelength and -1 if the file wasn't found.
Definition: files.cpp:298
struct sockaddr char size_t char size_t servicelen
Definition: cgame.h:232
itemFilterTypes_t INV_GetFilterTypeID(const char *filterTypeID)
Searches for a filter type name (as used in console functions) and returns the matching itemFilterTyp...
void Cmd_RemoveCommand(const char *cmdName)
Removes a command from script interface.
Definition: cmd.cpp:786
const char * Com_GetRandomMapAssemblyNameForCrashedCraft(const char *craftID)
Definition: scripts.cpp:3285
QGL_EXTERN GLint GLenum type
Definition: r_gl.h:94
bool INV_ItemMatchesFilter(const objDef_t *obj, const itemFilterTypes_t filterType)
Checks if the given object/item matched the given filter type.
void LIST_PrependString(linkedList_t **listDest, const char *data)
Adds a string as first entry to a linked list.
Definition: list.cpp:127
struct net_stream * NET_Connect(const char *node, const char *service, stream_onclose_func *onclose)
Try to connect to a given host on a given port.
Definition: net.cpp:644
void UI_RegisterLinkedListText(int dataId, linkedList_t *text)
share a linked list of text with a data id
Definition: ui_data.cpp:131
void XML_AddStringValue(xmlNode_t *parent, const char *name, const char *value)
add a non-empty String attribute to the XML Node
Definition: xml.cpp:49
#define MAX_TEAMS
Definition: defines.h:98
valueTypes_t
possible values for parsing functions
Definition: scripts.h:48
void UI_MessageAddStack(struct uiMessageListNodeMessage_s *message)
align_t int int y
Definition: cgame.h:128
const char double value
Definition: cgame.h:242
int FS_OpenFile(const char *filename, qFILE *file, filemode_t mode)
Finds and opens the file in the search path.
Definition: files.cpp:162
void UI_RegisterText(int dataId, const char *text)
share a text with a data id
Definition: ui_data.cpp:115
void(* xcommand_t)(void)
Definition: cmd.h:84
void R_DrawLineStrip(int points, int *verts)
2 dimensional line strip
Definition: r_draw.cpp:477
bool CL_OnBattlescape(void)
Check whether we are in a tactical mission as server or as client. But this only means that we are ab...
void UI_SortOptions(uiNode_t **first)
Sort options by alphabet.
Definition: ui_data.cpp:273
const char bool value
Definition: cgame.h:240
float XML_GetFloat(xmlNode_t *parent, const char *name, const float defaultval)
retrieve a Float attribute from an XML Node
Definition: xml.cpp:364
struct datagram_socket * NET_DatagramSocketNew(const char *node, const char *service, datagram_callback_func *func)
Opens a datagram socket (UDP)
Definition: net.cpp:1102
short humanAircraftType_t
Definition: inv_shared.h:28
void LIST_AddStringSorted(linkedList_t **listDest, const char *data)
Definition: list.cpp:107
void * LIST_GetByIdx(linkedList_t *list, int index)
Get an entry of a linked list by its index in the list.
Definition: list.cpp:362
uiNode_t * UI_GetNodeByPath(const char *path)
Return a node by a path name (names with dot separation) It is a simplification facade over UI_ReadNo...
Definition: ui_nodes.cpp:313
const char * teamDefID
Definition: cgame.h:184
int isMultiplayer
Definition: cgame.h:40
void XML_AddDoubleValue(xmlNode_t *parent, const char *name, double value)
add a non-zero Double attribute to the XML Node
Definition: xml.cpp:124
float float y
Definition: cgame.h:130
byte int * width
Definition: cgame.h:203
int XML_GetInt(xmlNode_t *parent, const char *name, const int defaultval)
retrieve an Int attribute from an XML Node
Definition: xml.cpp:308
const char const short defaultval
Definition: cgame.h:261
double XML_GetDouble(xmlNode_t *parent, const char *name, const double defaultval)
retrieve a Double attribute from an XML Node
Definition: xml.cpp:378
static void R_DrawImageCentered(int x, int y, const char *name)
Definition: cl_game.cpp:574
void SV_ShutdownWhenEmpty(void)
Will eventually shutdown the server once all clients have disconnected.
Definition: sv_main.cpp:1085
void GAME_ReloadMode(void)
Definition: cl_game.cpp:290
int(* BEPEvaluteCallback_t)(const char *var, const void *userdata)
#define EXPORT
Definition: shared.h:74
const char * UI_GetActiveWindowName(void)
Returns the name of the current window.
Definition: ui_windows.cpp:526
void XML_AddDate(xmlNode_t *parent, const char *name, const int day, const int sec)
add a date data to the XML Tree
Definition: xml.cpp:264
linkedList_t * equipmentList
Definition: cgame.h:88
const char * filename
Definition: ioapi.h:41
short ufoType_t
Definition: scripts.h:145
void Cbuf_AddText(const char *format,...)
Adds command text at the end of the buffer.
Definition: cmd.cpp:126
itemFilterTypes_t
A list of filter types in the market and production view.
Definition: cl_inventory.h:35
void UI_UpdateInvisOptions(uiNode_t *option, const linkedList_t *stringList)
Unhide those options that are stored in the linked list and hide the others.
Definition: ui_data.cpp:297
Describes a character with all its attributes.
Definition: chr_shared.h:388
void XML_AddPos3(xmlNode_t *parent, const char *name, const vec3_t pos)
add a Pos3 data to the XML Tree
Definition: xml.cpp:234
const char short value
Definition: cgame.h:244
void GAME_SetServerInfo(const char *server, const char *serverport)
Definition: cl_game.cpp:347
voidpf void uLong size
Definition: ioapi.h:42
bool reconnect
Definition: cgame.h:163
void FS_RemoveFile(const char *osPath)
Definition: files.cpp:1692
void XML_AddFloatValue(xmlNode_t *parent, const char *name, float value)
add a non-zero Float attribute to the XML Node
Definition: xml.cpp:99
int int const vec2_t pos
Definition: cgame.h:81
const char * CL_ActorGetSkillString(const int skill)
Return the skill string for the given skill level.
Definition: cl_team.cpp:165
const char const int defaultval
Definition: cgame.h:260
QGL_EXTERN GLsizei const GLvoid * data
Definition: r_gl.h:89
uiNode_t * UI_PopupList(const char *title, const char *headline, linkedList_t *entries, const char *clickAction)
Generates a popup that contains a list of selectable choices.
Definition: ui_popup.cpp:62
int FS_LoadFile(const char *path, byte **buffer)
Filenames are relative to the quake search path.
Definition: files.cpp:384
void NET_StreamFree(struct net_stream *s)
Call NET_StreamFree to dump the whole thing right now.
Definition: net.cpp:817
void UI_ContainerNodeUpdateEquipment(Inventory *inv, const equipDef_t *ed)
Fills the ground container of the ui_inventory with unused items from a given equipment definition...
int NET_ReadLong(dbuffer *buf)
Definition: netpack.cpp:282
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
void Com_Printf(const char *const fmt,...)
Definition: common.cpp:386
uiNode_t * UI_GetOption(int dataId)
Definition: ui_data.cpp:324
void GAME_AppendTeamMember(int memberIndex, const char *teamDefID, const equipDef_t *ed)
Definition: cl_game.cpp:252
bool Cmd_GenericCompleteFunction(char const *candidate, char const *partial, char const **match)
Definition: cmd.cpp:648
const char * Com_DropShipTypeToShortName(humanAircraftType_t type)
Translate DropShip type to short name.
Definition: scripts.cpp:3319
stream_onclose_func * onclose
Definition: net.cpp:126
const char * text
Definition: cgame.h:112
int FS_BuildFileList(const char *fileList)
Build a filelist.
Definition: files.cpp:962
int GAME_GetCurrentTeam(void)
Definition: cl_game.cpp:926
const char int int port
Definition: cgame.h:234
inventory definition for our menus
Definition: inv_shared.h:371
void LIST_Delete(linkedList_t **list)
Definition: list.cpp:195
#define __attribute__(x)
Definition: cxx.h:37
int const char * name
Definition: cgame.h:214
void Com_RegisterConstList(const constListEntry_t constList[])
Registers a list of string aliases.
Definition: scripts.cpp:253
const equipDef_t * INV_GetEquipmentDefinitionByID(const char *name)
Gets equipment definition by id.
stream_callback_func * func
Definition: cgame.h:225
void(* http_callback_t)(const char *response, void *userdata)
Definition: http.h:65
void UI_InitStack(const char *activeWindow, const char *mainWindow)
Init the stack to start with a window, and have an alternative window with ESC.
Definition: ui_windows.cpp:354
const char * Com_GetRandomMapAssemblyNameForCraft(const char *craftID)
Returns the name of an aircraft or an ufo that is used in the ump files for the random map assembly...
Definition: scripts.cpp:3277
voidpf void * buf
Definition: ioapi.h:42
const teamDef_t * Com_GetTeamDefinitionByID(const char *team)
Returns the teamDef pointer for the searched team id - or nullptr if not found in the teamDef array...
Definition: scripts.cpp:2345
int GAME_GetChrMaxLoad(const character_t *chr)
Returns the max weight the given character can carry.
Definition: cl_game.cpp:1600
xmlNode_t * XML_GetPos3(xmlNode_t *parent, const char *name, vec3_t pos)
retrieve the first Pos3 data from an XML Node
Definition: xml.cpp:431
void Cmd_TableRemoveList(const cmdList_t *cmdList)
Definition: cmd.cpp:859
void CL_Drop(void)
Ensures the right menu cvars are set after error drop or map change.
Definition: cl_main.cpp:167
xmlNode_t * XML_GetNextPos3(xmlNode_t *actual, xmlNode_t *parent, const char *name, vec3_t pos)
retrieve the next Pos3 data from an XML Node
Definition: xml.cpp:451
const ugv_t * Com_GetUGVByIDSilent(const char *ugvID)
Searches an UGV definition by a given script id and returns the pointer to the global data...
Definition: scripts.cpp:3362
bool GAME_LoadCharacter(xmlNode_t *p, character_t *chr)
Loads a character from a given xml node.
int LIST_Count(const linkedList_t *list)
Definition: list.cpp:344
int Cvar_GetInteger(const char *varName)
Returns the int value of a cvar.
Definition: cvar.cpp:194
void XML_AddPos2(xmlNode_t *parent, const char *name, const vec2_t pos)
add a Pos2 data to the XML Tree
Definition: xml.cpp:249
int int bool nextmap
Definition: cgame.h:48
connstate_t
Definition: cl_shared.h:75
const char * XML_GetString(xmlNode_t *parent, const char *name)
retrieve a String attribute from an XML Node
Definition: xml.cpp:350
void R_Color(const vec4_t rgba)
Change the color to given value.
Definition: r_state.cpp:1011
void * NET_StreamGetData(struct net_stream *s)
Definition: net.cpp:800
bool BEP_Evaluate(const char *expr, BEPEvaluteCallback_t varFuncParam, const void *userdata)
void Com_Error(int code, const char *fmt,...)
Definition: common.cpp:417
Atomic structure used to define most of the UI.
Definition: ui_nodes.h:80
void Cmd_ExecuteString(const char *text,...)
A complete command line has been parsed, so try to execute it.
Definition: cmd.cpp:1007
#define xmlNode_t
Definition: xml.h:24
xmlNode_t * XML_AddNode(xmlNode_t *parent, const char *name)
add a new node to the XML tree
Definition: xml.cpp:277
void R_Draw3DMapMarkers(const vec2_t nodePos, const vec2_t nodeSize, const vec3_t rotate, const vec2_t pos, float direction, float earthRadius, const char *model, int skin)
Draw 3D Marker on the 3D geoscape.
Definition: r_geoscape.cpp:237
void R_Draw2DMapMarkers(const vec2_t screenPos, float direction, const char *model, int skin)
Draw 3D Marker on the 2D geoscape.
Definition: r_geoscape.cpp:180
uiNode_t * UI_OptionIteratorNextOption(uiOptionIterator_t *iterator)
Find the next element from the iterator Iterator skipCollapsed and skipInvisible attribute can contro...
Definition: ui_data.cpp:430
const char * format
Definition: cgame.h:109
struct uiMessageListNodeMessage_s * UI_MessageGetStack(void)
void NET_OOB_Printf(struct net_stream *s, const char *format,...)
Out of band print.
Definition: netpack.cpp:548
Inventory ** ui_inventory
Definition: cgame.h:101
bool LIST_Remove(linkedList_t **list, const void *data)
Definition: list.cpp:213
void XML_AddInt(xmlNode_t *parent, const char *name, int value)
add an Int attribute to the XML Node
Definition: xml.cpp:183
const void * data
Definition: cgame.h:158
void XML_AddString(xmlNode_t *parent, const char *name, const char *value)
add a String attribute to the XML Node
Definition: xml.cpp:36
align_t
We need this here for checking the boundaries from script values.
Definition: scripts.h:89
uiNode_t * UI_PushWindow(const char *name, const char *parentName, linkedList_t *params)
Push a window onto the window stack.
Definition: ui_windows.cpp:170
void stream_callback_func(struct net_stream *s)
Definition: net.h:32
int * verts
Definition: cgame.h:206
void XML_AddFloat(xmlNode_t *parent, const char *name, float value)
add a Float attribute to the XML Node
Definition: xml.cpp:87
const image_t * UI_DrawNormImageByName(bool flip, float x, float y, float w, float h, float sh, float th, float sl, float tl, const char *name)
Draws an image or parts of it.
Definition: ui_render.cpp:203
void UI_ResetData(int dataId)
Reset a shared data. Type became NONE and value became nullptr.
Definition: ui_data.cpp:212
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags, const char *desc)
Init or return a cvar.
Definition: cvar.cpp:342
int NET_ReadString(dbuffer *buf, char *string, size_t length)
Definition: netpack.cpp:302
void LIST_AddString(linkedList_t **listDest, const char *data)
Adds an string to a new or to an already existing linked list. The string is copied here...
Definition: list.cpp:139
const char * data
Definition: cgame.h:145
float volume
Definition: cgame.h:198
void GAME_SwitchCurrentSelectedMap(int step)
Definition: cl_game.cpp:912
#define MAX_VAR
Definition: shared.h:36
float Cvar_GetValue(const char *varName)
Returns the float value of a cvar.
Definition: cvar.cpp:125
QGL_EXTERN GLuint GLsizei GLsizei * length
Definition: r_gl.h:110
void XML_AddBool(xmlNode_t *parent, const char *name, bool value)
add a Boolean attribute to the XML Node
Definition: xml.cpp:62
void XML_AddLong(xmlNode_t *parent, const char *name, long value)
add a Long attribute to the XML Node
Definition: xml.cpp:206
byte ** buffer
Definition: cgame.h:277
void LIST_Sort(linkedList_t **list, linkedListSort_t sorter, const void *userData)
uiNode_t * option
Definition: cgame.h:111
void UI_MessageResetStack(void)
int Cmd_Argc(void)
Return the number of arguments of the current command. "command parameter" will result in a argc of 2...
Definition: cmd.cpp:505
float const char int skin
Definition: cgame.h:210
int UI_DrawTooltip(const char *string, int x, int y, int maxWidth)
Generic tooltip function.
Definition: ui_tooltip.cpp:40
const char * serverport
Definition: cgame.h:183
const char * Cvar_VariableStringOld(const char *varName)
Returns the old value of cvar as string before we changed it.
Definition: cvar.cpp:226
event_t
Possible event values.
Definition: q_shared.h:79
const char const double defaultval
Definition: cgame.h:265
void stream_onclose_func()
Definition: net.h:31
void R_UploadAlpha(const image_t *image, const byte *alphaData)
Definition: r_image.cpp:423
changeEquipType_t
Definition: cgame.h:92
const char * Com_ValueToStr(const void *base, const valueTypes_t type, const int ofs)
Definition: scripts.cpp:1171
const char const int const int sec
Definition: cgame.h:249
int NET_ReadShort(dbuffer *buf)
Definition: netpack.cpp:242
const char * Com_EParse(const char **text, const char *errhead, const char *errinfo, char *target, size_t size)
Parsing function that prints an error message when there is no text in the buffer.
Definition: scripts.cpp:277
const char * menu
Definition: cgame.h:39
void UI_TextScrollEnd(const char *nodePath)
Scroll to the bottom.
void XML_AddShortValue(xmlNode_t *parent, const char *name, short value)
add a non-zero Short attribute to the XML Node
Definition: xml.cpp:172
filemode_t
Definition: filesys.h:110
int FS_WriteFile(const void *buffer, size_t len, const char *filename)
Definition: files.cpp:1546
typedef long(ZCALLBACK *tell_file_func) OF((voidpf opaque
item instance data, with linked list capability
Definition: inv_shared.h:402
void FS_CloseFile(qFILE *f)
const mapDef_t * GAME_GetCurrentSelectedMap(void)
Definition: cl_game.cpp:921
const char * Com_UFOTypeToShortName(ufoType_t type)
Translate UFO type to short name.
Definition: scripts.cpp:3342
void CL_GenerateCharacter(character_t *chr, const char *teamDefName)
Generates the skills and inventory for a character and for a 2x2 unit.
Definition: cl_team.cpp:235
void Com_DPrintf(int level, const char *fmt,...)
A Com_Printf that only shows up if the "developer" cvar is set.
Definition: common.cpp:398
int int y
Definition: cgame.h:69
const linkedList_t * LIST_ContainsString(const linkedList_t *list, const char *string)
Searches for the first occurrence of a given string.
Definition: list.cpp:73
linkedList_t * LIST_CopyStructure(linkedList_t *src)
ufoType_t Com_UFOShortNameToID(const char *token)
Translate short name to UFO type.
Definition: scripts.cpp:3329
const char const float defaultval
Definition: cgame.h:264
linkedListSort_t const void * userData
Definition: cgame.h:159
const char * CL_PlayerGetName(unsigned int player)
Get the player name.
Definition: cl_parse.cpp:113
void S_SetSampleRepeatRate(int sampleRepeatRate)
Controls the repeat rate for the same sample.
Definition: s_main.cpp:352
const char * name
Definition: cgame.h:38
mapDef_t * Com_GetMapDefinitionByID(const char *mapDefID)
Definition: scripts.cpp:3598
const char byte value
Definition: cgame.h:243
void datagram_callback_func(struct datagram_socket *s, const char *buf, int len, struct sockaddr *from)
Definition: net.h:33
bool LIST_RemoveEntry(linkedList_t **list, linkedList_t *entry)
Removes one entry from the linked list.
Definition: list.cpp:172
const char const bool defaultval
Definition: cgame.h:259
void Com_RegisterConstInt(const char *name, int value)
Register mappings between script strings and enum values for values of the type V_INT.
Definition: scripts.cpp:198
void XML_AddShort(xmlNode_t *parent, const char *name, short value)
add a Short attribute to the XML Node
Definition: xml.cpp:160
uiNode_t * UI_InitOptionIteratorAtIndex(int index, uiNode_t *option, uiOptionIterator_t *iterator)
Init an option iterator at an index.
Definition: ui_data.cpp:394
vec2_t pos
Definition: cgame.h:134
long XML_GetLong(xmlNode_t *parent, const char *name, const long defaultval)
retrieve a Long attribute from an XML Node
Definition: xml.cpp:336
Definition: cgame.h:94
void UI_GetNodeAbsPos(const uiNode_t *node, vec2_t pos)
Returns the absolute position of a node.
Definition: ui_node.cpp:514
bool Cvar_Delete(const char *varName)
Function to remove the cvar and free the space.
Definition: cvar.cpp:279
bool GAME_LoadDefaultTeam(bool force)
QGL_EXTERN GLuint index
Definition: r_gl.h:110
linkedList_t * entry
Definition: cgame.h:153
QGL_EXTERN void(APIENTRY *qglActiveTexture)(GLenum texture)
int const char * windowName
Definition: cgame.h:140
int(* linkedListSort_t)(linkedList_t *entry1, linkedList_t *entry2, const void *userData)
Definition: list.h:36
void S_StartLocalSample(const char *s, float volume)
Plays a sample without spatialization.
Definition: s_mix.cpp:184
CGAME_HARD_LINKED_FUNCTIONS linkedList_t * LIST_Add(linkedList_t **listDest, void const *data, size_t length)
QGL_EXTERN GLfloat f
Definition: r_gl.h:114
void R_DrawLine(int *verts, float thickness)
Draws one line with only one start and one end point.
Definition: r_draw.cpp:494
character_t * chr
Definition: cgame.h:187
const char const char * value
Definition: cgame.h:239
void R_LoadImage(const char *name, byte **pic, int *width, int *height)
Generic image-data loading fucntion.
Definition: r_image.cpp:152
int teamMembers
Definition: cgame.h:178
const cgame_export_t * GetCGameAPI(const cgame_import_t *import)
const char * Com_GetConstVariable(const char *space, int value)
Searches the mapping variable for a given integer value and a namespace.
Definition: scripts.cpp:122
const char const vec3_t pos
Definition: cgame.h:247
void INV_ItemDescription(const objDef_t *od)
Prints the description for items (weapons, armour, ...)
const vec2_t const vec3_t const vec2_t float float const char int skin
Definition: cgame.h:211
int Com_EParseValue(void *base, const char *token, valueTypes_t type, int ofs, size_t size)
Definition: scripts.cpp:964
bool XML_GetBool(xmlNode_t *parent, const char *name, const bool defaultval)
retrieve a Boolean attribute from an XML Node
Definition: xml.cpp:288
The csi structure is the client-server-information structure which contains all the static data neede...
Definition: q_shared.h:515
Definition: cgame.h:93
void XML_AddBoolValue(xmlNode_t *parent, const char *name, bool value)
add a non-false Boolean attribute to the XML Node
Definition: xml.cpp:74
void NET_StreamSetData(struct net_stream *s, void *data)
Definition: net.cpp:805
void XML_AddByte(xmlNode_t *parent, const char *name, byte value)
add a Byte attribute to the XML Node
Definition: xml.cpp:137
int FS_Read(void *buffer, int len, qFILE *f)
Definition: files.cpp:371
bool Com_ParseList(const char **text, linkedList_t **list)
Definition: scripts.cpp:1363
const char const long defaultval
Definition: cgame.h:262
size_t GAME_GetCharacterArraySize(void)
Definition: cl_game.cpp:227
QGL_EXTERN GLint i
Definition: r_gl.h:113
QGL_EXTERN GLuint GLchar GLuint * len
Definition: r_gl.h:99
float thickness
Definition: cgame.h:207
const char * CL_Translate(const char *t)
const char * UI_GetFontFromNode(const uiNode_t *const node)
Return the font for a specific node or default font.
Definition: ui_font.cpp:145
xmlNode_t * XML_GetDate(xmlNode_t *parent, const char *name, int *day, int *sec)
retrieve the date data from an XML Node
Definition: xml.cpp:471
void NET_DatagramBroadcast(struct datagram_socket *s, const char *buf, int len, int port)
Definition: net.cpp:1159
void CL_SetClientState(connstate_t state)
Sets the client state.
Definition: cl_main.cpp:1015
void NET_DatagramSocketClose(struct datagram_socket *s)
Definition: net.cpp:1182
linkedList_t ** victoryConditionsMsgIDs
Definition: cgame.h:73
xmlNode_t * XML_GetNextPos2(xmlNode_t *actual, xmlNode_t *parent, const char *name, vec2_t pos)
retrieve the next Pos2 data from an XML Node
Definition: xml.cpp:413
void GAME_AutoTeam(const char *equipmentDefinitionID, int teamMembers)
int team
Definition: cgame.h:71
bool GAME_IsTeamEmpty(void)
Definition: cl_game.cpp:388
static void CL_QueryMasterServer(const char *action, http_callback_t callback)
Definition: cl_game.cpp:356
char * FS_NextScriptHeader(const char *files, const char **name, const char **text)
Definition: files.cpp:1196
linkedList_t * text
Definition: cgame.h:114
const char int value
Definition: cgame.h:245
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition: r_gl.h:110
void NET_WriteByte(dbuffer *buf, byte c)
Definition: netpack.cpp:39
size_t len
Definition: cgame.h:281
void XML_AddDouble(xmlNode_t *parent, const char *name, double value)
add a Double attribute to the XML Node
Definition: xml.cpp:110
void UI_RegisterOption(int dataId, uiNode_t *option)
Definition: ui_data.cpp:311
inventory definition with all its containers
Definition: inv_shared.h:525
void HUD_InitUI(const char *optionWindowName)
Display the user interface.
Definition: cl_hud.cpp:1572
Defines all attributes of objects used in the inventory.
Definition: inv_shared.h:264
linkedList_t * LIST_GetPointer(linkedList_t *list, const void *data)
Searches for the first occurrence of a given pointer.
Definition: list.cpp:91
void UI_PopWindow(bool all)
Pops a window from the window stack.
Definition: ui_windows.cpp:452
int CL_GetPlayerNum(void)
Definition: cl_parse.cpp:103
vec_t vec3_t[3]
Definition: ufotypes.h:39
void Com_SetGameType(void)
Definition: common.cpp:815
vec_t vec2_t[2]
Definition: ufotypes.h:38
xmlNode_t * XML_GetNode(xmlNode_t *parent, const char *name)
Get first Node of the XML tree by name.
Definition: xml.cpp:487
void Cmd_AddParamCompleteFunction(const char *cmdName, int(*function)(const char *partial, const char **match))
Definition: cmd.cpp:679
void R_DrawRect(int x, int y, int w, int h, const vec4_t color, float lineWidth, int pattern)
Draws a rect to the screen. Also has support for stippled rendering of the rect.
Definition: r_draw.cpp:390
uiNode_t * UI_AddOption(uiNode_t **tree, const char *name, const char *label, const char *value)
Append an option to an option list.
Definition: ui_data.cpp:172
int UI_DrawString(const char *fontID, align_t align, int x, int y, int absX, int maxWidth, int lineHeight, const char *c, int boxHeight, int scrollPos, int *curLine, bool increaseLine, longlines_t method)
Definition: ui_render.cpp:371
void UI_DrawRect(int x, int y, int w, int h, const vec4_t color, float lineWidth, int pattern)
Definition: ui_render.cpp:42
void CL_Disconnect(void)
Sets the cls.state to ca_disconnected and informs the server.
Definition: cl_main.cpp:256
dbuffer * NET_ReadMsg(struct net_stream *s)
Reads messages from the network channel and adds them to the dbuffer where you can use the NET_Read* ...
Definition: net.cpp:774
cvar_t * Cvar_ForceSet(const char *varName, const char *value)
Will set the variable even if NOSET or LATCH.
Definition: cvar.cpp:604
void R_DrawBloom(void)
handle post-processing bloom
Definition: r_geoscape.cpp:762
const char const char const char const char const char const char const char const char const char const char * tooltip3
Definition: cgame.h:135
const char * NET_StreamPeerToName(struct net_stream *s, char *dst, int len, bool appendPort)
Definition: net.cpp:872
cvar_t * Cvar_Set(const char *varName, const char *value,...)
Sets a cvar value.
Definition: cvar.cpp:615
const char * Cvar_GetString(const char *varName)
Returns the value of cvar as string.
Definition: cvar.cpp:210
void R_DrawFill(int x, int y, int w, int h, const vec4_t color)
Fills a box of pixels with a single color.
Definition: r_draw.cpp:188
void UI_DrawFill(int x, int y, int w, int h, const vec4_t color)
Fills a box of pixels with a single color.
Definition: ui_render.cpp:37
dbuffer * msg
Definition: cgame.h:77
list of script aliases to register
Definition: scripts.h:231
const char const vec2_t pos
Definition: cgame.h:248
bool LIST_IsEmpty(const linkedList_t *list)
Checks whether the given list is empty.
Definition: list.cpp:335
void XML_AddIntValue(xmlNode_t *parent, const char *name, int value)
add a non-zero Int attribute to the XML Node
Definition: xml.cpp:195
void NET_StreamSetCallback(struct net_stream *s, stream_callback_func *func)
Definition: net.cpp:903
void Cbuf_Execute(void)
Pulls off terminated lines of text from the command buffer and sends them through Cmd_ExecuteString...
Definition: cmd.cpp:214
datagram_callback_func * func
Definition: net.cpp:145
uiSprite_t * UI_GetSpriteByName(const char *name)
Return an sprite by is name.
Definition: ui_sprite.cpp:115
qFILE filemode_t mode
Definition: cgame.h:276
static char * GAME_StrDup(const char *string)
Definition: cl_game.cpp:428
const linkedList_t * stringList
Definition: cgame.h:121
const char * INV_GetFilterType(itemFilterTypes_t id)
void UI_Popup(const char *title, const char *text)
Popup on geoscape.
Definition: ui_popup.cpp:47
const cgameType_t * cgameType
Definition: cgame.h:102
void Cvar_SetValue(const char *varName, float value)
Expands value to a string and calls Cvar_Set.
Definition: cvar.cpp:671
humanAircraftType_t Com_DropShipShortNameToID(const char *token)
Translate DropShip type to short name.
Definition: scripts.cpp:3307
uint8_t byte
Definition: ufotypes.h:34
QGL_EXTERN GLuint GLsizei bufSize
Definition: r_gl.h:110
const equipDef_t * GAME_ChangeEquip(const linkedList_t *equipmentList, changeEquipType_t changeType, const char *equipID)
Changed the given cvar to the next/prev equipment definition.
Definition: cl_game.cpp:1615
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
Definition: cvar.h:71
int Com_ServerState(void)
Check whether we are the server or have a singleplayer tactical mission.
Definition: common.cpp:538
void XML_AddByteValue(xmlNode_t *parent, const char *name, byte value)
add a non-zero Byte attribute to the XML Node
Definition: xml.cpp:149
http_callback_t callback
Definition: cgame.h:169
const equipDef_t * ed
Definition: cgame.h:138
Definition: cgame.h:95
xmlNode_t * XML_GetNextNode(xmlNode_t *current, xmlNode_t *parent, const char *name)
Get next Node of the XML tree by name.
Definition: xml.cpp:499
void * LIST_GetRandom(linkedList_t *list)
Definition: list.cpp:381
void Com_Drop(void)
Definition: common.cpp:465
const char * Com_UFOCrashedTypeToShortName(ufoType_t type)
Translate UFO type to short name when UFO is crashed.
Definition: scripts.cpp:3351
void UI_TextNodeSelectLine(uiNode_t *node, int num)
Change the selected line.
void NET_WriteShort(dbuffer *buf, int c)
Definition: netpack.cpp:45
int NET_ReadByte(dbuffer *buf)
Reads a byte from the netchannel.
Definition: netpack.cpp:234
const char * Cmd_Args(void)
Returns a single string containing argv(1) to argv(argc()-1)
Definition: cmd.cpp:526
void XML_AddLongValue(xmlNode_t *parent, const char *name, long value)
add a non-zero Long attribute to the XML Node
Definition: xml.cpp:220
bool Com_ParseBlockToken(const char *name, const char **text, void *base, const value_t *values, memPool_t *mempool, const char *token)
Definition: scripts.cpp:1311
Defines a type of UGV/Robot.
Definition: chr_shared.h:245
bool Com_GetConstInt(const char *name, int *value)
Searches whether a given value was registered as a string to int mapping.
Definition: scripts.cpp:74
int CL_GetClientState(void)
Definition: cl_main.cpp:1007
bool Com_UnregisterConstList(const constListEntry_t constList[])
Unregisters a list of string aliases.
Definition: scripts.cpp:237
void format(__printf__, 1, 2)))
int NET_ReadStringLine(dbuffer *buf, char *string, size_t length)
Definition: netpack.cpp:328
const char * mainMenu
Definition: cgame.h:108
void LIST_AddPointer(linkedList_t **listDest, void *data)
Adds just a pointer to a new or to an already existing linked list.
Definition: list.cpp:153
level_locals_t level
Definition: g_main.cpp:38
bool R_ImageExists(const char *pname,...)
Definition: r_image.cpp:681
xmlNode_t * XML_Parse(const char *buffer)
Definition: xml.cpp:531
void SV_Shutdown(const char *finalmsg, bool reconnect)
Called when each game quits, before Sys_Quit or Sys_Error.
Definition: sv_main.cpp:1042
const ugv_t * Com_GetUGVByID(const char *ugvID)
Searches an UGV definition by a given script id and returns the pointer to the global data...
Definition: scripts.cpp:3381
void HUD_DisplayMessage(const char *text)
Displays a message on the hud.
Definition: cl_hud.cpp:138
short Com_GetHumanAircraftIdsNum(void)
Definition: scripts.cpp:581
int CL_Milliseconds(void)
Definition: cl_main.cpp:1207
void Cmd_TableAddList(const cmdList_t *cmdList)
Definition: cmd.cpp:853
void FS_FreeFile(void *buffer)
Definition: files.cpp:411
void UI_DisplayNotice(const char *text, int time, const char *windowName)
Displays a message over all windows.
Definition: ui_draw.cpp:411
void UI_ExecuteConfunc(const char *fmt,...)
Executes confunc - just to identify those confuncs in the code - in this frame.
Definition: ui_main.cpp:110
Definition: cmd.h:86
bool Com_ParseBoolean(const char *token)
Parses a boolean from a string.
Definition: scripts.cpp:986
void UI_PopupButton(const char *title, const char *text, const char *clickAction1, const char *clickText1, const char *tooltip1, const char *clickAction2, const char *clickText2, const char *tooltip2, const char *clickAction3, const char *clickText3, const char *tooltip3)
Generates a popup that contains up to 3 buttons.
Definition: ui_popup.cpp:147
const character_t * chr
Definition: cgame.h:188
vec_t vec4_t[4]
Definition: ufotypes.h:40
const cgame_export_t *(* cgame_api_t)(const cgame_import_t *)
Definition: cgame.h:389