OpenMoHAA ..
Loading...
Searching...
No Matches
cm_public.h
1/*
2===========================================================================
3Copyright (C) 1999-2005 Id Software, Inc.
4
5This file is part of Quake III Arena source code.
6
7Quake III Arena source code is free software; you can redistribute it
8and/or modify it under the terms of the GNU General Public License as
9published by the Free Software Foundation; either version 2 of the License,
10or (at your option) any later version.
11
12Quake III Arena source code is distributed in the hope that it will be
13useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with Quake III Arena source code; if not, write to the Free Software
19Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20===========================================================================
21*/
22
23#include "qfiles.h"
24#include "q_shared.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30void CM_LoadMap( const char *name, qboolean clientload, int *checksum);
31void CM_SetExternalMapData( const byte *data, int length );
32void CM_ClearExternalMapData( void );
33void CM_ClearMap( void );
34clipHandle_t CM_InlineModel( int index ); // 0 = world, 1 + are bmodels
35clipHandle_t CM_TempBoxModel( const vec3_t mins, const vec3_t maxs, int contents );
36
37void CM_ModelBounds( clipHandle_t model, vec3_t mins, vec3_t maxs );
38void CM_ModelBoundsFromName( const char *name, vec3_t mins, vec3_t maxs );
39
40byte *CM_VisibilityPointer( void );
41
42void CM_PrintBSPFileSizes( void );
43
44int CM_NumClusters (void);
45int CM_NumInlineModels( void );
46char *CM_EntityString( void );
47const char *CM_MapTime( void );
48
49// returns an ORed contents mask
50int CM_PointContents( const vec3_t p, clipHandle_t model );
51int CM_PointBrushNum( const vec3_t p, clipHandle_t model );
52int CM_TransformedPointContents( const vec3_t p, clipHandle_t model, const vec3_t origin, const vec3_t angles );
53
54qboolean CM_BoxSightTrace( const vec3_t start, const vec3_t end,
55 const vec3_t mins, const vec3_t maxs,
56 clipHandle_t model, int brushmask, qboolean cylinder );
57qboolean CM_TransformedBoxSightTrace( const vec3_t start, const vec3_t end,
58 const vec3_t mins, const vec3_t maxs,
59 clipHandle_t model, int brushmask, const vec3_t origin, const vec3_t angles, qboolean cylinder );
60void CM_BoxTrace ( trace_t *results, const vec3_t start, const vec3_t end,
61 const vec3_t mins, const vec3_t maxs,
62 clipHandle_t model, int brushmask, int cylinder );
63void CM_TransformedBoxTrace( trace_t *results, const vec3_t start, const vec3_t end,
64 const vec3_t mins, const vec3_t maxs,
65 clipHandle_t model, int brushmask,
66 const vec3_t origin, const vec3_t angles, int cylinder );
67
68byte *CM_ClusterPVS (int cluster);
69
70int CM_PointLeafnum( const vec3_t p );
71
72// only returns non-solid leafs
73// overflow if return listsize and if *lastLeaf != list[listsize-1]
74int CM_BoxLeafnums( const vec3_t mins, const vec3_t maxs, int *list,
75 int listsize, int *lastLeaf );
76
77int CM_LeafCluster (int leafnum);
78int CM_LeafArea (int leafnum);
79
80void CM_AdjustAreaPortalState( int area1, int area2, qboolean open );
81void CM_ResetAreaPortals( void );
82void CM_WritePortalState( fileHandle_t f );
83void CM_ReadPortalState( fileHandle_t f );
84int CM_AreaForPoint( vec3_t vPos );
85qboolean CM_AreasConnected( int area1, int area2 );
86
87int CM_WriteAreaBits( byte *buffer, int area );
88
89qboolean CM_inPVS( vec3_t p1, vec3_t p2 );
90qboolean CM_LeafInPVS( int leaf1, int leaf2 );
91
92baseshader_t *CM_ShaderPointer( int iShaderNum );
93
94// cm_tag.c
95int CM_LerpTag( orientation_t *tag, clipHandle_t model, int startFrame, int endFrame,
96 float frac, const char *tagName );
97
98
99// cm_marks.c
100int CM_MarkFragments( int numPoints, const vec3_t *points, const vec3_t projection,
101 int maxPoints, vec3_t pointBuffer, int maxFragments, markFragment_t *fragmentBuffer );
102
103// cm_patch.c
104void CM_DrawDebugSurface( void (*drawPoly)(int color, int numPoints, float *points) );
105
106// cm_trace_ldb.cpp
107const char *CM_GetHitLocationInfo( int i_iLocation, float *o_fRadius, vec3_t o_vOffset );
108const char *CM_GetHitLocationInfoSecondary( int i_iLocation, float *o_fRadius, vec3_t o_vOffset );
109
110// cm_trace_obfuscation.cpp
111float CM_VisualObfuscation(const vec3_t start, const vec3_t end);
112
113#ifdef __cplusplus
114}
115#endif
Definition q_shared.h:1495
Definition q_shared.h:1526
Definition q_shared.h:1454