Skirmish game type implementation. More...
#include "client.h"
#include "cl_game.h"
#include "cl_team.h"
#include "cl_inventory.h"
#include "ui/ui_main.h"
#include "ui/ui_popup.h"
Go to the source code of this file.
Defines | |
#define | DROPSHIP_MAX INTERCEPTOR_STILETTO |
Functions | |
static void | GAME_SK_SetMissionParameters (const mapDef_t *md) |
Register some data in the shared client/server structs to ensure that e.g. every known alien race is used in a skirmish game. | |
static void | GAME_SK_Start_f (void) |
Starts a new skirmish game. | |
static void | GAME_SK_Restart_f (void) |
static void | GAME_SK_ChangeEquip_f (void) |
Changed the given cvar to the next/prev equipment definition. | |
void | GAME_SK_Results (struct dbuffer *msg, int winner, int *numSpawned, int *numAlive, int numKilled[][MAX_TEAMS], int numStunned[][MAX_TEAMS]) |
After a mission was finished this function is called. | |
static void | GAME_SK_HideDropships (const linkedList_t *dropships) |
Hide the dropship selection or show it with the dropship given in the parameter. | |
static void | GAME_SK_HideUFOs (const linkedList_t *ufos) |
Hide the ufo selection or show it with the ufos given in the parameter. | |
const mapDef_t * | GAME_SK_MapInfo (int step) |
int | GAME_SK_GetTeam (void) |
static void | GAME_InitMenuOptions (void) |
void | GAME_SK_InitStartup (void) |
void | GAME_SK_Shutdown (void) |
Variables | |
static cvar_t * | cl_equip |
Skirmish game type implementation.
Definition in file cl_game_skirmish.c.
#define DROPSHIP_MAX INTERCEPTOR_STILETTO |
Definition at line 33 of file cl_game_skirmish.c.
Referenced by GAME_InitMenuOptions().
static void GAME_InitMenuOptions | ( | void | ) | [static] |
Definition at line 258 of file cl_game_skirmish.c.
References Com_DropShipTypeToShortName(), Com_GetRandomMapAssemblyNameForCraft(), Com_UFOCrashedTypeToShortName(), Com_UFOTypeToShortName(), DROPSHIP_MAX, i, OPTION_DROPSHIPS, OPTION_UFOS, UFO_MAX, UI_AddOption(), and UI_RegisterOption().
Referenced by GAME_SK_InitStartup().
static void GAME_SK_ChangeEquip_f | ( | void | ) | [static] |
Changed the given cvar to the next/prev equipment definition.
Definition at line 117 of file cl_game_skirmish.c.
References Cmd_Argc(), Cmd_Argv(), Com_Printf(), csi, Cvar_GetString(), Cvar_Set(), csi_s::eds, INV_GetEquipmentDefinitionByID(), equipDef_s::name, and csi_s::numEDs.
Referenced by GAME_SK_InitStartup().
int GAME_SK_GetTeam | ( | void | ) |
Definition at line 253 of file cl_game_skirmish.c.
References cl_team, and cvar_s::integer.
static void GAME_SK_HideDropships | ( | const linkedList_t * | dropships | ) | [inline, static] |
Hide the dropship selection or show it with the dropship given in the parameter.
dropships | if NULL , the dropship selection panel will be hidden, otherwise it will be shown with the given list entries as content. |
Definition at line 200 of file cl_game_skirmish.c.
References Com_GetRandomMapAssemblyNameForCraft(), Cvar_Set(), linkedList_s::data, OPTION_DROPSHIPS, UI_ExecuteConfunc(), UI_GetOption(), and UI_UpdateInvisOptions().
Referenced by GAME_SK_MapInfo().
static void GAME_SK_HideUFOs | ( | const linkedList_t * | ufos | ) | [inline, static] |
Hide the ufo selection or show it with the ufos given in the parameter.
ufos | if NULL , the ufo selection panel will be hidden, otherwise it will be shown with the given list entries as content. |
Definition at line 220 of file cl_game_skirmish.c.
References Com_GetRandomMapAssemblyNameForCraft(), Cvar_Set(), linkedList_s::data, OPTION_UFOS, UI_ExecuteConfunc(), UI_GetOption(), and UI_UpdateInvisOptions().
Referenced by GAME_SK_MapInfo().
void GAME_SK_InitStartup | ( | void | ) |
Definition at line 281 of file cl_game_skirmish.c.
References Cmd_AddCommand(), Cvar_ForceSet(), Cvar_Get(), GAME_InitMenuOptions(), GAME_SK_ChangeEquip_f(), GAME_SK_Restart_f(), and GAME_SK_Start_f().
const mapDef_t* GAME_SK_MapInfo | ( | int | step | ) |
Definition at line 235 of file cl_game_skirmish.c.
References mapDef_s::aircraft, cls, Com_GetMapDefByIDX(), client_static_s::currentSelectedMap, GAME_SK_HideDropships(), GAME_SK_HideUFOs(), mapDef_s::map, and mapDef_s::ufos.
static void GAME_SK_Restart_f | ( | void | ) | [static] |
Definition at line 108 of file cl_game_skirmish.c.
References GAME_ReloadMode(), and GAME_SK_Start_f().
Referenced by GAME_SK_InitStartup().
void GAME_SK_Results | ( | struct dbuffer * | msg, | |
int | winner, | |||
int * | numSpawned, | |||
int * | numAlive, | |||
int | numKilled[][MAX_TEAMS], | |||
int | numStunned[][MAX_TEAMS] | |||
) |
After a mission was finished this function is called.
msg | The network message buffer | |
winner | The winning team | |
numSpawned | The amounts of all spawned actors per team | |
numAlive | The amount of survivors per team | |
numKilled | The amount of killed actors for all teams. The first dimension contains the attacker team, the second the victim team | |
numStunned | The amount of stunned actors for all teams. The first dimension contains the attacker team, the second the victim team |
Definition at line 156 of file cl_game_skirmish.c.
References _, CL_Drop(), cls, Com_sprintf(), i, lengthof, popupText, client_static_s::team, TEAM_ALIEN, TEAM_CIVILIAN, UI_MAX_SMALLTEXTLEN, and UI_Popup().
static void GAME_SK_SetMissionParameters | ( | const mapDef_t * | md | ) | [static] |
Register some data in the shared client/server structs to ensure that e.g. every known alien race is used in a skirmish game.
Definition at line 41 of file cl_game_skirmish.c.
References csi_s::alienTeams, CHRSH_IsTeamDefAlien(), csi, Cvar_Set(), Cvar_SetValue(), mapDef_s::hurtAliens, i, csi_s::numAlienTeams, csi_s::numTeamDefs, td, and csi_s::teamDef.
Referenced by GAME_SK_Start_f().
void GAME_SK_Shutdown | ( | void | ) |
Definition at line 294 of file cl_game_skirmish.c.
References Cmd_RemoveCommand(), Cvar_Delete(), OPTION_DROPSHIPS, OPTION_UFOS, qfalse, SV_Shutdown(), and UI_ResetData().
static void GAME_SK_Start_f | ( | void | ) | [static] |
Starts a new skirmish game.
Definition at line 66 of file cl_game_skirmish.c.
References Cbuf_AddText(), cls, Com_GetMapDefByIDX(), Com_Printf(), Com_sprintf(), client_static_s::currentSelectedMap, Cvar_GetInteger(), Cvar_GetString(), GAME_AppendTeamMember(), GAME_GenerateTeam(), GAME_GetCharacterArraySize(), GAME_GetTeamDef(), GAME_SK_SetMissionParameters(), i, INV_GetEquipmentDefinitionByID(), mapDef_s::map, map, MAX_MAPDEFS, MAX_VAR, name, mapDef_s::param, qfalse, qtrue, and UI_InitStack().
Referenced by GAME_SK_InitStartup(), and GAME_SK_Restart_f().
Definition at line 35 of file cl_game_skirmish.c.