-
Notifications
You must be signed in to change notification settings - Fork 10
/
cmodel.h
64 lines (59 loc) · 2.06 KB
/
cmodel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* Copyright (C) 1997-2001 Id Software, Inc.
*
* 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.
*
* 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.
*
* 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.
*
* =======================================================================
*
* Shared model load code
*
* =======================================================================
*/
#ifndef COMMON_CMODEL_H
#define COMMON_CMODEL_H
#define EXTRA_LUMP_VERTEXES 8
#define EXTRA_LUMP_TEXINFO 6
#define EXTRA_LUMP_SURFEDGES 24
#define EXTRA_LUMP_EDGES 13
#define EXTRA_LUMP_FACES 6
#define EXTRA_LUMP_PLANES 12
#define EXTRA_LUMP_LEAFBRUSHES 2
#define EXTRA_LUMP_BRUSHES 1
#define EXTRA_LUMP_NODES 6
#define EXTRA_LUMP_BRUSHSIDES 6
#define EXTRA_LUMP_LEAFS 1
typedef enum
{
map_quake2rr = 0,
map_heretic2 = 1,
map_daikatana = 2,
map_kingpin = 3,
map_anachronox = 4,
map_sin = 5,
map_quake2 = 6,
} maptype_t;
extern int Mod_CalcLumpHunkSize(const lump_t *l, int inSize, int outSize, int extra);
extern void Mod_LoadVisibility(const char *name, dvis_t **vis, int *numvisibility,
const byte *mod_base, const lump_t *l);
extern void Mod_LoadPlanes(const char *name, cplane_t **planes, int *numplanes,
const byte *mod_base, const lump_t *l);
extern byte *Mod_Load2QBSP(const char *name, byte *in, size_t filesize,
size_t *out_len, maptype_t *maptype);
extern float Mod_RadiusFromBounds(const vec3_t mins, const vec3_t maxs);
extern void Mod_DecompressVis(const byte *in, byte *out, const byte* numvisibility,
int row);
#endif