1 /*
2 ===========================================================================
3 Copyright (C) 1999-2005 Id Software, Inc.
4 
5 This file is part of Quake III Arena source code.
6 
7 Quake III Arena source code is free software; you can redistribute it
8 and/or modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the License,
10 or (at your option) any later version.
11 
12 Quake III Arena source code is distributed in the hope that it will be
13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Quake III Arena source code; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20 ===========================================================================
21 */
22 
23 #include "qfiles.h"
24 
25 
26 void		CM_LoadMap( const char *name, qboolean clientload, int *checksum);
27 void		CM_ClearMap( void );
28 clipHandle_t CM_InlineModel( int index );		// 0 = world, 1 + are bmodels
29 clipHandle_t CM_TempBoxModel( const vec3_t mins, const vec3_t maxs, int capsule );
30 
31 void		CM_ModelBounds( clipHandle_t model, vec3_t mins, vec3_t maxs );
32 
33 int			CM_NumClusters (void);
34 int			CM_NumInlineModels( void );
35 char		*CM_EntityString (void);
36 
37 // returns an ORed contents mask
38 int			CM_PointContents( const vec3_t p, clipHandle_t model );
39 int			CM_TransformedPointContents( const vec3_t p, clipHandle_t model, const vec3_t origin, const vec3_t angles );
40 
41 void		CM_BoxTrace ( trace_t *results, const vec3_t start, const vec3_t end,
42 						  vec3_t mins, vec3_t maxs,
43 						  clipHandle_t model, int brushmask, int capsule );
44 void		CM_TransformedBoxTrace( trace_t *results, const vec3_t start, const vec3_t end,
45 						  vec3_t mins, vec3_t maxs,
46 						  clipHandle_t model, int brushmask,
47 						  const vec3_t origin, const vec3_t angles, int capsule );
48 
49 byte		*CM_ClusterPVS (int cluster);
50 
51 int			CM_PointLeafnum( const vec3_t p );
52 
53 // only returns non-solid leafs
54 // overflow if return listsize and if *lastLeaf != list[listsize-1]
55 int			CM_BoxLeafnums( const vec3_t mins, const vec3_t maxs, int *list,
56 		 					int listsize, int *lastLeaf );
57 
58 int			CM_LeafCluster (int leafnum);
59 int			CM_LeafArea (int leafnum);
60 
61 void		CM_AdjustAreaPortalState( int area1, int area2, qboolean open );
62 qboolean	CM_AreasConnected( int area1, int area2 );
63 
64 int			CM_WriteAreaBits( byte *buffer, int area );
65 
66 // cm_tag.c
67 int			CM_LerpTag( orientation_t *tag,  clipHandle_t model, int startFrame, int endFrame,
68 					 float frac, const char *tagName );
69 
70 
71 // cm_marks.c
72 int	CM_MarkFragments( int numPoints, const vec3_t *points, const vec3_t projection,
73 				   int maxPoints, vec3_t pointBuffer, int maxFragments, markFragment_t *fragmentBuffer );
74 
75 // cm_patch.c
76 void CM_DrawDebugSurface( void (*drawPoly)(int color, int numPoints, float *points) );
77