|
UFO: Alien Invasion
|
Header file for Aircraft and item components. More...

Go to the source code of this file.
Data Structures | |
| struct | components_t |
| The definition of a "components" entry (i.e. an assembly of several items) parsed from a ufo-file. More... | |
Macros | |
| #define | MAX_ASSEMBLIES 16 |
| #define | MAX_COMP 32 |
| #define | COMP_ITEMCOUNT_SCALED -32768 |
Functions | |
| components_t * | COMP_GetComponentsByID (const char *id) |
| Returns components definition by ID. | |
| void | COMP_ParseComponents (const char *name, const char **text) |
| Parses one "components" entry in a .ufo file and writes it into the next free entry in xxxxxxxx (components_t). | |
Header file for Aircraft and item components.
Definition in file cp_component.h.
| #define COMP_ITEMCOUNT_SCALED -32768 |
Component item count scaled to the disassembled item/UFO's codition
Definition at line 30 of file cp_component.h.
Referenced by COMP_ParseComponents(), PR_DisassemblyInfo(), and PR_FinishDisassembly().
| #define MAX_ASSEMBLIES 16 |
Max number of assemblies
Definition at line 28 of file cp_component.h.
Referenced by COMP_ParseComponents().
| #define MAX_COMP 32 |
Max component in an assembly
Definition at line 29 of file cp_component.h.
Referenced by COMP_ParseComponents().
| components_t * COMP_GetComponentsByID | ( | const char * | id | ) |
Returns components definition by ID.
| [in] | id | assemblyId of the component definition. |
components_t definition. Definition at line 145 of file cp_component.cpp.
References components_t::assemblyId, ccs, cgi, ERR_DROP, i, and Q_streq.
Referenced by US_LoadXML(), and US_StoreUFO().
| void COMP_ParseComponents | ( | const char * | name, |
| const char ** | text ) |
Parses one "components" entry in a .ufo file and writes it into the next free entry in xxxxxxxx (components_t).
| [in] | name | The unique id of a components_t array entry. |
| [in] | text | the whole following text after the "components" definition. |
Definition at line 50 of file cp_component.cpp.
References component_type_data_t::amount, components_t::assemblyId, components_t::assemblyItem, ccs, cgi, Com_Parse(), COMP_ITEMCOUNT_SCALED, components_type_vals, DEBUG_CLIENT, ERR_DROP, component_type_data_t::id, INVSH_GetItemByID(), INVSH_GetItemByIDSilent(), components_t::itemAmount, components_t::itemAmount2, components_t::items, MAX_ASSEMBLIES, MAX_COMP, name, component_type_data_t::numbercrash, components_t::numItemtypes, OBJZERO, Q_streq, Q_strncpyz(), and components_t::time.
Referenced by CP_ParseScriptFirst().