#include <tabula.h>
#define CPUSTRING "unknown"
#if(defined _M_IX86 || defined __i386__) && !defined C_ONLY && !defined __sun__
#define id386 1
#else
#define id386 0
#endif
#if defined _M_ALPHA && !defined C_ONLY
#define idaxp 1
#else
#define idaxp 0
#endif
typedef unsigned char byte;
#ifndef NULL
#define NULL ((void *)0)
#endif
#define PITCH 0
#define YAW 1
#define ROLL 2
#define MAX_STRING_CHARS 1024
#define MAX_STRING_TOKENS 80
#define MAX_TOKEN_CHARS 128
#define MAX_QPATH 64
#define MAX_OSPATH 128
#define MAX_CLIENTS 256
#define MAX_EDICTS 1024
#define MAX_LIGHTSTYLES 256
#define MAX_MODELS 256
#define MAX_SOUNDS 256
#define MAX_IMAGES 256
#define MAX_ITEMS 256
#define MAX_GENERAL (MAX_CLIENTS * 2)
#define PRINT_LOW 0
#define PRINT_MEDIUM 1
#define PRINT_HIGH 2
#define PRINT_CHAT 3
#define ERR_FATAL 0
#define ERR_DROP 1
#define ERR_DISCONNECT 2
#define PRINT_ALL 0
#define PRINT_DEVELOPER 1
#define PRINT_ALERT 2
typedef enum {
MULTICAST_ALL,
MULTICAST_PHS,
MULTICAST_PVS,
MULTICAST_ALL_R,
MULTICAST_PHS_R,
MULTICAST_PVS_R
} multicast_t;
typedef float vec_t;
typedef vec_t vec3_t[3];
typedef vec_t vec5_t[5];
typedef int fixed4_t;
typedef int fixed8_t;
typedef int fixed16_t;
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
struct cplane_s;
extern vec3_t vec3_origin;
#define nanmask (255 << 23)
#define IS_NAN(x) (((*(int *)&x) & nanmask) == nanmask)
#if !defined C_ONLY && !defined __linux__ && !defined __sgi
extern long Q_ftol(float f);
#else
#define Q_ftol(f) (long)(f)
#endif
#define DotProduct(x, y) (x[0] * y[0] + x[1] * y[1] + x[2] * y[2])
#define VectorSubtract(a, b, c) (c[0] = a[0] - b[0], c[1] = a[1] - b[1], c[2] = a[2] - b[2])
#define VectorAdd(a, b, c) (c[0] = a[0] + b[0], c[1] = a[1] + b[1], c[2] = a[2] + b[2])
#define VectorCopy(a, b) (b[0] = a[0], b[1] = a[1], b[2] = a[2])
#define VectorClear(a) (a[0] = a[1] = a[2] = 0)
#define VectorNegate(a, b) (b[0] = -a[0], b[1] = -a[1], b[2] = -a[2])
#define VectorSet(v, x, y, z) (v[0] = (x), v[1] = (y), v[2] = (z))
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc);
vec_t _DotProduct(vec3_t v1, vec3_t v2);
void _VectorSubtract(vec3_t veca, vec3_t vecb, vec3_t out);
void _VectorAdd(vec3_t veca, vec3_t vecb, vec3_t out);
void _VectorCopy(vec3_t in, vec3_t out);
void ClearBounds(vec3_t mins, vec3_t maxs);
void AddPointToBounds(vec3_t v, vec3_t mins, vec3_t maxs);
int VectorCompare(vec3_t v1, vec3_t v2);
vec_t VectorLength(vec3_t v);
void CrossProduct(vec3_t v1, vec3_t v2, vec3_t cross);
vec_t VectorNormalize(vec3_t v); vec_t VectorNormalize2(vec3_t v, vec3_t out);
void VectorInverse(vec3_t v);
void VectorScale(vec3_t in, vec_t scale, vec3_t out);
int Q_log2(int val);
void R_ConcatRotations(float in1[3][3], float in2[3][3], float out[3][3]);
void R_ConcatTransforms(float in1[3][4], float in2[3][4], float out[3][4]);
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up);
int BoxOnPlaneSide(vec3_t emins, vec3_t emaxs, struct cplane_s *plane);
float anglemod(float a);
float LerpAngle(float a1, float a2, float frac);
#define BOX_ON_PLANE_SIDE(emins, emaxs, p) \
(((p)->type < 3) ? (((p)->dist <= (emins)[(p)->type]) ? 1 : (((p)->dist >= (emaxs)[(p)->type]) ? 2 : 3)) \
: BoxOnPlaneSide((emins), (emaxs), (p)))
void ProjectPointOnPlane(vec3_t dst, const vec3_t p, const vec3_t normal);
void PerpendicularVector(vec3_t dst, const vec3_t src);
void RotatePointAroundVector(vec3_t dst, const vec3_t dir, const vec3_t point, float degrees);
char *COM_SkipPath(char *pathname);
void COM_StripExtension(char *in, char *out);
void COM_FileBase(char *in, char *out);
void COM_FilePath(char *in, char *out);
void COM_DefaultExtension(char *path, char *extension);
char *COM_Parse(const char **data_p);
void Com_sprintf(char *dest, int size, const char *fmt, ...);
void Com_PageInMemory(byte *buffer, int size);
int Q_stricmp(const char *s1, const char *s2);
int Q_strcasecmp(const char *s1, const char *s2);
int Q_strncasecmp(const char *s1, const char *s2, int n);
#if 0#else
static inline uint16_t Swap16(uint16_t x) { return __builtin_bswap16(x); }
static inline uint32_t Swap32(uint32_t x) { return __builtin_bswap32(x); }
static inline float SwapFloat(float x) {
union {
float f;
uint32_t i;
} _;
_.f = x;
_.i = Swap32(_.i);
return _.f;
}
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define BigShort(l) ((short)Swap16((uint16_t)(l)))
#define LittleShort(l) l
#define BigLong(l) ((int)Swap32((uint32_t)(l)))
#define LittleLong(l) l
#define BigFloat(l) SwapFloat(l)
#define LittleFloat(l) l
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define BigShort(l) l
#define LittleShort(l) ((short)Swap16((uint16_t)(l)))
#define BigLong(l) l
#define LittleLong(l) ((int)Swap32((uint32_t)(l)))
#define BigFloat(l) l
#define LittleFloat(l) SwapFloat(l)
#else
#error "invalid endian detection"
#endif
#endif
void Swap_Init(void);
char *va(char *format, ...);
#define MAX_INFO_KEY 64
#define MAX_INFO_VALUE 64
#define MAX_INFO_STRING 512
char *Info_ValueForKey(char *s, char *key);
void Info_RemoveKey(char *s, char *key);
void Info_SetValueForKey(char *s, char *key, char *value);
bool Info_Validate(char *s);
extern unsigned int curtime;
unsigned int Sys_Milliseconds(void);
void Sys_Mkdir(char *path);
struct HunkAllocator {
uint8_t *base;
uint64_t max_size;
uint64_t cur_size;
};
static inline void *HunkAllocator_Begin(struct HunkAllocator *hunk, int max_size) {
hunk->base = malloc(max_size);
hunk->max_size = max_size;
hunk->cur_size = 0;
return hunk->base;
}
static inline void *HunkAllocator_Alloc(struct HunkAllocator *hunk, int size) {
size = (size + 31) & ~31;
void *result = hunk->base + hunk->cur_size;
hunk->cur_size += size;
return result;
}
static inline int HunkAllocator_End(struct HunkAllocator *hunk) { return hunk->cur_size; }
static inline void HunkAllocator_Free(void *base) { free(base); }
#define SFF_ARCH 0x01
#define SFF_HIDDEN 0x02
#define SFF_RDONLY 0x04
#define SFF_SUBDIR 0x08
#define SFF_SYSTEM 0x10
char *Sys_FindFirst(const char *path, unsigned musthave, unsigned canthave);
char *Sys_FindNext(unsigned musthave, unsigned canthave);
void Sys_FindClose(void);
void Sys_Error(char *error, ...);
void Com_Printf(char *msg, ...);
#ifndef CVAR
#define CVAR
#define CVAR_ARCHIVE 1
#define CVAR_USERINFO 2
#define CVAR_SERVERINFO 4
#define CVAR_NOSET 8
#define CVAR_LATCH 16
typedef struct cvar_s {
char *name;
char *string;
char *latched_string; int flags;
bool modified; float value;
struct cvar_s *next;
} cvar_t;
#endif
enum cmodel_index { CMODEL_START, CMODEL_A = CMODEL_START, CMODEL_B, CMODEL_C, CMODEL_COUNT };
#define CONTENTS_SOLID 1
#define CONTENTS_WINDOW 2
#define CONTENTS_AUX 4
#define CONTENTS_LAVA 8
#define CONTENTS_SLIME 16
#define CONTENTS_WATER 32
#define CONTENTS_MIST 64
#define LAST_VISIBLE_CONTENTS 64
#define CONTENTS_AREAPORTAL 0x8000
#define CONTENTS_PLAYERCLIP 0x10000
#define CONTENTS_MONSTERCLIP 0x20000
#define CONTENTS_CURRENT_0 0x40000
#define CONTENTS_CURRENT_90 0x80000
#define CONTENTS_CURRENT_180 0x100000
#define CONTENTS_CURRENT_270 0x200000
#define CONTENTS_CURRENT_UP 0x400000
#define CONTENTS_CURRENT_DOWN 0x800000
#define CONTENTS_ORIGIN 0x1000000
#define CONTENTS_MONSTER 0x2000000
#define CONTENTS_DEADMONSTER 0x4000000
#define CONTENTS_DETAIL 0x8000000
#define CONTENTS_TRANSLUCENT 0x10000000
#define CONTENTS_LADDER 0x20000000
#define SURF_LIGHT 0x1
#define SURF_SLICK 0x2
#define SURF_SKY 0x4
#define SURF_WARP 0x8
#define SURF_TRANS33 0x10
#define SURF_TRANS66 0x20
#define SURF_FLOWING 0x40
#define SURF_NODRAW 0x80
#define MASK_ALL (-1)
#define MASK_SOLID (CONTENTS_SOLID | CONTENTS_WINDOW)
#define MASK_PLAYERSOLID (CONTENTS_SOLID | CONTENTS_PLAYERCLIP | CONTENTS_WINDOW | CONTENTS_MONSTER)
#define MASK_DEADSOLID (CONTENTS_SOLID | CONTENTS_PLAYERCLIP | CONTENTS_WINDOW)
#define MASK_MONSTERSOLID (CONTENTS_SOLID | CONTENTS_MONSTERCLIP | CONTENTS_WINDOW | CONTENTS_MONSTER)
#define MASK_WATER (CONTENTS_WATER | CONTENTS_LAVA | CONTENTS_SLIME)
#define MASK_OPAQUE (CONTENTS_SOLID | CONTENTS_SLIME | CONTENTS_LAVA)
#define MASK_SHOT (CONTENTS_SOLID | CONTENTS_MONSTER | CONTENTS_WINDOW | CONTENTS_DEADMONSTER)
#define MASK_CURRENT \
(CONTENTS_CURRENT_0 | CONTENTS_CURRENT_90 | CONTENTS_CURRENT_180 | CONTENTS_CURRENT_270 | CONTENTS_CURRENT_UP | \
CONTENTS_CURRENT_DOWN)
#define AREA_SOLID 1
#define AREA_TRIGGERS 2
typedef struct cplane_s {
vec3_t normal;
float dist;
byte type; byte signbits; byte pad[2];
} cplane_t;
#define CPLANE_NORMAL_X 0
#define CPLANE_NORMAL_Y 4
#define CPLANE_NORMAL_Z 8
#define CPLANE_DIST 12
#define CPLANE_TYPE 16
#define CPLANE_SIGNBITS 17
#define CPLANE_PAD0 18
#define CPLANE_PAD1 19
typedef struct cmodel_s {
vec3_t mins, maxs;
vec3_t origin; int headnode;
} cmodel_t;
typedef struct csurface_s {
char name[16];
int flags;
int value;
} csurface_t;
typedef struct mapsurface_s {
csurface_t c;
char rname[32];
} mapsurface_t;
typedef struct {
bool allsolid; bool startsolid; float fraction; vec3_t endpos; cplane_t plane; csurface_t *surface; int contents; struct edict_s *ent; } trace_t;
typedef enum {
PM_NORMAL,
PM_SPECTATOR,
PM_DEAD,
PM_GIB, PM_FREEZE
} pmtype_t;
#define PMF_DUCKED 1
#define PMF_JUMP_HELD 2
#define PMF_ON_GROUND 4
#define PMF_TIME_WATERJUMP 8
#define PMF_TIME_LAND 16
#define PMF_TIME_TELEPORT 32
#define PMF_NO_PREDICTION 64
typedef struct {
pmtype_t pm_type;
short origin[3]; short velocity[3]; byte pm_flags; byte pm_time; short gravity;
short delta_angles[3]; } pmove_state_t;
#define BUTTON_ATTACK 1
#define BUTTON_USE 2
#define BUTTON_ANY 128
typedef struct usercmd_s {
byte msec;
byte buttons;
short angles[3];
short forwardmove, sidemove, upmove;
byte impulse; byte lightlevel; } usercmd_t;
#define MAXTOUCH 32
typedef struct {
pmove_state_t s;
usercmd_t cmd;
bool snapinitial;
int numtouch;
struct edict_s *touchents[MAXTOUCH];
vec3_t viewangles; float viewheight;
vec3_t mins, maxs;
struct edict_s *groundentity;
int watertype;
int waterlevel;
int cmodel_index;
trace_t (*trace)(int cmodel_index, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end);
int (*pointcontents)(int cmodel_index, vec3_t point);
} pmove_t;
#define EF_ROTATE 0x00000001
#define EF_GIB 0x00000002
#define EF_BLASTER 0x00000008
#define EF_ROCKET 0x00000010
#define EF_GRENADE 0x00000020
#define EF_HYPERBLASTER 0x00000040
#define EF_BFG 0x00000080
#define EF_COLOR_SHELL 0x00000100
#define EF_POWERSCREEN 0x00000200
#define EF_ANIM01 0x00000400
#define EF_ANIM23 0x00000800
#define EF_ANIM_ALL 0x00001000
#define EF_ANIM_ALLFAST 0x00002000
#define EF_FLIES 0x00004000
#define EF_QUAD 0x00008000
#define EF_PENT 0x00010000
#define EF_TELEPORTER 0x00020000
#define EF_FLAG1 0x00040000
#define EF_FLAG2 0x00080000
#define EF_IONRIPPER 0x00100000
#define EF_GREENGIB 0x00200000
#define EF_BLUEHYPERBLASTER 0x00400000
#define EF_SPINNINGLIGHTS 0x00800000
#define EF_PLASMA 0x01000000
#define EF_TRAP 0x02000000
#define EF_TRACKER 0x04000000
#define EF_DOUBLE 0x08000000
#define EF_SPHERETRANS 0x10000000
#define EF_TAGTRAIL 0x20000000
#define EF_HALF_DAMAGE 0x40000000
#define EF_TRACKERTRAIL 0x80000000
#define RF_MINLIGHT 1
#define RF_VIEWERMODEL 2
#define RF_WEAPONMODEL 4
#define RF_FULLBRIGHT 8
#define RF_DEPTHHACK 16
#define RF_TRANSLUCENT 32
#define RF_FRAMELERP 64
#define RF_BEAM 128
#define RF_CUSTOMSKIN 256
#define RF_GLOW 512
#define RF_SHELL_RED 1024
#define RF_SHELL_GREEN 2048
#define RF_SHELL_BLUE 4096
#define RF_IR_VISIBLE 0x00008000
#define RF_SHELL_DOUBLE 0x00010000
#define RF_SHELL_HALF_DAM 0x00020000
#define RF_USE_DISGUISE 0x00040000
#define RDF_UNDERWATER 1
#define RDF_NOWORLDMODEL 2
#define RDF_IRGOGGLES 4
#define RDF_UVGOGGLES 8
#define MZ_BLASTER 0
#define MZ_MACHINEGUN 1
#define MZ_SHOTGUN 2
#define MZ_CHAINGUN1 3
#define MZ_CHAINGUN2 4
#define MZ_CHAINGUN3 5
#define MZ_RAILGUN 6
#define MZ_ROCKET 7
#define MZ_GRENADE 8
#define MZ_LOGIN 9
#define MZ_LOGOUT 10
#define MZ_RESPAWN 11
#define MZ_BFG 12
#define MZ_SSHOTGUN 13
#define MZ_HYPERBLASTER 14
#define MZ_ITEMRESPAWN 15
#define MZ_IONRIPPER 16
#define MZ_BLUEHYPERBLASTER 17
#define MZ_PHALANX 18
#define MZ_SILENCED 128
#define MZ_ETF_RIFLE 30
#define MZ_UNUSED 31
#define MZ_SHOTGUN2 32
#define MZ_HEATBEAM 33
#define MZ_BLASTER2 34
#define MZ_TRACKER 35
#define MZ_NUKE1 36
#define MZ_NUKE2 37
#define MZ_NUKE4 38
#define MZ_NUKE8 39
#define MZ2_TANK_BLASTER_1 1
#define MZ2_TANK_BLASTER_2 2
#define MZ2_TANK_BLASTER_3 3
#define MZ2_TANK_MACHINEGUN_1 4
#define MZ2_TANK_MACHINEGUN_2 5
#define MZ2_TANK_MACHINEGUN_3 6
#define MZ2_TANK_MACHINEGUN_4 7
#define MZ2_TANK_MACHINEGUN_5 8
#define MZ2_TANK_MACHINEGUN_6 9
#define MZ2_TANK_MACHINEGUN_7 10
#define MZ2_TANK_MACHINEGUN_8 11
#define MZ2_TANK_MACHINEGUN_9 12
#define MZ2_TANK_MACHINEGUN_10 13
#define MZ2_TANK_MACHINEGUN_11 14
#define MZ2_TANK_MACHINEGUN_12 15
#define MZ2_TANK_MACHINEGUN_13 16
#define MZ2_TANK_MACHINEGUN_14 17
#define MZ2_TANK_MACHINEGUN_15 18
#define MZ2_TANK_MACHINEGUN_16 19
#define MZ2_TANK_MACHINEGUN_17 20
#define MZ2_TANK_MACHINEGUN_18 21
#define MZ2_TANK_MACHINEGUN_19 22
#define MZ2_TANK_ROCKET_1 23
#define MZ2_TANK_ROCKET_2 24
#define MZ2_TANK_ROCKET_3 25
#define MZ2_INFANTRY_MACHINEGUN_1 26
#define MZ2_INFANTRY_MACHINEGUN_2 27
#define MZ2_INFANTRY_MACHINEGUN_3 28
#define MZ2_INFANTRY_MACHINEGUN_4 29
#define MZ2_INFANTRY_MACHINEGUN_5 30
#define MZ2_INFANTRY_MACHINEGUN_6 31
#define MZ2_INFANTRY_MACHINEGUN_7 32
#define MZ2_INFANTRY_MACHINEGUN_8 33
#define MZ2_INFANTRY_MACHINEGUN_9 34
#define MZ2_INFANTRY_MACHINEGUN_10 35
#define MZ2_INFANTRY_MACHINEGUN_11 36
#define MZ2_INFANTRY_MACHINEGUN_12 37
#define MZ2_INFANTRY_MACHINEGUN_13 38
#define MZ2_SOLDIER_BLASTER_1 39
#define MZ2_SOLDIER_BLASTER_2 40
#define MZ2_SOLDIER_SHOTGUN_1 41
#define MZ2_SOLDIER_SHOTGUN_2 42
#define MZ2_SOLDIER_MACHINEGUN_1 43
#define MZ2_SOLDIER_MACHINEGUN_2 44
#define MZ2_GUNNER_MACHINEGUN_1 45
#define MZ2_GUNNER_MACHINEGUN_2 46
#define MZ2_GUNNER_MACHINEGUN_3 47
#define MZ2_GUNNER_MACHINEGUN_4 48
#define MZ2_GUNNER_MACHINEGUN_5 49
#define MZ2_GUNNER_MACHINEGUN_6 50
#define MZ2_GUNNER_MACHINEGUN_7 51
#define MZ2_GUNNER_MACHINEGUN_8 52
#define MZ2_GUNNER_GRENADE_1 53
#define MZ2_GUNNER_GRENADE_2 54
#define MZ2_GUNNER_GRENADE_3 55
#define MZ2_GUNNER_GRENADE_4 56
#define MZ2_CHICK_ROCKET_1 57
#define MZ2_FLYER_BLASTER_1 58
#define MZ2_FLYER_BLASTER_2 59
#define MZ2_MEDIC_BLASTER_1 60
#define MZ2_GLADIATOR_RAILGUN_1 61
#define MZ2_HOVER_BLASTER_1 62
#define MZ2_ACTOR_MACHINEGUN_1 63
#define MZ2_SUPERTANK_MACHINEGUN_1 64
#define MZ2_SUPERTANK_MACHINEGUN_2 65
#define MZ2_SUPERTANK_MACHINEGUN_3 66
#define MZ2_SUPERTANK_MACHINEGUN_4 67
#define MZ2_SUPERTANK_MACHINEGUN_5 68
#define MZ2_SUPERTANK_MACHINEGUN_6 69
#define MZ2_SUPERTANK_ROCKET_1 70
#define MZ2_SUPERTANK_ROCKET_2 71
#define MZ2_SUPERTANK_ROCKET_3 72
#define MZ2_BOSS2_MACHINEGUN_L1 73
#define MZ2_BOSS2_MACHINEGUN_L2 74
#define MZ2_BOSS2_MACHINEGUN_L3 75
#define MZ2_BOSS2_MACHINEGUN_L4 76
#define MZ2_BOSS2_MACHINEGUN_L5 77
#define MZ2_BOSS2_ROCKET_1 78
#define MZ2_BOSS2_ROCKET_2 79
#define MZ2_BOSS2_ROCKET_3 80
#define MZ2_BOSS2_ROCKET_4 81
#define MZ2_FLOAT_BLASTER_1 82
#define MZ2_SOLDIER_BLASTER_3 83
#define MZ2_SOLDIER_SHOTGUN_3 84
#define MZ2_SOLDIER_MACHINEGUN_3 85
#define MZ2_SOLDIER_BLASTER_4 86
#define MZ2_SOLDIER_SHOTGUN_4 87
#define MZ2_SOLDIER_MACHINEGUN_4 88
#define MZ2_SOLDIER_BLASTER_5 89
#define MZ2_SOLDIER_SHOTGUN_5 90
#define MZ2_SOLDIER_MACHINEGUN_5 91
#define MZ2_SOLDIER_BLASTER_6 92
#define MZ2_SOLDIER_SHOTGUN_6 93
#define MZ2_SOLDIER_MACHINEGUN_6 94
#define MZ2_SOLDIER_BLASTER_7 95
#define MZ2_SOLDIER_SHOTGUN_7 96
#define MZ2_SOLDIER_MACHINEGUN_7 97
#define MZ2_SOLDIER_BLASTER_8 98
#define MZ2_SOLDIER_SHOTGUN_8 99
#define MZ2_SOLDIER_MACHINEGUN_8 100
#define MZ2_MAKRON_BFG 101
#define MZ2_MAKRON_BLASTER_1 102
#define MZ2_MAKRON_BLASTER_2 103
#define MZ2_MAKRON_BLASTER_3 104
#define MZ2_MAKRON_BLASTER_4 105
#define MZ2_MAKRON_BLASTER_5 106
#define MZ2_MAKRON_BLASTER_6 107
#define MZ2_MAKRON_BLASTER_7 108
#define MZ2_MAKRON_BLASTER_8 109
#define MZ2_MAKRON_BLASTER_9 110
#define MZ2_MAKRON_BLASTER_10 111
#define MZ2_MAKRON_BLASTER_11 112
#define MZ2_MAKRON_BLASTER_12 113
#define MZ2_MAKRON_BLASTER_13 114
#define MZ2_MAKRON_BLASTER_14 115
#define MZ2_MAKRON_BLASTER_15 116
#define MZ2_MAKRON_BLASTER_16 117
#define MZ2_MAKRON_BLASTER_17 118
#define MZ2_MAKRON_RAILGUN_1 119
#define MZ2_JORG_MACHINEGUN_L1 120
#define MZ2_JORG_MACHINEGUN_L2 121
#define MZ2_JORG_MACHINEGUN_L3 122
#define MZ2_JORG_MACHINEGUN_L4 123
#define MZ2_JORG_MACHINEGUN_L5 124
#define MZ2_JORG_MACHINEGUN_L6 125
#define MZ2_JORG_MACHINEGUN_R1 126
#define MZ2_JORG_MACHINEGUN_R2 127
#define MZ2_JORG_MACHINEGUN_R3 128
#define MZ2_JORG_MACHINEGUN_R4 129
#define MZ2_JORG_MACHINEGUN_R5 130
#define MZ2_JORG_MACHINEGUN_R6 131
#define MZ2_JORG_BFG_1 132
#define MZ2_BOSS2_MACHINEGUN_R1 133
#define MZ2_BOSS2_MACHINEGUN_R2 134
#define MZ2_BOSS2_MACHINEGUN_R3 135
#define MZ2_BOSS2_MACHINEGUN_R4 136
#define MZ2_BOSS2_MACHINEGUN_R5 137
#define MZ2_CARRIER_MACHINEGUN_L1 138
#define MZ2_CARRIER_MACHINEGUN_R1 139
#define MZ2_CARRIER_GRENADE 140
#define MZ2_TURRET_MACHINEGUN 141
#define MZ2_TURRET_ROCKET 142
#define MZ2_TURRET_BLASTER 143
#define MZ2_STALKER_BLASTER 144
#define MZ2_DAEDALUS_BLASTER 145
#define MZ2_MEDIC_BLASTER_2 146
#define MZ2_CARRIER_RAILGUN 147
#define MZ2_WIDOW_DISRUPTOR 148
#define MZ2_WIDOW_BLASTER 149
#define MZ2_WIDOW_RAIL 150
#define MZ2_WIDOW_PLASMABEAM 151
#define MZ2_CARRIER_MACHINEGUN_L2 152
#define MZ2_CARRIER_MACHINEGUN_R2 153
#define MZ2_WIDOW_RAIL_LEFT 154
#define MZ2_WIDOW_RAIL_RIGHT 155
#define MZ2_WIDOW_BLASTER_SWEEP1 156
#define MZ2_WIDOW_BLASTER_SWEEP2 157
#define MZ2_WIDOW_BLASTER_SWEEP3 158
#define MZ2_WIDOW_BLASTER_SWEEP4 159
#define MZ2_WIDOW_BLASTER_SWEEP5 160
#define MZ2_WIDOW_BLASTER_SWEEP6 161
#define MZ2_WIDOW_BLASTER_SWEEP7 162
#define MZ2_WIDOW_BLASTER_SWEEP8 163
#define MZ2_WIDOW_BLASTER_SWEEP9 164
#define MZ2_WIDOW_BLASTER_100 165
#define MZ2_WIDOW_BLASTER_90 166
#define MZ2_WIDOW_BLASTER_80 167
#define MZ2_WIDOW_BLASTER_70 168
#define MZ2_WIDOW_BLASTER_60 169
#define MZ2_WIDOW_BLASTER_50 170
#define MZ2_WIDOW_BLASTER_40 171
#define MZ2_WIDOW_BLASTER_30 172
#define MZ2_WIDOW_BLASTER_20 173
#define MZ2_WIDOW_BLASTER_10 174
#define MZ2_WIDOW_BLASTER_0 175
#define MZ2_WIDOW_BLASTER_10L 176
#define MZ2_WIDOW_BLASTER_20L 177
#define MZ2_WIDOW_BLASTER_30L 178
#define MZ2_WIDOW_BLASTER_40L 179
#define MZ2_WIDOW_BLASTER_50L 180
#define MZ2_WIDOW_BLASTER_60L 181
#define MZ2_WIDOW_BLASTER_70L 182
#define MZ2_WIDOW_RUN_1 183
#define MZ2_WIDOW_RUN_2 184
#define MZ2_WIDOW_RUN_3 185
#define MZ2_WIDOW_RUN_4 186
#define MZ2_WIDOW_RUN_5 187
#define MZ2_WIDOW_RUN_6 188
#define MZ2_WIDOW_RUN_7 189
#define MZ2_WIDOW_RUN_8 190
#define MZ2_CARRIER_ROCKET_1 191
#define MZ2_CARRIER_ROCKET_2 192
#define MZ2_CARRIER_ROCKET_3 193
#define MZ2_CARRIER_ROCKET_4 194
#define MZ2_WIDOW2_BEAMER_1 195
#define MZ2_WIDOW2_BEAMER_2 196
#define MZ2_WIDOW2_BEAMER_3 197
#define MZ2_WIDOW2_BEAMER_4 198
#define MZ2_WIDOW2_BEAMER_5 199
#define MZ2_WIDOW2_BEAM_SWEEP_1 200
#define MZ2_WIDOW2_BEAM_SWEEP_2 201
#define MZ2_WIDOW2_BEAM_SWEEP_3 202
#define MZ2_WIDOW2_BEAM_SWEEP_4 203
#define MZ2_WIDOW2_BEAM_SWEEP_5 204
#define MZ2_WIDOW2_BEAM_SWEEP_6 205
#define MZ2_WIDOW2_BEAM_SWEEP_7 206
#define MZ2_WIDOW2_BEAM_SWEEP_8 207
#define MZ2_WIDOW2_BEAM_SWEEP_9 208
#define MZ2_WIDOW2_BEAM_SWEEP_10 209
#define MZ2_WIDOW2_BEAM_SWEEP_11 210
extern vec3_t monster_flash_offset[];
typedef enum {
TE_GUNSHOT,
TE_BLOOD,
TE_BLASTER,
TE_RAILTRAIL,
TE_SHOTGUN,
TE_EXPLOSION1,
TE_EXPLOSION2,
TE_ROCKET_EXPLOSION,
TE_GRENADE_EXPLOSION,
TE_SPARKS,
TE_SPLASH,
TE_BUBBLETRAIL,
TE_SCREEN_SPARKS,
TE_SHIELD_SPARKS,
TE_BULLET_SPARKS,
TE_LASER_SPARKS,
TE_PARASITE_ATTACK,
TE_ROCKET_EXPLOSION_WATER,
TE_GRENADE_EXPLOSION_WATER,
TE_MEDIC_CABLE_ATTACK,
TE_BFG_EXPLOSION,
TE_BFG_BIGEXPLOSION,
TE_BOSSTPORT, TE_BFG_LASER,
TE_GRAPPLE_CABLE,
TE_WELDING_SPARKS,
TE_GREENBLOOD,
TE_BLUEHYPERBLASTER,
TE_PLASMA_EXPLOSION,
TE_TUNNEL_SPARKS,
TE_BLASTER2,
TE_RAILTRAIL2,
TE_FLAME,
TE_LIGHTNING,
TE_DEBUGTRAIL,
TE_PLAIN_EXPLOSION,
TE_FLASHLIGHT,
TE_FORCEWALL,
TE_HEATBEAM,
TE_MONSTER_HEATBEAM,
TE_STEAM,
TE_BUBBLETRAIL2,
TE_MOREBLOOD,
TE_HEATBEAM_SPARKS,
TE_HEATBEAM_STEAM,
TE_CHAINFIST_SMOKE,
TE_ELECTRIC_SPARKS,
TE_TRACKER_EXPLOSION,
TE_TELEPORT_EFFECT,
TE_DBALL_GOAL,
TE_WIDOWBEAMOUT,
TE_NUKEBLAST,
TE_WIDOWSPLASH,
TE_EXPLOSION1_BIG,
TE_EXPLOSION1_NP,
TE_FLECHETTE
} temp_event_t;
#define SPLASH_UNKNOWN 0
#define SPLASH_SPARKS 1
#define SPLASH_BLUE_WATER 2
#define SPLASH_BROWN_WATER 3
#define SPLASH_SLIME 4
#define SPLASH_LAVA 5
#define SPLASH_BLOOD 6
#define CHAN_AUTO 0
#define CHAN_WEAPON 1
#define CHAN_VOICE 2
#define CHAN_ITEM 3
#define CHAN_BODY 4
#define CHAN_NO_PHS_ADD 8
#define CHAN_RELIABLE 16
#define ATTN_NONE 0
#define ATTN_NORM 1
#define ATTN_IDLE 2
#define ATTN_STATIC 3
#define STAT_HEALTH_ICON 0
#define STAT_HEALTH 1
#define STAT_AMMO_ICON 2
#define STAT_AMMO 3
#define STAT_ARMOR_ICON 4
#define STAT_ARMOR 5
#define STAT_SELECTED_ICON 6
#define STAT_PICKUP_ICON 7
#define STAT_PICKUP_STRING 8
#define STAT_TIMER_ICON 9
#define STAT_TIMER 10
#define STAT_HELPICON 11
#define STAT_SELECTED_ITEM 12
#define STAT_LAYOUTS 13
#define STAT_FRAGS 14
#define STAT_FLASHES 15
#define STAT_CHASE 16
#define STAT_SPECTATOR 17
#define MAX_STATS 32
#define DF_NO_HEALTH 0x00000001
#define DF_NO_ITEMS 0x00000002
#define DF_WEAPONS_STAY 0x00000004
#define DF_NO_FALLING 0x00000008
#define DF_INSTANT_ITEMS 0x00000010
#define DF_SAME_LEVEL 0x00000020
#define DF_SKINTEAMS 0x00000040
#define DF_MODELTEAMS 0x00000080
#define DF_NO_FRIENDLY_FIRE 0x00000100
#define DF_SPAWN_FARTHEST 0x00000200
#define DF_FORCE_RESPAWN 0x00000400
#define DF_NO_ARMOR 0x00000800
#define DF_ALLOW_EXIT 0x00001000
#define DF_INFINITE_AMMO 0x00002000
#define DF_QUAD_DROP 0x00004000
#define DF_FIXED_FOV 0x00008000
#define DF_QUADFIRE_DROP 0x00010000
#define DF_NO_MINES 0x00020000
#define DF_NO_STACK_DOUBLE 0x00040000
#define DF_NO_NUKES 0x00080000
#define DF_NO_SPHERES 0x00100000
#define ROGUE_VERSION_ID 1278
#define ROGUE_VERSION_STRING "08/21/1998 Beta 2 for Ensemble"
#define ANGLE2SHORT(x) ((int)((x)*65536 / 360) & 65535)
#define SHORT2ANGLE(x) ((x) * (360.0 / 65536))
#define CS_NAME 0
#define CS_CDTRACK 1
#define CS_SKY 2
#define CS_SKYAXIS 3
#define CS_SKYROTATE 4
#define CS_STATUSBAR 5
#define CS_AIRACCEL 29
#define CS_MAXCLIENTS 30
#define CS_MODELS 32
#define CS_SOUNDS (CS_MODELS + MAX_MODELS)
#define CS_IMAGES (CS_SOUNDS + MAX_SOUNDS)
#define CS_LIGHTS (CS_IMAGES + MAX_IMAGES)
#define CS_ITEMS (CS_LIGHTS + MAX_LIGHTSTYLES)
#define CS_PLAYERSKINS (CS_ITEMS + MAX_ITEMS)
#define CS_GENERAL (CS_PLAYERSKINS + MAX_CLIENTS)
#define MAX_CONFIGSTRINGS (CS_GENERAL + MAX_GENERAL)
typedef enum {
EV_NONE,
EV_ITEM_RESPAWN,
EV_FOOTSTEP,
EV_FALLSHORT,
EV_FALL,
EV_FALLFAR,
EV_PLAYER_TELEPORT,
EV_OTHER_TELEPORT
} entity_event_t;
typedef struct entity_state_s {
int number;
int cmodel_index;
vec3_t origin;
vec3_t angles;
vec3_t old_origin; int modelindex;
int modelindex2, modelindex3, modelindex4; int frame;
int skinnum;
unsigned int effects; int renderfx;
int solid; int sound; int event; } entity_state_t;
typedef struct {
int cmodel_index;
pmove_state_t pmove;
vec3_t viewangles; vec3_t viewoffset; vec3_t kick_angles;
vec3_t gunangles;
vec3_t gunoffset;
int gunindex;
int gunframe;
float blend[4];
float fov;
int rdflags;
short stats[MAX_STATS]; } player_state_t;
#define VIDREF_GL 1
#define VIDREF_SOFT 2
#define VIDREF_OTHER 3
extern int vidref_val;