31 #define ALIGN_PTR(value,size) (void*)(((uintptr_t)value + (size - 1)) & (~(size - 1)))
34 #define MEMBER_SIZEOF(TYPE, MEMBER) sizeof(((TYPE*)0)->MEMBER)
41 #define V_BASETYPEMASK 0x3F
148 #define AIRCRAFT_NONE -1
149 #define UFO_NONE AIRCRAFT_NONE
155 #define AIR_SLOT_TYPE_STRINGS { \
163 "base_ammo_missile", \
177 return *
reinterpret_cast<T*
>(
reinterpret_cast<byte*
>(object) + value->
ofs);
182 return Com_GetValue<T>(
const_cast<void*
>(object), value);
192 int Com_SetValueDebug(
void* base,
const void* set,
valueTypes_t type,
int ofs,
size_t size,
const char* file,
int line);
193 #define Com_SetValue(base, set, type, ofs, size) Com_SetValueDebug(base, set, type, ofs, size, __FILE__, __LINE__)
213 #define SND_VOLUME_FOOTSTEPS 0.4f
246 const char*
Com_EParse(
const char** text,
const char* errhead,
const char* errinfo,
char* target = 0,
size_t size = 0);
258 #include "../game/q_shared.h"
list of script aliases to register
const char *const vt_names[]
possible values for parsing functions
void Com_ParseScripts(bool onlyServer)
const char *const longlines_names[]
bool Com_UnregisterConstVariable(const char *name)
Removes a registered constant from the script mapping hash table.
QGL_EXTERN GLint GLenum type
valueTypes_t
possible values for parsing functions
bool Com_GetConstIntFromNamespace(const char *space, const char *variable, int *value)
Searches whether a given value was registered as a string to int mapping.
short humanAircraftType_t
short Com_GetHumanAircraftIdsNum(void)
humanAircraftType_t Com_DropShipShortNameToID(const char *token)
Translate DropShip type to short name.
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 char *const fade_names[]
Defines a type of UGV/Robot.
bool Com_GetConstInt(const char *name, int *value)
Searches whether a given value was registered as a string to int mapping.
void Com_RegisterConstList(const constListEntry_t constList[])
Registers a list of string aliases.
const char *const name_strings[]
const char * Com_GetConstVariable(const char *space, int value)
Searches the mapping variable for a given integer value and a namespace.
bool Com_ParseBlock(const char *name, const char **text, void *base, const value_t *values, memPool_t *mempool)
int Com_SetValue(void *base, const void *set, valueTypes_t type, int ofs, size_t size)
void Com_RegisterConstInt(const char *name, int value)
Register mappings between script strings and enum values for values of the type V_INT.
ufoType_t Com_UFOShortNameToID(const char *token)
Translate short name to UFO type.
bool Com_ParseBlockToken(const char *name, const char **text, void *base, const value_t *values, memPool_t *mempool, const char *token)
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...
bool Com_ParseList(const char **text, linkedList_t **list)
const char * Com_UFOCrashedTypeToShortName(ufoType_t type)
Translate UFO type to short name when UFO is crashed.
const terrainType_t * Com_GetTerrainType(const char *textureName)
Searches the terrain definition if given.
const char *const align_names[]
align_t
We need this here for checking the boundaries from script values.
const char * Com_EParse(const char **text, const char *errhead, const char *errinfo, char *target=0, size_t size=0)
Parsing function that prints an error message when there is no text in the buffer.
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...
const char * Com_GetRandomMapAssemblyNameForCrashedCraft(const char *craftID)
T & Com_GetValue(void *const object, value_t const *const value)
void Com_GetCharacterValues(const char *teamDefition, character_t *chr)
Assign character values, 3D models and names to a character.
short Com_GetDropShipIdsNum(void)
const char * Com_GetLastParseError(void)
const char * Com_UFOTypeToShortName(ufoType_t type)
Translate UFO type to short name.
struct terrainType_s * hash_next
void * Com_AlignPtr(const void *memory, valueTypes_t type)
Align a memory to use a natural address for the data type we will write.
bool Com_ParseBoolean(const char *token)
Parses a boolean from a string.
bool Com_GetCharacterModel(character_t *chr)
struct constListEntry_s constListEntry_t
list of script aliases to register
int Com_EParseValue(void *base, const char *token, valueTypes_t type, int ofs, size_t size)
const char * Com_ValueToStr(const void *base, const valueTypes_t type, const int ofs)
short Com_GetUfoIdsNum(void)
bool Com_UnregisterConstList(const constListEntry_t constList[])
Unregisters a list of string aliases.
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
const char * Com_DropShipTypeToShortName(humanAircraftType_t type)
Translate DropShip type to short name.
struct terrainType_s terrainType_t
Different terrain definitions for footsteps and particles.
definitions common between client and server, but not game lib
const chrTemplate_t * Com_GetCharacterTemplateByID(const char *chrTemplate)
Returns the chrTemplate pointer for the given id - or nullptr if not found in the chrTemplates array...
Different terrain definitions for footsteps and particles.
const char * footstepSound
const teamDef_t * Com_GetTeamDefinitionByID(const char *team)
Returns the teamDef pointer for the searched team id - or nullptr if not found in the teamDef array...
const char *const blend_names[]
const char *const style_names[]
resultStatus_t 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_GetScriptChecksum(void)
Describes a character with all its attributes.