Campaign parsing header. More...
Go to the source code of this file.
Data Structures | |
struct | components_s |
The definition of a "components" entry (i.e. an assembly of several items) parsed from a ufo-file. More... | |
Defines | |
#define | MAX_COMP 32 |
#define | COMP_ITEMCOUNT_SCALED -32768 |
Typedefs | |
typedef struct components_s | components_t |
The definition of a "components" entry (i.e. an assembly of several items) parsed from a ufo-file. | |
Functions | |
void | CL_ParseCampaign (const char *name, const char **text) |
void | CL_ScriptSanityCheck (void) |
Check the parsed script values for errors after parsing every script file. | |
components_t * | CL_GetComponentsByItem (const objDef_t *item) |
Returns components definition for an item. | |
components_t * | CL_GetComponentsByID (const char *id) |
Returns components definition by ID. |
Campaign parsing header.
Definition in file cp_parse.h.
#define COMP_ITEMCOUNT_SCALED -32768 |
Component item count scaled to the disassembled item/UFO's codition
Definition at line 31 of file cp_parse.h.
Referenced by CL_ParseComponents(), PR_DisassembleItem(), and PR_DisassemblyInfo().
#define MAX_COMP 32 |
Definition at line 29 of file cp_parse.h.
Referenced by CL_ParseComponents().
typedef struct components_s components_t |
The definition of a "components" entry (i.e. an assembly of several items) parsed from a ufo-file.
components_t* CL_GetComponentsByID | ( | const char * | id | ) |
Returns components definition by ID.
[in] | id | assemblyId of the component definition. |
Definition at line 623 of file cp_parse.c.
References components_s::assemblyId, ccs, Com_Error(), ccs_s::components, ERR_DROP, i, and ccs_s::numComponents.
Referenced by US_LoadXML(), and US_StoreUFO().
components_t* CL_GetComponentsByItem | ( | const objDef_t * | item | ) |
Returns components definition for an item.
[in] | item | Item to search the components for. |
Definition at line 604 of file cp_parse.c.
References components_s::assemblyId, components_s::assemblyItem, ccs, Com_DPrintf(), Com_Error(), ccs_s::components, DEBUG_CLIENT, ERR_DROP, i, objDef_s::id, and ccs_s::numComponents.
void CL_ParseCampaign | ( | const char * | name, | |
const char ** | text | |||
) |
Definition at line 416 of file cp_parse.c.
References salary_s::admin, salary_s::adminInitial, salary_s::aircraftDivisor, salary_s::aircraftFactor, salary_s::base, salary_s::baseUpkeep, ccs_s::campaigns, ccs, CL_ParseSalary(), Com_EParse(), Com_EParseValue(), Com_Parse(), Com_Printf(), CP_GetEventsByID(), salary_s::debtInterest, campaign_s::difficulty, EMPL_PILOT, EMPL_ROBOT, EMPL_SCIENTIST, EMPL_SOLDIER, EMPL_WORKER, campaign_s::events, i, campaign_s::id, campaign_s::idx, MAX_CAMPAIGNS, ccs_s::numCampaigns, value_s::ofs, Q_strncpyz(), salary_s::rankBonus, campaign_s::researched, ccs_s::salaries, value_s::size, value_s::string, campaign_s::team, TEAM_PHALANX, and value_s::type.
Referenced by CL_ParseScriptSecond().
void CL_ScriptSanityCheck | ( | void | ) |
Check the parsed script values for errors after parsing every script file.
Definition at line 768 of file cp_parse.c.
References sanity_functions_t::check, Com_Printf(), and sanity_functions_t::name.
Referenced by CP_CampaignInit().