Turn a lot of already-available function documentation comments into Doxygen documentation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3739 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
72003cf9bf
commit
722303eb84
|
@ -17,14 +17,9 @@
|
|||
along with Warzone 2100; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/***************************************************************************/
|
||||
/*
|
||||
* piedraw.c
|
||||
*
|
||||
* updated render routines for 3D coloured shaded transparency rendering
|
||||
*
|
||||
/** \file
|
||||
* Render routines for 3D coloured and shaded transparency rendering.
|
||||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
#include <string.h>
|
||||
#include <SDL_opengl.h>
|
||||
|
@ -54,11 +49,9 @@ static GLfloat aVertex[VERTEX_COMPONENTS * MAP_VERTICES];
|
|||
|
||||
extern BOOL drawing_interface;
|
||||
|
||||
/***************************************************************************/
|
||||
/*
|
||||
* OpenGL extensions for shadows
|
||||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
BOOL check_extension(const char* extension_name)
|
||||
{
|
||||
|
@ -126,12 +119,9 @@ static BOOL stencil_one_pass(void)
|
|||
return (1 == can_do_stencil_one_pass); // to get the types right
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/*
|
||||
* Local Variables
|
||||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
static TERRAIN_VERTEXF pieVrts[pie_MAX_VERTICES_PER_POLYGON];
|
||||
static unsigned int pieCount = 0;
|
||||
|
@ -140,12 +130,9 @@ static unsigned int polyCount = 0;
|
|||
static BOOL lighting = FALSE;
|
||||
static BOOL shadows = FALSE;
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/*
|
||||
* Source
|
||||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
void pie_BeginLighting(const Vector3f * light)
|
||||
{
|
||||
|
@ -173,7 +160,6 @@ void pie_EndLighting(void)
|
|||
lighting = FALSE;
|
||||
}
|
||||
|
||||
|
||||
static inline void pie_Polygon(const unsigned int numVerts, const TERRAIN_VERTEXF* pVrts, const BOOL light)
|
||||
{
|
||||
unsigned int i = 0;
|
||||
|
@ -242,7 +228,6 @@ static inline void pie_Polygon(const unsigned int numVerts, const TERRAIN_VERTEX
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
* pie_PiePoly
|
||||
*
|
||||
|
@ -278,7 +263,6 @@ static inline void pie_PiePoly(const PIEPOLY *poly, const BOOL light)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static inline void pie_PiePolyFrame(PIEPOLY *poly, SDWORD frame, const BOOL light)
|
||||
{
|
||||
if ( (poly->flags & iV_IMD_TEXANIM) && poly->pTexAnim != NULL && frame != 0 )
|
||||
|
@ -306,7 +290,6 @@ static inline void pie_PiePolyFrame(PIEPOLY *poly, SDWORD frame, const BOOL ligh
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
* pie_Draw3dShape
|
||||
*
|
||||
|
@ -455,7 +438,6 @@ static void pie_Draw3DShape2(iIMDShape *shape, int frame, PIELIGHT colour, PIELI
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// returns true if the edges are adjacent
|
||||
static int compare_edge (EDGE *A, EDGE *B, const Vector3f *pVertices )
|
||||
{
|
||||
|
@ -509,7 +491,6 @@ static void addToEdgeList(int a, int b, EDGE *edgelist, unsigned int* edge_count
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// scale the height according to the flags
|
||||
static inline float scale_y(float y, int flag, int flag_data)
|
||||
{
|
||||
|
@ -525,7 +506,6 @@ static inline float scale_y(float y, int flag, int flag_data)
|
|||
return tempY;
|
||||
}
|
||||
|
||||
|
||||
/// Draw the shadow for a shape
|
||||
static void pie_DrawShadow(iIMDShape *shape, int flag, int flag_data, Vector3f* light)
|
||||
{
|
||||
|
@ -670,7 +650,6 @@ static void inverse_matrix(const float * src, float * dst)
|
|||
dst[8] = invdet * (src[0]*src[5] - src[4]*src[1]);
|
||||
}
|
||||
|
||||
|
||||
void pie_CleanUp( void )
|
||||
{
|
||||
free( tshapes );
|
||||
|
@ -783,7 +762,6 @@ void pie_Draw3DShape(iIMDShape *shape, int frame, int team, PIELIGHT colour, PIE
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static void pie_ShadowDrawLoop(void)
|
||||
{
|
||||
unsigned int i = 0;
|
||||
|
@ -795,7 +773,6 @@ static void pie_ShadowDrawLoop(void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static void pie_DrawShadows(void)
|
||||
{
|
||||
const float width = pie_GetVideoBufferWidth();
|
||||
|
@ -934,12 +911,6 @@ void pie_DrawImage(PIEIMAGE *image, PIERECT *dest)
|
|||
glEnd();
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
void pie_DrawTerrainDone(int mapx, int mapy)
|
||||
{
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
|
|
|
@ -17,14 +17,9 @@
|
|||
along with Warzone 2100; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/***************************************************************************/
|
||||
/*
|
||||
* piefunc.c
|
||||
*
|
||||
* extended render routines for 3D rendering
|
||||
*
|
||||
/** \file
|
||||
* Extended render routines for 3D rendering.
|
||||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
#include "lib/framework/frame.h"
|
||||
#include "lib/framework/frameint.h"
|
||||
|
@ -40,13 +35,9 @@
|
|||
#include "lib/ivis_common/piemode.h"
|
||||
#include "lib/ivis_common/pieclip.h"
|
||||
|
||||
/***************************************************************************/
|
||||
/*
|
||||
* Source
|
||||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
/* ---------------------------------------------------------------------------------- */
|
||||
|
||||
void pie_DrawViewingWindow(Vector3i *v, UDWORD x1, UDWORD y1, UDWORD x2, UDWORD y2, PIELIGHT colour)
|
||||
{
|
||||
|
@ -102,7 +93,6 @@ void pie_DrawViewingWindow(Vector3i *v, UDWORD x1, UDWORD y1, UDWORD x2, UDWORD
|
|||
glDisable(GL_SCISSOR_TEST);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------- */
|
||||
void pie_TransColouredTriangle(CLIP_VERTEX *vrt, PIELIGHT c)
|
||||
{
|
||||
UDWORD i;
|
||||
|
@ -120,8 +110,6 @@ void pie_TransColouredTriangle(CLIP_VERTEX *vrt, PIELIGHT c)
|
|||
glEnd();
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------- */
|
||||
|
||||
void pie_DrawSkybox(float scale, int u, int v, int w, int h)
|
||||
{
|
||||
const float r = 1.0f; // just because it is shorter than 1.0f
|
||||
|
@ -204,8 +192,6 @@ void pie_DrawFogBox(float left, float right, float front, float back, float heig
|
|||
glPopAttrib();
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------- */
|
||||
|
||||
UBYTE pie_ByteScale(UBYTE a, UBYTE b)
|
||||
{
|
||||
return ((UDWORD)a * (UDWORD)b) >> 8;
|
||||
|
|
|
@ -17,14 +17,9 @@
|
|||
along with Warzone 2100; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/***************************************************************************/
|
||||
/*
|
||||
* pieMatrix.c
|
||||
*
|
||||
* matrix functions for pumpkin image library.
|
||||
*
|
||||
/** \file
|
||||
* Matrix manipulation functions.
|
||||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
#include "lib/framework/frame.h"
|
||||
|
||||
|
@ -264,8 +259,8 @@ void pie_MatRotX(int x)
|
|||
/*!
|
||||
* 3D vector perspective projection
|
||||
* Projects 3D vector into 2D screen space
|
||||
* \param v3d 3D vector to project
|
||||
* \param v2d resulting 2D vector
|
||||
* \param v3d 3D vector to project
|
||||
* \param[out] v2d resulting 2D vector
|
||||
* \return projected z component of v2d
|
||||
*/
|
||||
Sint32 pie_RotateProject(const Vector3i *v3d, Vector2i *v2d)
|
||||
|
@ -296,9 +291,6 @@ Sint32 pie_RotateProject(const Vector3i *v3d, Vector2i *v2d)
|
|||
return zz;
|
||||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
void pie_PerspectiveBegin(void)
|
||||
{
|
||||
const float width = pie_GetVideoBufferWidth();
|
||||
|
@ -352,8 +344,6 @@ void pie_BeginInterface(void)
|
|||
drawing_interface = TRUE;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
void pie_SetGeometricOffset(int x, int y)
|
||||
{
|
||||
psRendSurface->xcentre = x;
|
||||
|
@ -361,16 +351,10 @@ void pie_SetGeometricOffset(int x, int y)
|
|||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
//*** inverse rotate 3D vector with current rotation matrix
|
||||
//*
|
||||
//* params v1 = pointer to 3D vector to rotate
|
||||
//* v2 = pointer to 3D resultant vector
|
||||
//*
|
||||
//* on exit v2 = inverse-rotated vector
|
||||
//*
|
||||
//******
|
||||
|
||||
/** Inverse rotate 3D vector with current rotation matrix.
|
||||
* @param v1 3D vector to rotate
|
||||
* @param[out] v2 inverse rotated 3D vector
|
||||
*/
|
||||
void pie_VectorInverseRotate0(const Vector3i *v1, Vector3i *v2)
|
||||
{
|
||||
Sint32 x, y, z;
|
||||
|
@ -382,11 +366,8 @@ void pie_VectorInverseRotate0(const Vector3i *v1, Vector3i *v2)
|
|||
v2->z = (x * psMatrix->g+y * psMatrix->h+z * psMatrix->i) >> FP12_SHIFT;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
//*** setup transformation matrices/quaternions and trig tables
|
||||
//*
|
||||
//******
|
||||
|
||||
/** Sets up transformation matrices/quaternions and trig tables
|
||||
*/
|
||||
void pie_MatInit(void)
|
||||
{
|
||||
unsigned i, scsize;
|
||||
|
|
|
@ -17,14 +17,9 @@
|
|||
along with Warzone 2100; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/***************************************************************************/
|
||||
/*
|
||||
* pieState.c
|
||||
*
|
||||
* renderer setup and state control routines for 3D rendering
|
||||
*
|
||||
/** \file
|
||||
* Renderer setup and state control routines for 3D rendering.
|
||||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
#include "lib/framework/frame.h"
|
||||
|
||||
|
@ -36,36 +31,37 @@
|
|||
#include "lib/ivis_common/tex.h"
|
||||
#include "lib/ivis_common/piepalette.h"
|
||||
|
||||
/***************************************************************************/
|
||||
/*
|
||||
* Global Variables
|
||||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
extern RENDER_STATE rendStates;
|
||||
|
||||
/***************************************************************************/
|
||||
/*
|
||||
* Source
|
||||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
void pie_SetDepthBufferStatus(DEPTH_MODE depthMode) {
|
||||
switch(depthMode) {
|
||||
void pie_SetDepthBufferStatus(DEPTH_MODE depthMode)
|
||||
{
|
||||
switch(depthMode)
|
||||
{
|
||||
case DEPTH_CMP_LEQ_WRT_ON:
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
glDepthMask(GL_TRUE);
|
||||
break;
|
||||
|
||||
case DEPTH_CMP_ALWAYS_WRT_ON:
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDepthMask(GL_TRUE);
|
||||
break;
|
||||
|
||||
case DEPTH_CMP_LEQ_WRT_OFF:
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
glDepthMask(GL_FALSE);
|
||||
break;
|
||||
|
||||
case DEPTH_CMP_ALWAYS_WRT_OFF:
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDepthMask(GL_FALSE);
|
||||
|
@ -95,13 +91,11 @@ void pie_UpdateFogDistance(float begin, float end)
|
|||
glFogf(GL_FOG_END, end);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
//
|
||||
// pie_SetFogStatus(BOOL val)
|
||||
//
|
||||
// Toggle fog on and off for rendering objects inside or outside the 3D world
|
||||
//
|
||||
//***************************************************************************
|
||||
|
||||
void pie_SetFogStatus(BOOL val)
|
||||
{
|
||||
|
@ -183,7 +177,6 @@ void pie_SetAlphaTest(BOOL keyingOn)
|
|||
}
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
void pie_SetColourCombine(COLOUR_MODE colCombMode)
|
||||
{
|
||||
if (colCombMode != rendStates.colourCombine) {
|
||||
|
@ -202,7 +195,6 @@ void pie_SetColourCombine(COLOUR_MODE colCombMode)
|
|||
}
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
void pie_SetTranslucencyMode(TRANSLUCENCY_MODE transMode)
|
||||
{
|
||||
if (transMode != rendStates.transMode) {
|
||||
|
@ -228,7 +220,6 @@ void pie_SetTranslucencyMode(TRANSLUCENCY_MODE transMode)
|
|||
}
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
void pie_SetGammaValue(float val)
|
||||
{
|
||||
debug(LOG_VIDEO, "%s(%f)", __FUNCTION__, val);
|
||||
|
|
Loading…
Reference in New Issue