Create the qfbsp doxygen modules.

Also, make doxygen extract static functions as well, so qfbsp's docs can be
more complete.
This commit is contained in:
Bill Currie 2010-09-01 10:06:54 +09:00
parent bfc6c9e798
commit fcd1897421
33 changed files with 214 additions and 2 deletions

View file

@ -308,7 +308,7 @@ EXTRACT_PRIVATE = NO
# If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation.
EXTRACT_STATIC = NO
EXTRACT_STATIC = YES
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
# defined locally in source files will be included in the documentation.

View file

@ -28,6 +28,11 @@
#include "bsp5.h"
#include "map.h"
/** \defgroup qfbsp_brush Brush Functions
\ingroup qfbsp
*/
//@{
#define NUM_HULLS 2 // normal and +16
#define NUM_CONTENTS 2 // solid and water
@ -74,4 +79,6 @@ int PlaneTypeForNormal (const vec3_t normal);
*/
int FindPlane (plane_t *dplane, int *side);
//@}
#endif//qfbsp_brush_h

View file

@ -23,9 +23,17 @@
#ifndef qfbsp_bsp5_h
#define qfbsp_bsp5_h
/** \defgroup qfbsp QuakeForge BSP Compiler
*/
#include "QF/mathlib.h"
#include "QF/bspfile.h"
/** \defgroup qfbsp_general General functions
\ingroup qfbsp
*/
//@{
typedef struct plane_s {
vec3_t normal;
vec_t dist;
@ -128,4 +136,6 @@ node_t *AllocNode (void);
extern bsp_t *bsp;
//@}
#endif//qfbsp_bsp5_h

View file

@ -25,6 +25,11 @@
#include "QF/bspfile.h"
/** \defgroup qfbsp_csg4 CSG Functions
\ingroup qfbsp
*/
//@{
struct plane_s;
struct visfacet_s;
struct brushset_s;
@ -80,4 +85,6 @@ struct surface_s *CSGFaces (struct brushset_s *bs);
void SplitFace (struct visfacet_s *in, struct plane_s *split,
struct visfacet_s **front, struct visfacet_s **back);
//@}
#endif//qfbsp_csg4_h

View file

@ -25,6 +25,11 @@
#include "QF/mathlib.h"
/** \defgroup qfbsp_draw Debug Drawing Functions
\ingroup qfbsp
*/
//@{
struct visfacet_s;
struct portal_s;
struct node_s;
@ -49,4 +54,6 @@ void DrawBrush (struct brush_s *b);
void DrawWinding (struct winding_s *w);
void DrawTri (vec3_t p1, vec3_t p2, vec3_t p3);
//@}
#endif//qfbsp_draw_h

View file

@ -25,6 +25,11 @@
#include "bsp5.h"
/** \defgroup qfbsp_map Map Parser
\ingroup qfbsp
*/
//@{
#define MAX_FACES 256
typedef struct mface_s {
struct mface_s *next;
@ -118,4 +123,6 @@ void GetVectorForKey (entity_t *ent, const char *key, vec3_t vec);
*/
void WriteEntitiesToString (void);
//@}
#endif//qfbsp_map_h

View file

@ -23,6 +23,11 @@
#ifndef qfbsp_merge_h
#define qfbsp_merge_h
/** \defgroup qfbsp_merge Merge Functions
\ingroup qfbsp
*/
//@{
/** Add a face to the list of faces, doing any possible merging.
\param face The face to add to the list.
@ -59,4 +64,6 @@ void MergePlaneFaces (surface_t *plane);
*/
void MergeAll (surface_t *surfhead);
//@}
#endif//qfbsp_merge_h

View file

@ -31,6 +31,11 @@
#include "QF/qtypes.h"
/** \defgroup qfbsp_options Command-line Options Parsing
\ingroup qfbsp
*/
//@{
typedef struct {
int verbosity; // 0=silent
qboolean drawflag;
@ -60,4 +65,7 @@ typedef struct {
extern options_t options;
int DecodeArgs (int argc, char **argv);
extern const char *this_program;
//@}
#endif//qfbsp_options_h

View file

@ -23,6 +23,11 @@
#ifndef qfbsp_outside_h
#define qfbsp_outside_h
/** \defgroup qfbsp_outside Outside Functions
\ingroup qfbsp
*/
//@{
struct node_s;
/** Make the outside of the map solid.
@ -37,4 +42,6 @@ struct node_s;
*/
qboolean FillOutside (struct node_s *node);
//@}
#endif//qfbsp_outside_h

View file

@ -23,6 +23,11 @@
#ifndef qfbsp_portals_h
#define qfbsp_portals_h
/** \defgroup qfbsp_portals Portal Functions
\ingroup qfbsp
*/
//@{
struct node_s;
typedef struct portal_s {
@ -79,4 +84,6 @@ void FreeAllPortals (struct node_s *node);
*/
void WritePortalfile (struct node_s *headnode);
//@}
#endif//qfbsp_portals_h

View file

@ -23,6 +23,11 @@
#ifndef qfbsp_readbsp_h
#define qfbsp_readbsp_h
/** \defgroup qfbsp_readbsp BSP Reading Functions
\ingroup qfbsp
*/
//@{
/** Load the bspfile into memory.
*/
void LoadBSP (void);
@ -43,4 +48,6 @@ void extract_entities (void);
*/
void extract_hull (void);
//@}
#endif//qfbsp_readbsp_h

View file

@ -23,6 +23,11 @@
#ifndef qfbsp_region_h
#define qfbsp_region_h
/** \defgroup qfbsp_region Region Functions
\ingroup qfbsp
*/
//@{
struct node_s;
/** Write the faces and edges to the bsp file.
@ -31,4 +36,6 @@ struct node_s;
*/
void GrowNodeRegions (struct node_s *headnode);
//@}
#endif//qfbsp_region_h

View file

@ -25,6 +25,11 @@
#include "QF/qtypes.h"
/** \defgroup qfbsp_solidbsp BSP Creation Functions
\ingroup qfbsp
*/
//@{
struct visfacet_s;
struct plane_s;
struct surface_s;
@ -44,4 +49,6 @@ void CalcSurfaceInfo (struct surface_s *surf);
*/
struct node_s *SolidBSP (struct surface_s *surfhead, qboolean midsplit);
//@}
#endif//qfbsp_solidbsp_h

View file

@ -25,6 +25,11 @@
#include "QF/bspfile.h"
/** \defgroup qfbsp_surface Surface Functions
\ingroup qfbsp
*/
//@{
struct visfacet_s;
struct node_s;
struct surface_s;
@ -96,4 +101,6 @@ struct surface_s *GatherNodeFaces (struct node_s *headnode);
*/
void MakeFaceEdges (struct node_s *headnode);
//@}
#endif//surfaces_h

View file

@ -23,6 +23,11 @@
#ifndef qfbsp_tjunc_h
#define qfbsp_tjunc_h
/** \defgroup qfbsp_tjunc T-Junction Repair
\ingroup qfbsp
*/
//@{
struct node_s;
/** Add the edges from the faces in the bsp tree.
@ -31,4 +36,6 @@ struct node_s;
*/
void tjunc (struct node_s *headnode);
//@}
#endif//qfbsp_tjunc_h

View file

@ -25,6 +25,11 @@
#include "QF/mathlib.h"
/** \defgroup qfbsp_winding Winding Manipulation
\ingroup qfbsp
*/
//@{
struct plane_s;
typedef struct winding_s {
@ -113,4 +118,6 @@ winding_t *ClipWinding (winding_t *in, struct plane_s *split, qboolean keepon);
void DivideWinding (winding_t *in, struct plane_s *split,
winding_t **front, winding_t **back);
//@}
#endif//qfbsp_winding_h

View file

@ -25,6 +25,11 @@
#include "QF/bspfile.h"
/** \defgroup qfbsp_writebsp BSP Writing Functions
\ingroup qfbsp
*/
//@{
struct node_s;
void WriteNodePlanes (struct node_s *headnode);
@ -37,4 +42,6 @@ int FindFinalPlane (dplane_t *p);
void BeginBSPFile (void);
void FinishBSPFile (void);
//@}
#endif//qfbsp_writebsp_h

View file

@ -38,6 +38,10 @@
#include "surfaces.h"
#include "winding.h"
/** \addtogroup qfbsp_brush
*/
//@{
int numbrushplanes;
plane_t planes[MAX_MAP_PLANES];
@ -798,3 +802,5 @@ Brush_LoadEntity (entity_t *ent, int hullnum)
return bset;
}
//@}

View file

@ -39,6 +39,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "surfaces.h"
#include "winding.h"
/** \addtogroup qfbsp_csg4
*/
//@{
/*
NOTES
@ -382,3 +386,5 @@ CSGFaces (brushset_t *bs)
return surfhead;
}
//@}

View file

@ -44,6 +44,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "map.h"
/** \addtogroup qfbsp_map
*/
//@{
int nummapbrushfaces;
int nummapbrushes;
mbrush_t mapbrushes[MAX_MAP_BRUSHES];
@ -589,3 +593,5 @@ WriteEntitiesToString (void)
}
BSP_AddEntities (bsp, buf->str, buf->size);
}
//@}

View file

@ -34,6 +34,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "surfaces.h"
#include "winding.h"
/** \addtogroup qfbsp_merge
*/
//@{
#define CONTINUOUS_EPSILON 0.001
@ -236,3 +240,5 @@ MergeAll (surface_t * surfhead)
printf ("%i mergefaces\n", mergefaces);
}
//@}

View file

@ -26,6 +26,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "draw.h"
/** \addtogroup qfbsp_draw
*/
//@{
void
Draw_ClearBounds (void)
@ -91,3 +95,5 @@ void
DrawPortal (struct portal_s *portal)
{
}
//@}

View file

@ -45,6 +45,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "options.h"
/** \addtogroup qfbsp_options
*/
//@{
const char *this_program;
static struct option const long_options[] = {
@ -242,3 +246,5 @@ DecodeArgs (int argc, char **argv)
return optind;
}
//@}

View file

@ -33,6 +33,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "outside.h"
#include "winding.h"
/** \addtogroup qfbsp_outside
*/
//@{
int outleafs;
/** Find the leaf node in which the point is.
@ -365,3 +369,5 @@ FillOutside (node_t *node)
qprintf ("%4i outleafs\n", outleafs);
return true;
}
//@}

View file

@ -38,6 +38,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "portals.h"
#include "winding.h"
/** \addtogroup qfbsp_portals
*/
//@{
int c_activeportals, c_peakportals;
node_t outside_node; // portals outside the world face this
@ -448,7 +452,7 @@ ShareContents (node_t *n1, node_t *n2)
/** Check if two nodes have the same non-solid, non-sky contents.
\node Affected by watervis.
\note Affected by watervis.
\param n1 The first node to check.
\param n2 The second node to check.
@ -636,3 +640,5 @@ WritePortalfile (node_t *headnode)
fclose (pf);
}
//@}

View file

@ -59,6 +59,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "writebsp.h"
#include "tjunc.h"
/** \addtogroup qfbsp
*/
//@{
options_t options;
bsp_t *bsp;
@ -486,3 +490,5 @@ qprintf (const char *fmt, ...)
vprintf (fmt, argptr);
va_end (argptr);
}
//@}

View file

@ -58,6 +58,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "readbsp.h"
#include "winding.h"
/** \addtogroup qfbsp_readbsp
*/
//@{
dmodel_t *models;
face_t *mfaces;
node_t *nodes;
@ -474,3 +478,5 @@ extract_hull (void)
}
Qprintf (hf, "};\n");
}
//@}

View file

@ -37,6 +37,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "surfaces.h"
#include "winding.h"
/** \addtogroup qfbsp_region
*/
//@{
/*
input
-----
@ -273,3 +277,5 @@ GrowNodeRegions (node_t *headnode)
if overlap
split
*/
//@}

View file

@ -39,6 +39,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "surfaces.h"
#include "winding.h"
/** \addtogroup qfbsp_solidbsp
*/
//@{
int leaffaces;
int nodefaces;
int splitnodes;
@ -707,3 +711,5 @@ SolidBSP (surface_t *surfhead, qboolean midsplit)
return headnode;
}
//@}

View file

@ -38,6 +38,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "surfaces.h"
#include "winding.h"
/** \addtogroup qfbsp_surface
*/
//@{
/*
a surface has all of the faces that could be drawn on a given plane
@ -431,3 +435,5 @@ MakeFaceEdges (node_t *headnode)
firstmodeledge = bsp->numedges;
firstmodelface = bsp->numfaces;
}
//@}

View file

@ -38,6 +38,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "winding.h"
#include "tjunc.h"
/** \addtogroup qfbsp_tjunc
*/
//@{
typedef struct wvert_s {
vec_t t;
struct wvert_s *prev, *next;
@ -427,3 +431,5 @@ tjunc (node_t *headnode)
qprintf ("%i edges added by tjunctions\n", tjuncs);
qprintf ("%i faces added by tjunctions\n", tjuncfaces);
}
//@}

View file

@ -40,6 +40,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "bsp5.h"
#include "winding.h"
/** \addtogroup qfbsp_winding
*/
//@{
int c_activewindings, c_peakwindings;
winding_t *
@ -301,3 +305,5 @@ FreeWinding (winding_t *w)
c_activewindings--;
free (w);
}
//@}

View file

@ -45,6 +45,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "options.h"
#include "writebsp.h"
/** \addtogroup qfbsp_writebsp
*/
//@{
int headclipnode;
int firstface;
@ -497,3 +501,5 @@ FinishBSPFile (void)
WriteBSPFile (bsp, f);
Qclose (f);
}
//@}