cp_parse.h File Reference

Campaign parsing header. More...

This graph shows which files directly or indirectly include this file:

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_tCL_GetComponentsByItem (const objDef_t *item)
 Returns components definition for an item.
components_tCL_GetComponentsByID (const char *id)
 Returns components definition by ID.

Detailed Description

Campaign parsing header.

Definition in file cp_parse.h.


Define Documentation

#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 Documentation

typedef struct components_s components_t

The definition of a "components" entry (i.e. an assembly of several items) parsed from a ufo-file.

See also:
CL_ParseComponents

Function Documentation

components_t* CL_GetComponentsByID ( const char *  id  ) 

Returns components definition by ID.

Parameters:
[in] id assemblyId of the component definition.
Returns:
comp Pointer to components_t 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.

Parameters:
[in] item Item to search the components for.
Returns:
comp Pointer to components_t definition.

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 
)
void CL_ScriptSanityCheck ( void   ) 

Check the parsed script values for errors after parsing every script file.

See also:
CL_ReadSinglePlayerData

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().


Generated by  doxygen 1.6.2