From 87eb96453a405bfa0fbfffb57c9d6cfc74acfb70 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 18 Jul 2020 13:30:51 +0300 Subject: Add compatibility with RW 3.4 --- rwsdk/include/d3d8/rwplcore.h | 1071 ++++++++++++++++++++++++----------------- 1 file changed, 631 insertions(+), 440 deletions(-) (limited to 'rwsdk/include/d3d8/rwplcore.h') diff --git a/rwsdk/include/d3d8/rwplcore.h b/rwsdk/include/d3d8/rwplcore.h index b0ff7dfa..3740ae60 100644 --- a/rwsdk/include/d3d8/rwplcore.h +++ b/rwsdk/include/d3d8/rwplcore.h @@ -22,7 +22,7 @@ /************************************************************************* * * Filename: - * Automatically Generated on: Wed Jul 10 10:45:00 2002 + * Automatically Generated on: Thu Jan 23 11:06:23 2003 * ************************************************************************/ @@ -68,6 +68,7 @@ typedef struct _RwUInt64 RwUInt64; typedef struct _RwInt64 RwInt64; /* We'll do it with structures (can't do maths on these, but OK for allocation): */ +#if (!defined(DOXYGEN)) #ifdef rwBIGENDIAN struct _RwUInt64 { @@ -99,6 +100,7 @@ struct _RwInt64 #error "ENDIAN-ness undefined!" #endif /* rwLITTLEENDIAN */ #endif /* rwBIGENDIAN */ +#endif /* (!defined(DOXYGEN)) */ #define RWZERO64 { (RwUInt32)0, (RwUInt32)0 } #endif /* _MSC_VER */ @@ -108,7 +110,8 @@ typedef struct _RwInt128 RwInt128; /* We'll do it with structures * (can't do maths on these, but OK for allocation): */ -#ifdef rwBIGENDIAN +#if (!defined(DOXYGEN)) +#ifdef rwBIGENDIAN struct _RwUInt128 { RwUInt64 top; @@ -139,6 +142,7 @@ struct _RwInt128 #error "ENDIAN-ness undefined!" #endif /* rwLITTLEENDIAN */ #endif /* rwBIGENDIAN */ +#endif /* (!defined(DOXYGEN)) */ #define RWZERO128 { RWZERO64, RWZERO64 } @@ -160,6 +164,10 @@ struct _RwInt128 #define rwFRAMEALIGNMENT sizeof(RwUInt32) #define rwV4DALIGNMENT sizeof(RwUInt32) +#if (!defined(rwMALLOCALIGNMENT)) +#define rwMALLOCALIGNMENT sizeof(RwUInt32) +#endif /* (!defined(rwMALLOCALIGNMENT) */ + #if (defined(_MSC_VER)) #if (defined(RWVERBOSE)) @@ -501,7 +509,7 @@ int32fromreal(RwReal x) #if (!defined(NOASM)) static __inline RwUInt32 -RwFastRealToUInt32(RwReal x) +RwFastRealToUInt32Inline(RwReal x) { RwUInt32 res; @@ -510,6 +518,9 @@ RwFastRealToUInt32(RwReal x) return(res); } + +#define RwFastRealToUInt32 RwFastRealToUInt32Inline + #endif /* (defined(NOASM)) */ #endif /* (defined(_MSC_VER)) */ @@ -627,11 +638,14 @@ do \ while(0) typedef union _rwIEEEFloatShapeType _rwIEEEFloatShapeType; + +#if (!defined(DOXYGEN)) union _rwIEEEFloatShapeType { float value; unsigned int word; }; +#endif /* (!defined(DOXYGEN)) */ #define _RW_GET_FLOAT_WORD(i,d) \ do { \ @@ -949,13 +963,13 @@ while(0) #if (!defined(rwSqrt)) /* NOTE: this is overloaded in drvmodel.h for some targets (SKY2 and XBOX atm) * [we do in fact do overload w/ sqrtf there, if RW_USE_SPF, - * for D3D7, D3D8, OpenGL and SoftRas] */ + * for D3D8, OpenGL and SoftRas] */ #define rwSqrt(_result, _x) rwSqrtMacro(_result, _x) #endif /* (!defined(rwSqrt)) */ #if (!defined(rwInvSqrt)) /* NOTE: this is overloaded in drvmodel.h for some targets (SKY2 and XBOX atm) * [we do in fact do overload w/ (1 / sqrtf) there, if RW_USE_SPF, - * for D3D7, D3D8, OpenGL and SoftRas] */ + * for D3D8, OpenGL and SoftRas] */ #define rwInvSqrt(_recip, _x) rwInvSqrtMacro(_recip, _x) #endif /* (!defined(rwInvSqrt)) */ #if (!defined(RwTan)) @@ -977,7 +991,22 @@ while(0) /*--- Automatically derived from: C:/daily/rwsdk/src/plcore/batypes.h ---*/ #define rwLIBRARYBASEVERSION 0x31000 -#define rwLIBRARYCURRENTVERSION 0x33002 +#define rwLIBRARYCURRENTVERSION 0x34005 + +#define rwLIBRARYVERSION31000 0x31000 +#if (rwLIBRARYVERSION31000 < rwLIBRARYBASEVERSION) +#error "Time to remove all rwLIBRARYVERSION31000 code" +#endif + +#define rwLIBRARYVERSION34001 0x34001 +#if (rwLIBRARYVERSION34001 < rwLIBRARYBASEVERSION) +#error "Time to remove all rwLIBRARYVERSION34001 code" +#endif + +#define rwLIBRARYVERSION34002 0x34002 +#if (rwLIBRARYVERSION34002 < rwLIBRARYBASEVERSION) +#error "Time to remove all rwLIBRARYVERSION34002 code" +#endif /* * RWBUILDNUMBER @@ -993,14 +1022,16 @@ while(0) * The following Doxygen comment MUST be copied into RwCore.h, * so don't move it from here. */ +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup rwcore - * \page rwcoreoverview Core Library Overview + * \ingroup fundamentaltypes + * \page fundtypesoverview Fundamental Types Overview * - * LIBRARY: rwcore.lib - * HEADER: rwcore.h + * \par Requirements + * \li \b Headers: rwcore.h + * \li \b Libraries: rwcore.lib * - * This library provides the fundamental RenderWare features. + * The rwcore.lib library provides the fundamental RenderWare features. * * When creating a RenderWare application, this library must always be * linked. @@ -1024,7 +1055,7 @@ while(0) * supplied User Guide. The RenderWare Engine \ref rwengine API is * usually the starting point for new developers. */ - +#endif /* RWADOXYGENEXTERNAL */ #if (!defined(RWFORCEENUMSIZEINT)) #define RWFORCEENUMSIZEINT ((RwInt32)((~((RwUInt32)0))>>1)) @@ -1157,7 +1188,6 @@ while(0) #if (defined(RWDEBUG) && defined(RWVERBOSE)) -/* #include */ #if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) #define _CRTDBG_MAP_ALLOC #endif /* defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) */ @@ -1189,6 +1219,8 @@ while(0) /* NB volatile keyword required for VC5.0 to ensure a reload - AMB */ typedef union RwSplitBits RwSplitBits; + +#if (!defined(DOXYGEN)) union RwSplitBits { RwReal nReal; @@ -1219,6 +1251,7 @@ struct RwSplitFixed #endif /* rwBIGENDIAN */ typedef union RwUnionReal RwUnionReal; + union RwUnionReal /* MSB is sign bit in any circumstance */ { RwReal real; /* 4 bytes interpreted as RwReal */ @@ -1226,6 +1259,7 @@ union RwUnionReal /* MSB is sign bit in any circumstance */ RwFixed fixed; /* 4 bytes interpreted as 16:16 fixed */ RwSplitFixed splitfixed; /* 4 bytes interpreted as 16:16 fixed */ }; +#endif /* (!defined(DOXYGEN)) */ /*****************/ @@ -1233,14 +1267,9 @@ union RwUnionReal /* MSB is sign bit in any circumstance */ /*****************/ -/** - * \ingroup datatypes - * \typedef RwV2d - * typedef for struct RwV2d - */ typedef struct RwV2d RwV2d; /** - * \ingroup datatypes + * \ingroup rwv2d * \struct RwV2d * This type represents points in a 2D space, such as device * space, specified by the (x, y) coordinates of the point. @@ -1251,14 +1280,9 @@ struct RwV2d RwReal y; /**< Y vlaue */ }; -/** - * \ingroup datatypes - * \typedef RwV3d - * typedef for struct RwV3d - */ typedef struct RwV3d RwV3d; /** - * \ingroup datatypes + * \ingroup rwv3d * \struct RwV3d * This type represents 3D points and vectors specified by * the (x, y, z) coordinates of a 3D point or the (x, y, z) components of a @@ -1274,13 +1298,16 @@ struct RwV3d #define RWV4DALIGNMENT(_v4d) \ (! (((rwV4DALIGNMENT)-1) & ((RwUInt32)(_v4d)))) +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwv4d * \struct RwV4d * This type represents 4D points and vectors specified by * the (x, y, z, w) coordinates of a 4D point or the (x, y, z, w) components of a * 4D vector. */ +#endif /* RWADOXYGENEXTERNAL */ + struct RwV4d { RwReal x; /**< X value */ @@ -1289,27 +1316,21 @@ struct RwV4d RwReal w; /**< W value */ }; -/** - * \ingroup datatypes - * \typedef RwV4d - * typedef for struct RwV4d - */ typedef struct RwV4d RWALIGN(RwV4d, rwV4DALIGNMENT); -/** - * \ingroup datatypes - * \typedef RwRect - * typedef for struct RwRect - */ typedef struct RwRect RwRect; + +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup geometricaltypes * \struct RwRect * This type represents a 2D device space rectangle specified * by the position of the top-left corner (the offset x, y) and its width (w) * and height (h). */ +#endif /* RWADOXYGENEXTERNAL */ + struct RwRect { RwInt32 x; /**< X value of the top-left corner */ @@ -1318,18 +1339,15 @@ struct RwRect RwInt32 h; /**< Height of the rectangle */ }; -/** - * \ingroup datatypes - * \typedef RwSphere - * typedef for struct RwSphere - */ typedef struct RwSphere RwSphere; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup geometricaltypes * \struct RwSphere * This type represents a sphere specified by the position * of its center and its radius */ +#endif /* RWADOXYGENEXTERNAL */ struct RwSphere { RwV3d center; /**< Sphere center */ @@ -1341,18 +1359,16 @@ struct RwSphere ( *(_target) = *(_source) ) #endif /* (!defined(RwSphereAssign)) */ -/** - * \ingroup datatypes - * \typedef RwLine - * typedef for struct RwLine - */ typedef struct RwLine RwLine; + +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup geometricaltypes * \struct RwLine * This type represents a 3D line specified by the position * of its start and end points. */ +#endif /* RWADOXYGENEXTERNAL */ struct RwLine { RwV3d start; /**< Line start */ @@ -1367,11 +1383,13 @@ struct RwLine /* The maximum number of texture coordinates */ #define rwMAXTEXTURECOORDS 8 +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup fundtypesdatatypes * RwTextureCoordinateIndex * This type represents the index for texture coordinates. */ +#endif /* RWADOXYGENEXTERNAL */ enum RwTextureCoordinateIndex { rwNARWTEXTURECOORDINATEINDEX = 0, @@ -1387,18 +1405,16 @@ enum RwTextureCoordinateIndex }; typedef enum RwTextureCoordinateIndex RwTextureCoordinateIndex; -/** - * \ingroup datatypes - * \typedef RwTexCoords - * typedef for struct RwTexCoords - */ typedef struct RwTexCoords RwTexCoords; + +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup fundtypesdatatypes * \struct RwTexCoords * This type represents the the u and v texture * coordinates of a particular vertex. */ +#endif /* RWADOXYGENEXTERNAL */ struct RwTexCoords { RwReal u; /**< U value */ @@ -1409,10 +1425,13 @@ struct RwTexCoords /* Singley linked list macros. End marked as NULL */ typedef struct RwSLLink RwSLLink; /*** RwSLLink ***/ + +#if (!defined(DOXYGEN)) struct RwSLLink { RwSLLink *next; }; +#endif /* (!defined(DOXYGEN)) */ #define rwSLLinkGetData(link,type,entry) \ ((type *)(((RwUInt8 *)(link))-offsetof(type,entry))) @@ -1427,10 +1446,13 @@ struct RwSLLink ((linkvar)->next) typedef struct RwSingleList RwSingleList; + +#if (!defined(DOXYGEN)) struct RwSingleList { RwSLLink link; }; +#endif /* (!defined(DOXYGEN)) */ #define rwSingleListInitialize(list) \ (list)->link.next= NULL; @@ -1446,11 +1468,14 @@ struct RwSingleList /* Doubly linked list. End marked as start (its a ring) */ typedef struct RwLLLink RwLLLink; /*** RwLLLink ***/ + +#if (!defined(DOXYGEN)) struct RwLLLink { RwLLLink *next; RwLLLink *prev; }; +#endif /* (!defined(DOXYGEN)) */ #define rwLLLinkGetData(linkvar,type,entry) \ ((type *)(((RwUInt8 *)(linkvar))-offsetof(type,entry))) @@ -1472,10 +1497,13 @@ struct RwLLLink ((linkvar)->next) typedef struct RwLinkList RwLinkList; + +#if (!defined(DOXYGEN)) struct RwLinkList { RwLLLink link; }; +#endif /* (!defined(DOXYGEN)) */ #define rwLinkListInitialize(list) \ ( (list)->link.next = ((RwLLLink *)(list)), \ @@ -1497,19 +1525,17 @@ struct RwLinkList #define rwLinkListGetTerminator(list) \ (&((list)->link)) -/** - * \ingroup datatypes - * \typedef RwSurfaceProperties - * typedef for struct RwSurfaceProperties - */ typedef struct RwSurfaceProperties RwSurfaceProperties; + +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup fundtypesdatatypes * \struct RwSurfaceProperties * This type represents the ambient, diffuse and * specular reflection coefficients of a particular geometry. Each coefficient * is specified in the range 0.0 (no reflection) to 1.0 (maximum reflection). */ +#endif /* RWADOXYGENEXTERNAL */ struct RwSurfaceProperties { RwReal ambient; /**< ambient reflection coefficient */ @@ -1541,10 +1567,10 @@ struct RwSurfaceProperties */ #define RWFIX_MIN (1) #define RWFIX_MAX (0x7fffffff) -#define RwFixedCast(A) (RwInt32FromRealMacro((A) * 65536.0f)) -#define RwFixedToInt(A) ((A) >> 16) -#define RwFixedToFloat(A) ((float)(((float)(A)) * (1.0f / 65536.0f))) +#define RwFixedToInt(a) ((a) >> 16) +#define RwFixedToFloat(a) ((float)(((float)(a)) * (1.0f / 65536.0f))) #define RwFixedToReal(a) ((RwReal)(((RwReal)(a)) * (1.0f / 65536.0f))) +#define RwIntToFixed(a) ((a) << 16) #define RwRealToFixed(a) (RwInt32FromRealMacro((a) * 65536.0f)) #define RwRealAbs(a) ((RwReal)((a) >= (RwReal)(0.0) ? (a) : (-(a)))) #define RwRealMin2(a,b) ((RwReal)( ((a) <= (b)) ? (a) : (b))) @@ -1555,7 +1581,6 @@ struct RwSurfaceProperties #ifndef NORWREALSHORTCUT #define RToFixed RwRealToFixed #define RAbs RwRealAbs -#define FxCast RwFixedCast #define FxToInt RwFixedToInt #define FxToFloat RwFixedToFloat #define FxToReal RwFixedToFloat @@ -1580,6 +1605,8 @@ struct RwSurfaceProperties * typedef for struct RwPlane */ typedef struct RwPlane RwPlane; + +#if (!defined(DOXYGEN)) /* * This type represents a plane */ @@ -1588,7 +1615,7 @@ struct RwPlane RwV3d normal; /**< Normal to the plane */ RwReal distance; /**< Distance to plane from origin in normal direction*/ }; - +#endif /* (!defined(DOXYGEN)) */ /**************************************************************************** Defines @@ -1613,7 +1640,7 @@ typedef enum RwPlaneType RwPlaneType; (*(const RwReal *)(((const RwUInt8 *)(&((vect).x)))+(RwInt32)(y))) #define SETCOORD(vect,y,value) \ (((*(RwReal *)(((RwUInt8 *)(&((vect).x)))+(RwInt32)(y))))=(value)) -#define SETCONTCOORD(vect,y,value) \ +#define SETCONSTCOORD(vect,y,value) \ (((*(const RwReal *) \ (((const RwUInt8 *) \ (&((vect).x)))+(RwInt32)(y))))=(value)) @@ -1624,7 +1651,7 @@ typedef enum RwPlaneType RwPlaneType; /** - * \ingroup rwcore + * \ingroup integertypes * \page inttypes Integer Types * * RenderWare supports a number of integer types: @@ -1661,7 +1688,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup realtypes * \typedef RwReal * * RenderWare supports a single RwReal floating-point type to aid portability @@ -1683,7 +1710,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup realtypes * \typedef RwFixed * * RenderWare supports a single RwFixed fixed-point type. @@ -1696,15 +1723,15 @@ typedef enum RwPlaneType RwPlaneType; * RWFIX_MAX and RWFIX_MIN respectively. * * The following macros are provided to help you work with RwFixed datatypes: - * \li RwFixedCast(x) Cast the integer portion of an RwFixed to another type. * \li RwFixedToInt(x) Convert an RwFixed to an integer. (The fractional portion is lost.) * \li RwFixedToFloat(x) Convert an RwFixed to a float. * \li RwFixedToReal(x) Convert an RwFixed to an RwReal. * \li RwRealToFixed(x) Convert an RwReal to an RwFixed. (Some precision may be lost.) + * \li RwIntToFixed(x) Convert an RwInt32 to an RwFixed. (Some precision may be lost.) */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwInt8 * * Signed 8 bit integer type. @@ -1712,7 +1739,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwUInt8 * * Unsigned 8bit integer type. @@ -1720,7 +1747,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwChar * * Character type. @@ -1728,7 +1755,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwInt16 * * Signed 16 bit integer type. @@ -1736,7 +1763,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwUInt16 * * Unsigned 16 bit integer type. @@ -1744,7 +1771,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwInt32 * * Signed 32 bit integer type. @@ -1752,7 +1779,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwUInt32 * * Unsigned 32 bit integer type. @@ -1760,7 +1787,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwInt64 * * Signed 64 bit integer type. @@ -1768,7 +1795,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwUInt64 * * Unsigned 64 bit integer type. @@ -1776,7 +1803,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwInt128 * * Signed 128 bit integer type. @@ -1784,7 +1811,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwUInt128 * * Unsigned 128 bit integer type. @@ -1792,7 +1819,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwBool * * Boolean type. @@ -1894,8 +1921,10 @@ enum RwCorePluginID rwID_PITEXDICTIONARY = 0x23, rwID_TOC = 0x24, rwID_PRTSTDGLOBALDATA = 0x25, + rwID_ALTPIPE = 0x26, + rwID_PIPEDS = 0x27, /* Insert before MAX and increment MAX */ - rwID_COREPLUGINIDMAX = 0x26, + rwID_COREPLUGINIDMAX = 0x28, rwCOREPLUGINIDFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }; typedef enum RwCorePluginID RwCorePluginID ; @@ -1944,12 +1973,15 @@ typedef enum RwPlatformID RwPlatformID; */ typedef struct RwObject RwObject; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwobject * \struct RwObject * This should be considered an opaque type. Use * the RwObject API functions to access. */ +#endif /* RWADOXYGENEXTERNAL */ + struct RwObject { RwUInt8 type; /**< Internal Use */ @@ -1960,20 +1992,23 @@ struct RwObject /* Often a Frame */ }; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * \typedef RwObjectCallBack + * \ingroup rwobject + * \ref RwObjectCallBack * callback function supplied for object callback functions. * - * \return Pointer to the current object - * * \param object Pointer to the current object, supplied by - * iterator. - * \param data Pointer to developer-defined data structure. + * iterator. + * \param data Pointer to developer-defined data structure. + * + * \return Pointer to the current object * * \see RwFrameForAllObjects * */ +#endif /* RWADOXYGENEXTERNAL */ + typedef RwObject *(*RwObjectCallBack)(RwObject *object, void *data); /**************************************************************************** @@ -2128,6 +2163,8 @@ typedef int (*vecSscanfFunc)(const RwChar *buffer, ...) /* __RWFORMAT__(scanf, 2, 3) */; typedef struct RwStringFunctions RwStringFunctions; + +#if (!defined(DOXYGEN)) struct RwStringFunctions { vecSprintfFunc vecSprintf ; @@ -2147,6 +2184,7 @@ struct RwStringFunctions vecStrtokFunc vecStrtok; vecSscanfFunc vecSscanf; }; +#endif /* (!defined(DOXYGEN)) */ /*--- Automatically derived from: C:/daily/rwsdk/src/plcore/rwdbgerr.h ---*/ @@ -2203,32 +2241,32 @@ typedef enum RwErrorCodePlugin_errcore RwErrorCodePlugin_errcore; #endif /* (!defined(rwFREELISTCLEANLANDFILL)) */ #define RWFREELISTALIGNED(_pData, _freelist) \ - (! (((RwUInt32)(_pData)) & ((_freelist)->alignmentMinusOne)) ) + (! (((RwUInt32)(_pData)) & ((_freelist)->alignment - 1)) ) /***************************** * REGULAR MEMORY ALLOCATION * *****************************/ /** - * \ingroup rwmem + * \ingroup memoryfileinterface * \def RwMalloc * RwMalloc(_s) is a macro for malloc(_s). */ /** - * \ingroup rwmem + * \ingroup memoryfileinterface * \def RwFree * RwFree(_p) is a macro for free(_p). */ /** - * \ingroup rwmem + * \ingroup memoryfileinterface * \def RwCalloc * RwCalloc(_n, _s) is a macro for calloc(_n, _s). */ /** - * \ingroup rwmem + * \ingroup memoryfileinterface * \def RwRealloc * RwRealloc(_p, _s) is a macro for realloc(_p, _s). */ @@ -2252,8 +2290,6 @@ typedef enum RwErrorCodePlugin_errcore RwErrorCodePlugin_errcore; # if (defined(_MSC_VER)) # if ((_MSC_VER>=1000) && defined(_DEBUG)) -/* Pick up _ASSERTE() macro */ -/* #include */ #if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) #define _CRTDBG_MAP_ALLOC #endif /* defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) */ @@ -2556,12 +2592,12 @@ typedef enum RwErrorCodePlugin_errcore RwErrorCodePlugin_errcore; typedef struct RwMemoryFunctions RwMemoryFunctions; /** - * \ingroup datatypes + * \ingroup memoryfileinterface * \struct RwMemoryFunctions * This type represents the memory functions used * by RenderWare. By default, the standard ANSI functions are used. The * application may install an alternative interface providing that it is ANSI - * compliant (see API function \ref RwEngineInit): + * compliant (in RenderWare Graphics see API function RwEngineInit): */ struct RwMemoryFunctions { @@ -2574,60 +2610,44 @@ struct RwMemoryFunctions void *(*rwcalloc)(size_t numObj, size_t sizeObj); /**< calloc calloc */ }; -typedef struct RwFreeBlock RwFreeBlock; -/* - * Freelists -- from Page 131 - * Advanced Animation and Rendering Techniques - * Alan Watt and Mark Watt - * Addison-Wesley 1993, - * ISBN 0-201-54412-1: + /** + * \ingroup rwfreelist + * The free list was statically allocated * - * "Lastly, on a more general note concerning speedups for renderers, the - * implementor should be aware that a lot of suggestions for improving - * efficiency fall into the category of ingenious, but complex, - * algorithms for very specific contexts that may save a few microseconds - * but which make your code unreadable. A more general computer science - * perspective that takes a `global view' of the renderer can be more - * fruitful. For example, the renderer devotes a lot of time to - * allocating and deallocating chunks of memory for storing data. A lot - * of these chunks are always the same size - such as those that are - * continually required to store the data structure for fragment lists. - * Using memory management techniques that recognize this fact can yield - * considerable dividends. One such scheme would be to hold a series of - * empty lists in memory for all the commonly used data structures. An - * empty list for fragments, say, would contain a list of previously - * allocated, but no longer needed, fragment structures. When the - * renderer needs memory for a new fragment, it looks first at this empty - * list. If there is nothing there it allocates space directly, - * otherwise it takes a fragments off the end of the list and uses that. - * Conversely, when the renderer no longer needs a fragment, instead of - * freeing it, it goes onto the end of the empty list. In the authors' - * experience, replacing the naive allocate/deallocate scheme with this - * way of managing memory can result in 100% speedup. " - */ -struct RwFreeBlock -{ - RwFreeBlock *nextBlock; -}; - -typedef struct RwFreeList RwFreeList; -struct RwFreeList -{ - void **freeListStack; /* Stack of unused entries */ - void **freeListStackTop; /* Pointer to the top of the stack */ + * \see RwFreeListSetFlags + */ +#define rwFREELISTFLAG_STATIC 0x00000001 - RwFreeBlock *firstBlock; /* Data start */ +/** + * \ingroup rwfreelist + * \hideinitializer + * Free blocks as soon as they are empty + * + * \see RwFreeListSetFlags + */ +#define rwFREELISTFLAG_FREEBLOCKS 0x00000002 - RwInt32 blockSize; /* Size of block in bytes */ - RwInt32 entrySize; /* Entry size */ - RwInt32 alignmentMinusOne; /* Entry alignment minus 1 */ - RwInt32 entriesPerBlock; /* Amount of space in a block */ - RwInt32 entriesAllocated; /* Total slots allocated - * (but not necessarily being used */ +typedef struct RwFreeList RwFreeList; - /* All freelists */ - RwLLLink lFreeList; +/** + * \ingroup rwfreelist + * Holds free list info, should be considered opaque. Use API functions to access. + */ +struct RwFreeList +{ + RwUInt32 entrySize; /** + rwFREELISTFLAG_FREEBLOCKS */ + RwLLLink link; /** #define RwFreeListAlloc(_f) \ - memalign((1 + (_f)->alignmentMinusOne), (_f)->entrySize) + memalign(((_f)->alignment), (_f)->entrySize) #else /* ((defined(__MWERKS__) || defined(__GNUC__)) && defined(__R5900__)) */ @@ -2750,7 +2786,7 @@ extern RwInt32 RwFreeListPurgeAllFreeLists(void); */ /** - * \ingroup datatypes + * \ingroup rwstream * \ref RwStreamType * This type represents the different types of stream that * can be used. @@ -2768,7 +2804,7 @@ enum RwStreamType typedef enum RwStreamType RwStreamType; /** - * \ingroup datatypes + * \ingroup rwstream * \ref RwStreamAccessType * This type represents the options available for * accessing a stream when it is opened. @@ -2785,8 +2821,8 @@ typedef enum RwStreamAccessType RwStreamAccessType; /* Memory stream */ /** - * \ingroup datatypes - * \typedef RwStreamMemory + * \ingroup rwstream + * \struct RwStreamMemory * This should be considered an opaque type. * Use the RwStream API functions to access. */ @@ -2803,7 +2839,7 @@ struct RwStreamMemory typedef union RwStreamFile RwStreamFile; /** - * \ingroup datatypes + * \ingroup rwstream * \union RwStreamFile * This type is used to represent a file pointer for * accessing data on disk through the stream mechanism. @@ -2829,8 +2865,8 @@ typedef RwBool(*rwCustomStreamFnSkip) (void *data, /* Custom stream */ /** - * \ingroup datatypes - * \typedef RwStreamCustom + * \ingroup rwstream + * \struct RwStreamCustom * This should be considered an opaque type. * Use the RwStream API functions to access. */ @@ -2850,7 +2886,7 @@ struct RwStreamCustom typedef union RwStreamUnion RwStreamUnion; /** - * \ingroup datatypes + * \ingroup rwstream * \union RwStreamUnion * The union of all supported stream types */ @@ -2862,8 +2898,8 @@ union RwStreamUnion }; /** - * \ingroup datatypes - * \typedef RwStream + * \ingroup rwstream + * \struct RwStream * Binary stream for reading or writing object data. * This should be considered an opaque type. * Use the RwStream API functions to access. @@ -2883,7 +2919,7 @@ struct RwStream typedef struct RwMemory RwMemory; /** - * \ingroup datatypes + * \ingroup rwstream * \struct RwMemory * This type represents a block of allocated memory. * It is used to specify an area of memory connected to a stream of type @@ -2905,6 +2941,9 @@ extern "C" { #endif /* __cplusplus */ +extern void +RwStreamSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + /* Open/Close streams */ extern RwStream * @@ -2953,8 +2992,9 @@ RwStreamSkip(RwStream * stream, Global Types */ +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginDataChunkWriteCallBack represents the function * registered by \ref RwCameraRegisterPluginStream, etc. as the function that * writes extension data to a binary stream. @@ -2979,7 +3019,7 @@ RwStreamSkip(RwStream * stream, typedef RwStream *(*RwPluginDataChunkWriteCallBack)(RwStream *stream, RwInt32 binaryLength, const void *object, RwInt32 offsetInObject, RwInt32 sizeInObject); /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginDataChunkReadCallBack represents the function * registered by \ref RwCameraRegisterPluginStream, etc. as the function that * reads extension data from a binary stream. @@ -3004,7 +3044,7 @@ typedef RwStream *(*RwPluginDataChunkWriteCallBack)(RwStream *stream, RwInt32 bi typedef RwStream *(*RwPluginDataChunkReadCallBack)(RwStream *stream, RwInt32 binaryLength, void *object, RwInt32 offsetInObject, RwInt32 sizeInObject); /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginDataChunkGetSizeCallBack represents the callback * registered by \ref RwCameraRegisterPluginStream, etc. as the function that * determines the binary size of the extension data. @@ -3022,7 +3062,7 @@ typedef RwStream *(*RwPluginDataChunkReadCallBack)(RwStream *stream, RwInt32 bin typedef RwInt32(*RwPluginDataChunkGetSizeCallBack)(const void *object, RwInt32 offsetInObject, RwInt32 sizeInObject); /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginDataChunkAlwaysCallBack represents the callback * registered by \ref RwCameraSetStreamAlwaysCallBack, etc. as the * function that is called after the reading of plugin stream data is @@ -3037,11 +3077,13 @@ typedef RwInt32(*RwPluginDataChunkGetSizeCallBack)(const void *object, RwInt32 o * * \param sizeInObject A RwInt32 value equal to the size * (in bytes) of the extension data. + * + * \return Returns TRUE if successful, FALSE otherwise. */ typedef RwBool(*RwPluginDataChunkAlwaysCallBack)(void *object, RwInt32 offsetInObject, RwInt32 sizeInObject); /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginDataChunkRightsCallBack represents the callback * registered by RwCameraSetStreamRightsCallBack, etc. as the * function that is called after the reading of plugin stream data is @@ -3058,11 +3100,13 @@ typedef RwBool(*RwPluginDataChunkAlwaysCallBack)(void *object, RwInt32 offsetInO * (in bytes) of the extension data. * * \param extraData An RwUInt32 writen with the plugin id. + * + * \return Returns TRUE if successful, FALSE otherwise. */ typedef RwBool(*RwPluginDataChunkRightsCallBack)(void *object, RwInt32 offsetInObject, RwInt32 sizeInObject, RwUInt32 extraData); /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginObjectConstructor represents the callback * registered by \ref RwEngineRegisterPlugin, \ref RwCameraRegisterPlugin, etc. * as the function that initializes either the global extension data (in the @@ -3083,7 +3127,7 @@ typedef RwBool(*RwPluginDataChunkRightsCallBack)(void *object, RwInt32 offsetInO typedef void *(*RwPluginObjectConstructor)(void *object, RwInt32 offsetInObject, RwInt32 sizeInObject); /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginObjectCopy represents the callback registered by * \ref RwCameraRegisterPlugin, etc. as the function that copies the object * extension data when an object is duplicated. @@ -3105,7 +3149,7 @@ typedef void *(*RwPluginObjectConstructor)(void *object, RwInt32 offsetInObject, typedef void *(*RwPluginObjectCopy)(void *dstObject, const void *srcObject, RwInt32 offsetInObject, RwInt32 sizeInObject); /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginObjectDestructor represents the callback registered * by \ref RwEngineRegisterPlugin, \ref RwCameraRegisterPlugin, etc. as the * function that destroys either the global extension data (in the case of @@ -3123,6 +3167,8 @@ typedef void *(*RwPluginObjectCopy)(void *dstObject, const void *srcObject, RwIn * * \return Pointer to the object. */ +#endif /* RWADOXYGENEXTERNAL */ + typedef void *(*RwPluginObjectDestructor)(void *object, RwInt32 offsetInObject, RwInt32 sizeInObject); typedef void *(*RwPluginErrorStrCallBack)(void *); @@ -3130,6 +3176,7 @@ typedef void *(*RwPluginErrorStrCallBack)(void *); typedef struct RwPluginRegistry RwPluginRegistry; typedef struct RwPluginRegEntry RwPluginRegEntry; +#if (!defined(DOXYGEN)) struct RwPluginRegistry { RwInt32 sizeOfStruct; @@ -3158,6 +3205,7 @@ struct RwPluginRegEntry RwPluginRegEntry *prevRegEntry; RwPluginRegistry *parentRegistry; }; +#endif /* (!defined(DOXYGEN)) */ @@ -3172,6 +3220,9 @@ extern "C" /* Registering toolkits and allocating memory */ +extern void +RwPluginRegistrySetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + extern RwBool _rwPluginRegistrySetStaticPluginsSize(RwPluginRegistry * reg, RwInt32 size); @@ -3355,14 +3406,17 @@ MACRO_STOP #define RWMATRIXPRINT(_matrix) /* No op */ #endif /* (!(defined(RWMATRIXPRINT))) */ +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwmatrix * enum RwOpCombineType * This type represents a combination operator which * can be applied to frames and matrices. * The operator determines the order * in which one object is combined with another */ +#endif /* RWADOXYGENEXTERNAL */ + enum RwOpCombineType { rwCOMBINEREPLACE = 0, /**flags & (RwInt32)(flagsbit)) /* Creation/destruction */ +extern void +RwMatrixSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + extern RwBool RwMatrixDestroy(RwMatrix * mpMat); @@ -3693,7 +3746,7 @@ MACRO_STOP rwMATRIXTYPENORMAL) ) || /* ... or actually is */ \ rwMatrixIsNormal(_matrix, _epsilon)) && \ ( ( !( rwMatrixGetFlags(_matrix) & /* not flagged as orthogonal */ \ - rwMATRIXTYPEORTHOGANAL) ) || /* ... or actually is */ \ + rwMATRIXTYPEORTHOGONAL) ) || /* ... or actually is */ \ rwMatrixIsOrthogonal(_matrix, _epsilon)) ) #define rwMat01Det(_mAA) \ @@ -3906,8 +3959,6 @@ MACRO_STOP #pragma warning( disable : 344 ) #endif /* (defined(__ICL)) */ -//nobody needed that - AAP -//#include #if (defined(RWDEBUG)) #if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) @@ -4001,48 +4052,16 @@ MACRO_START \ } \ MACRO_STOP -/* LEGACY-SUPPORT macros */ -#define RWIM2DVERTEXSetCameraX(vert, camx) RwIm2DVertexSetCameraX(vert, camx) -#define RWIM2DVERTEXSetCameraY(vert, camy) RwIm2DVertexSetCameraY(vert, camy) -#define RWIM2DVERTEXSetCameraZ(vert, camz) RwIm2DVertexSetCameraZ(vert, camz) -#define RWIM2DVERTEXSetRecipCameraZ(vert, recipz) \ - RwIm2DVertexSetRecipCameraZ(vert, recipz) -#define RWIM2DVERTEXGetCameraX(vert) RwIm2DVertexGetCameraX(vert) -#define RWIM2DVERTEXGetCameraY(vert) RwIm2DVertexGetCameraY(vert) -#define RWIM2DVERTEXGetCameraZ(vert) RwIm2DVertexGetCameraZ(vert) -#define RWIM2DVERTEXGetRecipCameraZ(vert) RwIm2DVertexGetRecipCameraZ(vert) -#define RWIM2DVERTEXSetScreenX(vert, scrnx) RwIm2DVertexSetScreenX(vert, scrnx) -#define RWIM2DVERTEXSetScreenY(vert, scrny) RwIm2DVertexSetScreenY(vert, scrny) -#define RWIM2DVERTEXSetScreenZ(vert, scrnz) RwIm2DVertexSetScreenZ(vert, scrnz) -#define RWIM2DVERTEXGetScreenX(vert) RwIm2DVertexGetScreenX(vert) -#define RWIM2DVERTEXGetScreenY(vert) RwIm2DVertexGetScreenY(vert) -#define RWIM2DVERTEXGetScreenZ(vert) RwIm2DVertexGetScreenZ(vert) -#define RWIM2DVERTEXSetU(vert, u, recipz) RwIm2DVertexSetU(vert, u, recipz) -#define RWIM2DVERTEXSetV(vert, v, recipz) RwIm2DVertexSetV(vert, v, recipz) -#define RWIM2DVERTEXGetU(vert) RwIm2DVertexGetU(vert) -#define RWIM2DVERTEXGetV(vert) RwIm2DVertexGetV(vert) -#define RWIM2DVERTEXSetRealRGBA(vert, red, green, blue, alpha) \ - RwIm2DVertexSetRealRGBA(vert, red, green, blue, alpha) -#define RWIM2DVERTEXSetIntRGBA(vert, red, green, blue, alpha) \ - RwIm2DVertexSetIntRGBA(vert, red, green, blue, alpha) -#define RWIM2DVERTEXGetRed(vert) RwIm2DVertexGetRed(vert) -#define RWIM2DVERTEXGetGreen(vert) RwIm2DVertexGetGreen(vert) -#define RWIM2DVERTEXGetBlue(vert) RwIm2DVertexGetBlue(vert) -#define RWIM2DVERTEXGetAlpha(vert) RwIm2DVertexGetAlpha(vert) -#define RWIM2DVERTEXCopyRGBA(dst, src) RwIm2DVertexCopyRGBA(dst, src) -#define RWIM2DVERTEXClipRGBA(o, i, n, f) RwIm2DVertexClipRGBA(o, i, n, f) - /**************************************************************************** Global Types */ /* We use RwD3D8Vertex to drive the hardware in 2D mode */ -/** - * \ingroup rwcoredriverd3d8 - * \typedef RwD3D8Vertex +/* * D3D8 vertex structure definition for 2D geometry */ +#if !defined(RWADOXYGENEXTERNAL) typedef struct RwD3D8Vertex RwD3D8Vertex; /** * \ingroup rwcoredriverd3d8 @@ -4061,47 +4080,41 @@ struct RwD3D8Vertex RwReal u; /**< Texture coordinate U */ RwReal v; /**< Texture coordinate V */ }; +#endif /* !defined(RWADOXYGENEXTERNAL) */ /* Define types used */ +#if !defined(RWADOXYGENEXTERNAL) /** * \ingroup rwcoredriverd3d8 - * \typedef RwIm2DVertex + * \ref RwIm2DVertex * Typedef for a RenderWare Graphics Immediate Mode 2D Vertex */ typedef RwD3D8Vertex RwIm2DVertex; +#endif /* !defined(RWADOXYGENEXTERNAL) */ -/* LEGACY-SUPPORT macro */ +#if !defined(RWADOXYGENEXTERNAL) /** * \ingroup rwcoredriverd3d8 - * \def RWIM2DVERTEX - * RWIM2DVERTEX is a legacy macro for RwIm2DVertex - */ -#define RWIM2DVERTEX RwIm2DVertex - -/** - * \ingroup rwcoredriverd3d8 - * \typedef RxVertexIndex + * \ref RxVertexIndex * * Typedef for a RenderWare Graphics PowerPipe Immediate * Mode Vertex */ typedef RwUInt16 RxVertexIndex; +#endif /* !defined(RWADOXYGENEXTERNAL) */ + +#if !defined(RWADOXYGENEXTERNAL) /** * \ingroup rwcoredriverd3d8 - * \typedef RwImVertexIndex + * \ref RwImVertexIndex * Typedef for a RenderWare Graphics Immediate Mode Vertex. */ typedef RxVertexIndex RwImVertexIndex; +#endif /* !defined(RWADOXYGENEXTERNAL) */ -/* LEGACY-SUPPORT macro */ -/** - * \ingroup rwcoredriverd3d8 - * \def RWIMVERTEXINDEX - * RWIMVERTEXINDEX is a legacy macro for RwImVertexIndex - */ -#define RWIMVERTEXINDEX RwImVertexIndex +#if !defined(RWADOXYGENEXTERNAL) /** * \ingroup rwcoredriverd3d8 @@ -4114,8 +4127,10 @@ typedef struct RwUInt32 numTextureStageStateChanges; /**< Number of Texture Stage States changed */ RwUInt32 numMaterialChanges; /**< Number of Material changes */ RwUInt32 numLightsChanged; /**< Number of Lights changed */ + RwUInt32 numVBSwitches; /**< Number of Vertex Buffer switches */ } RwD3D8Metrics; +#endif /* !defined(RWADOXYGENEXTERNAL) */ #endif /* D3D8_DRVMODEL_H */ @@ -4125,7 +4140,7 @@ RwD3D8Metrics; * Typedef for pointer to Vector multiplication by Matrix function */ -typedef RwV3d *(*rwVectorMultFn) (RwV3d * pointsOut, +typedef RwV3d *(*rwVectorMultFn) (RwV3d * pointsOut, const RwV3d * pointsIn, RwInt32 numPoints, const RwMatrix * matrix); @@ -4136,7 +4151,7 @@ typedef RwV3d *(*rwVectorMultFn) (RwV3d * pointsOut, * currently applies to SKY2 and XBOX - IDBS [2/11/2001] * [and, if using the intel compiler version 400 or above, * we will use the single-precision float "sqrtf" under - * D3D7, D3D8, OpenGL or SoftRas] */ + * D3D8, OpenGL or SoftRas] */ #if (defined(rwSqrtMacro)) #define RWNOSQRTTABLE #endif /* (defined(rwSqrtMacro)) */ @@ -4198,7 +4213,7 @@ MACRO_STOP #define RwV2dDotProductMacro(a,b) \ (( ((((a)->x) * ( (b)->x))) + \ - ( (((a)->y) * ( (b)->y))))) \ + ( (((a)->y) * ( (b)->y))))) #define _rwV2dNormalizeMacro(_result, _out, _in) \ MACRO_START \ @@ -4303,7 +4318,7 @@ MACRO_STOP #define RwV3dDotProductMacro(a, b) \ ((((( (((a)->x) * ((b)->x))) + \ ( (((a)->y) * ((b)->y))))) + \ - ( (((a)->z) * ((b)->z))))) \ + ( (((a)->z) * ((b)->z))))) #define RwV3dCrossProductMacro(o, a, b) \ MACRO_START \ @@ -4375,7 +4390,7 @@ MACRO_STOP #endif /* (!defined(rw4OVERPISQ)) */ #if (!defined(rwPI3)) -#define rwPI3 (rwPI * (RwReal)3) +#define rwPI3 (rwPI * (RwReal)3) #endif /* (!defined(rwPI3)) */ #if (!defined(rwPI3OVER2)) @@ -4463,7 +4478,7 @@ extern void RwV3dSub(RwV3d * out, const RwV3d * ina, const RwV3d * inb); extern void RwV3dScale(RwV3d * out, const RwV3d * in, RwReal scalar); -extern void RwV3dIncrementScaled(RwV3d * out, +extern void RwV3dIncrementScaled(RwV3d * out, const RwV3d * in, RwReal scalar); extern void RwV3dNegate(RwV3d * out, const RwV3d * in); extern RwReal RwV3dDotProduct(const RwV3d * ina, const RwV3d * inb); @@ -4513,6 +4528,8 @@ extern RwReal _rwV3dNormalize(RwV3d * out, const RwV3d * in); */ typedef struct RwSList RwSList; + +#if (!defined(DOXYGEN)) struct RwSList { RwUInt8 *listElements; @@ -4520,7 +4537,7 @@ struct RwSList RwInt32 numElementsAlloced; RwInt32 entrySize; }; - +#endif /* (!defined(DOXYGEN) */ /**************************************************************************** @@ -4595,99 +4612,169 @@ extern void *_rwSListToArray(RwSList *sList); !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * RwRenderState - * This type represents the various render states that - * can be set using the API function \ref RwRenderStateSet. This function also - * takes a render state value or pointer to an object depending on the type. - * For render states that are toggles, the value should be TRUE to switch the - * state on and FALSE to turn it off. + * \ingroup rwrenderstate + * RwRenderState represents the global state variables that control + * rendering. These may be set and queried using the + * \ref RwRenderStateSet and \ref RwRenderStateGet functions respectively. + * + * Refer to the \ref rwrenderstateoverview for an overview of this system. * - * Note that many of these render states may not be supported on certain - * platforms. The \ref RwRenderStateSet functions will return FALSE in such cases. + * \note The texture render states (raster, address & filter modes) would + * normally just be used when rendering in immediate mode and should be + * specificied completely every time a texture is used. Retained mode + * pipelines will frequently set theses states internally, usually based on + * \ref RwTexture objects. */ +#endif /* RWADOXYGENEXTERNAL */ enum RwRenderState { rwRENDERSTATENARENDERSTATE = 0, - rwRENDERSTATETEXTURERASTER, /** Supported on Xbox, D3D8, and OpenGL only. + */ + rwRENDERSTATESTENCILFAIL, + /**<\ref RwStencilOperation used when the stencil test passes. + * Supported on Xbox, D3D8, and OpenGL only. + */ + rwRENDERSTATESTENCILZFAIL, + /**<\ref RwStencilOperation used when the stencil test passes and + * the depth test (z-test) fails. + * Supported on Xbox, D3D8, and OpenGL only. + */ + rwRENDERSTATESTENCILPASS, + /** Supported on Xbox, D3D8, and OpenGL only. + */ + rwRENDERSTATESTENCILFUNCTION, + /**<\ref RwStencilFunction for the stencil test. + * Supported on Xbox, D3D8, and OpenGL only. + */ + rwRENDERSTATESTENCILFUNCTIONREF, + /** Supported on Xbox, D3D8, and OpenGL only. + */ + rwRENDERSTATESTENCILFUNCTIONMASK, + /** Supported on Xbox, D3D8, and OpenGL only. + */ + rwRENDERSTATESTENCILFUNCTIONWRITEMASK, + /** Supported on Xbox, D3D8, and OpenGL only. + */ rwRENDERSTATEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }; typedef enum RwRenderState RwRenderState; - +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * RwShadeMode - * This type represents the options available for setting the - * rwRENDERSTATESHADEMODE render state */ + * \ingroup rwrenderstate + * RwShadeMode represents the available shading modes that may be + * set using the \ref RwRenderState \ref rwRENDERSTATESHADEMODE. + */ +#endif /* RWADOXYGENEXTERNAL */ enum RwShadeMode { - rwSHADEMODENASHADEMODE = 0, /**var) +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * \typedef RwResEntry + * \ingroup rwresources + * \struct RwResEntry * RwResEntry object. Instanced data block in resources arena. * This should be considered an opaque * type. Use the RwResEntry API functions to access. */ +#endif /* RWADOXYGENEXTERNAL */ + typedef struct RwResEntry RwResEntry; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * \typedef RwResEntryDestroyNotify - * This type represents the function + * \ingroup rwresources + * \ref RwResEntryDestroyNotify type represents the function * called from \ref RwResourcesFreeResEntry (and indirectly from * \ref RwResourcesEmptyArena) immediately before the memory used by the * specified resources entry is released. * * \param resEntry Pointer to the instanced data. */ +#endif /* RWADOXYGENEXTERNAL */ typedef void (*RwResEntryDestroyNotify) (RwResEntry * resEntry); #if (!defined(DOXYGEN)) struct RwResEntry { - RwLLLink link; /**< Node in the list of resource elements */ - RwInt32 size; /**< Size of this node */ - void *owner; /**< Owner of this node */ - RwResEntry **ownerRef; /**< Pointer to pointer to this (enables de-alloc) */ - RwResEntryDestroyNotify destroyNotify; /**< This is called right before destruction */ + RwLLLink link; /* Node in the list of resource elements */ + RwInt32 size; /* Size of this node */ + void *owner; /* Owner of this node */ + RwResEntry **ownerRef; /* Pointer to pointer to this (enables de-alloc) */ + RwResEntryDestroyNotify destroyNotify; /* This is called right before destruction */ }; #endif /* (!defined(DOXYGEN)) */ typedef struct rwResources rwResources; + +#if (!defined(DOXYGEN)) struct rwResources { RwInt32 maxSize; @@ -5711,11 +5890,13 @@ struct rwResources RwLinkList *usedEntries; }; + typedef struct rwResourcesGlobals rwResourcesGlobals; struct rwResourcesGlobals { rwResources res; }; +#endif /* (!defined(DOXYGEN)) */ #ifdef __cplusplus @@ -5768,8 +5949,9 @@ extern RwModuleInfo resourcesModule; */ typedef struct RwRGBAReal RwRGBAReal; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwrgba * \struct RwRGBAReal * This structure represents a RGBA color which has * components specified as real values. @@ -5785,6 +5967,7 @@ typedef struct RwRGBAReal RwRGBAReal; * value 0 generally corresponds to the associcated component in an * RwRGBAReal with the value 0.0. */ +#endif /* RWADOXYGENEXTERNAL */ struct RwRGBAReal { RwReal red; /**< red component */ @@ -5799,11 +5982,14 @@ struct RwRGBAReal #endif /* (!defined(RwRGBARealAssign)) */ typedef struct RwRGBA RwRGBA; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwrgba * \struct RwRGBA * This structure represents a RGBA color - * which has integer components specified in the range 0 to 255. */ + * which has integer components specified in the range 0 to 255. + */ +#endif /* RWADOXYGENEXTERNAL */ struct RwRGBA { RwUInt8 red; /**< red component */ @@ -5947,6 +6133,7 @@ extern void RwRGBARealFromRwRGBA(RwRGBAReal *result, /* Matrix stream format */ typedef struct rwStreamMatrix RwMatrixChunkInfo; typedef struct rwStreamMatrix rwStreamMatrix; +#if (!defined(DOXYGEN)) struct rwStreamMatrix { RwV3d right; @@ -5955,6 +6142,7 @@ struct rwStreamMatrix RwV3d pos; RwInt32 type; }; +#endif /* (!defined(DOXYGEN)) */ /**************************************************************************** @@ -6009,11 +6197,14 @@ extern RwMatrixChunkInfo *RwMatrixChunkInfoRead(RwStream * stream, */ typedef struct RwChunkHeaderInfo RwChunkHeaderInfo; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwstream * \struct RwChunkHeaderInfo * Holds data for a chunk header read from a - * stream with \ref RwStreamReadChunkHeaderInfo. */ + * stream with \ref RwStreamReadChunkHeaderInfo. + */ +#endif /* RWADOXYGENEXTERNAL */ struct RwChunkHeaderInfo { RwUInt32 type; /**< chunk ID - see \ref RwStreamFindChunk */ -- cgit v1.2.3