UFO: Alien Invasion
Loading...
Searching...
No Matches
cgame.h
Go to the documentation of this file.
1
5
6/*
7Copyright (C) 2002-2025 UFO: Alien Invasion.
8
9This program is free software; you can redistribute it and/or
10modify it under the terms of the GNU General Public License
11as published by the Free Software Foundation; either version 2
12of the License, or (at your option) any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
18See the GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, 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"
33
34struct cgame_import_s;
35
36typedef 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);
56 void (EXPORT* UpdateCharacterValues) (const character_t* chr);
58 bool (EXPORT* IsTeamKnown) (const teamDef_t* teamDef);
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
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
84typedef struct cgameType_s {
85 char id[MAX_VAR];
87 char name[MAX_VAR];
91
97
99typedef 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);
124 uiNode_t* (IMPORT* UI_GetOption) (int dataId);
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);
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);
147 void (IMPORT* LIST_AddStringSorted) (linkedList_t** listDest, const char* data);
150 const linkedList_t* (IMPORT* LIST_ContainsString) (const linkedList_t* list, const char* string);
161
163 void (IMPORT* SV_Shutdown) (const char* finalmsg, bool reconnect);
164
166 const char* (IMPORT* CL_PlayerGetName) (unsigned int player);
173
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);
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);
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);
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
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);
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);
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 */
277 int (IMPORT* FS_LoadFile) (const char* path, byte** 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)));
324 const char* (IMPORT* Com_GetRandomMapAssemblyNameForCraft) (const char* craftID);
325 void (IMPORT* Com_RegisterConstInt) (const char* name, int value);
327 void (IMPORT* Com_RegisterConstList) (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);
341 short (IMPORT* Com_GetUFOIdsNum) (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
351 bool (IMPORT* CL_OnBattlescape) (void);
352
353 const char* (IMPORT* CL_ActorGetSkillString) (const int skill);
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
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
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);
386
387extern "C" const cgame_export_t* GetCGameAPI(const cgame_import_t* import);
388
389typedef const cgame_export_t* (*cgame_api_t) (const cgame_import_t*);
bool BEP_Evaluate(const char *expr, BEPEvaluteCallback_t varFuncParam, const void *userdata)
int(* BEPEvaluteCallback_t)(const char *var, const void *userdata)
const cgame_export_t *(* cgame_api_t)(const cgame_import_t *)
Definition cgame.h:389
changeEquipType_t
Definition cgame.h:92
@ INIT
Definition cgame.h:95
@ FORWARD
Definition cgame.h:93
@ BACKWARD
Definition cgame.h:94
const cgame_export_t * GetCGameAPI(const cgame_import_t *import)
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...
bool GAME_IsTeamEmpty(void)
Definition cl_game.cpp:388
static void R_DrawImageCentered(int x, int y, const char *name)
Definition cl_game.cpp:574
void GAME_SwitchCurrentSelectedMap(int step)
Definition cl_game.cpp:912
void GAME_AppendTeamMember(int memberIndex, const char *teamDefID, const equipDef_t *ed)
Definition cl_game.cpp:252
size_t GAME_GetCharacterArraySize(void)
Definition cl_game.cpp:227
int GAME_GetChrMaxLoad(const character_t *chr)
Returns the max weight the given character can carry.
Definition cl_game.cpp:1577
static void CL_QueryMasterServer(const char *action, http_callback_t callback)
Definition cl_game.cpp:356
void GAME_SetServerInfo(const char *server, const char *serverport)
Definition cl_game.cpp:347
int GAME_GetCurrentTeam(void)
Definition cl_game.cpp:926
void GAME_ReloadMode(void)
Definition cl_game.cpp:290
void LIST_Sort(linkedList_t **list, linkedListSort_t sorter, const void *userData)
void FS_CloseFile(qFILE *f)
bool GAME_SaveCharacter(xmlNode_t *p, const character_t *chr)
saves a character to a given xml node
bool GAME_LoadDefaultTeam(bool force)
void GAME_AutoTeam(const char *equipmentDefinitionID, int teamMembers)
bool GAME_LoadCharacter(xmlNode_t *p, character_t *chr)
Loads a character from a given xml node.
void HUD_InitUI(const char *optionWindowName)
Display the user interface.
Definition cl_hud.cpp:1572
void HUD_DisplayMessage(const char *text)
Displays a message on the hud.
Definition cl_hud.cpp:138
itemFilterTypes_t INV_GetFilterTypeID(const char *filterTypeID)
Searches for a filter type name (as used in console functions) and returns the matching itemFilterTyp...
bool INV_ItemMatchesFilter(const objDef_t *obj, const itemFilterTypes_t filterType)
Checks if the given object/item matched the given filter type.
Header file for inventory handling and Equipment menu.
void INV_ItemDescription(const objDef_t *od)
Prints the description for items (weapons, armour, ...).
int CL_GetClientState(void)
Definition cl_main.cpp:1007
void CL_Drop(void)
Ensures the right menu cvars are set after error drop or map change.
Definition cl_main.cpp:167
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
int CL_Milliseconds(void)
Definition cl_main.cpp:1207
int CL_GetPlayerNum(void)
Definition cl_parse.cpp:103
void R_LoadImage(const char *name, byte **pic, int *width, int *height)
Generic image-data loading fucntion.
Definition r_image.cpp:152
void R_Color(const vec4_t rgba)
Change the color to given value.
Definition r_state.cpp:1011
connstate_t
Definition cl_shared.h:75
void CL_UpdateCharacterValues(const character_t *chr)
Definition cl_team.cpp:218
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
inventory definition with all its containers
Definition inv_shared.h:525
item instance data, with linked list capability
Definition inv_shared.h:402
void Cmd_ExecuteString(const char *text,...)
A complete command line has been parsed, so try to execute it.
Definition cmd.cpp:1007
void Cmd_AddParamCompleteFunction(const char *cmdName, int(*function)(const char *partial, const char **match))
Definition cmd.cpp:679
void Cmd_TableAddList(const cmdList_t *cmdList)
Definition cmd.cpp:853
void Cmd_RemoveCommand(const char *cmdName)
Removes a command from script interface.
Definition cmd.cpp:786
void Cbuf_Execute(void)
Pulls off terminated lines of text from the command buffer and sends them through Cmd_ExecuteString...
Definition cmd.cpp:214
bool Cmd_GenericCompleteFunction(char const *candidate, char const *partial, char const **match)
Definition cmd.cpp:648
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
void Cmd_AddCommand(const char *cmdName, xcommand_t function, const char *desc)
Add a new command to the script interface.
Definition cmd.cpp:744
void Cbuf_AddText(const char *format,...)
Adds command text at the end of the buffer.
Definition cmd.cpp:126
void Cmd_TableRemoveList(const cmdList_t *cmdList)
Definition cmd.cpp:859
void(* xcommand_t)(void)
Definition cmd.h:84
void Com_DPrintf(int level, const char *fmt,...)
A Com_Printf that only shows up if the "developer" cvar is set.
Definition common.cpp:440
int Com_ServerState(void)
Check whether we are the server or have a singleplayer tactical mission.
Definition common.cpp:578
void Com_Error(int code, const char *fmt,...)
Definition common.cpp:459
void Com_SetGameType(void)
Definition common.cpp:832
void Com_Printf(const char *const fmt,...)
Definition common.cpp:428
void Com_Drop(void)
Definition common.cpp:507
void SV_ShutdownWhenEmpty(void)
Will eventually shutdown the server once all clients have disconnected.
Definition sv_main.cpp:1085
void SV_Shutdown(const char *finalmsg, bool reconnect)
Called when each game quits, before Sys_Quit or Sys_Error.
Definition sv_main.cpp:1042
void Cvar_SetValue(const char *varName, float value)
Expands value to a string and calls Cvar_Set.
Definition cvar.cpp:671
bool Cvar_Delete(const char *varName)
Function to remove the cvar and free the space.
Definition cvar.cpp:279
int Cvar_GetInteger(const char *varName)
Returns the int value of a cvar.
Definition cvar.cpp:194
float Cvar_GetValue(const char *varName)
Returns the float value of a cvar.
Definition cvar.cpp:125
#define MAX_TEAMS
Definition defines.h:98
void FS_RemoveFile(const char *osPath)
Definition files.cpp:1692
int FS_CheckFile(const char *fmt,...)
Just returns the filelength and -1 if the file wasn't found.
Definition files.cpp:298
int FS_LoadFile(const char *path, byte **buffer)
Filenames are relative to the quake search path.
Definition files.cpp:384
void FS_FreeFile(void *buffer)
Definition files.cpp:411
int FS_WriteFile(const void *buffer, size_t len, const char *filename)
Definition files.cpp:1546
int FS_Read(void *buffer, int len, qFILE *f)
Definition files.cpp:371
int FS_OpenFile(const char *filename, qFILE *file, filemode_t mode)
Finds and opens the file in the search path.
Definition files.cpp:162
int FS_BuildFileList(const char *fileList)
Build a filelist.
Definition files.cpp:962
filemode_t
Definition filesys.h:110
level_locals_t level
Definition g_main.cpp:38
void Sys_Error(const char *error,...)
Definition g_main.cpp:421
void(* http_callback_t)(const char *response, void *userdata)
Definition http.h:65
typedef long(ZCALLBACK *tell_file_func) OF((voidpf opaque
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
void LIST_AddStringSorted(linkedList_t **listDest, const char *data)
Definition list.cpp:107
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
void LIST_Delete(linkedList_t **list)
Definition list.cpp:195
bool LIST_RemoveEntry(linkedList_t **list, linkedList_t *entry)
Removes one entry from the linked list.
Definition list.cpp:172
int LIST_Count(const linkedList_t *list)
Definition list.cpp:344
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
bool LIST_Remove(linkedList_t **list, const void *data)
Definition list.cpp:213
bool LIST_IsEmpty(const linkedList_t *list)
Checks whether the given list is empty.
Definition list.cpp:335
void LIST_PrependString(linkedList_t **listDest, const char *data)
Adds a string as first entry to a linked list.
Definition list.cpp:127
int(* linkedListSort_t)(linkedList_t *entry1, linkedList_t *entry2, const void *userData)
Definition list.h:36
void NET_StreamSetCallback(struct net_stream *s, stream_callback_func *func)
Definition net.cpp:903
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
void NET_StreamSetData(struct net_stream *s, void *data)
Definition net.cpp:805
void NET_DatagramBroadcast(struct datagram_socket *s, const char *buf, int len, int port)
Definition net.cpp:1159
void NET_StreamFree(struct net_stream *s)
Call NET_StreamFree to dump the whole thing right now.
Definition net.cpp:817
void NET_DatagramSocketClose(struct datagram_socket *s)
Definition net.cpp:1182
void stream_onclose_func()
Definition net.h:31
void datagram_callback_func(struct datagram_socket *s, const char *buf, int len, struct sockaddr *from)
Definition net.h:33
void stream_callback_func(struct net_stream *s)
Definition net.h:32
int NET_ReadString(dbuffer *buf, char *string, size_t length)
Definition netpack.cpp:302
void NET_WriteShort(dbuffer *buf, int c)
Definition netpack.cpp:45
int NET_ReadStringLine(dbuffer *buf, char *string, size_t length)
Definition netpack.cpp:328
int NET_ReadLong(dbuffer *buf)
Definition netpack.cpp:282
int NET_ReadByte(dbuffer *buf)
Reads a byte from the netchannel.
Definition netpack.cpp:234
int NET_ReadShort(dbuffer *buf)
Definition netpack.cpp:242
void NET_WriteByte(dbuffer *buf, byte c)
Definition netpack.cpp:39
void NET_OOB_Printf(struct net_stream *s, const char *format,...)
Out of band print.
Definition netpack.cpp:548
event_t
Possible event values.
Definition q_shared.h:79
void format(__printf__, 1, 2)))
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 R_DrawLine(int *verts, float thickness)
Draws one line with only one start and one end point.
Definition r_draw.cpp:494
void R_DrawLineStrip(int points, int *verts)
2 dimensional line strip
Definition r_draw.cpp:477
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
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.
void R_Draw2DMapMarkers(const vec2_t screenPos, float direction, const char *model, int skin)
Draw 3D Marker on the 2D geoscape.
void R_DrawBloom(void)
handle post-processing bloom
QGL_EXTERN void(APIENTRY *qglActiveTexture)(GLenum texture)
QGL_EXTERN GLsizei const GLvoid * data
Definition r_gl.h:89
QGL_EXTERN GLuint index
Definition r_gl.h:110
QGL_EXTERN GLint i
Definition r_gl.h:113
QGL_EXTERN GLuint GLsizei bufSize
Definition r_gl.h:110
void R_SoftenTexture(byte *in, int width, int height, int bpp)
Applies blurring to a texture.
Definition r_image.cpp:391
void R_UploadAlpha(const image_t *image, const byte *alphaData)
Definition r_image.cpp:423
bool R_ImageExists(const char *pname,...)
Definition r_image.cpp:681
void S_SetSampleRepeatRate(int sampleRepeatRate)
Controls the repeat rate for the same sample.
Definition s_main.cpp:345
void S_StartLocalSample(const char *s, float volume)
Plays a sample without spatialization.
Definition s_mix.cpp:184
bool Com_ParseBoolean(const char *token)
Parses a boolean from a string.
Definition scripts.cpp:986
bool Com_ParseBlock(const char *name, const char **text, void *base, const value_t *values, memPool_t *mempool)
Definition scripts.cpp:1393
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
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
bool Com_UnregisterConstList(const constListEntry_t constList[])
Unregisters a list of string aliases.
Definition scripts.cpp:237
bool Com_UnregisterConstVariable(const char *name)
Removes a registered constant from the script mapping hash table.
Definition scripts.cpp:147
short Com_GetHumanAircraftIdsNum(void)
Definition scripts.cpp:581
short Com_GetDropShipIdsNum(void)
Definition scripts.cpp:576
ufoType_t Com_UFOShortNameToID(const char *token)
Translate short name to UFO type.
Definition scripts.cpp:3329
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 Com_GetConstInt(const char *name, int *value)
Searches whether a given value was registered as a string to int mapping.
Definition scripts.cpp:74
humanAircraftType_t Com_DropShipShortNameToID(const char *token)
Translate DropShip type to short name.
Definition scripts.cpp:3307
bool Com_ParseList(const char **text, linkedList_t **list)
Definition scripts.cpp:1363
void Com_RegisterConstList(const constListEntry_t constList[])
Registers a list of string aliases.
Definition scripts.cpp:253
int Com_EParseValue(void *base, const char *token, valueTypes_t type, int ofs, size_t size)
Definition scripts.cpp:964
align_t
We need this here for checking the boundaries from script values.
Definition scripts.h:89
valueTypes_t
possible values for parsing functions
Definition scripts.h:48
#define EXPORT
Definition shared.h:74
#define IMPORT
Definition shared.h:75
#define MAX_VAR
Definition shared.h:36
linkedList_t ** victoryConditionsMsgIDs
Definition cgame.h:73
int int y
Definition cgame.h:69
void(EXPORT *MapDraw)(geoscapeData_t *data)
const mapDef_t *EXPORT * MapInfo(int step)
void(EXPORT *StartBattlescape)(bool isTeamPlay)
character_t *EXPORT * GetSelectedChr(void)
bool(EXPORT *HandleServerCommand)(const char *command
int int int totalMarge
Definition cgame.h:69
int int int int int int padding
Definition cgame.h:69
linkedList_t linkedList_t ** missionBriefingMsgIDs
Definition cgame.h:73
int int int int int int const vec4_t bgcolor
Definition cgame.h:69
const linkedList_t * team
Definition cgame.h:66
void(EXPORT *DrawBaseLayoutTooltip)(int baseIdx
void(EXPORT *Shutdown)(void)
void(EXPORT *MapDrawMarkers)(const uiNode_t *node)
int int int int int int const vec4_t const vec4_t color
Definition cgame.h:69
void(EXPORT *NotifyEvent)(event_t eventType)
void(EXPORT *UpdateCharacterValues)(const character_t *chr)
bool(EXPORT *Spawn)(linkedList_t **chrList)
void(EXPORT *Drop)(void)
void(EXPORT *AddChatMessage)(const char *message)
int int const vec2_t pos
Definition cgame.h:81
int int int int w
Definition cgame.h:69
dbuffer * msg
Definition cgame.h:77
equipDef_t *EXPORT * GetEquipmentDefinition(void)
const char *EXPORT * GetTeamDef(void)
const char *EXPORT * GetModelForItem(const char *string)
int(EXPORT *GetChrMaxLoad)(const character_t *chr)
int int bool nextmap
Definition cgame.h:48
int int int int int h
Definition cgame.h:69
bool(EXPORT *IsTeamKnown)(const teamDef_t *teamDef)
bool(EXPORT *MapClick)(const uiNode_t *node
int isMultiplayer
Definition cgame.h:40
const char * menu
Definition cgame.h:39
void(EXPORT *RunFrame)(float secondsSinceLastFrame)
void(EXPORT *Init)(void)
bool(EXPORT *IsItemUseable)(const objDef_t *od)
const char * name
Definition cgame.h:38
int(IMPORT *CL_GetPlayerNum)(void)
const char const bool defaultval
Definition cgame.h:259
float float float w
Definition cgame.h:130
void *IMPORT * Alloc(size_t size, bool zeroFill, memPool_t *pool, const int tagNum, const char *fileName, const int fileLine)
const char * teamDefID
Definition cgame.h:184
const char *IMPORT * Com_DropShipTypeToShortName(humanAircraftType_t type)
const char *IMPORT * Cvar_GetString(const char *varName)
const char * data
Definition cgame.h:145
const equipDef_t *IMPORT * GAME_ChangeEquip(const linkedList_t *equipmentList, changeEquipType_t changeType, const char *equipID)
struct sockaddr char * node
Definition cgame.h:232
int * verts
Definition cgame.h:206
xmlNode_t *IMPORT * XML_GetNode(xmlNode_t *parent, const char *name)
float thickness
Definition cgame.h:207
void(IMPORT *R_Color)(const vec4_t rgba)
uiNode_t *IMPORT * UI_GetNodeByPath(const char *path)
size_t(IMPORT *GAME_GetCharacterArraySize)(void)
linkedList_t * entry
Definition cgame.h:153
void(IMPORT *XML_AddLongValue)(xmlNode_t *parent
bool(IMPORT *LIST_RemoveEntry)(linkedList_t **list
void(IMPORT *S_StartLocalSample)(const char *s
void(IMPORT *S_SetSampleRepeatRate)(int sampleRepeatRate)
void(IMPORT *XML_AddFloatValue)(xmlNode_t *parent
stream_callback_func * func
Definition cgame.h:225
float float float float float sh
Definition cgame.h:130
void(IMPORT *FS_CloseFile)(qFILE *f)
void *IMPORT * LIST_GetRandom(linkedList_t *list)
linkedListSort_t const void * userData
Definition cgame.h:159
void(IMPORT *XML_AddStringValue)(xmlNode_t *parent
xcommand_t function
Definition cgame.h:303
void(IMPORT *UI_MessageResetStack)(void)
void(IMPORT *UI_SortOptions)(uiNode_t **first)
void(IMPORT *LIST_Delete)(linkedList_t **list)
uiNode_t *IMPORT * UI_InitOptionIteratorAtIndex(int index, uiNode_t *option, uiOptionIterator_t *iterator)
uiNode_t *IMPORT * UI_OptionIteratorNextOption(uiOptionIterator_t *iterator)
void(IMPORT *FreePool)(memPool_t *pool)
http_callback_t callback
Definition cgame.h:169
const char * text
Definition cgame.h:112
const mapDef_t *IMPORT * GAME_GetCurrentSelectedMap(void)
void(IMPORT *XML_AddIntValue)(xmlNode_t *parent
const char valueTypes_t int size_t size
Definition cgame.h:333
const char const char const char const char const char const char const char const char * clickAction3
Definition cgame.h:136
const char *IMPORT * Com_UFOTypeToShortName(ufoType_t type)
bool(IMPORT *XML_GetBool)(xmlNode_t *parent
byte ** buffer
Definition cgame.h:277
int void(* item)(void *, const objDef_t *, int)
Definition cgame.h:359
void(IMPORT *UI_ResetData)(int dataId)
bool(IMPORT *LIST_Remove)(linkedList_t **list
void(IMPORT *XML_AddBoolValue)(xmlNode_t *parent
void(IMPORT *R_DrawBloom)(void)
const char * format
Definition cgame.h:109
bool(IMPORT *GAME_IsTeamEmpty)(void)
const char *IMPORT * GetAbsoluteSavePath(char *buf, size_t bufSize)
const char *IMPORT * FS_NextFileFromFileList(const char *files)
void(IMPORT *R_DrawFill)(int x
char size_t length
Definition cgame.h:220
align_t int int y
Definition cgame.h:128
align_t align
Definition cgame.h:128
const char void const value_t * values
Definition cgame.h:336
linkedList_t *IMPORT * LIST_Add(linkedList_t **list, void const *data, size_t length)
float float float float float float th
Definition cgame.h:130
void(IMPORT *UI_ExecuteConfunc)(const char *fmt
int int int bpp
Definition cgame.h:202
linkedList_t ** list
Definition cgame.h:335
int(IMPORT *GAME_GetCurrentTeam)(void)
const char *IMPORT * CL_PlayerGetName(unsigned int player)
void(IMPORT *CL_Disconnect)(void)
void(* collect)(void *, const teamDef_t *, int, bool))
Definition cgame.h:360
const char *IMPORT * UI_GetFontFromNode(const uiNode_t *const node)
const char * fmt
Definition cgame.h:318
void(IMPORT *FS_RemoveFile)(const char *osPath)
struct sockaddr char size_t nodelen
Definition cgame.h:232
int void void void(* ownitems)(const Inventory *))
Definition cgame.h:359
dbuffer *IMPORT * NET_ReadMsg(struct net_stream *s)
const vec2_t nodeSize
Definition cgame.h:211
uiNode_t * option
Definition cgame.h:111
byte * r_xviAlpha
Definition cgame.h:382
int(IMPORT *FS_BuildFileList)(const char *files)
void(IMPORT *XML_AddByteValue)(xmlNode_t *parent
bool reconnect
Definition cgame.h:163
void(IMPORT *GAME_SwitchCurrentSelectedMap)(int step)
bool(IMPORT *GAME_SaveCharacter)(xmlNode_t *p
uiNode_t *IMPORT * UI_PopupList(const char *title, const char *headline, linkedList_t *entries, const char *clickAction)
short(IMPORT *XML_GetShort)(xmlNode_t *parent
const char int userId
Definition cgame.h:374
const equipDef_t const objDef_t * weapon
Definition cgame.h:364
const char const char const char const char const char const char * clickText2
Definition cgame.h:136
const itemFilterTypes_t filterType
Definition cgame.h:368
const char * token
Definition cgame.h:333
const char valueTypes_t int ofs
Definition cgame.h:333
struct sockaddr char size_t char * service
Definition cgame.h:232
const char * teamDefName
Definition cgame.h:350
const ugv_t *IMPORT * Com_GetUGVByID(const char *ugvID)
int int int maxWidth
Definition cgame.h:133
void(IMPORT *NET_DatagramSocketClose)(struct datagram_socket *s)
void(IMPORT *LIST_AddString)(linkedList_t **list
struct sockaddr char size_t char size_t servicelen
Definition cgame.h:232
float(IMPORT *XML_GetFloat)(xmlNode_t *parent
const char const char * value
Definition cgame.h:239
Inventory ** ui_inventory
Definition cgame.h:101
const char *IMPORT * INV_GetFilterType(itemFilterTypes_t id)
linkedList_t *IMPORT * LIST_GetPointer(linkedList_t *list, const void *data)
void *IMPORT * LIST_GetByIdx(linkedList_t *list, int index)
byte * r_radarSourcePic
Definition cgame.h:384
const char void * base
Definition cgame.h:336
const char *IMPORT * CL_ActorGetSkillString(const int skill)
qFILE * file
Definition cgame.h:276
character_t * chr
Definition cgame.h:187
void(IMPORT *UI_PopWindow)(bool all)
const char const char * clickAction1
Definition cgame.h:135
float float float float float float float float tl
Definition cgame.h:130
const cgameType_t * cgameType
Definition cgame.h:102
void(IMPORT *CL_Drop)(void)
void(IMPORT *UI_DrawFill)(int x
int(IMPORT *NET_ReadStringLine)(dbuffer *buf
align_t int x
Definition cgame.h:128
const invDef_t * container
Definition cgame.h:365
BEPEvaluteCallback_t const void * userdata
Definition cgame.h:380
xcommand_t const char * desc
Definition cgame.h:303
const char *IMPORT * Cmd_Argv(int n)
xmlNode_t *IMPORT * XML_GetPos3(xmlNode_t *parent, const char *name, vec3_t pos)
struct sockaddr * addr
Definition cgame.h:232
void(IMPORT *GAME_ReloadMode)(void)
const equipDef_t const objDef_t int maxWeight
Definition cgame.h:364
const char valueTypes_t type
Definition cgame.h:333
const char const char const char const char const char const char const char const char const char * clickText3
Definition cgame.h:136
void(IMPORT *FS_FreeFile)(void *buffer)
int teamMembers
Definition cgame.h:178
struct net_stream *IMPORT * NET_Connect(const char *node, const char *service, stream_onclose_func *onclose)
const invDef_t Item * fItem
Definition cgame.h:365
qFILE filemode_t mode
Definition cgame.h:276
byte ** pic
Definition cgame.h:203
const char *IMPORT * Cvar_VariableStringOld(const char *varName)
void(IMPORT *HUD_DisplayMessage)(const char *text)
const char const char const char const char const char const char const char const char const char const char * tooltip3
Definition cgame.h:136
const ugv_t *IMPORT * Com_GetUGVByIDSilent(const char *ugvID)
__attribute__((format(__printf__, 1, 2)))
xmlNode_t *IMPORT * XML_GetNextPos2(xmlNode_t *actual, xmlNode_t *parent, const char *name, vec2_t pos)
uiSprite_t *IMPORT * UI_GetSpriteByName(const char *name)
cvar_t *IMPORT * Cvar_ForceSet(const char *varName, const char *value)
xmlNode_t *IMPORT * XML_GetNextNode(xmlNode_t *current, xmlNode_t *parent, const char *name)
double(IMPORT *XML_GetDouble)(xmlNode_t *parent
int(IMPORT *CL_Milliseconds)(void)
uiNode_t *IMPORT * UI_GetOption(int dataId)
struct datagram_socket *IMPORT * NET_DatagramSocketNew(const char *node, const char *service, datagram_callback_func *func)
const char *IMPORT * NET_StreamPeerToName(struct net_stream *s, char *dst, int len, bool appendPort)
const char * buf
Definition cgame.h:234
int(IMPORT *NET_ReadLong)(dbuffer *buf)
void(IMPORT *XML_AddShortValue)(xmlNode_t *parent
void(IMPORT *XML_AddDoubleValue)(xmlNode_t *parent
int int height
Definition cgame.h:202
xmlNode_t *IMPORT * XML_AddNode(xmlNode_t *parent, const char *name)
char const * partial
Definition cgame.h:309
float volume
Definition cgame.h:198
const vec2_t const vec3_t rotate
Definition cgame.h:211
const linkedList_t *IMPORT * LIST_ContainsString(const linkedList_t *list, const char *string)
const char * variable
Definition cgame.h:330
float float float float float float float float const char * name
Definition cgame.h:130
const linkedList_t * stringList
Definition cgame.h:121
char *IMPORT * FS_NextScriptHeader(const char *files, const char **name, const char **text)
linkedList_t *IMPORT * LIST_CopyStructure(linkedList_t *src)
mapDef_t *IMPORT * Com_GetMapDefinitionByID(const char *mapDefID)
const equipDef_t * ed
Definition cgame.h:138
void(IMPORT *LIST_AddStringSorted)(linkedList_t **listDest
int int int const vec4_t color
Definition cgame.h:131
byte * r_radarPic
Definition cgame.h:383
const char const char const char const char * tooltip1
Definition cgame.h:135
void(IMPORT *SV_ShutdownWhenEmpty)(void)
void(IMPORT *HUD_InitUI)(const char *optionWindowName)
cvar_t *IMPORT * Cvar_Set(const char *varName, const char *value,...) __attribute__((format(__printf__
int(IMPORT *LIST_Count)(const linkedList_t *list)
vec2_t pos
Definition cgame.h:134
const char const int day
Definition cgame.h:249
const char *IMPORT * Com_GetRandomMapAssemblyNameForCraft(const char *craftID)
size_t const char * filename
Definition cgame.h:281
int void void(* ammo)(void *, const Item *)
Definition cgame.h:359
const char *IMPORT * Com_UFOCrashedTypeToShortName(ufoType_t type)
const char uiNode_t *IMPORT * UI_AddOption(uiNode_t **tree, const char *name, const char *label, const char *value)
char *IMPORT * GAME_StrDup(const char *string)
const byte * alphaData
Definition cgame.h:213
int qFILE * f
Definition cgame.h:283
int int int const vec4_t float int pattern
Definition cgame.h:131
const vec2_t const vec3_t const vec2_t float float earthRadius
Definition cgame.h:211
const char const int const int sec
Definition cgame.h:249
const char *IMPORT * Com_EParse(const char **text, const char *errhead, const char *errinfo)
char * string
Definition cgame.h:220
int(IMPORT *GAME_GetChrMaxLoad)(const character_t *chr)
bool(IMPORT *GAME_LoadDefaultTeam)(bool force)
ufoType_t(IMPORT *Com_UFOShortNameToID)(const char *token)
const char * msg
Definition cgame.h:320
float const char * model
Definition cgame.h:210
xmlNode_t *IMPORT * XML_GetNextPos3(xmlNode_t *actual, xmlNode_t *parent, const char *name, vec3_t pos)
int(IMPORT *UI_DrawTooltip)(const char *string
const equipDef_t *IMPORT * INV_GetEquipmentDefinitionByID(const char *name)
const teamDef_t *IMPORT * Com_GetTeamDefinitionByID(const char *team)
linkedListSort_t sorter
Definition cgame.h:159
BEPEvaluteCallback_t varFuncParam
Definition cgame.h:380
void(IMPORT *UI_MessageAddStack)(struct uiMessageListNodeMessage_s *)
csi_t * csi
Definition cgame.h:100
bool(IMPORT *GAME_LoadCharacter)(xmlNode_t *p
const char *IMPORT * Cmd_Args(void)
void(IMPORT *CL_SetClientState)(connstate_t state)
void *IMPORT * NET_StreamGetData(struct net_stream *s)
int(IMPORT *CL_GetClientState)(void)
int(IMPORT *NET_ReadByte)(dbuffer *buf)
int int int const vec4_t float lineWidth
Definition cgame.h:131
const char *IMPORT * Com_ValueToStr(const void *base, const valueTypes_t type, const int ofs)
void(IMPORT *R_DrawRect)(int x
const char const char const char const char const char * clickAction2
Definition cgame.h:136
humanAircraftType_t(IMPORT *Com_DropShipShortNameToID)(const char *token)
xmlNode_t *IMPORT * XML_GetDate(xmlNode_t *parent, const char *name, int *day, int *sec)
memPool_t *IMPORT * CreatePool(const char *name)
void(IMPORT *NET_StreamSetData)(struct net_stream *s
const char * mainMenu
Definition cgame.h:108
const char * serverport
Definition cgame.h:183
char const char const ** match
Definition cgame.h:309
char *IMPORT * PoolStrDup(const char *in, memPool_t *pool, const int tagNum)
const char *IMPORT * CL_Translate(const char *t)
int(IMPORT *NET_ReadString)(dbuffer *buf
float float float float h
Definition cgame.h:130
int const char * windowName
Definition cgame.h:140
const char void const value_t memPool_t * mempool
Definition cgame.h:336
void(IMPORT *UI_TextScrollEnd)(const char *nodePath)
const char *IMPORT * XML_GetString(xmlNode_t *parent, const char *name)
const char int len
Definition cgame.h:234
void(IMPORT *Free)(void *ptr)
void(IMPORT *UI_PushWindow)(const char *name)
itemFilterTypes_t(IMPORT *INV_GetFilterTypeID)(const char *filterTypeID)
const char *IMPORT * Com_GetRandomMapAssemblyNameForCrashedCraft(const char *craftID)
struct uiMessageListNodeMessage_s *IMPORT * UI_MessageGetStack(void)
const char __attribute__((format(__printf__, 2, 3)))
const char const char const char const char const char const char const char * tooltip2
Definition cgame.h:136
const char *IMPORT * GetRelativeSavePath(char *buf, size_t bufSize)
align_t int int const char * c
Definition cgame.h:128
cvar_t *IMPORT * Cvar_Get(const char *varName, const char *value, int flags, const char *desc)
const char *IMPORT * UI_GetActiveWindowName(void)
float const char int skin
Definition cgame.h:210
float direction
Definition cgame.h:210
float float float float float float float sl
Definition cgame.h:130
const char *IMPORT * Com_GetConstVariable(const char *space, int value)
xmlNode_t *IMPORT * XML_GetPos2(xmlNode_t *parent, const char *name, vec2_t pos)
const char int int port
Definition cgame.h:234
xmlNode_t *IMPORT * XML_Parse(const char *buffer)
int(IMPORT *NET_ReadShort)(dbuffer *buf)
bool(IMPORT *LIST_IsEmpty)(const linkedList_t *list)
const char const char const char * clickText1
Definition cgame.h:135
void(IMPORT *NET_StreamFree)(struct net_stream *s)
char name[MAX_VAR]
Definition cgame.h:87
linkedList_t * equipmentList
Definition cgame.h:88
char window[MAX_VAR]
Definition cgame.h:86
Describes a character with all its attributes.
Definition chr_shared.h:388
list of script aliases to register
Definition scripts.h:231
The csi structure is the client-server-information structure which contains all the static data neede...
Definition q_shared.h:515
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
Definition cvar.h:71
inventory definition for our menus
Definition inv_shared.h:371
Defines all attributes of objects used in the inventory.
Definition inv_shared.h:264
Defines a type of UGV/Robot.
Definition chr_shared.h:245
Atomic structure used to define most of the UI.
Definition ui_nodes.h:80
vec_t vec3_t[3]
Definition ufotypes.h:39
vec_t vec4_t[4]
Definition ufotypes.h:40
vec_t vec2_t[2]
Definition ufotypes.h:38
void UI_RegisterOption(int dataId, uiNode_t *option)
Definition ui_data.cpp:311
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
void UI_ResetData(int dataId)
Reset a shared data. Type became NONE and value became nullptr.
Definition ui_data.cpp:212
void UI_SortOptions(uiNode_t **first)
Sort options by alphabet.
Definition ui_data.cpp:273
void UI_RegisterText(int dataId, const char *text)
share a text with a data id
Definition ui_data.cpp:115
void UI_RegisterLinkedListText(int dataId, linkedList_t *text)
share a linked list of text with a data id
Definition ui_data.cpp:131
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
void UI_GetNodeAbsPos(const uiNode_t *node, vec2_t pos)
Returns the absolute position of a node.
Definition ui_node.cpp:526
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.
void UI_MessageResetStack(void)
void UI_MessageAddStack(struct uiMessageListNodeMessage_s *message)
void UI_TextScrollEnd(const char *nodePath)
Scroll to the bottom.
void UI_TextNodeSelectLine(uiNode_t *node, int num)
Change the selected line.
void UI_Popup(const char *title, const char *text)
Popup on geoscape.
Definition ui_popup.cpp:47
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
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)
void UI_DrawRect(int x, int y, int w, int h, const vec4_t color, float lineWidth, int pattern)
Definition ui_render.cpp:42
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.
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
int UI_DrawTooltip(const char *string, int x, int y, int maxWidth)
Generic tooltip function.
uiNode_t * UI_PushWindow(const char *name, const char *parentName, linkedList_t *params)
Push a window onto the window stack.
void UI_PopWindow(bool all)
Pops a window from the window stack.
void UI_InitStack(const char *activeWindow, const char *mainWindow)
Init the stack to start with a window, and have an alternative window with ESC.
void XML_AddPos2(xmlNode_t *parent, const char *name, const vec2_t pos)
add a Pos2 data to the XML Tree
Definition xml.cpp:258
void XML_AddFloatValue(xmlNode_t *parent, const char *name, float value)
add a non-zero Float attribute to the XML Node
Definition xml.cpp:108
double XML_GetDouble(xmlNode_t *parent, const char *name, const double defaultval)
retrieve a Double attribute from an XML Node
Definition xml.cpp:387
float XML_GetFloat(xmlNode_t *parent, const char *name, const float defaultval)
retrieve a Float attribute from an XML Node
Definition xml.cpp:373
void XML_AddByte(xmlNode_t *parent, const char *name, byte value)
add a Byte attribute to the XML Node
Definition xml.cpp:146
bool XML_GetBool(xmlNode_t *parent, const char *name, const bool defaultval)
retrieve a Boolean attribute from an XML Node
Definition xml.cpp:297
void XML_AddString(xmlNode_t *parent, const char *name, const char *value)
add a String attribute to the XML Node
Definition xml.cpp:45
void XML_AddIntValue(xmlNode_t *parent, const char *name, int value)
add a non-zero Int attribute to the XML Node
Definition xml.cpp:204
long XML_GetLong(xmlNode_t *parent, const char *name, const long defaultval)
retrieve a Long attribute from an XML Node
Definition xml.cpp:345
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:58
void XML_AddShortValue(xmlNode_t *parent, const char *name, short value)
add a non-zero Short attribute to the XML Node
Definition xml.cpp:181
int XML_GetInt(xmlNode_t *parent, const char *name, const int defaultval)
retrieve an Int attribute from an XML Node
Definition xml.cpp:317
void XML_AddFloat(xmlNode_t *parent, const char *name, float value)
add a Float attribute to the XML Node
Definition xml.cpp:96
short XML_GetShort(xmlNode_t *parent, const char *name, const short defaultval)
retrieve a Short attribute from an XML Node
Definition xml.cpp:331
void XML_AddDouble(xmlNode_t *parent, const char *name, double value)
add a Double attribute to the XML Node
Definition xml.cpp:119
void XML_AddByteValue(xmlNode_t *parent, const char *name, byte value)
add a non-zero Byte attribute to the XML Node
Definition xml.cpp:158
void XML_AddLongValue(xmlNode_t *parent, const char *name, long value)
add a non-zero Long attribute to the XML Node
Definition xml.cpp:229
void XML_AddDoubleValue(xmlNode_t *parent, const char *name, double value)
add a non-zero Double attribute to the XML Node
Definition xml.cpp:133
void XML_AddLong(xmlNode_t *parent, const char *name, long value)
add a Long attribute to the XML Node
Definition xml.cpp:215
void XML_AddBool(xmlNode_t *parent, const char *name, bool value)
add a Boolean attribute to the XML Node
Definition xml.cpp:71
void XML_AddInt(xmlNode_t *parent, const char *name, int value)
add an Int attribute to the XML Node
Definition xml.cpp:192
void XML_AddShort(xmlNode_t *parent, const char *name, short value)
add a Short attribute to the XML Node
Definition xml.cpp:169
void XML_AddPos3(xmlNode_t *parent, const char *name, const vec3_t pos)
add a Pos3 data to the XML Tree
Definition xml.cpp:243
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:273
void XML_AddBoolValue(xmlNode_t *parent, const char *name, bool value)
add a non-false Boolean attribute to the XML Node
Definition xml.cpp:83
#define xmlNode_t
Definition xml.h:24