UFO scripts used in client and server. More...
#include "scripts.h"
#include "../shared/parse.h"
#include "../game/inventory.h"
Go to the source code of this file.
Data Structures | |
struct | com_constNameInt_s |
Structure to map (script) strings and integer (enum) values. More... | |
Defines | |
#define | CONSTNAMEINT_HASH_SIZE 32 |
#define | MAX_CONSTNAMEINT_NAME 32 |
#define | TERRAIN_HASH_SIZE 64 |
Typedefs | |
typedef struct com_constNameInt_s | com_constNameInt_t |
Structure to map (script) strings and integer (enum) values. | |
typedef enum model_script_s | model_script_t |
Enumerations | |
enum | { OD_WEAPON, OD_PROTECTION, OD_RATINGS } |
The order here must be the same as in od_vals. More... | |
enum | model_script_s { MODEL_PATH, MODEL_BODY, MODEL_HEAD, MODEL_SKIN, MODEL_NUM_TYPES } |
Functions | |
static const char * | Com_ConstIntGetVariable (const char *name) |
Will extract the variable from a string<=>int mapping string which contain a namespace. | |
qboolean | Com_GetConstInt (const char *name, int *value) |
Searches whether a given value was registered as a string to int mapping. | |
qboolean | Com_GetConstIntFromNamespace (const char *space, const char *variable, int *value) |
Searches whether a given value was registered as a string to int mapping. | |
const char * | Com_GetConstVariable (const char *space, int value) |
Searches the mapping variable for a given integer value and a namespace. | |
qboolean | Com_UnregisterConstVariable (const char *name) |
Removes a registered constant from the script mapping hash table. | |
void | Com_RegisterConstInt (const char *name, int value) |
Register mappings between script strings and enum values for values of the type V_INT . | |
qboolean | Com_UnregisterConstList (const constListEntry_t constList[]) |
Unregisters a list of string aliases. | |
void | Com_RegisterConstList (const constListEntry_t constList[]) |
Registers a list of string aliases. | |
const char * | Com_EParse (const char **text, const char *errhead, const char *errinfo) |
Parsing function that prints an error message when there is no text in the buffer. | |
static void | Com_ParseVersion (const char *version) |
CASSERT (lengthof(vt_names)==V_NUM_TYPES) | |
CASSERT (lengthof(align_names)==ALIGN_LAST) | |
CASSERT (lengthof(blend_names)==BLEND_LAST) | |
CASSERT (lengthof(style_names)==STYLE_LAST) | |
CASSERT (lengthof(fade_names)==FADE_LAST) | |
CASSERT (lengthof(vt_sizes)==V_NUM_TYPES) | |
CASSERT (lengthof(vt_aligns)==V_NUM_TYPES) | |
const char * | Com_GetLastParseError (void) |
void * | Com_AlignPtr (void *memory, valueTypes_t type) |
Align a memory to use a natural address for the data type we will write. | |
int | Com_ParseValue (void *base, const char *token, valueTypes_t type, int ofs, size_t size, size_t *writtenBytes) |
Parse a value from a string. | |
int | Com_EParseValue (void *base, const char *token, valueTypes_t type, int ofs, size_t size) |
qboolean | Com_ParseBoolean (const char *token) |
Parses a boolean from a string. | |
int | Com_SetValue (void *base, const void *set, valueTypes_t type, int ofs, size_t size) |
const char * | Com_ValueToStr (const void *base, const valueTypes_t type, const int ofs) |
static void | Com_ParseFire (const char *name, const char **text, fireDef_t *fd) |
static void | Com_ParseArmourOrResistance (const char *name, const char **text, short *ad, qboolean rating) |
Parses the armour definitions or the team resistance values from script files. The protection and rating values. | |
CASSERT (lengthof(air_slot_type_strings)==MAX_ACITEMS) | |
static void | Com_ParseItem (const char *name, const char **text) |
Parses weapon, equipment, craft items and armour. | |
static void | Com_ParseInventory (const char *name, const char **text) |
static void | Com_ParseEquipment (const char *name, const char **text) |
static const char * | Com_GiveName (int gender, const teamDef_t *td) |
static const char * | Com_GiveModel (int type, int gender, const teamDef_t *td) |
const char * | Com_GetActorSound (teamDef_t *td, int gender, actorSound_t soundType) |
Returns the actor sounds for a given category. | |
teamDef_t * | Com_GetTeamDefinitionByID (const char *team) |
Returns the teamDef pointer for the searched team id - or NULL if not found in the teamDef array. | |
void | Com_GetCharacterValues (const char *teamDefition, character_t *chr) |
Assign character values, 3D models and names to a character. | |
static void | Com_ParseActorNames (const char *name, const char **text, teamDef_t *td) |
Parses "name" definition from team_* ufo script files. | |
static void | Com_ParseActorModels (const char *name, const char **text, teamDef_t *td) |
Parses "actors" definition from team_* ufo script files. | |
static void | Com_ParseActorSounds (const char *name, const char **text, teamDef_t *td) |
Parses "actorsounds" definition from team_* ufo script files. | |
static void | Com_ParseTeam (const char *name, const char **text) |
const chrTemplate_t * | Com_GetCharacterTemplateByID (const char *chrTemplate) |
Returns the chrTemplate pointer for the given id - or NULL if not found in the chrTemplates array. | |
static void | Com_ParseUGVs (const char *name, const char **text) |
Parse 2x2 units (e.g. UGVs). | |
static void | Com_ParseCharacterTemplate (const char *name, const char **text) |
Parses character templates from scripts. | |
const terrainType_t * | Com_GetTerrainType (const char *textureName) |
Searches the terrain definition if given. | |
static void | Com_ParseTerrain (const char *name, const char **text) |
Parses "terrain" definition from script files. | |
static void | Com_ParseGameTypes (const char *name, const char **text) |
static void | Com_ParseDamageTypes (const char *name, const char **text) |
const char * | Com_GetRandomMapAssemblyNameForCraft (const char *craftID) |
Returns the name of an aircraft or an ufo that is used in the ump files for the random map assembly. | |
humanAircraftType_t | Com_DropShipShortNameToID (const char *token) |
Translate DropShip type to short name. | |
const char * | Com_DropShipTypeToShortName (humanAircraftType_t type) |
Translate DropShip type to short name. | |
ufoType_t | Com_UFOShortNameToID (const char *token) |
Translate UFO type to short name. | |
const char * | Com_UFOTypeToShortName (ufoType_t type) |
Translate UFO type to short name. | |
const char * | Com_UFOCrashedTypeToShortName (ufoType_t type) |
Translate UFO type to short name when UFO is crashed. | |
const ugv_t * | Com_GetUGVByIDSilent (const char *ugvID) |
Searches an UGV definition by a given script id and returns the pointer to the global data. | |
const ugv_t * | Com_GetUGVByID (const char *ugvID) |
Searches an UGV definition by a given script id and returns the pointer to the global data. | |
static void | Com_AddObjectLinks (void) |
Creates links to other items (i.e. ammo<->weapons). | |
void | Com_ParseScripts (qboolean onlyServer) |
int | Com_GetScriptChecksum (void) |
Variables | |
static com_constNameInt_t * | com_constNameInt |
Linked list of all the registeres mappings. | |
static com_constNameInt_t * | com_constNameInt_hash [CONSTNAMEINT_HASH_SIZE] |
Hash of all the registeres mappings. | |
static qboolean | versionParsed |
const char *const | vt_names [] |
possible values for parsing functions | |
const char *const | align_names [] |
const char *const | blend_names [] |
const char *const | style_names [] |
const char *const | fade_names [] |
static const size_t | vt_sizes [] |
target sizes for buffer | |
static const size_t | vt_aligns [] |
natural align for each targets | |
static char | parseErrorMessage [256] |
static const char *const | skillNames [SKILL_NUM_TYPES+1] |
static const value_t | od_vals [] |
static const value_t | fdps [] |
const char *const | air_slot_type_strings [] |
List of valid strings for slot types. | |
static linkedList_t * | parseItemWeapons = NULL |
Temporary list of weapon ids as parsed from the ufo file "weapon_mod \<id\>" in Com_ParseItem and used in Com_AddObjectLinks. | |
static const value_t | idps [] |
const char *const | name_strings [NAME_NUM_TYPES] |
static const value_t | equipment_definition_vals [] |
Valid equipment definition values from script files. | |
static const value_t | teamDefValues [] |
possible teamdesc values (ufo-scriptfiles) | |
static const value_t | ugvValues [] |
static terrainType_t * | terrainTypesHash [TERRAIN_HASH_SIZE] |
static const value_t | terrainTypeValues [] |
gametype_t | gts [MAX_GAMETYPES] |
int | numGTs = 0 |
static const value_t | gameTypeValues [] |
possible gametype values for the gameserver (ufo-scriptfiles) |
UFO scripts used in client and server.
Definition in file scripts.c.
#define CONSTNAMEINT_HASH_SIZE 32 |
Definition at line 28 of file scripts.c.
Referenced by Com_GetConstInt(), Com_RegisterConstInt(), and Com_UnregisterConstVariable().
#define TERRAIN_HASH_SIZE 64 |
Definition at line 2775 of file scripts.c.
Referenced by Com_GetTerrainType(), and Com_ParseTerrain().
typedef struct com_constNameInt_s com_constNameInt_t |
Structure to map (script) strings and integer (enum) values.
typedef enum model_script_s model_script_t |
anonymous enum |
enum model_script_s |
CASSERT | ( | lengthof(air_slot_type_strings) | = =MAX_ACITEMS |
) |
CASSERT | ( | lengthof(vt_aligns) | = =V_NUM_TYPES |
) |
CASSERT | ( | lengthof(vt_sizes) | = =V_NUM_TYPES |
) |
CASSERT | ( | lengthof(fade_names) | = =FADE_LAST |
) |
CASSERT | ( | lengthof(style_names) | = =STYLE_LAST |
) |
CASSERT | ( | lengthof(blend_names) | = =BLEND_LAST |
) |
CASSERT | ( | lengthof(align_names) | = =ALIGN_LAST |
) |
CASSERT | ( | lengthof(vt_names) | = =V_NUM_TYPES |
) |
static void Com_AddObjectLinks | ( | void | ) | [static] |
Creates links to other items (i.e. ammo<->weapons).
< Use this so we do not change the original popupListData pointer.
Definition at line 3158 of file scripts.c.
References AC_ITEM_WEAPON, objDef_s::ammos, byte, objDef_s::craftitem, csi, linkedList_s::data, objDef_s::fd, i, objDef_s::id, id, INVSH_GetItemByID(), INVSH_GetItemByIDX(), LIST_Delete(), m, MAX_AMMOS_PER_OBJDEF, linkedList_s::next, objDef_s::numAmmos, objDef_s::numFiredefs, csi_s::numODs, objDef_s::numWeapons, fireDef_s::obj, csi_s::ods, Sys_Error(), craftitem_s::type, objDef_s::weapon, and objDef_s::weapons.
Referenced by Com_ParseScripts().
void* Com_AlignPtr | ( | void * | memory, | |
valueTypes_t | type | |||
) |
Align a memory to use a natural address for the data type we will write.
Definition at line 449 of file scripts.c.
References Sys_Error(), V_NULL, and V_NUM_TYPES.
Referenced by CL_ParsePtlCmds(), UI_InitRawActionValue(), and UI_ParseProperty().
static const char* Com_ConstIntGetVariable | ( | const char * | name | ) | [static] |
Will extract the variable from a string<=>int mapping string which contain a namespace.
name | The name of the script entry to map to an integer |
NULL
otherwise Definition at line 53 of file scripts.c.
Referenced by Com_GetConstInt(), Com_RegisterConstInt(), and Com_UnregisterConstVariable().
humanAircraftType_t Com_DropShipShortNameToID | ( | const char * | token | ) |
Translate DropShip type to short name.
Definition at line 3069 of file scripts.c.
References Com_ParseValue(), and V_AIRCRAFTTYPE.
Referenced by BS_AddAircraftToMarket(), BS_GetAircraftBuyingPrice(), BS_GetAircraftOnMarket(), BS_GetAircraftSellingPrice(), BS_LoadXML(), BS_RemoveAircraftFromMarket(), and Com_ParseEquipment().
const char* Com_DropShipTypeToShortName | ( | humanAircraftType_t | type | ) |
Translate DropShip type to short name.
Definition at line 3081 of file scripts.c.
References Com_ValueToStr(), and V_AIRCRAFTTYPE.
Referenced by B_SetUpFirstBase(), BS_InitMarket(), BS_SaveXML(), CL_CampaignRunMarket(), and GAME_InitMenuOptions().
const char* Com_EParse | ( | const char ** | text, | |
const char * | errhead, | |||
const char * | errinfo | |||
) |
Parsing function that prints an error message when there is no text in the buffer.
Definition at line 275 of file scripts.c.
References Com_Parse(), and Com_Printf().
Referenced by AIR_ParseAircraft(), B_ParseBaseTemplate(), B_ParseBuildings(), CL_ParseAlienTeam(), CL_ParseCampaign(), CL_ParseCampaignEvents(), CL_ParseCities(), CL_ParseComponents(), CL_ParseCustomSkin(), CL_ParseEventMails(), CL_ParseLanguages(), CL_ParseMapDefinition(), CL_ParseNations(), CL_ParseParticle(), CL_ParsePtlCmds(), CL_ParseRanks(), CL_ParseResearchableCampaignStates(), CL_ParseResearchedCampaignItems(), CL_ParseSalary(), CL_ParseSequence(), CL_ParseTipsOfTheDay(), Com_ParseActorModels(), Com_ParseActorNames(), Com_ParseActorSounds(), Com_ParseArmourOrResistance(), Com_ParseCharacterTemplate(), Com_ParseDamageTypes(), Com_ParseEquipment(), Com_ParseFire(), Com_ParseGameTypes(), Com_ParseInventory(), Com_ParseItem(), Com_ParseTeam(), Com_ParseTerrain(), Com_ParseUGVs(), INS_ParseInstallations(), M_ParseMusic(), MSO_ParseCategories(), MSO_ParseSettings(), RS_ParseTechnologies(), SV_GetCvarToken(), SV_GetTileFromTileSet(), SV_ParseAssembly(), SV_ParseMapTile(), SV_ParseMapTileSet(), TUT_ParseTutorials(), UI_ParseActionList(), UI_ParseCallAction(), UI_ParseEventProperty(), UI_ParseExcludeRect(), UI_ParseFont(), UI_ParseNode(), UI_ParseNodeBody(), UI_ParseNodeProperties(), UI_ParseProperty(), UI_ParseSetAction(), UI_ParseUIModel(), and UP_ParseChapters().
int Com_EParseValue | ( | void * | base, | |
const char * | token, | |||
valueTypes_t | type, | |||
int | ofs, | |||
size_t | size | |||
) |
menu exampleName { string "_this is translatable" }
Definition at line 864 of file scripts.c.
References Com_ParseValue(), Com_Printf(), RESULT_ERROR, RESULT_OK, RESULT_WARNING, and Sys_Error().
Referenced by AIR_ParseAircraft(), B_ParseBaseTemplate(), B_ParseBuildings(), CL_ParseAlienTeam(), CL_ParseCampaign(), CL_ParseCampaignEvents(), CL_ParseCities(), CL_ParseCustomSkin(), CL_ParseEventMails(), CL_ParseMapDefinition(), CL_ParseMapParticle(), CL_ParseNations(), CL_ParsePtlCmds(), CL_ParseRanks(), CL_ParseSalary(), CL_SpawnParseEntitystring(), Com_ParseCharacterTemplate(), Com_ParseEquipment(), Com_ParseFire(), Com_ParseGameTypes(), Com_ParseInventory(), Com_ParseItem(), Com_ParseTeam(), Com_ParseTerrain(), Com_ParseUGVs(), INS_ParseInstallations(), RS_ParseTechnologies(), SEQ_Execute2Dobj(), SEQ_ExecuteCamera(), SEQ_ExecuteModel(), TUT_ParseTutorials(), UI_InitRawActionValue(), UI_ParseExcludeRect(), UI_ParseFont(), and UI_ParseUIModel().
const char* Com_GetActorSound | ( | teamDef_t * | td, | |
int | gender, | |||
actorSound_t | soundType | |||
) |
Returns the actor sounds for a given category.
[in] | td | teamDef pointer |
[in] | gender | The gender of the actor |
[in] | soundType | Which sound category (actorSound_t) |
Definition at line 2154 of file scripts.c.
References Com_DPrintf(), linkedList_s::data, DEBUG_CLIENT, DEBUG_SOUND, teamDef_s::id, NAME_LAST, linkedList_s::next, teamDef_s::numSounds, random, and teamDef_s::sounds.
Referenced by CL_ActorPlaySound().
const chrTemplate_t* Com_GetCharacterTemplateByID | ( | const char * | chrTemplate | ) |
Returns the chrTemplate pointer for the given id - or NULL if not found in the chrTemplates array.
[in] | team | The character template id (given in ufo-script files) |
Definition at line 2626 of file scripts.c.
References csi_s::chrTemplates, Com_Printf(), csi, i, chrTemplate_s::id, and csi_s::numChrTemplates.
Referenced by Com_ParseTeam().
void Com_GetCharacterValues | ( | const char * | teamDefition, | |
character_t * | chr | |||
) |
Assign character values, 3D models and names to a character.
[in] | teamDefition | The team definition id to use to generate the character values. |
[in,out] | chr | The character that should get the paths to the different models/skins. |
Definition at line 2208 of file scripts.c.
References ACTOR_SIZE_INVALID, ACTOR_SIZE_NORMAL, character_s::body, Com_Error(), Com_GetTeamDefinitionByID(), Com_GiveModel(), Com_GiveName(), ERR_DROP, character_s::fieldSize, character_s::gender, character_s::head, MODEL_BODY, MODEL_HEAD, MODEL_PATH, MODEL_SKIN, character_s::name, NAME_LAST, character_s::path, Q_strcat(), Q_strncpyz(), teamDef_s::size, character_s::skin, and character_s::teamDef.
Referenced by CL_GenerateCharacter(), and SV_InitGameProgs().
qboolean Com_GetConstInt | ( | const char * | name, | |
int * | value | |||
) |
Searches whether a given value was registered as a string to int mapping.
[in] | name | The name of the string mapping (maybe including a namespace) |
[out] | value | The mapped integer if found, not touched if the given string was found in the registered values. |
Definition at line 70 of file scripts.c.
References Com_ConstIntGetVariable(), Com_HashKey(), CONSTNAMEINT_HASH_SIZE, com_constNameInt_s::fullname, hash(), com_constNameInt_s::hash_next, com_constNameInt_s::name, qfalse, qtrue, and com_constNameInt_s::value.
Referenced by Com_GetConstIntFromNamespace(), Com_ParseValue(), CP_LoadInterestsXML(), SV_InitGameProgs(), and testConstInt().
qboolean Com_GetConstIntFromNamespace | ( | const char * | space, | |
const char * | variable, | |||
int * | value | |||
) |
Searches whether a given value was registered as a string to int mapping.
[in] | space | The namespace of the mapping variable |
[in] | variable | The name of the string mapping |
[out] | value | The mapped integer if found, not touched if the given string was found in the registered values. |
Definition at line 103 of file scripts.c.
References Com_GetConstInt(), qfalse, and va().
Referenced by AIR_LoadAircraftXML(), B_LoadXML(), CL_LoadCharacterXML(), CP_LoadMissionsXML(), E_LoadXML(), INS_LoadXML(), MS_LoadXML(), RS_LoadXML(), SV_InitGameProgs(), and US_LoadXML().
const char* Com_GetConstVariable | ( | const char * | space, | |
int | value | |||
) |
Searches the mapping variable for a given integer value and a namespace.
[in] | value | The mapped integer |
[in] | namespace | The namespace to search in - might not be NULL or empty. |
Definition at line 122 of file scripts.c.
References com_constNameInt_s::fullname, com_constNameInt_s::name, com_constNameInt_s::next, and com_constNameInt_s::value.
Referenced by AIR_SaveAircraftXML(), B_SaveXML(), CL_SaveCharacterXML(), CP_SaveInterestsXML(), CP_SaveMissionsXML(), E_SaveXML(), INS_SaveXML(), MS_MessageSaveXML(), RS_SaveXML(), SV_InitGameProgs(), testConstInt(), and US_SaveXML().
const char* Com_GetLastParseError | ( | void | ) |
Returns the last error message
Definition at line 440 of file scripts.c.
Referenced by UI_NodeSetProperty(), and UI_ParseProperty().
const char* Com_GetRandomMapAssemblyNameForCraft | ( | const char * | craftID | ) |
Returns the name of an aircraft or an ufo that is used in the ump files for the random map assembly.
Definition at line 3058 of file scripts.c.
References va().
Referenced by CP_CreateBattleParameters(), GAME_InitMenuOptions(), GAME_SK_HideDropships(), and GAME_SK_HideUFOs().
int Com_GetScriptChecksum | ( | void | ) |
Definition at line 3298 of file scripts.c.
References Com_BlockChecksum(), FS_GetFileData(), and LittleLong().
Referenced by CL_CanMultiplayerStart(), and SV_Map().
teamDef_t* Com_GetTeamDefinitionByID | ( | const char * | team | ) |
Returns the teamDef pointer for the searched team id - or NULL if not found in the teamDef array.
[in] | team | The team id (given in ufo-script files) |
Definition at line 2188 of file scripts.c.
References Com_Printf(), csi, i, teamDef_s::id, csi_s::numTeamDefs, and csi_s::teamDef.
Referenced by AC_LoadXML(), AIR_LoadAircraftXML(), CL_LoadCharacterXML(), CL_ParseAlienTeam(), Com_GetCharacterValues(), GAME_ItemIsUseable(), and RS_AssignTechLinks().
const terrainType_t* Com_GetTerrainType | ( | const char * | textureName | ) |
Searches the terrain definition if given.
[in] | textureName | The terrain definition id from script files which is the texture name relative to base/textures |
Definition at line 2792 of file scripts.c.
References Com_HashKey(), hash(), terrainType_s::hash_next, TERRAIN_HASH_SIZE, and terrainType_s::texture.
Referenced by Com_ParseTerrain(), LE_PlaySoundFileAndParticleForSurface(), SV_GetBounceFraction(), and SV_GetFootstepSound().
const ugv_t* Com_GetUGVByID | ( | const char * | ugvID | ) |
Searches an UGV definition by a given script id and returns the pointer to the global data.
[in] | ugvID | The script id of the UGV definition you are looking for |
Definition at line 3144 of file scripts.c.
References Com_GetUGVByIDSilent(), Com_Printf(), csi, and csi_s::numUGV.
Referenced by E_InitialEmployees().
const ugv_t* Com_GetUGVByIDSilent | ( | const char * | ugvID | ) |
Searches an UGV definition by a given script id and returns the pointer to the global data.
[in] | ugvID | The script id of the UGV definition you are looking for |
Definition at line 3124 of file scripts.c.
References csi, i, ugv_s::id, csi_s::numUGV, and csi_s::ugvs.
Referenced by Com_GetUGVByID(), E_LoadXML(), and UP_Article().
static const char* Com_GiveModel | ( | int | type, | |
int | gender, | |||
const teamDef_t * | td | |||
) | [static] |
[in] | type | MODEL_PATH, MODEL_BODY, MODEL_HEAD, MODEL_SKIN (path, body, head, skin - see team_*.ufo) |
[in] | gender | 1 (female) or 2 (male) |
[in] | td | The team definition |
Definition at line 2123 of file scripts.c.
References Com_Printf(), linkedList_s::data, teamDef_s::id, MODEL_NUM_TYPES, teamDef_s::models, linkedList_s::next, and teamDef_s::numModels.
Referenced by Com_GetCharacterValues().
static const char* Com_GiveName | ( | int | gender, | |
const teamDef_t * | td | |||
) | [static] |
[in] | gender | 1 (female) or 2 (male) |
[in] | td | The team definition to get the name from |
Definition at line 2086 of file scripts.c.
References Com_DPrintf(), linkedList_s::data, DEBUG_ENGINE, teamDef_s::id, name, NAME_NUM_TYPES, teamDef_s::names, linkedList_s::next, teamDef_s::numNames, and Sys_Error().
Referenced by Com_GetCharacterValues().
static void Com_ParseActorModels | ( | const char * | name, | |
const char ** | text, | |||
teamDef_t * | td | |||
) | [static] |
Parses "actors" definition from team_* ufo script files.
Definition at line 2346 of file scripts.c.
References Com_EParse(), Com_Parse(), Com_Printf(), i, teamDef_s::id, LIST_AddString(), teamDef_s::models, NAME_NUM_TYPES, teamDef_s::numModels, and Sys_Error().
Referenced by Com_ParseTeam().
static void Com_ParseActorNames | ( | const char * | name, | |
const char ** | text, | |||
teamDef_t * | td | |||
) | [static] |
Parses "name" definition from team_* ufo script files.
Definition at line 2271 of file scripts.c.
References Com_EParse(), Com_Parse(), Com_Printf(), i, teamDef_s::id, LIST_AddString(), NAME_FEMALE, NAME_FEMALE_LAST, NAME_LAST, NAME_MALE, NAME_MALE_LAST, NAME_NEUTRAL, NAME_NUM_TYPES, teamDef_s::names, teamDef_s::numNames, and Sys_Error().
Referenced by Com_ParseTeam().
static void Com_ParseActorSounds | ( | const char * | name, | |
const char ** | text, | |||
teamDef_t * | td | |||
) | [static] |
Parses "actorsounds" definition from team_* ufo script files.
Definition at line 2425 of file scripts.c.
References Com_EParse(), Com_Parse(), Com_Printf(), i, LIST_AddString(), NAME_LAST, NAME_NUM_TYPES, teamDef_s::numSounds, SND_DEATH, SND_HURT, and teamDef_s::sounds.
Referenced by Com_ParseTeam().
static void Com_ParseArmourOrResistance | ( | const char * | name, | |
const char ** | text, | |||
short * | ad, | |||
qboolean | rating | |||
) | [static] |
Parses the armour definitions or the team resistance values from script files. The protection and rating values.
Definition at line 1575 of file scripts.c.
References Com_EParse(), Com_Parse(), Com_Printf(), csi, csi_s::dts, i, damageType_s::id, csi_s::numDTs, damageType_s::showInMenu, and Sys_Error().
Referenced by Com_ParseItem(), and Com_ParseTeam().
qboolean Com_ParseBoolean | ( | const char * | token | ) |
Parses a boolean from a string.
token | The token to convert into a boolean |
false
if the string could not get parsed Definition at line 895 of file scripts.c.
References Com_ParseValue(), qfalse, RESULT_ERROR, and V_BOOL.
Referenced by GAME_CP_Results_f(), and HUD_RemainingTUs_f().
static void Com_ParseCharacterTemplate | ( | const char * | name, | |
const char ** | text | |||
) | [static] |
Parses character templates from scripts.
Definition at line 2712 of file scripts.c.
References csi_s::chrTemplates, Com_EParse(), Com_EParseValue(), Com_Parse(), Com_Printf(), csi, i, chrTemplate_s::id, MAX_CHARACTER_TEMPLATES, csi_s::numChrTemplates, Q_strncpyz(), chrTemplate_s::rate, SKILL_NUM_TYPES, chrTemplate_s::skills, Sys_Error(), and V_INT2.
Referenced by Com_ParseScripts().
static void Com_ParseDamageTypes | ( | const char * | name, | |
const char ** | text | |||
) | [static] |
Definition at line 2970 of file scripts.c.
References Com_DPrintf(), Com_EParse(), Com_Parse(), Com_Printf(), csi, csi_s::damBlast, csi_s::damFire, csi_s::damLaser, csi_s::damNormal, csi_s::damParticle, csi_s::damPlasma, csi_s::damShock, csi_s::damStunElectro, csi_s::damStunGas, DEBUG_CLIENT, csi_s::dts, i, damageType_s::id, MAX_DAMAGETYPES, csi_s::numDTs, Q_strncpyz(), qtrue, damageType_s::showInMenu, and Sys_Error().
Referenced by Com_ParseScripts().
static void Com_ParseEquipment | ( | const char * | name, | |
const char ** | text | |||
) | [static] |
Definition at line 1975 of file scripts.c.
References Com_DropShipShortNameToID(), Com_EParse(), Com_EParseValue(), Com_Parse(), Com_Printf(), csi, csi_s::eds, i, objDef_s::id, objDef_s::idx, INVSH_GetItemByID(), MAX_EQUIPDEFS, equipDef_s::name, equipDef_s::numAircraft, csi_s::numEDs, equipDef_s::numItems, value_s::ofs, Q_strncpyz(), value_s::size, value_s::string, Sys_Error(), and value_s::type.
Referenced by Com_ParseScripts().
static void Com_ParseFire | ( | const char * | name, | |
const char ** | text, | |||
fireDef_t * | fd | |||
) | [static] |
Definition at line 1496 of file scripts.c.
References ABILITY_NUM_TYPES, Com_EParse(), Com_EParseValue(), Com_Parse(), Com_Printf(), fireDef_s::fireAttenuation, fireDef_s::impactAttenuation, value_s::ofs, Q_strcasecmp, fireDef_s::range, value_s::size, SKILL_NUM_TYPES, SOUND_ATTN_MAX, SOUND_ATTN_NONE, fireDef_s::splrad, value_s::string, value_s::type, UNIT_SIZE, and fireDef_s::weaponSkill.
Referenced by Com_ParseItem().
static void Com_ParseGameTypes | ( | const char * | name, | |
const char ** | text | |||
) | [static] |
Definition at line 2886 of file scripts.c.
References Com_EParse(), Com_EParseValue(), Com_Parse(), Com_Printf(), gametype_s::cvars, FS_SkipBlock(), gt, i, gametype_s::id, MAX_CVARLISTINGAMETYPE, MAX_GAMETYPES, MAX_VAR, cvarlist_s::name, gametype_s::num_cvars, value_s::ofs, Q_strncpyz(), value_s::size, value_s::string, Sys_Error(), value_s::type, and cvarlist_s::value.
Referenced by Com_ParseScripts().
static void Com_ParseInventory | ( | const char * | name, | |
const char ** | text | |||
) | [static] |
Definition at line 1847 of file scripts.c.
References Com_EParse(), Com_EParseValue(), Com_Parse(), Com_Printf(), csi, i, invDef_s::id, id, csi_s::idArmour, csi_s::idBackpack, csi_s::idBelt, csi_s::idEquip, csi_s::idExtension, csi_s::idFloor, csi_s::idHeadgear, csi_s::idHolster, csi_s::idLeft, csi_s::idRight, csi_s::ids, MAX_INVDEFS, invDef_s::name, csi_s::numIDs, value_s::ofs, Q_strcasecmp, Q_strncpyz(), value_s::size, value_s::string, Sys_Error(), and value_s::type.
Referenced by Com_ParseScripts().
static void Com_ParseItem | ( | const char * | name, | |
const char ** | text | |||
) | [static] |
Parses weapon, equipment, craft items and armour.
< default is no craftitem
Store the current item-pointer and the weapon id for later linking of the "weapon" pointers
Definition at line 1645 of file scripts.c.
References byte, Com_DPrintf(), Com_EParse(), Com_EParseValue(), Com_Parse(), Com_ParseArmourOrResistance(), Com_ParseFire(), Com_Printf(), objDef_s::craftitem, csi, DEBUG_SHARED, objDef_s::fd, fireDef_s::fdIdx, fireDef_s::fireAttenuation, i, objDef_s::id, objDef_s::idx, fireDef_s::impactAttenuation, INVSH_GetItemByIDSilent(), LIST_Add(), LIST_AddPointer(), LIST_AddString(), MAX_ACITEMS, MAX_FIREDEFS_PER_WEAPON, MAX_OBJDEFS, MAX_WEAPONS_PER_OBJDEF, objDef_s::numFiredefs, csi_s::numODs, objDef_s::numWeapons, OD_PROTECTION, OD_RATINGS, OD_WEAPON, csi_s::ods, value_s::ofs, objDef_s::protection, Q_strcasecmp, Q_strncpyz(), qfalse, qtrue, objDef_s::ratings, objDef_s::shape, SHAPE_SMALL_MAX_HEIGHT, SHAPE_SMALL_MAX_WIDTH, value_s::size, SOUND_ATTN_NORM, value_s::string, objDef_s::sx, objDef_s::sy, Sys_Error(), value_s::type, craftitem_s::type, V_NULL, and fireDef_s::weapFdsIdx.
Referenced by Com_ParseScripts().
void Com_ParseScripts | ( | qboolean | onlyServer | ) |
Definition at line 3221 of file scripts.c.
References CL_ParseClientData(), Com_AddObjectLinks(), Com_ParseCharacterTemplate(), Com_ParseDamageTypes(), Com_ParseEquipment(), Com_ParseGameTypes(), Com_ParseInventory(), Com_ParseItem(), Com_ParseTeam(), Com_ParseTerrain(), Com_ParseUGVs(), Com_ParseVersion(), Com_Printf(), csi, csi_s::damBlast, csi_s::damFire, csi_s::damLaser, csi_s::damNormal, csi_s::damParticle, csi_s::damPlasma, csi_s::damShock, csi_s::damStunElectro, csi_s::damStunGas, FS_BuildFileList(), FS_NextScriptHeader(), csi_s::idArmour, csi_s::idBackpack, csi_s::idBelt, csi_s::idEquip, csi_s::idExtension, csi_s::idFloor, csi_s::idHeadgear, csi_s::idHolster, csi_s::idLeft, csi_s::idRight, INVSH_InitCSI(), name, NONE, csi_s::numDTs, csi_s::numEDs, csi_s::numIDs, csi_s::numODs, csi_s::numTeamDefs, Sys_Error(), and versionParsed.
Referenced by Qcommon_Init(), and UFO_InitSuiteInventory().
static void Com_ParseTeam | ( | const char * | name, | |
const char ** | text | |||
) | [static] |
Definition at line 2501 of file scripts.c.
References teamDef_s::armour, teamDef_s::characterTemplates, Com_DPrintf(), Com_EParse(), Com_EParseValue(), Com_GetCharacterTemplateByID(), Com_Parse(), Com_ParseActorModels(), Com_ParseActorNames(), Com_ParseActorSounds(), Com_ParseArmourOrResistance(), Com_Printf(), csi, teamDef_s::deathTextureName, DEBUG_CLIENT, FS_SkipBlock(), i, chrTemplate_s::id, teamDef_s::id, teamDef_s::idx, INVSH_GetItemByID(), MAX_DEATH, MAX_TEAMDEFS, csi_s::numTeamDefs, teamDef_s::numTemplates, value_s::ofs, teamDef_s::onlyWeapon, Q_strncpyz(), qfalse, qtrue, teamDef_s::resistance, value_s::size, value_s::string, Sys_Error(), td, csi_s::teamDef, value_s::type, va(), and teamDef_s::weapons.
Referenced by Com_ParseScripts().
static void Com_ParseTerrain | ( | const char * | name, | |
const char ** | text | |||
) | [static] |
Parses "terrain" definition from script files.
Definition at line 2812 of file scripts.c.
References terrainType_s::bounceFraction, Com_EParse(), Com_EParseValue(), com_genericPool, Com_GetTerrainType(), Com_HashKey(), Com_Parse(), Com_Printf(), terrainType_s::footStepVolume, hash(), terrainType_s::hash_next, Mem_PoolAlloc, Mem_PoolStrDup, Mem_PoolStrDupTo, value_s::ofs, value_s::size, SND_VOLUME_FOOTSTEPS, value_s::string, TERRAIN_HASH_SIZE, terrainType_s::texture, value_s::type, and V_STRING.
Referenced by Com_ParseScripts().
static void Com_ParseUGVs | ( | const char * | name, | |
const char ** | text | |||
) | [static] |
Parse 2x2 units (e.g. UGVs).
Definition at line 2653 of file scripts.c.
References Com_EParse(), Com_EParseValue(), com_genericPool, Com_Parse(), Com_Printf(), csi, i, ugv_s::id, ugv_s::idx, MAX_UGV, Mem_PoolStrDup, csi_s::numUGV, value_s::ofs, value_s::size, value_s::string, value_s::type, and csi_s::ugvs.
Referenced by Com_ParseScripts().
int Com_ParseValue | ( | void * | base, | |
const char * | token, | |||
valueTypes_t | type, | |||
int | ofs, | |||
size_t | size, | |||
size_t * | writtenBytes | |||
) |
Parse a value from a string.
[in] | base | The start pointer to a given data type (typedef, struct) where the parsed data is stored |
[in] | token | The data which should be parsed |
[in] | type | The data type that should be parsed |
[in] | ofs | The offset for the value |
[in] | size | The expected size of the data type. If 0, no checks are done |
[out] | writtenBytes |
Definition at line 472 of file scripts.c.
References ALIGN_LAST, BLEND_LAST, byte, Com_GetConstInt(), csi, DAYS_PER_YEAR, DROPSHIP_FIREBIRD, DROPSHIP_HERAKLES, DROPSHIP_RAPTOR, csi_s::dts, f, FADE_LAST, i, damageType_s::id, int(), INTERCEPTOR_DRAGON, INTERCEPTOR_SARACEN, INTERCEPTOR_STARCHASER, INTERCEPTOR_STILETTO, INTERCEPTOR_STINGRAY, MAX_VAR, csi_s::numDTs, Q_strncpyz(), qfalse, qtrue, RACE_BLOODSPIDER, RACE_CIVILIAN, RACE_ORTNOK, RACE_PHALANX_HUMAN, RACE_ROBOT, RACE_SHEVAAR, RACE_TAMAN, RESULT_ERROR, RESULT_OK, RESULT_WARNING, SECONDS_PER_HOUR, SHAPE_BIG_MAX_HEIGHT, SHAPE_BIG_MAX_WIDTH, SHAPE_SMALL_MAX_HEIGHT, SHAPE_SMALL_MAX_WIDTH, STYLE_LAST, Sys_Error(), TEAM_ALIEN, TEAM_CIVILIAN, TEAM_PHALANX, UFO_BOMBER, UFO_CARRIER, UFO_CORRUPTER, UFO_FIGHTER, UFO_GUNBOAT, UFO_HARVESTER, UFO_MOTHERSHIP, UFO_RIPPER, UFO_SCOUT, UFO_SIZE_T, UFO_SUPPLY, V_AIRCRAFTTYPE, V_ALIGN, V_BLEND, V_BOOL, V_CHAR, V_CLIENT_HUNK, V_CLIENT_HUNK_STRING, V_COLOR, V_DATE, V_DMGTYPE, V_DMGWEIGHT, V_FADE, V_FLOAT, V_INT, V_INT2, V_LONGSTRING, V_NULL, V_POS, V_RACE, V_RELABS, V_RGBA, V_SHAPE_BIG, V_SHAPE_SMALL, V_STRING, V_STYLE, V_TEAM, V_TRANSLATION_STRING, V_UFO, V_UFOCRASHED, and V_VECTOR.
Referenced by Com_DropShipShortNameToID(), Com_EParseValue(), Com_ParseBoolean(), Com_UFOShortNameToID(), UI_MaterialEditorChangeValue_f(), UI_NodeSetProperty(), UI_ParseProperty(), and UI_PushDropDownWindow_f().
static void Com_ParseVersion | ( | const char * | version | ) | [static] |
Definition at line 294 of file scripts.c.
References qtrue, Sys_Error(), UFO_VERSION, and versionParsed.
Referenced by Com_ParseScripts().
void Com_RegisterConstInt | ( | const char * | name, | |
int | value | |||
) |
Register mappings between script strings and enum values for values of the type V_INT
.
name | The name of the script entry to map to an integer. This can also include a namespace prefix for the case we want to map back an integer to a string from a specific namespace. In case this string is equipped with a namespace, the string is in the form "namespace::variable" | |
value | The value to map the given name to |
Definition at line 204 of file scripts.c.
References com_aliasSysPool, Com_ConstIntGetVariable(), Com_HashKey(), Com_Printf(), CONSTNAMEINT_HASH_SIZE, com_constNameInt_s::fullname, hash(), com_constNameInt_s::hash_next, Mem_PoolAlloc, Mem_StrDup, com_constNameInt_s::name, com_constNameInt_s::next, Q_strncpyz(), and com_constNameInt_s::value.
Referenced by Com_RegisterConstList(), SV_InitGameProgs(), testConstInt(), UI_RegisterAbstractNode(), UI_RegisterBaseInventoryNode(), UI_RegisterPanelNode(), and UI_RegisterTextNode().
void Com_RegisterConstList | ( | const constListEntry_t | constList[] | ) |
Registers a list of string aliases.
[in] | constList | Array of string => int mappings. Must be terminated with a NULL string ({NULL, -1}) line |
Definition at line 263 of file scripts.c.
References Com_RegisterConstInt(), i, name, constListEntry_s::name, and com_constNameInt_s::value.
Referenced by AIR_LoadAircraftXML(), AIR_SaveAircraftXML(), B_LoadXML(), B_SaveXML(), CL_LoadCharacterXML(), CL_SaveCharacterXML(), CP_LoadInterestsXML(), CP_LoadMissionsXML(), CP_SaveInterestsXML(), CP_SaveMissionsXML(), E_LoadXML(), E_SaveXML(), INS_LoadXML(), INS_SaveXML(), MS_LoadXML(), MS_MessageSaveXML(), RS_LoadXML(), RS_SaveXML(), testConstInt(), US_LoadXML(), and US_SaveXML().
int Com_SetValue | ( | void * | base, | |
const void * | set, | |||
valueTypes_t | type, | |||
int | ofs, | |||
size_t | size | |||
) |
[in] | base | The start pointer to a given data type (typedef, struct) |
[in] | set | The data which should be parsed |
[in] | type | The data type that should be parsed |
[in] | ofs | The offset for the value |
[in] | size | The expected size of the data type. If 0, no checks are done |
Definition at line 918 of file scripts.c.
References byte, Com_Printf(), DROPSHIP_FIREBIRD, DROPSHIP_HERAKLES, DROPSHIP_RAPTOR, int(), INTERCEPTOR_DRAGON, INTERCEPTOR_SARACEN, INTERCEPTOR_STARCHASER, INTERCEPTOR_STILETTO, INTERCEPTOR_STINGRAY, len, MAX_VAR, Q_strncpyz(), qfalse, qtrue, RACE_BLOODSPIDER, RACE_CIVILIAN, RACE_ORTNOK, RACE_PHALANX_HUMAN, RACE_ROBOT, RACE_SHEVAAR, RACE_TAMAN, SHAPE_BIG_MAX_HEIGHT, SHAPE_SMALL_MAX_HEIGHT, Sys_Error(), TEAM_ALIEN, TEAM_CIVILIAN, TEAM_PHALANX, UFO_BOMBER, UFO_CARRIER, UFO_CORRUPTER, UFO_FIGHTER, UFO_GUNBOAT, UFO_HARVESTER, UFO_MOTHERSHIP, UFO_RIPPER, UFO_SCOUT, UFO_SIZE_T, UFO_SUPPLY, V_AIRCRAFTTYPE, V_ALIGN, V_BLEND, V_BOOL, V_CHAR, V_COLOR, V_DATE, V_DMGTYPE, V_DMGWEIGHT, V_FADE, V_FLOAT, V_INT, V_INT2, V_LONGSTRING, V_NULL, V_POS, V_RACE, V_RGBA, V_SHAPE_BIG, V_SHAPE_SMALL, V_STRING, V_STYLE, V_TEAM, V_UFO, V_UFOCRASHED, and V_VECTOR.
Referenced by CL_ParticleFunction(), and UI_NodeSetPropertyFromRAW().
const char* Com_UFOCrashedTypeToShortName | ( | ufoType_t | type | ) |
Translate UFO type to short name when UFO is crashed.
Definition at line 3113 of file scripts.c.
References Com_ValueToStr(), and V_UFOCRASHED.
Referenced by CP_CreateBattleParameters(), CP_MapIsSelectable(), and GAME_InitMenuOptions().
ufoType_t Com_UFOShortNameToID | ( | const char * | token | ) |
Translate UFO type to short name.
Definition at line 3091 of file scripts.c.
References Com_ParseValue(), and V_UFO.
Referenced by AIR_ParseAircraft().
const char* Com_UFOTypeToShortName | ( | ufoType_t | type | ) |
Translate UFO type to short name.
Definition at line 3104 of file scripts.c.
References Com_ValueToStr(), and V_UFO.
Referenced by CP_ChooseMap(), CP_CreateBattleParameters(), CP_MapIsSelectable(), CP_MissionBegin(), CP_SupplyMissionCreate(), GAME_InitMenuOptions(), NAT_ScriptSanityCheck(), UFO_GetTechnologyFromType(), and UFO_MissionResultToString().
qboolean Com_UnregisterConstList | ( | const constListEntry_t | constList[] | ) |
Unregisters a list of string aliases.
[in] | constList | Array of string => int mappings. Must be terminated with a NULL string ({NULL, -1}) line |
Definition at line 246 of file scripts.c.
References Com_UnregisterConstVariable(), i, name, constListEntry_s::name, and qtrue.
Referenced by AIR_LoadAircraftXML(), AIR_SaveAircraftXML(), B_LoadXML(), B_SaveXML(), CL_LoadCharacterXML(), CL_SaveCharacterXML(), CP_LoadInterestsXML(), CP_LoadMissionsXML(), CP_SaveInterestsXML(), CP_SaveMissionsXML(), E_LoadXML(), E_SaveXML(), INS_LoadXML(), INS_SaveXML(), MS_LoadXML(), MS_MessageSaveXML(), RS_LoadXML(), RS_SaveXML(), testConstInt(), US_LoadXML(), and US_SaveXML().
qboolean Com_UnregisterConstVariable | ( | const char * | name | ) |
Removes a registered constant from the script mapping hash table.
name | The name of the script entry to remove out of the const int hash. In case this string is equipped with a namespace, the string is in the form "namespace::variable". If you try to unregister a variable that was registered with a namespace, this namespace must be included in the given name, too. |
Definition at line 148 of file scripts.c.
References Com_ConstIntGetVariable(), Com_HashKey(), CONSTNAMEINT_HASH_SIZE, com_constNameInt_s::fullname, hash(), com_constNameInt_s::hash_next, Mem_Free, com_constNameInt_s::next, qfalse, and qtrue.
Referenced by Com_UnregisterConstList(), SV_InitGameProgs(), and testConstInt().
const char* Com_ValueToStr | ( | const void * | base, | |
const valueTypes_t | type, | |||
const int | ofs | |||
) |
[in] | base | The start pointer to a given data type (typedef, struct) |
[in] | type | The data type that should be parsed |
[in] | ofs | The offset for the value |
Definition at line 1150 of file scripts.c.
References ALIGN_LAST, BLEND_LAST, byte, Com_sprintf(), csi, DAYS_PER_YEAR, DROPSHIP_FIREBIRD, DROPSHIP_HERAKLES, DROPSHIP_RAPTOR, csi_s::dts, FADE_LAST, INTERCEPTOR_DRAGON, INTERCEPTOR_SARACEN, INTERCEPTOR_STARCHASER, INTERCEPTOR_STILETTO, INTERCEPTOR_STINGRAY, MAX_DAMAGETYPES, MAX_VAR, Q_strncpyz(), RACE_BLOODSPIDER, RACE_CIVILIAN, RACE_ORTNOK, RACE_PHALANX_HUMAN, RACE_ROBOT, RACE_SHEVAAR, RACE_TAMAN, STYLE_LAST, Sys_Error(), TEAM_ALIEN, TEAM_CIVILIAN, TEAM_PHALANX, UFO_BOMBER, UFO_CARRIER, UFO_CORRUPTER, UFO_FIGHTER, UFO_GUNBOAT, UFO_HARVESTER, UFO_MOTHERSHIP, UFO_RIPPER, UFO_SCOUT, UFO_SUPPLY, V_AIRCRAFTTYPE, V_ALIGN, V_BLEND, V_BOOL, V_CHAR, V_CLIENT_HUNK, V_CLIENT_HUNK_STRING, V_COLOR, V_DATE, V_DMGTYPE, V_DMGWEIGHT, V_FADE, V_FLOAT, V_INT, V_INT2, V_LONGSTRING, V_NULL, V_POS, V_RACE, V_RELABS, V_RGBA, V_SHAPE_BIG, V_SHAPE_SMALL, V_STRING, V_STYLE, V_TEAM, V_TRANSLATION_STRING, V_UFO, V_UFOCRASHED, and V_VECTOR.
Referenced by Com_DropShipTypeToShortName(), Com_UFOCrashedTypeToShortName(), Com_UFOTypeToShortName(), E_CreateEmployeeAtIndex(), MP_GetEquipment(), PTL_DebugList_f(), UI_GetReferenceString(), and UI_GetStringFromNodeProperty().
const char* const air_slot_type_strings[] |
{ "base_missile", "base_laser", "weapon", "shield", "electronics", "pilot", "ammo", "base_ammo_missile", "base_ammo_laser" }
List of valid strings for slot types.
Definition at line 1621 of file scripts.c.
Referenced by AIR_ParseAircraft().
const char* const align_names[] |
const char* const blend_names[] |
com_constNameInt_t* com_constNameInt [static] |
com_constNameInt_t* com_constNameInt_hash[CONSTNAMEINT_HASH_SIZE] [static] |
const value_t equipment_definition_vals[] [static] |
{ {"mininterest", V_INT, offsetof(equipDef_t, minInterest), 0}, {"maxinterest", V_INT, offsetof(equipDef_t, maxInterest), 0}, {NULL, 0, 0, 0} }
Valid equipment definition values from script files.
const char* const fade_names[] |
const value_t gameTypeValues[] [static] |
{ {"name", V_TRANSLATION_STRING, offsetof(gametype_t, name), 0}, {NULL, 0, 0, 0} }
possible gametype values for the gameserver (ufo-scriptfiles)
gametype_t gts[MAX_GAMETYPES] |
Definition at line 2877 of file scripts.c.
Referenced by Com_GameTypeList_f(), Com_SetGameType(), and GAME_MP_ChangeGametype_f().
{ {"shape", V_SHAPE_BIG, offsetof(invDef_t, shape), 0}, {"single", V_BOOL, offsetof(invDef_t, single), MEMBER_SIZEOF(invDef_t, single)}, {"scroll", V_BOOL, offsetof(invDef_t, scroll), MEMBER_SIZEOF(invDef_t, scroll)}, {"extension", V_BOOL, offsetof(invDef_t, extension), MEMBER_SIZEOF(invDef_t, extension)}, {"armour", V_BOOL, offsetof(invDef_t, armour), MEMBER_SIZEOF(invDef_t, armour)}, {"headgear", V_BOOL, offsetof(invDef_t, headgear), MEMBER_SIZEOF(invDef_t, headgear)}, {"all", V_BOOL, offsetof(invDef_t, all), MEMBER_SIZEOF(invDef_t, all)}, {"temp", V_BOOL, offsetof(invDef_t, temp), MEMBER_SIZEOF(invDef_t, temp)}, {"in", V_INT, offsetof(invDef_t, in), MEMBER_SIZEOF(invDef_t, in)}, {"out", V_INT, offsetof(invDef_t, out), MEMBER_SIZEOF(invDef_t, out)}, {NULL, 0, 0, 0} }
const char* const name_strings[NAME_NUM_TYPES] |
int numGTs = 0 |
Definition at line 2878 of file scripts.c.
Referenced by Com_GameTypeList_f(), Com_SetGameType(), and GAME_MP_ChangeGametype_f().
char parseErrorMessage[256] [static] |
linkedList_t* parseItemWeapons = NULL [static] |
const char* const skillNames[SKILL_NUM_TYPES+1] [static] |
const char* const style_names[] |
const value_t teamDefValues[] [static] |
{ {"tech", V_STRING, offsetof(teamDef_t, tech), 0}, {"name", V_TRANSLATION_STRING, offsetof(teamDef_t, name), 0}, {"armour", V_BOOL, offsetof(teamDef_t, armour), MEMBER_SIZEOF(teamDef_t, armour)}, {"weapons", V_BOOL, offsetof(teamDef_t, weapons), MEMBER_SIZEOF(teamDef_t, weapons)}, {"size", V_INT, offsetof(teamDef_t, size), MEMBER_SIZEOF(teamDef_t, size)}, {"hit_particle", V_STRING, offsetof(teamDef_t, hitParticle), 0}, {"death_texture", V_STRING, offsetof(teamDef_t, deathTextureName), 0}, {"race", V_RACE, offsetof(teamDef_t, race), MEMBER_SIZEOF(teamDef_t, race)}, {NULL, 0, 0, 0} }
possible teamdesc values (ufo-scriptfiles)
terrainType_t* terrainTypesHash[TERRAIN_HASH_SIZE] [static] |
const value_t terrainTypeValues[] [static] |
{ {"footstepsound", V_STRING, offsetof(terrainType_t, footStepSound), 0}, {"particle", V_STRING, offsetof(terrainType_t, particle), 0}, {"footstepvolume", V_FLOAT, offsetof(terrainType_t, footStepVolume), 0}, {"bouncefraction", V_FLOAT, offsetof(terrainType_t, bounceFraction), 0}, {NULL, 0, 0, 0} }
qboolean versionParsed [static] |
Definition at line 292 of file scripts.c.
Referenced by Com_ParseScripts(), and Com_ParseVersion().
const size_t vt_aligns[] [static] |
const char* const vt_names[] |
possible values for parsing functions
Definition at line 310 of file scripts.c.
Referenced by CL_ParsePtlCmds(), and CL_ParticleFunction().