UFO: Alien Invasion
|
Skirmish game type implementation. More...
#include "../../cl_shared.h"
#include "../cl_game.h"
#include "cl_game_skirmish.h"
#include "../../ui/ui_data.h"
Go to the source code of this file.
Functions | |
static CGAME_HARD_LINKED_FUNCTIONS void | GAME_SK_InitMissionBriefing (const char **title, linkedList_t **victoryConditionsMsgIDs, linkedList_t **missionBriefingMsgIDs) |
static const char * | GAME_SK_GetRandomMapAssemblyNameForCraft (const char *name) |
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. More... | |
static void | GAME_SK_Start_f (void) |
Starts a new skirmish game. More... | |
static void | GAME_SK_Restart_f (void) |
static void | GAME_SK_ChangeEquip_f (void) |
Changed the given cvar to the next/prev equipment definition. More... | |
static void | GAME_SK_Results (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. More... | |
static void | GAME_SK_HideDropships (const linkedList_t *dropships) |
Hide the dropship selection or show it with the dropship given in the parameter. More... | |
static void | GAME_SK_HideUFOs (const linkedList_t *ufos) |
Hide the ufo selection or show it with the ufos given in the parameter. More... | |
static const mapDef_t * | GAME_SK_MapInfo (int step) |
static void | GAME_InitMenuOptions (void) |
static void | GAME_SK_InitStartup (void) |
static void | GAME_SK_Shutdown (void) |
const cgame_export_t * | GetCGameAPI (const cgame_import_t *import) |
Variables | |
static cvar_t * | cl_equip |
static const cgame_import_t * | cgi |
static const cmdList_t | skirmishCmds [] |
Skirmish game type implementation.
Definition in file cl_game_skirmish.cpp.
Definition at line 293 of file cl_game_skirmish.cpp.
References cgame_import_s::Com_DropShipTypeToShortName(), cgame_import_s::Com_UFOCrashedTypeToShortName(), cgame_import_s::Com_UFOTypeToShortName(), GAME_SK_GetRandomMapAssemblyNameForCraft(), i, OPTION_DROPSHIPS, OPTION_UFOS, and cgame_import_s::UI_AddOption().
Referenced by GAME_SK_InitStartup().
Changed the given cvar to the next/prev equipment definition.
Definition at line 133 of file cl_game_skirmish.cpp.
References BACKWARD, cgame_import_s::cgameType, cgame_import_s::Cmd_Argv(), Com_sprintf(), cgame_import_s::Cvar_GetString(), cgame_import_s::Cvar_Set(), cgame_import_s::ed, cgameType_s::equipmentList, FORWARD, cgame_import_s::GAME_ChangeEquip(), equipDef_s::id, INIT, MAX_VAR, equipDef_s::name, Q_streq, and type.
|
inlinestatic |
Definition at line 50 of file cl_game_skirmish.cpp.
References cgame_import_s::Com_GetRandomMapAssemblyNameForCraft().
Referenced by GAME_InitMenuOptions(), GAME_SK_HideDropships(), and GAME_SK_HideUFOs().
|
inlinestatic |
Hide the dropship selection or show it with the dropship given in the parameter.
dropships | if nullptr , the dropship selection panel will be hidden, otherwise it will be shown with the given list entries as content. |
Definition at line 226 of file cl_game_skirmish.cpp.
References cgame_import_s::Cvar_Set(), linkedList_t::data, GAME_SK_GetRandomMapAssemblyNameForCraft(), OPTION_DROPSHIPS, and cgame_import_s::UI_GetOption().
Referenced by GAME_SK_MapInfo().
|
inlinestatic |
Hide the ufo selection or show it with the ufos given in the parameter.
ufos | if nullptr , the ufo selection panel will be hidden, otherwise it will be shown with the given list entries as content. |
Definition at line 247 of file cl_game_skirmish.cpp.
References cgame_import_s::Cvar_Set(), linkedList_t::data, GAME_SK_GetRandomMapAssemblyNameForCraft(), OPTION_UFOS, and cgame_import_s::UI_GetOption().
Referenced by GAME_SK_MapInfo().
|
static |
Definition at line 36 of file cl_game_skirmish.cpp.
References _, mapDef_s::description, cgame_import_s::GAME_GetCurrentSelectedMap(), mapDef_s::missionBriefing, Q_strvalid, and mapDef_s::victoryCondition.
Referenced by GetCGameAPI().
Definition at line 325 of file cl_game_skirmish.cpp.
References cgame_import_s::Cvar_ForceSet(), cgame_import_s::Cvar_Get(), and GAME_InitMenuOptions().
Referenced by GetCGameAPI().
Definition at line 264 of file cl_game_skirmish.cpp.
References mapDef_s::aircraft, ERR_DROP, cgame_import_s::GAME_GetCurrentSelectedMap(), GAME_SK_HideDropships(), GAME_SK_HideUFOs(), i, mapDef_s::mapTheme, mapDef_s::maxAliens, mapDef_s::singleplayer, and mapDef_s::ufos.
Referenced by GetCGameAPI().
Definition at line 124 of file cl_game_skirmish.cpp.
References GAME_SK_Start_f().
|
static |
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 |
nextmap | Indicates if there is another map to follow within the same msission |
Definition at line 173 of file cl_game_skirmish.cpp.
References _, Com_sprintf(), i, MAX_TEAMS, TEAM_ALIEN, and TEAM_CIVILIAN.
Referenced by GetCGameAPI().
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 59 of file cl_game_skirmish.cpp.
References csi_s::alienChrTemplates, csi_s::alienTeams, CHRSH_IsTeamDefAlien(), mapDef_s::civTeam, cgame_import_s::csi, cgame_import_s::Cvar_Set(), i, MAX_TEAMS_PER_MISSION, csi_s::numAlienTeams, csi_s::numTeamDefs, and csi_s::teamDef.
Referenced by GAME_SK_Start_f().
Definition at line 335 of file cl_game_skirmish.cpp.
References cgame_import_s::Cvar_ForceSet(), OPTION_DROPSHIPS, and OPTION_UFOS.
Referenced by GetCGameAPI().
Starts a new skirmish game.
Definition at line 86 of file cl_game_skirmish.cpp.
References cgame_import_s::Cvar_GetString(), cgame_import_s::ed, cgame_import_s::GAME_GetCurrentSelectedMap(), GAME_SK_SetMissionParameters(), i, cgame_import_s::INV_GetEquipmentDefinitionByID(), cgame_import_s::LIST_GetRandom(), mapDef_s::mapTheme, name, and mapDef_s::params.
Referenced by GAME_SK_Restart_f().
const cgame_export_t* GetCGameAPI | ( | const cgame_import_t * | import | ) |
Definition at line 348 of file cl_game_skirmish.cpp.
References cgi, GAME_CP_CharacterCvars(), GAME_CP_DrawBaseLayout(), GAME_CP_DrawBaseLayoutTooltip(), GAME_CP_Drop(), GAME_CP_Frame(), GAME_CP_GetEquipmentDefinition(), GAME_CP_GetItemModel(), GAME_CP_GetSelectedChr(), GAME_CP_GetTeamDef(), GAME_CP_InitializeBattlescape(), GAME_CP_InitMissionBriefing(), GAME_CP_InitStartup(), GAME_CP_ItemIsUseable(), GAME_CP_Results(), GAME_CP_Shutdown(), GAME_CP_Spawn(), GAME_CP_TeamIsKnown(), GAME_SK_InitMissionBriefing(), GAME_SK_InitStartup(), GAME_SK_MapInfo(), GAME_SK_Results(), GAME_SK_Shutdown(), GEO_Click(), GEO_Draw(), GEO_DrawMarkers(), cgame_export_s::GetEquipmentDefinition(), cgame_export_s::GetModelForItem(), cgame_export_s::GetSelectedChr(), cgame_export_s::GetTeamDef(), cgame_export_s::MapInfo(), cgame_export_s::menu, cgame_export_s::name, and OBJZERO.
|
static |
Definition at line 32 of file cl_game_skirmish.cpp.
|
static |
Definition at line 31 of file cl_game_skirmish.cpp.
|
static |
Definition at line 317 of file cl_game_skirmish.cpp.