27 #include "../client.h"
28 #include "../cl_language.h"
30 #include "../battlescape/cl_localentity.h"
31 #include "../battlescape/cl_hud.h"
32 #include "../battlescape/cl_parse.h"
33 #include "../ui/ui_main.h"
34 #include "../ui/ui_draw.h"
35 #include "../ui/ui_nodes.h"
36 #include "../ui/ui_popup.h"
37 #include "../ui/ui_render.h"
38 #include "../ui/ui_windows.h"
39 #include "../ui/ui_sprite.h"
40 #include "../ui/ui_font.h"
41 #include "../ui/ui_tooltip.h"
42 #include "../ui/node/ui_node_container.h"
43 #include "../ui/node/ui_node_messagelist.h"
44 #include "../ui/node/ui_node_model.h"
45 #include "../cl_team.h"
46 #include "../web/web_cgame.h"
47 #include "../battlescape/events/e_main.h"
48 #include "../cl_inventory.h"
49 #include "../../shared/parse.h"
50 #include "../../common/filesys.h"
51 #include "../renderer/r_draw.h"
52 #include "../renderer/r_framebuffer.h"
53 #include "../renderer/r_geoscape.h"
58 #define MAX_CGAMETYPES 16
93 for (GameCvars::const_iterator
i = copy.begin();
i != copy.end(); ++
i) {
95 if (cvar->
flags == 0) {
98 cvar->
name, list ? list->
name :
"none");
120 _cmds.insert(cmdName);
126 _cmds.erase(cmdName);
131 GameCmds copy =
_cmds;
132 for (GameCmds::const_iterator
i = copy.begin();
i != copy.end(); ++
i) {
133 const char* cmdName = *
i;
136 cmdName, list ? list->
name :
"none");
148 #ifdef HARD_LINKED_CGAME
154 GetCGameMultiplayerAPI,
159 static const char* cgameMenu;
165 if (cgameMenu ==
nullptr)
168 for (
int i = 0;
i <
len;
i++) {
198 if (index < 0 || index >=
lengthof(characters))
201 return &characters[
index];
213 for (
int i = 0;
i <
size;
i++) {
234 if (cgame ==
nullptr)
246 characters[
i].init();
263 const char* ugvId = strstr(chr->
teamDef->
id,
"ugv");
286 for (
int i = 0;
i < teamMembers;
i++)
293 if (list !=
nullptr) {
302 if (list !=
nullptr) {
304 return isMultiplayer;
329 if (list !=
nullptr && list->EndRoundAnnounce)
330 list->EndRoundAnnounce(playerNum, team);
364 if (!list || list->HandleServerCommand ==
nullptr)
367 return list->HandleServerCommand(command, msg);
376 if (!list || list->AddChatMessage ==
nullptr)
381 va_start(argptr, format);
382 Q_vsnprintf(
string,
sizeof(
string), format, argptr);
385 list->AddChatMessage(
string);
398 va_start(argptr, format);
399 Q_vsnprintf(
string,
sizeof(
string), format, argptr);
410 va_start(argptr, format);
411 Q_vsnprintf(
string,
sizeof(
string), format, argptr);
421 va_start(argptr, format);
509 collectItem(data, i->
def(), 1);
511 collectAmmo(data, i);
521 collectItem(data, item->
def(), 1);
542 collect(data, le->
teamDef, 1,
false);
544 collect(data, le->
teamDef, 1,
true);
568 Com_Printf(
"Could not find image '%s'\n", name);
581 static const char*
Com_EParse_ (
const char** text,
const char* errhead,
const char* errinfo)
591 if (cgi ==
nullptr) {
902 #ifndef HARD_LINKED_CGAME
934 if (list && list->MapDraw)
941 if (list && list->MapDrawMarkers)
942 list->MapDrawMarkers(node);
948 if (list && list->MapClick)
949 list->MapClick(node, x, y, pos);
1035 const char* mapname = md->
mapTheme;
1038 if (mapname[0] ==
'+') {
1046 Cvar_Set(
"mn_mappic",
"maps/shots/%s", mapname);
1048 Cvar_Set(
"mn_mappic",
"maps/shots/default");
1051 Cvar_Set(
"mn_mappic2",
"maps/shots/%s_2", mapname);
1053 Cvar_Set(
"mn_mappic2",
"maps/shots/default");
1056 Cvar_Set(
"mn_mappic3",
"maps/shots/%s_3", mapname);
1058 Cvar_Set(
"mn_mappic3",
"maps/shots/default");
1071 const char* callbackCmd =
Cmd_Argv(1);
1078 const char* preview;
1091 if (preview[0] ==
'+')
1094 preview =
"default";
1096 Cbuf_AddText(
"%s add \"%s\" \"%s\"\n", callbackCmd, md->
id, preview);
1155 Com_Printf(
"Could not find map %s\n", mapname);
1173 if (
Q_streq(name, cgameTypes[i].
id))
1176 if (i < numCGameTypes) {
1177 Com_Printf(
"GAME_ParseModes: cgame def \"%s\" with same name found, second ignored\n", name);
1182 Sys_Error(
"GAME_ParseModes: MAX_CGAMETYPES exceeded");
1185 cgameType_t* cgame = &cgameTypes[numCGameTypes++];
1193 #ifndef HARD_LINKED_CGAME
1201 Com_sprintf(fullPath,
sizeof(fullPath),
"%s/cgame-%s.%s", path, name, SO_EXT);
1218 const char*
name = t->
id;
1219 #ifndef HARD_LINKED_CGAME
1223 Com_Printf(
"------- Loading cgame-%s.%s -------\n", name, SO_EXT);
1230 const char* path =
nullptr;
1251 Sys_Error(
"Could not find the equipDef '%s' in the cgame mode: '%s'", equipID, name);
1260 #ifdef HARD_LINKED_CGAME
1271 const char* modeName;
1277 if (modeName[0] ==
'\0')
1292 Com_Printf(
"GAME_SetMode_f: Mode '%s' not found\n", modeName);
1308 if (list && list->IsItemUseable)
1309 return list->IsItemUseable(od);
1330 list->Results(msg, winner, numSpawned, numAlive, numKilled, numStunned, nextmap);
1345 assert(item->
def());
1361 if (
INVDEF(container)->temp)
1450 if (teamDefID[0] ==
'\0')
1451 teamDefID =
"phalanx";
1494 if (list !=
nullptr && list->StartBattlescape) {
1495 list->StartBattlescape(isTeamPlay);
1516 if (list !=
nullptr && list->InitMissionBriefing)
1517 list->InitMissionBriefing(&title, &victoryConditionsMsgIDs, &missionBriefingMsgIDs);
1521 LIST_AddString(&victoryConditionsMsgIDs,
"*msgid:victory_condition_default");
1525 LIST_AddString(&missionBriefingMsgIDs,
"*msgid:mission_briefing_default");
1540 for (
int i = 0;
i <
size;
i++) {
1546 if (list && list->InitializeBattlescape) {
1547 list->InitializeBattlescape(&msg, team);
1575 if (list && list->Spawn)
1626 if (list && list->NotifyEvent)
1627 list->NotifyEvent(eventType);
1637 if (list && list->IsTeamKnown !=
nullptr)
1638 return list->IsTeamKnown(teamDef);
1645 if (list && list->UpdateCharacterValues !=
nullptr)
1646 list->UpdateCharacterValues(chr);
1662 if (list && list->Drop) {
1694 if (list && list->RunFrame !=
nullptr)
1702 if (list && list->DrawBaseLayout !=
nullptr)
1703 list->DrawBaseLayout(baseIdx, x, y, totalMarge, w, h, padding, bgcolor, color);
1715 if (list && list->DrawBaseLayoutTooltip !=
nullptr)
1716 list->DrawBaseLayoutTooltip(baseIdx, x, y);
1730 if (model !=
nullptr) {
1731 if (uiModel !=
nullptr)
1737 if (uiModel !=
nullptr)
1755 if (ucn == chrTmp->ucn) {
1775 if (list && list->GetChrMaxLoad !=
nullptr)
1776 return std::min(strength, list->GetChrMaxLoad(chr));
1790 Com_Error(
ERR_DROP,
"Could not find the equipment definition for '%s'", equipID);
1793 switch (changeType) {
1810 if (entry ==
nullptr) {
1811 equipID = (
const char*)equipmentList->
data;
1812 }
else if (changeType ==
FORWARD) {
1813 equipID = (
const char*)(entry->
next !=
nullptr ? entry->
next->
data : equipmentList->
data);
1814 }
else if (changeType ==
BACKWARD) {
1815 const char* newEntry =
nullptr;
1816 const char* prevEntry =
nullptr;
1819 if (prevEntry !=
nullptr) {
1820 newEntry = prevEntry;
1831 Com_Error(
ERR_DROP,
"Could not find the equipment definition for '%s'", equipID);
1842 Com_Printf(
"----------- game modes -------------\n");
1857 Com_Printf(
"added %i game modes\n", numCGameTypes);
1890 characters[1].init();
static void UI_PushWindow_(const char *name)
void Cmd_UnRegisterCmdListener(CmdListenerPtr listener)
Unregisters a command listener.
equipDef_t * GAME_GetEquipmentDefinition(void)
uiNode_t *IMPORT * UI_PopupList(const char *title, const char *headline, linkedList_t *entries, const char *clickAction)
const objDef_t * onlyWeapon
bool Com_ParseBlock(const char *name, const char **text, void *base, const value_t *values, memPool_t *mempool)
const char * Cmd_Argv(int arg)
Returns a given argument.
void GAME_GenerateTeam(const char *teamDefID, const equipDef_t *ed, int teamMembers)
static void * GAME_AllocInventoryMemory(size_t size)
void Cmd_AddCommand(const char *cmdName, xcommand_t function, const char *desc)
Add a new command to the script interface.
void GAME_AddChatMessage(const char *format,...)
xmlNode_t * XML_GetPos2(xmlNode_t *parent, const char *name, vec2_t pos)
retrieve the first Pos2 data from an XML Node
void CL_UpdateCharacterValues(const character_t *chr)
void *IMPORT * Alloc(size_t size, bool zeroFill, memPool_t *pool, const int tagNum, const char *fileName, const int fileLine)
static SharedPtr< GAMECvarListener > cvarListener(new GAMECvarListener())
short XML_GetShort(xmlNode_t *parent, const char *name, const short defaultval)
retrieve a Short attribute from an XML Node
const char * FS_NextFileFromFileList(const char *files)
Returns the next file that is found in the virtual filesystem identified by the given file pattern...
void destroyInventory(Inventory *const inv)
Destroys inventory.
uiNode_t *IMPORT * UI_GetNodeByPath(const char *path)
int Q_vsnprintf(char *str, size_t size, const char *format, va_list ap)
Safe (null terminating) vsnprintf implementation.
void R_SoftenTexture(byte *in, int width, int height, int bpp)
Applies blurring to a texture.
bool Com_UnregisterConstVariable(const char *name)
Removes a registered constant from the script mapping hash table.
void Sys_Error(const char *error,...)
struct uiMessageListNodeMessage_s *IMPORT * UI_MessageGetStack(void)
short Com_GetDropShipIdsNum(void)
void NET_SockaddrToStrings(struct datagram_socket *s, struct sockaddr *addr, char *node, size_t nodelen, char *service, size_t servicelen)
Convert sockaddr to string.
bool Com_GetConstIntFromNamespace(const char *space, const char *variable, int *value)
Searches whether a given value was registered as a string to int mapping.
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.
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.
const char * Com_GetRandomMapAssemblyNameForCrashedCraft(const char *craftID)
const objDef_t * INVSH_GetItemByID(const char *id)
Returns the item that belongs to the given id or nullptr if it wasn't found.
void R_DrawImage(float x, float y, const image_t *image)
Draws an image or parts of it.
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.
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.
void UI_RegisterLinkedListText(int dataId, linkedList_t *text)
share a linked list of text with a data id
void XML_AddStringValue(xmlNode_t *parent, const char *name, const char *value)
add a non-empty String attribute to the XML Node
static void GAME_WebDelete(int category, const char *filename)
void UI_MessageAddStack(struct uiMessageListNodeMessage_s *message)
int FS_OpenFile(const char *filename, qFILE *file, filemode_t mode)
Finds and opens the file in the search path.
void UI_RegisterText(int dataId, const char *text)
share a text with a data id
void R_DrawLineStrip(int points, int *verts)
2 dimensional line strip
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.
void GAME_SpawnSoldiers(void)
Called during startup of mission to send team info.
float XML_GetFloat(xmlNode_t *parent, const char *name, const float defaultval)
retrieve a Float attribute from an XML Node
const char * va(const char *format,...)
does a varargs printf into a temp buffer, so I don't need to have varargs versions of all text functi...
struct datagram_socket * NET_DatagramSocketNew(const char *node, const char *service, datagram_callback_func *func)
Opens a datagram socket (UDP)
void LIST_AddStringSorted(linkedList_t **listDest, const char *data)
const teamDef_t * teamDef
void * LIST_GetByIdx(linkedList_t *list, int index)
Get an entry of a linked list by its index in the list.
static void GAME_DestroyInventory(Inventory *const inv)
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...
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
void XML_AddDoubleValue(xmlNode_t *parent, const char *name, double value)
add a non-zero Double attribute to the XML Node
int experience[SKILL_NUM_TYPES+1]
void GAME_TeamDelete_f(void)
Removes a user created team.
static int GAME_GetNextUniqueCharacterNumber(void)
const char * GAME_GetAbsoluteSavePath(char *buf, size_t bufSize)
char * CL_GetConfigString(int index)
int XML_GetInt(xmlNode_t *parent, const char *name, const int defaultval)
retrieve an Int attribute from an XML Node
uiNode_t *IMPORT * UI_OptionIteratorNextOption(uiOptionIterator_t *iterator)
double XML_GetDouble(xmlNode_t *parent, const char *name, const double defaultval)
retrieve a Double attribute from an XML Node
static void GAME_FreeAllInventory(void)
void * _Mem_Alloc(size_t size, bool zeroFill, memPool_t *pool, const int tagNum, const char *fileName, const int fileLine)
Item * getContainer2(const containerIndex_t idx) const
static void R_DrawImageCentered(int x, int y, const char *name)
void SV_ShutdownWhenEmpty(void)
Will eventually shutdown the server once all clients have disconnected.
char *IMPORT * FS_NextScriptHeader(const char *files, const char **name, const char **text)
void GAME_ReloadMode(void)
void *IMPORT * LIST_GetRandom(linkedList_t *list)
bool Com_sprintf(char *dest, size_t size, const char *fmt,...)
copies formatted string with buffer-size checking
const char * UI_GetActiveWindowName(void)
Returns the name of the current window.
Defines a type of UGV/Robot.
void UI_DrawModelNode(uiNode_t *node, const char *source)
#define Mem_PoolAlloc(size, pool, tagNum)
int nextUniqueCharacterNumber
bool GAME_HandleServerCommand(const char *command, dbuffer *msg)
void XML_AddDate(xmlNode_t *parent, const char *name, const int day, const int sec)
add a date data to the XML Tree
void Cbuf_AddText(const char *format,...)
Adds command text at the end of the buffer.
void UI_UpdateInvisOptions(uiNode_t *option, const linkedList_t *stringList)
Unhide those options that are stored in the linked list and hide the others.
uiNode_t *IMPORT * UI_InitOptionIteratorAtIndex(int index, uiNode_t *option, uiOptionIterator_t *iterator)
void NET_WriteString(dbuffer *buf, const char *str)
void GAME_ParseModes(const char *name, const char **text)
void XML_AddPos3(xmlNode_t *parent, const char *name, const vec3_t pos)
add a Pos3 data to the XML Tree
Shared game type headers.
void GAME_SetServerInfo(const char *server, const char *serverport)
void GAME_StartBattlescape(bool isTeamPlay)
Called when the server sends the EV_START event.
xmlNode_t *IMPORT * XML_GetPos3(xmlNode_t *parent, const char *name, vec3_t pos)
const objDef_t * def(void) const
Inventory ** ui_inventory
static char * GAME_PoolStrDup(const char *in, memPool_t *pool, const int tagNum)
void FS_RemoveFile(const char *osPath)
void XML_AddFloatValue(xmlNode_t *parent, const char *name, float value)
add a non-zero Float attribute to the XML Node
equipDef_t eds[MAX_EQUIPDEFS]
const char *IMPORT * GetAbsoluteSavePath(char *buf, size_t bufSize)
void Cvar_UnRegisterCvarListener(CvarListenerPtr listener)
Unregisters a cvar listener.
const char * CL_ActorGetSkillString(const int skill)
Return the skill string for the given skill level.
static void UI_NextMap_f(void)
Select the next available map.
const char *EXPORT * GetModelForItem(const char *string)
int FS_LoadFile(const char *path, byte **buffer)
Filenames are relative to the quake search path.
void NET_StreamFree(struct net_stream *s)
Call NET_StreamFree to dump the whole thing right now.
void onDelete(const struct cvar_s *cvar)
int countItems() const
Count the number of items in the inventory (without temp containers)
int stuns[KILLED_NUM_TYPES]
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...
static const char * Com_EParse_(const char **text, const char *errhead, const char *errinfo)
int NET_ReadLong(dbuffer *buf)
char *IMPORT * GAME_StrDup(const char *string)
static void GAME_SendCurrentTeamSpawningInfo(dbuffer *buf, linkedList_t *team)
Stores a team-list (chr-list) info to buffer (which might be a network buffer, too).
const struct cgame_export_s * gametype
void Com_Printf(const char *const fmt,...)
uiNode_t * UI_GetOption(int dataId)
void GAME_AppendTeamMember(int memberIndex, const char *teamDefID, const equipDef_t *ed)
bool Cmd_GenericCompleteFunction(char const *candidate, char const *partial, char const **match)
const char *IMPORT * GetRelativeSavePath(char *buf, size_t bufSize)
const char * Com_DropShipTypeToShortName(humanAircraftType_t type)
Translate DropShip type to short name.
xmlNode_t *IMPORT * XML_Parse(const char *buffer)
const char *IMPORT * UI_GetFontFromNode(const uiNode_t *const node)
int FS_BuildFileList(const char *fileList)
Build a filelist.
int GAME_GetCurrentTeam(void)
void resetTempContainers()
std::set< const struct cvar_s * > GameCvars
void LIST_Delete(linkedList_t **list)
Defines all attributes of objects used in the inventory.
const char *IMPORT * Com_DropShipTypeToShortName(humanAircraftType_t type)
void Com_RegisterConstList(const constListEntry_t constList[])
Registers a list of string aliases.
uiSprite_t *IMPORT * UI_GetSpriteByName(const char *name)
void(* http_callback_t)(const char *response, void *userdata)
static bool GAME_LoadGame(const char *path, const char *name)
void GAME_TeamSlotComments_f(void)
Reads the comments from team files.
const equipDef_t * INV_GetEquipmentDefinitionByID(const char *name)
Gets equipment definition by id.
cvar_t * masterserver_url
void UI_InitStack(const char *activeWindow, const char *mainWindow)
Init the stack to start with a window, and have an alternative window with ESC.
bool LE_IsActor(const le_t *le)
Checks whether the given le is a living actor.
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...
void GAME_UnloadGame(void)
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...
int GAME_GetChrMaxLoad(const character_t *chr)
Returns the max weight the given character can carry.
void GAME_AutoTeam_f(void)
void GAME_NotifyEvent(event_t eventType)
xmlNode_t * XML_GetPos3(xmlNode_t *parent, const char *name, vec3_t pos)
retrieve the first Pos3 data from an XML Node
void Cmd_TableRemoveList(const cmdList_t *cmdList)
void CL_Drop(void)
Ensures the right menu cvars are set after error drop or map change.
static void UI_DrawNormImageByName_(bool flip, float x, float y, float w, float h, float sh, float th, float sl, float tl, const char *name)
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
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...
bool GAME_LoadCharacter(xmlNode_t *p, character_t *chr)
Loads a character from a given xml node.
int LIST_Count(const linkedList_t *list)
int Cvar_GetInteger(const char *varName)
Returns the int value of a cvar.
static void GAME_EquipActor(character_t *const chr, const equipDef_t *ed, const objDef_t *weapon, int maxWeight)
const char *IMPORT * Cvar_GetString(const char *varName)
void XML_AddPos2(xmlNode_t *parent, const char *name, const vec2_t pos)
add a Pos2 data to the XML Tree
memPool_t * cl_genericPool
const linkedList_t *IMPORT * LIST_ContainsString(const linkedList_t *list, const char *string)
#define Q_strvalid(string)
const char * XML_GetString(xmlNode_t *parent, const char *name)
retrieve a String attribute from an XML Node
void R_Color(const vec4_t rgba)
Change the color to given value.
void * NET_StreamGetData(struct net_stream *s)
bool BEP_Evaluate(const char *expr, BEPEvaluteCallback_t varFuncParam, const void *userdata)
static bool GAME_Spawn(linkedList_t **chrList)
void Com_Error(int code, const char *fmt,...)
const char *IMPORT * Cmd_Args(void)
const char *IMPORT * Com_UFOCrashedTypeToShortName(ufoType_t type)
image_t * R_FindImage(const char *pname, imagetype_t type)
Finds or loads the given image.
const char *IMPORT * CL_PlayerGetName(unsigned int player)
void Cmd_ExecuteString(const char *text,...)
A complete command line has been parsed, so try to execute it.
static void GAME_CollectAliens(void *data, void(*collect)(void *, const teamDef_t *, int, bool))
Collecting stunned and dead alien bodies after the mission.
byte r_xviAlpha[XVI_WIDTH *XVI_HEIGHT]
xmlNode_t * XML_AddNode(xmlNode_t *parent, const char *name)
add a new node to the XML tree
static void GAME_Exit_f(void)
Quits the current running game by calling the shutdown callback.
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.
uiNode_t * UI_OptionIteratorNextOption(uiOptionIterator_t *iterator)
Find the next element from the iterator Iterator skipCollapsed and skipInvisible attribute can contro...
const char * FS_Gamedir(void)
Called to find where to write a file (savegames, etc)
item instance data, with linked list capability
static int UI_DrawString_(const char *fontID, align_t align, int x, int y, const char *c)
void GAME_EndBattlescape(void)
This is called when a client quits the battlescape.
void Q_strncpyz(char *dest, const char *src, size_t destsize)
Safe strncpy that ensures a trailing zero.
xmlNode_t *IMPORT * XML_GetDate(xmlNode_t *parent, const char *name, int *day, int *sec)
struct uiMessageListNodeMessage_s * UI_MessageGetStack(void)
void NET_OOB_Printf(struct net_stream *s, const char *format,...)
Out of band print.
cvar_t *IMPORT * Cvar_Set(const char *varName, const char *value,...) __attribute__((format(__printf__
inventory definition with all its containers
bool LIST_Remove(linkedList_t **list, const void *data)
void GAME_DrawMapMarkers(uiNode_t *node)
void XML_AddInt(xmlNode_t *parent, const char *name, int value)
add an Int attribute to the XML Node
const char * GAME_GetModelForItem(const objDef_t *od, uiModel_t **uiModel)
Get a model for an item.
linkedList_t * equipmentList
void XML_AddString(xmlNode_t *parent, const char *name, const char *value)
add a String attribute to the XML Node
align_t
We need this here for checking the boundaries from script values.
uiNode_t * UI_PushWindow(const char *name, const char *parentName, linkedList_t *params)
Push a window onto the window stack.
static bool GAME_RemoveFromInventory(Inventory *const i, const invDef_t *container, Item *fItem)
void GAME_ActorSelect_f(void)
int treatmentLevel[BODYPART_MAXTYPE]
const char *IMPORT * FS_NextFileFromFileList(const char *files)
void XML_AddFloat(xmlNode_t *parent, const char *name, float value)
add a Float attribute to the XML Node
const equipDef_t *IMPORT * GAME_ChangeEquip(const linkedList_t *equipmentList, changeEquipType_t changeType, const char *equipID)
static void GAME_Free(void *ptr)
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_ResetData(int dataId)
Reset a shared data. Type became NONE and value became nullptr.
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags, const char *desc)
Init or return a cvar.
int NET_ReadString(dbuffer *buf, char *string, size_t length)
static void GAME_WebListForUser(int category, int userId)
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...
const equipDef_t *IMPORT * INV_GetEquipmentDefinitionByID(const char *name)
void GAME_SwitchCurrentSelectedMap(int step)
geoscapeData_t geoscapeData
float Cvar_GetValue(const char *varName)
Returns the float value of a cvar.
#define MapDef_ForeachCondition(var, condition)
void EquipActor(character_t *const chr, const equipDef_t *ed, const objDef_t *weapon, int maxWeight)
mapDef_t * Com_GetMapDefByIDX(int index)
static void GAME_CollectItems(void *data, int won, void(*collectItem)(void *, const objDef_t *, int), void(*collectAmmo)(void *, const Item *), void(*ownitems)(const Inventory *))
const mapDef_t *EXPORT * MapInfo(int step)
void GAME_SetMode(const cgame_export_t *gametype)
void XML_AddBool(xmlNode_t *parent, const char *name, bool value)
add a Boolean attribute to the XML Node
void GAME_InitMissionBriefing(const char *title)
void XML_AddLong(xmlNode_t *parent, const char *name, long value)
add a Long attribute to the XML Node
static void GAME_WebDownloadFromUser(int category, const char *filename, int userId)
mapDef_t *IMPORT * Com_GetMapDefinitionByID(const char *mapDefID)
static void UI_MapInfo(int step)
Prints the map info for the server creation dialogue.
static character_t characters[MAX_ACTIVETEAM]
static character array that can be used by a game mode to store the needed character values...
void LIST_Sort(linkedList_t **list, linkedListSort_t sorter, const void *userData)
character_t *EXPORT * GetSelectedChr(void)
int kills[KILLED_NUM_TYPES]
void Cvar_RegisterCvarListener(CvarListenerPtr listener)
Registers a cvar listener.
dbuffer *IMPORT * NET_ReadMsg(struct net_stream *s)
std::set< const char * > GameCmds
character_t * GAME_GetCharacterByUCN(int ucn)
Returns a character that can be used to store the game type specific character values.
void GAME_ResetCharacters(void)
Reset all characters in the static character array.
void initInventory(const char *name, const csi_t *csi, const inventoryImport_t *import)
Initializes the inventory definition by linking the ->next pointers properly.
memPool_t *IMPORT * CreatePool(const char *name)
void GAME_Frame(void)
Called every frame and allows us to hook into the current running game mode.
void UI_MessageResetStack(void)
short Com_GetUfoIdsNum(void)
static void UI_RequestMapList_f(void)
int Cmd_Argc(void)
Return the number of arguments of the current command. "command parameter" will result in a argc of 2...
const cgame_import_t * cgi
const eventRegister_t * CL_GetEvent(const event_t eType)
Singleplayer campaign game type headers.
const char * Cvar_VariableStringOld(const char *varName)
Returns the old value of cvar as string before we changed it.
event_t
Possible event values.
Multiplayer game type headers.
void R_UploadAlpha(const image_t *image, const byte *alphaData)
bool UI_IsWindowOnStack(const char *name)
Check if a named window is on the stack if active windows.
void NET_WriteLong(dbuffer *buf, int c)
const char *IMPORT * Com_UFOTypeToShortName(ufoType_t type)
static SharedPtr< GAMECmdListener > cmdListener(new GAMECmdListener())
const char * Com_ValueToStr(const void *base, const valueTypes_t type, const int ofs)
int NET_ReadShort(dbuffer *buf)
const char *IMPORT * Com_GetConstVariable(const char *space, int value)
cgame team management headers.
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.
#define Mem_CreatePool(name)
static void GAME_InitializeBattlescape(linkedList_t *team)
This is called if actors are spawned (or at least the spawning commands were send to the server)...
void GAME_DrawBaseLayout(int baseIdx, int x, int y, int totalMarge, int w, int h, int padding, const vec4_t bgcolor, const vec4_t color)
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
static void R_UploadAlpha_(const char *name, const byte *alphaData)
int FS_WriteFile(const void *buffer, size_t len, const char *filename)
bool GAME_IsMultiplayer(void)
void FS_CloseFile(qFILE *f)
const mapDef_t * GAME_GetCurrentSelectedMap(void)
const char * Com_UFOTypeToShortName(ufoType_t type)
Translate UFO type to short name.
void GAME_InitUIData(void)
Fills the game mode list entries with the parsed values from the script.
void CL_GenerateCharacter(character_t *chr, const char *teamDefName)
Generates the skills and inventory for a character and for a 2x2 unit.
Item * getFloorContainer() const
void Com_DPrintf(int level, const char *fmt,...)
A Com_Printf that only shows up if the "developer" cvar is set.
struct net_stream * netStream
#define INVDEF(containerID)
const char *IMPORT * INV_GetFilterType(itemFilterTypes_t id)
#define NET_STATE_STARTMATCH
const linkedList_t * LIST_ContainsString(const linkedList_t *list, const char *string)
Searches for the first occurrence of a given string.
linkedList_t * LIST_CopyStructure(linkedList_t *src)
ufoType_t Com_UFOShortNameToID(const char *token)
Translate short name to UFO type.
linkedList_t *IMPORT * LIST_CopyStructure(linkedList_t *src)
bool GAME_TeamIsKnown(const teamDef_t *teamDef)
const char * CL_PlayerGetName(unsigned int player)
Get the player name.
void S_SetSampleRepeatRate(int sampleRepeatRate)
Controls the repeat rate for the same sample.
void GAME_LoadTeam_f(void)
Loads the selected teamslot.
void NET_WriteFormat(dbuffer *buf, const char *format,...)
The user-friendly version of NET_WriteFormat that writes variable arguments to buffer according to fo...
mapDef_t * Com_GetMapDefinitionByID(const char *mapDefID)
Atomic structure used to define most of the UI.
cvar_t *IMPORT * Cvar_Get(const char *varName, const char *value, int flags, const char *desc)
static void GAME_NetSendItem(dbuffer *buf, const Item *item, containerIndex_t container, int x, int y)
void onAdd(const char *cmdName)
bool LIST_RemoveEntry(linkedList_t **list, linkedList_t *entry)
Removes one entry from the linked list.
#define Mem_FreePool(pool)
const char * formatString
The format string that is used to write and parse this event.
character_t * GAME_GetSelectedChr(void)
Returns the currently selected character.
Struct that defines one particular event with all its callbacks and data.
int WEB_CGameListForUser(const char *cgameId, int category, int userId)
Shows the uploaded files for the particular cgame category and the given userid.
void Com_RegisterConstInt(const char *name, int value)
Register mappings between script strings and enum values for values of the type V_INT.
void XML_AddShort(xmlNode_t *parent, const char *name, short value)
add a Short attribute to the XML Node
uiNode_t * UI_InitOptionIteratorAtIndex(int index, uiNode_t *option, uiOptionIterator_t *iterator)
Init an option iterator at an index.
linkedList_t * chrDisplayList
List of currently displayed or equipable characters.
const mapDef_t *IMPORT * GAME_GetCurrentSelectedMap(void)
long XML_GetLong(xmlNode_t *parent, const char *name, const long defaultval)
retrieve a Long attribute from an XML Node
const char *IMPORT * CL_ActorGetSkillString(const int skill)
static void GAME_NET_OOB_Printf(struct net_stream *s, const char *format,...)
void UI_GetNodeAbsPos(const uiNode_t *node, vec2_t pos)
Returns the absolute position of a node.
bool Cvar_Delete(const char *varName)
Function to remove the cvar and free the space.
bool GAME_LoadDefaultTeam(bool force)
const char *IMPORT * NET_StreamPeerToName(struct net_stream *s, char *dst, int len, bool appendPort)
uiModel_t * UI_GetUIModel(const char *modelName)
Returns pointer to UI model.
character_t * GAME_GetCharacter(int index)
Returns a character that can be used to store the game type specific character values.
void S_StartLocalSample(const char *s, float volume)
Plays a sample without spatialization.
CGAME_HARD_LINKED_FUNCTIONS linkedList_t * LIST_Add(linkedList_t **listDest, void const *data, size_t length)
static const cgame_import_t * GAME_GetImportData(const cgameType_t *t)
void R_DrawLine(int *verts, float thickness)
Draws one line with only one start and one end point.
le_t * LE_GetNextInUse(le_t *lastLE)
Iterate through the entities that are in use.
static void GAME_NetSendCharacter(dbuffer *buf, const character_t *chr)
Send the character information to the server that is needed to spawn the soldiers of the player...
void R_LoadImage(const char *name, byte **pic, int *width, int *height)
Generic image-data loading fucntion.
struct net_stream *IMPORT * NET_Connect(const char *node, const char *service, stream_onclose_func *onclose)
static void UI_SelectMap_f(void)
void *IMPORT * NET_StreamGetData(struct net_stream *s)
static const value_t cgame_vals[]
Valid equipment definition values from script files.
const char * GAME_GetCurrentName(void)
cvar_t * Cvar_FullSet(const char *varName, const char *value, int flags)
Sets a cvar from console with the given flags.
const char * Com_GetConstVariable(const char *space, int value)
Searches the mapping variable for a given integer value and a namespace.
void INV_ItemDescription(const objDef_t *od)
Prints the description for items (weapons, armour, ...)
int Com_EParseValue(void *base, const char *token, valueTypes_t type, int ofs, size_t size)
void GAME_SaveTeam_f(void)
Stores a team in a specified teamslot.
byte r_radarSourcePic[RADAR_WIDTH *RADAR_HEIGHT]
bool XML_GetBool(xmlNode_t *parent, const char *name, const bool defaultval)
retrieve a Boolean attribute from an XML Node
xmlNode_t *IMPORT * XML_GetPos2(xmlNode_t *parent, const char *name, vec2_t pos)
void XML_AddBoolValue(xmlNode_t *parent, const char *name, bool value)
add a non-false Boolean attribute to the XML Node
void onRemove(const char *cmdName)
const char *IMPORT * Com_GetRandomMapAssemblyNameForCraft(const char *craftID)
void GAME_ToggleActorForTeam_f(void)
This will activate/deactivate the actor for the team.
void NET_StreamSetData(struct net_stream *s, void *data)
void XML_AddByte(xmlNode_t *parent, const char *name, byte value)
add a Byte attribute to the XML Node
Skirmish game type headers.
int FS_Read(void *buffer, int len, qFILE *f)
short numBodyParts(void) const
bool isReloadable() const
uiNode_t *IMPORT * UI_GetOption(int dataId)
const ugv_t *IMPORT * Com_GetUGVByID(const char *ugvID)
bool Com_ParseList(const char **text, linkedList_t **list)
const cgame_export_t * GetCGameAPI(const cgame_import_t *import)
#define Mem_FreeTag(pool, tagNum)
static void GAME_WebUpload(int category, const char *filename)
static void GAME_SetNextUniqueCharacterNumber(int ucn)
size_t GAME_GetCharacterArraySize(void)
Listener for command changes.
QGL_EXTERN GLuint GLchar GLuint * len
const char * CL_Translate(const char *t)
const cgameType_t * cgameType
const char * UI_GetFontFromNode(const uiNode_t *const node)
Return the font for a specific node or default font.
void GAME_UpdateTeamMenuParameters_f(void)
Displays actor info and equipment and unused items in proper (filter) category.
xmlNode_t * XML_GetDate(xmlNode_t *parent, const char *name, int *day, int *sec)
retrieve the date data from an XML Node
void NET_DatagramBroadcast(struct datagram_socket *s, const char *buf, int len, int port)
void CL_SetClientState(connstate_t state)
Sets the client state.
void NET_DatagramSocketClose(struct datagram_socket *s)
bool WEB_CGameUpload(const char *cgameId, int category, const char *filename)
Uploads a file to the server.
xmlNode_t *IMPORT * XML_GetNextNode(xmlNode_t *current, xmlNode_t *parent, const char *name)
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
void GAME_AutoTeam(const char *equipmentDefinitionID, int teamMembers)
const char *IMPORT * UI_GetActiveWindowName(void)
bool GAME_IsTeamEmpty(void)
const char *IMPORT * Com_GetRandomMapAssemblyNameForCrashedCraft(const char *craftID)
static void CL_QueryMasterServer(const char *action, http_callback_t callback)
char * FS_NextScriptHeader(const char *files, const char **name, const char **text)
void GAME_HandleResults(dbuffer *msg, int winner, int *numSpawned, int *numAlive, int numKilled[][MAX_TEAMS], int numStunned[][MAX_TEAMS], bool nextmap)
After a mission was finished this function is called.
xmlNode_t *IMPORT * XML_GetNextPos3(xmlNode_t *actual, xmlNode_t *parent, const char *name, vec3_t pos)
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
void NET_WriteByte(dbuffer *buf, byte c)
struct datagram_socket *IMPORT * NET_DatagramSocketNew(const char *node, const char *service, datagram_callback_func *func)
const BodyData * bodyTemplate
static void UI_MapInfoGetNext(int step)
#define CS_VICTORY_CONDITIONS
void XML_AddDouble(xmlNode_t *parent, const char *name, double value)
add a Double attribute to the XML Node
void GAME_DisplayItemInfo(uiNode_t *node, const char *string)
Shows game type specific item information (if it's not resolvable via objDef_t).
void GAME_EndRoundAnnounce(int playerNum, int team)
Send end round announcements.
void UI_RegisterOption(int dataId, uiNode_t *option)
void HUD_InitUI(const char *optionWindowName)
Display the user interface.
linkedList_t * LIST_GetPointer(linkedList_t *list, const void *data)
Searches for the first occurrence of a given pointer.
void UI_PopWindow(bool all)
Pops a window from the window stack.
void Cmd_RegisterCmdListener(CmdListenerPtr listener)
Registers a command listener.
void GAME_CharacterCvars(const character_t *chr)
const objDef_t * ammoDef(void) const
int CL_GetPlayerNum(void)
#define LIST_Foreach(list, type, var)
Iterates over a linked list, it's safe to delete the returned entry from the list while looping over ...
void Com_SetGameType(void)
inventory definition for our menus
const char *IMPORT * CL_Translate(const char *t)
xmlNode_t * XML_GetNode(xmlNode_t *parent, const char *name)
Get first Node of the XML tree by name.
void Cmd_AddParamCompleteFunction(const char *cmdName, int(*function)(const char *partial, const char **match))
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.
xmlNode_t *IMPORT * XML_AddNode(xmlNode_t *parent, const char *name)
const teamDef_t *IMPORT * Com_GetTeamDefinitionByID(const char *team)
uiNode_t * UI_AddOption(uiNode_t **tree, const char *name, const char *label, const char *value)
Append an option to an option list.
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)
const char *IMPORT * Com_EParse(const char **text, const char *errhead, const char *errinfo)
bool WEB_CGameDelete(const char *cgameId, int category, const char *filename)
Deletes a user owned file on the server.
void UI_DrawRect(int x, int y, int w, int h, const vec4_t color, float lineWidth, int pattern)
void onCreate(const struct cvar_s *cvar)
void CL_Disconnect(void)
Sets the cls.state to ca_disconnected and informs the server.
#define MapDef_Foreach(var)
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* ...
cvar_t * Cvar_ForceSet(const char *varName, const char *value)
Will set the variable even if NOSET or LATCH.
bool HTTP_GetURL(const char *url, http_callback_t callback, void *userdata, const char *postfields)
Downloads the given url and return the data to the callback (optional)
static void GAME_NET_OOB_Printf2(const char *format,...)
void R_DrawBloom(void)
handle post-processing bloom
void GAME_InitStartup(void)
equipDef_t *EXPORT * GetEquipmentDefinition(void)
const char *IMPORT * Cvar_VariableStringOld(const char *varName)
GLsizei const GLvoid * data
const char * NET_StreamPeerToName(struct net_stream *s, char *dst, int len, bool appendPort)
cvar_t * Cvar_Set(const char *varName, const char *value,...)
Sets a cvar value.
const char * Cvar_GetString(const char *varName)
Returns the value of cvar as string.
static void GAME_UI_Popup(const char *title, const char *format,...)
#define Mem_PoolStrDup(in, pool, tagNum)
le_t * teamList[MAX_ACTIVETEAM]
void R_DrawFill(int x, int y, int w, int h, const vec4_t color)
Fills a box of pixels with a single color.
bool GAME_ItemIsUseable(const objDef_t *od)
const cgame_export_t *(* cgame_api_t)(const cgame_import_t *)
void UI_DrawFill(int x, int y, int w, int h, const vec4_t color)
Fills a box of pixels with a single color.
Model that have more than one part (top and down part of an aircraft)
bool LIST_IsEmpty(const linkedList_t *list)
Checks whether the given list is empty.
char *IMPORT * PoolStrDup(const char *in, memPool_t *pool, const int tagNum)
void GAME_StartMatch(void)
void XML_AddIntValue(xmlNode_t *parent, const char *name, int value)
add a non-zero Int attribute to the XML Node
void *IMPORT * LIST_GetByIdx(linkedList_t *list, int index)
void NET_StreamSetCallback(struct net_stream *s, stream_callback_func *func)
void Cbuf_Execute(void)
Pulls off terminated lines of text from the command buffer and sends them through Cmd_ExecuteString...
uiSprite_t * UI_GetSpriteByName(const char *name)
Return an sprite by is name.
static char * GAME_StrDup(const char *string)
void GAME_DrawBaseLayoutTooltip(int baseIdx, int x, int y)
Cgame callback to draw tooltip for baselayout UI node.
Listener for cvar changes.
image_t * R_GetImage(const char *name)
const char uiNode_t *IMPORT * UI_AddOption(uiNode_t **tree, const char *name, const char *label, const char *value)
xmlNode_t *IMPORT * XML_GetNextPos2(xmlNode_t *actual, xmlNode_t *parent, const char *name, vec2_t pos)
void destroyInventoryInterface(void)
linkedList_t *IMPORT * LIST_GetPointer(linkedList_t *list, const void *data)
const char * INV_GetFilterType(itemFilterTypes_t id)
#define ACTOR_SIZE_NORMAL
byte r_radarPic[RADAR_WIDTH *RADAR_HEIGHT]
const char * GAME_GetRelativeSavePath(char *buf, size_t bufSize)
void Cvar_SetValue(const char *varName, float value)
Expands value to a string and calls Cvar_Set.
humanAircraftType_t Com_DropShipShortNameToID(const char *token)
Translate DropShip type to short name.
linkedList_t *IMPORT * LIST_Add(linkedList_t **list, void const *data, size_t length)
void GAME_DrawMap(geoscapeData_t *data)
static void GAME_SetMode_f(void)
Decides which game mode should be set - takes the menu as reference.
static void GAME_FreePool(memPool_t *pool)
static void GAME_Abort_f(void)
Let the aliens win the match.
void GAME_SaveTeamState_f(void)
Will remove those actors that should not be used in the team.
QGL_EXTERN GLuint GLsizei bufSize
actorSizeEnum_t fieldSize
static const cgame_export_t * GAME_GetCGameAPI(const cgameType_t *t)
const char * GAME_GetTeamDef(void)
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.
static equipDef_t equipDefStandard
int Com_ServerState(void)
Check whether we are the server or have a singleplayer tactical mission.
int skills[SKILL_NUM_TYPES]
static const cgame_export_t * GAME_GetCGameAPI_(const cgameType_t *t)
void XML_AddByteValue(xmlNode_t *parent, const char *name, byte value)
add a non-zero Byte attribute to the XML Node
static void UI_GetMaps_f(void)
static void GAME_NetSendInventory(dbuffer *buf, const Inventory *inv)
const char *IMPORT * Cmd_Argv(int n)
cvar_t *IMPORT * Cvar_ForceSet(const char *varName, const char *value)
xmlNode_t * XML_GetNextNode(xmlNode_t *current, xmlNode_t *parent, const char *name)
Get next Node of the XML tree by name.
void * LIST_GetRandom(linkedList_t *list)
const char * Com_UFOCrashedTypeToShortName(ufoType_t type)
Translate UFO type to short name when UFO is crashed.
void UI_TextNodeSelectLine(uiNode_t *node, int num)
Change the selected line.
static cgameType_t cgameTypes[MAX_CGAMETYPES]
bool CHRSH_IsArmourUseableForTeam(const objDef_t *od, const teamDef_t *teamDef)
void NET_WriteShort(dbuffer *buf, int c)
int NET_ReadByte(dbuffer *buf)
Reads a byte from the netchannel.
const char * Cmd_Args(void)
Returns a single string containing argv(1) to argv(argc()-1)
static const cgame_export_t * GAME_GetCurrentType(void)
static void GAME_FreeInventory(void *data)
static const inventoryImport_t inventoryImport
void XML_AddLongValue(xmlNode_t *parent, const char *name, long value)
add a non-zero Long attribute to the XML Node
const char *IMPORT * XML_GetString(xmlNode_t *parent, const char *name)
bool Com_ParseBlockToken(const char *name, const char **text, void *base, const value_t *values, memPool_t *mempool, const char *token)
xmlNode_t *IMPORT * XML_GetNode(xmlNode_t *parent, const char *name)
static memPool_t * GAME_CreatePool(const char *name)
bool Com_GetConstInt(const char *name, int *value)
Searches whether a given value was registered as a string to int mapping.
int CL_GetClientState(void)
const ugv_t *IMPORT * Com_GetUGVByIDSilent(const char *ugvID)
bool Com_UnregisterConstList(const constListEntry_t constList[])
Unregisters a list of string aliases.
void format(__printf__, 1, 2)))
int NET_ReadStringLine(dbuffer *buf, char *string, size_t length)
void LIST_AddPointer(linkedList_t **listDest, void *data)
Adds just a pointer to a new or to an already existing linked list.
bool R_ImageExists(const char *pname,...)
xmlNode_t * XML_Parse(const char *buffer)
void SV_Shutdown(const char *finalmsg, bool reconnect)
Called when each game quits, before Sys_Quit or Sys_Error.
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...
const char *EXPORT * GetTeamDef(void)
void HUD_DisplayMessage(const char *text)
Displays a message on the hud.
bool removeFromInventory(Inventory *const inv, const invDef_t *container, Item *fItem) __attribute__((warn_unused_result))
short Com_GetHumanAircraftIdsNum(void)
int CL_Milliseconds(void)
void Cmd_TableAddList(const cmdList_t *cmdList)
void FS_FreeFile(void *buffer)
void UI_DisplayNotice(const char *text, int time, const char *windowName)
Displays a message over all windows.
void GAME_MapClick(uiNode_t *node, int x, int y, const vec2_t pos)
bool WEB_CGameDownloadFromUser(const char *cgameId, int category, const char *filename, int userId)
Downloads a file from the server and store it in the user directory.
#define SND_VOLUME_DEFAULT
const char *IMPORT * Com_ValueToStr(const void *base, const valueTypes_t type, const int ofs)
void UI_ExecuteConfunc(const char *fmt,...)
Executes confunc - just to identify those confuncs in the code - in this frame.
const char * FS_NextPath(const char *prevpath)
Allows enumerating all of the directories in the search path.
bool Com_ParseBoolean(const char *token)
Parses a boolean from a string.
int GetUsedSlots()
Calculate the number of used inventory slots.
static void UI_PreviousMap_f(void)
Select the previous available map.
static const int TAG_INVENTORY
void NET_WriteMsg(struct net_stream *s, dbuffer &buf)
Enqueue the buffer in the net stream for ONE client.
Describes a character with all its attributes.