UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
bspfile.h
Go to the documentation of this file.
1
4
5
/*
6
Copyright (C) 1997-2001 Id Software, Inc.
7
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License
10
as published by the Free Software Foundation; either version 2
11
of the License, or (at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
17
See the GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23
*/
24
25
#pragma once
26
27
#include "
../../../common/qfiles.h
"
28
29
dMapTile_t
*
LoadBSPFile
(
const
char
*
filename
);
30
long
WriteBSPFile
(
const
char
*
filename
);
31
void
PrintBSPFileSizes
(
void
);
32
36
typedef
struct
epair_s {
37
struct
epair_s*
next
;
38
const
char
*
key
;
39
const
char
*
value
;
40
bool
ump
;
41
}
epair_t
;
42
46
typedef
struct
{
47
vec3_t
origin
;
48
int
firstbrush
;
49
int
numbrushes
;
50
epair_t
*
epairs
;
51
bool
skip
;
53
}
entity_t
;
54
55
extern
int
num_entities
;
56
extern
entity_t
entities
[
MAX_MAP_ENTITIES
];
57
58
entity_t
*
FindTargetEntity
(
const
char
* target);
59
void
ParseEntities
(
void
);
60
const
char
*
UnparseEntities
(
void
);
61
62
void
SetKeyValue
(
entity_t
* ent,
const
char
*
key
,
const
char
* value);
63
/* will return "" if not present */
64
const
char
*
ValueForKey
(
const
entity_t
* ent,
const
char
*
key
);
65
66
vec_t
FloatForKey
(
const
entity_t
* ent,
const
char
*
key
);
67
void
GetVectorFromString
(
const
char
* value,
vec3_t
vec);
68
void
GetVectorForKey
(
const
entity_t
* ent,
const
char
*
key
,
vec3_t
vec);
69
epair_t
*
ParseEpair
(
int
entNum);
70
bool
EpairCheckForDuplicate
(
const
entity_t
* ent,
const
epair_t
*e);
71
epair_t
*
AddEpair
(
const
char
*
key
,
const
char
* value,
int
entNum);
72
byte
*
CompressRouting
(
byte
* dataStart,
byte
* destStart,
int
l);
num_entities
int num_entities
Definition
bspfile.cpp:394
entities
entity_t entities[MAX_MAP_ENTITIES]
Definition
bspfile.cpp:395
GetVectorFromString
void GetVectorFromString(const char *value, vec3_t vec)
Converts a string into a vec3_t.
Definition
bspfile.cpp:575
UnparseEntities
const char * UnparseEntities(void)
Generates the curTile->entdata string from all the entities.
Definition
bspfile.cpp:515
ParseEntities
void ParseEntities(void)
Parses the curTile->entdata string into entities.
Definition
bspfile.cpp:502
FindTargetEntity
entity_t * FindTargetEntity(const char *target)
Searches the entities array for an entity with the parameter targetname that matches the searched tar...
Definition
map.cpp:911
GetVectorForKey
void GetVectorForKey(const entity_t *ent, const char *key, vec3_t vec)
Converts the value of a entity parameter into a vec3_t.
Definition
bspfile.cpp:592
FloatForKey
vec_t FloatForKey(const entity_t *ent, const char *key)
Definition
bspfile.cpp:566
SetKeyValue
void SetKeyValue(entity_t *ent, const char *key, const char *value)
Definition
bspfile.cpp:546
PrintBSPFileSizes
void PrintBSPFileSizes(void)
Dumps info about current file.
Definition
bspfile.cpp:364
WriteBSPFile
long WriteBSPFile(const char *filename)
Swaps the bsp file in place, so it should not be referenced again.
Definition
bspfile.cpp:316
EpairCheckForDuplicate
bool EpairCheckForDuplicate(const entity_t *ent, const epair_t *e)
Definition
bspfile.cpp:418
AddEpair
epair_t * AddEpair(const char *key, const char *value, int entNum)
Definition
bspfile.cpp:428
LoadBSPFile
dMapTile_t * LoadBSPFile(const char *filename)
Definition
bspfile.cpp:231
ParseEpair
epair_t * ParseEpair(int entNum)
Parses one key and value for an entity from the current tokens.
Definition
bspfile.cpp:453
ValueForKey
const char * ValueForKey(const entity_t *ent, const char *key)
Definition
bspfile.cpp:558
CompressRouting
byte * CompressRouting(byte *dataStart, byte *destStart, int l)
Compress the routing data of a map.
Definition
bspfile.cpp:37
key
unsigned int key
Definition
cl_input.cpp:64
MAX_MAP_ENTITIES
#define MAX_MAP_ENTITIES
Definition
defines.h:136
origin
voidpf uLong int origin
Definition
ioapi.h:45
filename
const char * filename
Definition
ioapi.h:41
qfiles.h
Header for various formats like pak, and model formats as well as bsp format.
dMapTile_t
Definition
typedefs.h:440
entity_t
Definition
r_entity.h:96
entity_t::epairs
epair_t * epairs
Definition
bspfile.h:50
entity_t::numbrushes
int numbrushes
Definition
bspfile.h:49
entity_t::firstbrush
int firstbrush
Definition
bspfile.h:48
entity_t::skip
bool skip
Definition
bspfile.h:51
epair_t
Definition
bspfile.h:36
epair_t::key
const char * key
Definition
bspfile.h:38
epair_t::next
struct epair_s * next
Definition
bspfile.h:37
epair_t::ump
bool ump
Definition
bspfile.h:40
epair_t::value
const char * value
Definition
bspfile.h:39
vec_t
float vec_t
Definition
ufotypes.h:37
vec3_t
vec_t vec3_t[3]
Definition
ufotypes.h:39
src
tools
ufo2map
common
bspfile.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0