OpenMoHAA 0.82.0
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_ClearMap( void );
32clipHandle_t CM_InlineModel( int index ); // 0 = world, 1 + are bmodels
33clipHandle_t CM_TempBoxModel( const vec3_t mins, const vec3_t maxs, int contents );
34
35void CM_ModelBounds( clipHandle_t model, vec3_t mins, vec3_t maxs );
36void CM_ModelBoundsFromName( const char *name, vec3_t mins, vec3_t maxs );
37
38byte *CM_VisibilityPointer( void );
39
40void CM_PrintBSPFileSizes( void );
41
42int CM_NumClusters (void);
43int CM_NumInlineModels( void );
44char *CM_EntityString( void );
45const char *CM_MapTime( void );
46
47// returns an ORed contents mask
48int CM_PointContents( const vec3_t p, clipHandle_t model );
49int CM_PointBrushNum( const vec3_t p, clipHandle_t model );
50int CM_TransformedPointContents( const vec3_t p, clipHandle_t model, const vec3_t origin, const vec3_t angles );
51
52qboolean CM_BoxSightTrace( const vec3_t start, const vec3_t end,
53 const vec3_t mins, const vec3_t maxs,
54 clipHandle_t model, int brushmask, qboolean cylinder );
55qboolean CM_TransformedBoxSightTrace( const vec3_t start, const vec3_t end,
56 const vec3_t mins, const vec3_t maxs,
57 clipHandle_t model, int brushmask, const vec3_t origin, const vec3_t angles, qboolean cylinder );
58void CM_BoxTrace ( trace_t *results, const vec3_t start, const vec3_t end,
59 const vec3_t mins, const vec3_t maxs,
60 clipHandle_t model, int brushmask, int cylinder );
61void CM_TransformedBoxTrace( trace_t *results, const vec3_t start, const vec3_t end,
62 const vec3_t mins, const vec3_t maxs,
63 clipHandle_t model, int brushmask,
64 const vec3_t origin, const vec3_t angles, int cylinder );
65
66byte *CM_ClusterPVS (int cluster);
67
68int CM_PointLeafnum( const vec3_t p );
69
70// only returns non-solid leafs
71// overflow if return listsize and if *lastLeaf != list[listsize-1]
72int CM_BoxLeafnums( const vec3_t mins, const vec3_t maxs, int *list,
73 int listsize, int *lastLeaf );
74
75int CM_LeafCluster (int leafnum);
76int CM_LeafArea (int leafnum);
77
78void CM_AdjustAreaPortalState( int area1, int area2, qboolean open );
79void CM_ResetAreaPortals( void );
80void CM_WritePortalState( fileHandle_t f );
81void CM_ReadPortalState( fileHandle_t f );
82int CM_AreaForPoint( vec3_t vPos );
83qboolean CM_AreasConnected( int area1, int area2 );
84
85int CM_WriteAreaBits( byte *buffer, int area );
86
87qboolean CM_inPVS( vec3_t p1, vec3_t p2 );
88qboolean CM_LeafInPVS( int leaf1, int leaf2 );
89
90baseshader_t *CM_ShaderPointer( int iShaderNum );
91
92// cm_tag.c
93int CM_LerpTag( orientation_t *tag, clipHandle_t model, int startFrame, int endFrame,
94 float frac, const char *tagName );
95
96
97// cm_marks.c
98int CM_MarkFragments( int numPoints, const vec3_t *points, const vec3_t projection,
99 int maxPoints, vec3_t pointBuffer, int maxFragments, markFragment_t *fragmentBuffer );
100
101// cm_patch.c
102void CM_DrawDebugSurface( void (*drawPoly)(int color, int numPoints, float *points) );
103
104// cm_trace_ldb.cpp
105const char *CM_GetHitLocationInfo( int i_iLocation, float *o_fRadius, vec3_t o_vOffset );
106const char *CM_GetHitLocationInfoSecondary( int i_iLocation, float *o_fRadius, vec3_t o_vOffset );
107
108// cm_trace_obfuscation.cpp
109float CM_VisualObfuscation(const vec3_t start, const vec3_t end);
110
111#ifdef __cplusplus
112}
113#endif
Definition q_shared.h:1493
Definition q_shared.h:1524
Definition q_shared.h:1452