cl_game_skirmish.c File Reference

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"
Include dependency graph for cl_game_skirmish.c:

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_tGAME_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_tcl_equip

Detailed Description

Skirmish game type implementation.

Definition in file cl_game_skirmish.c.


Define Documentation

#define DROPSHIP_MAX   INTERCEPTOR_STILETTO

Definition at line 33 of file cl_game_skirmish.c.

Referenced by GAME_InitMenuOptions().


Function Documentation

static void GAME_InitMenuOptions ( void   )  [static]
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.

Parameters:
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.

Parameters:
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   ) 
const mapDef_t* GAME_SK_MapInfo ( int  step  ) 
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.

Parameters:
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   ) 
static void GAME_SK_Start_f ( void   )  [static]

Variable Documentation

cvar_t* cl_equip [static]

Definition at line 35 of file cl_game_skirmish.c.


Generated by  doxygen 1.6.2