2002-09-19 18:51:19 +00:00
|
|
|
/*
|
|
|
|
Copyright (C) 1996-1997 Id Software, Inc.
|
2002-09-19 16:58:48 +00:00
|
|
|
|
2002-09-19 18:51:19 +00:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
2002-09-19 16:58:48 +00:00
|
|
|
|
2002-09-19 18:51:19 +00:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
2002-09-19 16:58:48 +00:00
|
|
|
|
2002-09-19 18:51:19 +00:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2002-09-19 16:58:48 +00:00
|
|
|
|
2002-09-19 18:51:19 +00:00
|
|
|
See file, 'COPYING', for details.
|
2002-09-23 16:27:17 +00:00
|
|
|
|
|
|
|
$Id$
|
2002-09-19 16:58:48 +00:00
|
|
|
*/
|
|
|
|
|
2003-09-03 22:00:08 +00:00
|
|
|
#define MAX_FACES 256
|
2002-09-19 16:58:48 +00:00
|
|
|
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;
|
2003-02-04 23:26:26 +00:00
|
|
|
qboolean detail; // true if brush is detail brush
|
2002-09-19 16:58:48 +00:00
|
|
|
} 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];
|
|
|
|
|
2003-01-06 18:28:13 +00:00
|
|
|
void LoadMapFile (const char *filename);
|
2002-09-19 16:58:48 +00:00
|
|
|
|
2003-01-06 18:28:13 +00:00
|
|
|
int FindMiptex (const char *name);
|
2002-09-19 16:58:48 +00:00
|
|
|
|
|
|
|
void PrintEntity (entity_t *ent);
|
2003-01-06 18:28:13 +00:00
|
|
|
const char *ValueForKey (entity_t *ent, const char *key);
|
|
|
|
void SetKeyValue (entity_t *ent, const char *key, const char *value);
|
|
|
|
float FloatForKey (entity_t *ent, const char *key);
|
|
|
|
void GetVectorForKey (entity_t *ent, const char *key, vec3_t vec);
|
2002-09-19 16:58:48 +00:00
|
|
|
|
|
|
|
void WriteEntitiesToString (void);
|