52 lines
976 B
C
52 lines
976 B
C
|
|
|
|
//jim
|
|
//#define max_faces 16
|
|
#define max_faces 32
|
|
typedef struct mface_s
|
|
{
|
|
struct mface_s *next;
|
|
plane_t plane;
|
|
int texinfo;
|
|
} mface_t;
|
|
|
|
typedef struct mbrush_s
|
|
{
|
|
struct mbrush_s *next;
|
|
mface_t *faces;
|
|
} mbrush_t;
|
|
|
|
typedef struct epair_s
|
|
{
|
|
struct epair_s *next;
|
|
char *key;
|
|
char *value;
|
|
} epair_t;
|
|
|
|
typedef struct
|
|
{
|
|
vec3_t origin;
|
|
mbrush_t *brushes;
|
|
epair_t *epairs;
|
|
} entity_t;
|
|
|
|
extern int nummapbrushes;
|
|
extern mbrush_t mapbrushes[max_map_brushes];
|
|
|
|
extern int num_entities;
|
|
extern entity_t entities[max_map_entities];
|
|
|
|
extern int nummiptex;
|
|
extern char miptex[max_map_texinfo][16];
|
|
|
|
void loadmapfile (char *filename);
|
|
|
|
int findmiptex (char *name);
|
|
|
|
void printentity (entity_t *ent);
|
|
char *valueforkey (entity_t *ent, char *key);
|
|
void setkeyvalue (entity_t *ent, char *key, char *value);
|
|
float floatforkey (entity_t *ent, char *key);
|
|
void getvectorforkey (entity_t *ent, char *key, vec3_t vec);
|
|
|
|
void writeentitiestostring (void);
|