mirror of
https://github.com/ioquake/jedi-academy.git
synced 2024-11-22 20:31:26 +00:00
64 lines
1.6 KiB
C
64 lines
1.6 KiB
C
// Filename:- fields.h
|
|
//
|
|
|
|
#ifndef FIELDS_H
|
|
#define FIELDS_H
|
|
|
|
//
|
|
// fields are needed for spawning from the entity string
|
|
// and saving / loading games
|
|
//
|
|
#define FFL_SPAWNTEMP 1
|
|
#define MAX_GHOULINST_SIZE 16384
|
|
|
|
#ifndef FOFS
|
|
#define FOFS(x) ((size_t)&(((gentity_t *)0)->x)) // usually already defined in qshared.h
|
|
#endif
|
|
#define STOFS(x) ((size_t)&(((spawn_temp_t *)0)->x))
|
|
#define LLOFS(x) ((size_t)&(((level_locals_t *)0)->x))
|
|
#define CLOFS(x) ((size_t)&(((gclient_t *)0)->x))
|
|
#define NPCOFS(x) ((size_t)&(((gNPC_t *)0)->x))
|
|
#define VHOFS(x) ((size_t)&(((Vehicle_t *)0)->x))
|
|
|
|
//
|
|
#define strFOFS(x) #x,FOFS(x)
|
|
#define strSTOFS(x) #x,STOFS(x)
|
|
#define strLLOFS(x) #x,LLOFS(x)
|
|
#define strCLOFS(x) #x,CLOFS(x)
|
|
#define strNPCOFS(x) #x,NPCOFS(x)
|
|
#define strVHICOFS(x) #x,VHOFS(x)
|
|
|
|
typedef enum
|
|
{
|
|
// F_INT,
|
|
// F_SHORT,
|
|
// F_FLOAT,
|
|
F_STRING, // string
|
|
// F_VECTOR,
|
|
F_NULL, // A ptr to null out
|
|
F_ITEM, // Item pointer handling
|
|
// F_MMOVE, // Mmove pointer handling
|
|
F_GCLIENT, // Client pointer handling
|
|
F_GENTITY, // gentity_t ptr handling
|
|
F_BOOLPTR, // Generic pointer that is recreated later, could be left alone, but clearer if only 0/1 rather than 0/alloc
|
|
|
|
F_BEHAVIORSET, // special scripting string ptr array handler
|
|
F_ALERTEVENT, // special handler for alertevent struct in level_locals_t
|
|
F_AIGROUPS, // some AI grouping stuff of Mike's
|
|
F_ANIMFILESETS, // animfileset animevent strings
|
|
|
|
F_GROUP,
|
|
F_VEHINFO,
|
|
F_IGNORE
|
|
} fieldtypeSAVE_t;
|
|
|
|
typedef struct
|
|
{
|
|
char *psName;
|
|
int iOffset;
|
|
fieldtypeSAVE_t eFieldType;
|
|
} save_field_t;
|
|
|
|
#endif // #ifndef FIELDS_H
|
|
|
|
//////////////////////// eof //////////////////////////
|