Add compatibility with RW 3.4

This commit is contained in:
Sergeanur 2020-07-18 13:30:51 +03:00
parent dd717b2d93
commit 87eb96453a
96 changed files with 2572 additions and 25458 deletions

View File

@ -48,10 +48,10 @@ workspace "reVC"
filter { "system:windows" } filter { "system:windows" }
platforms { platforms {
"win-x86-RW33_d3d8-mss", "win-x86-RW34_d3d8-mss",
"win-x86-librw_d3d9-mss", "win-x86-librw_d3d9-mss",
"win-x86-librw_gl3_glfw-mss", "win-x86-librw_gl3_glfw-mss",
"win-x86-RW33_d3d8-oal", "win-x86-RW34_d3d8-oal",
"win-x86-librw_d3d9-oal", "win-x86-librw_d3d9-oal",
"win-x86-librw_gl3_glfw-oal", "win-x86-librw_gl3_glfw-oal",
} }
@ -128,7 +128,7 @@ project "librw"
targetdir "lib/%{cfg.platform}/%{cfg.buildcfg}" targetdir "lib/%{cfg.platform}/%{cfg.buildcfg}"
files { path.join(Librw, "src/*.*") } files { path.join(Librw, "src/*.*") }
files { path.join(Librw, "src/*/*.*") } files { path.join(Librw, "src/*/*.*") }
filter "platforms:*RW33*" filter "platforms:*RW34*"
flags { "ExcludeFromBuild" } flags { "ExcludeFromBuild" }
filter {} filter {}
end end
@ -218,11 +218,11 @@ project "reVC"
filter "platforms:linux*oal" filter "platforms:linux*oal"
links { "openal", "mpg123", "sndfile", "pthread" } links { "openal", "mpg123", "sndfile", "pthread" }
filter "platforms:*RW33*" filter "platforms:*RW34*"
staticruntime "on" staticruntime "on"
includedirs { "rwsdk/include/d3d8" } includedirs { "rwsdk/include/d3d8" }
libdirs { "rwsdk/lib/d3d8/release" } libdirs { "rwsdk/lib/d3d8/release" }
links { "rwcore", "rpworld", "rpmatfx", "rpskin", "rphanim", "rtbmp", "rtquat", "rtcharse" } links { "rwcore", "rpworld", "rpmatfx", "rpskin", "rphanim", "rtbmp", "rtquat", "rtanim", "rtcharse", "rpanisot" }
defines { "RWLIBS" } defines { "RWLIBS" }
linkoptions "/SECTION:_rwcseg,ER!W /MERGE:_rwcseg=.text" linkoptions "/SECTION:_rwcseg,ER!W /MERGE:_rwcseg=.text"

View File

@ -1,793 +0,0 @@
/* If this file is used outside of the core RW SDK,
* the following things need to be defined
*/
#if (!defined(RWASSERT))
#define RWASSERT(_assertval) /* No op */
#endif
#if (!defined(RWFUNCTION))
#define RWFUNCTION(_rwfunctionstring) /* No op */
#endif
#if (!defined(RWRETURN))
#define RWRETURN(_rwreturnval) return(_rwreturnval)
#endif
#if (!defined(RWRETURNVOID))
#define RWRETURNVOID() return
#endif
/* These are used by specular lighting,
* sorry I have to leave them in here... IDBS
* I'll make it neater when I have time.
*/
#if (!defined(FALLOFFAMBIENT))
#define FALLOFFAMBIENT() /* No op */
#endif
#if (!defined(FALLOFFDIRECTIONAL))
#define FALLOFFDIRECTIONAL() /* No op */
#endif
#if (!defined(FALLOFFPOINT))
#define FALLOFFPOINT() /* No op */
#endif
#if (!defined(FALLOFFSPOT))
#define FALLOFFSPOT() /* No op */
#endif
#if (!defined(FALLOFFSOFTSPOT))
#define FALLOFFSOFTSPOT() /* No op */
#endif
/***************************************************************************
_rwApplyAmbientLight
On entry : Instanced data
: Light
: Optional inverse object matrix
: (to transform light to object space)
: Inverse scale of object
: Surface properties of the light
On exit :
*/
static void
_rwApplyAmbientLight(VERTSARG,
const void *voidLight,
const RwMatrix * __RWUNUSED__ inverseMat,
RwReal __RWUNUSED__ invScale,
const RwSurfaceProperties * surfaceProps)
{
CAMVERTDECL;
NUMVERTDECL;
const RpLight *light = (const RpLight *) voidLight;
RwReal scale;
RwV3d vertToLight;
RWFUNCTION(RWSTRING("_rwApplyAmbientLight"));
RWASSERT(light);
RWASSERT(surfaceProps);
CAMVERTINIT();
NUMVERTINIT();
/* No directional component:
* (this is used in CAMVERTADDRGBA in a specular lighting node) */
vertToLight.x = 0;
vertToLight.y = 0;
vertToLight.z = 0;
/* rpLIGHTAMBIENT - Constant illumination on all vertices
*/
if (rwObjectTestPrivateFlags(light, rpLIGHTPRIVATENOCHROMA))
{
scale = 255.0f * light->color.red * surfaceProps->ambient;
/* Ambient light affects all vertices the same */
while (numVert--)
{
RwReal lum = scale;
#undef FALLOFFCALC
#define FALLOFFCALC FALLOFFAMBIENT
CAMVERTADDRGBA(1, 1, 1, 0);
CAMVERTINC();
}
}
else
/* perform for coloured lights */
{
scale = 255.0f * surfaceProps->ambient;
/* Ambient light affects all vertices the same */
while (numVert--)
{
RwReal lum = scale;
#undef FALLOFFCALC
#define FALLOFFCALC FALLOFFAMBIENT
CAMVERTADDRGBA(light->color.red, light->color.green,
light->color.blue, 0);
CAMVERTINC();
}
}
RWRETURNVOID();
}
/***************************************************************************
_rwApplyDirectionalLight
On entry : Instanced data
: Light
: Optional inverse object matrix
: (to transform light to object space)
: Inverse scale of object
: Surface properties of the light
On exit :
*/
static void
_rwApplyDirectionalLight(VERTSARG,
const void *voidLight,
const RwMatrix * inverseMat,
RwReal __RWUNUSED__ invScale,
const RwSurfaceProperties * surfaceProps)
{
OBJCAMVERTDECL;
NUMVERTDECL;
const RpLight *light = (const RpLight *) voidLight;
RwV3d vertToLight;
RwReal scale;
RwReal dot;
RwFrame *lightFrame;
RWFUNCTION(RWSTRING("_rwApplyDirectionalLight"));
RWASSERT(light);
RWASSERT(surfaceProps);
OBJCAMVERTINIT();
NUMVERTINIT();
/* rpLIGHTDIRECTIONAL - Lighting scaled by dot product
* of vertex normal and light lookAt vector.
*/
/* This may not have a frame - we need to check */
lightFrame = RpLightGetFrame(light);
if (lightFrame)
{
vertToLight = RwFrameGetLTM(lightFrame)->at;
/* Transform the light into object space if necessary */
if (inverseMat)
{
RwV3dTransformVectors(&vertToLight, &vertToLight, 1, inverseMat);
_rwV3dNormalize(&vertToLight, &vertToLight);
}
/* Vert TO light */
RwV3dScale(&vertToLight, &vertToLight, -1);
/* Optimise for grey lights? */
if (rwObjectTestPrivateFlags(light, rpLIGHTPRIVATENOCHROMA))
{
/* Use one of the light colour intensities as general intensity */
/* light vector tests are to be identical to others */
scale = 255.0f * light->color.red * surfaceProps->diffuse;
/* Loop through each of the vertices */
while (numVert--)
{
RwV3d objNormal;
OBJVERTGETNORMAL(&objNormal);
/* Calculate angle between vertex normal and light vector */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
/* Ensure vector is facing light,
* don't light areas not facing */
if (dot > 0.0f)
{
RwReal lum = dot * scale;
#undef FALLOFFCALC
#define FALLOFFCALC FALLOFFDIRECTIONAL
CAMVERTADDRGBA(1, 1, 1, 0);
}
/* Next vertex */
OBJCAMVERTINC();
}
}
else
/* perform for coloured lights */
{
scale = 255.0f * surfaceProps->diffuse;
/* Loop through each of the vertices */
while (numVert--)
{
RwV3d objNormal;
OBJVERTGETNORMAL(&objNormal);
/* Calculate angle between vertex normal and light vector */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
/* Ensure vector is facing light,
* don't light areas not facing */
if (dot > 0.0f)
{
RwReal lum = dot * scale;
#define FALLOFFCALC FALLOFFDIRECTIONAL
CAMVERTADDRGBA(light->color.red, light->color.green,
light->color.blue, 0);
}
/* Next vertex */
OBJCAMVERTINC();
}
}
}
RWRETURNVOID();
}
/***************************************************************************
_rwApplyPointLight
On entry : Instanced data
: Light
: Optional inverse object matrix
: (to transform light to object space)
: Inverse scale of object
: Surface properties of the light
On exit :
*/
static void
_rwApplyPointLight(VERTSARG, const void *voidLight,
const RwMatrix * inverseMat,
RwReal invScale, const RwSurfaceProperties * surfaceProps)
{
OBJCAMVERTDECL;
NUMVERTDECL;
const RpLight *light = (const RpLight *) voidLight;
RwReal scale, recipRad;
RwV3d lightPos, vertToLight;
RwReal radSquared;
RWFUNCTION(RWSTRING("_rwApplyPointLight"));
RWASSERT(light);
RWASSERT(surfaceProps);
OBJCAMVERTINIT();
NUMVERTINIT();
/* rpLIGHTPOINT - Linear falloff with distance, scaled by
* dot product of vertex normal and light to vertex vector.
*/
lightPos = RwFrameGetLTM(RpLightGetFrame(light))->pos;
if (inverseMat)
{
RwReal scaledRad;
scaledRad = ((light->radius) * (invScale));
radSquared = ((scaledRad) * (scaledRad));
recipRad = (((RwReal) (1)) / (scaledRad));
/* Transform light into object space */
RwV3dTransformPoints(&lightPos, &lightPos, 1, inverseMat);
}
else
{
radSquared = ((light->radius) * (light->radius));
recipRad = (((RwReal) (1)) / (light->radius));
}
if (rwObjectTestPrivateFlags(light, rpLIGHTPRIVATENOCHROMA))
{
/* The scale encapsulates the common elements to do
* with light intensity and surface lighting properties
*/
scale =
((((RwReal) (255)) * (light->color.red))) *
(surfaceProps->diffuse);
while (numVert--)
{
RwV3d objVertex, objNormal;
RwReal dot, dist2;
OBJVERTGETPOS(&objVertex);
OBJVERTGETNORMAL(&objNormal);
/* Discover the vector between vertex and light and it's length */
RwV3dSub(&vertToLight, &lightPos, &objVertex);
/* Ensure that this vertex is facing the light source */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
if (dot > 0.0f)
{
/* Ensure vertex lies within the light's radius */
dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
if (dist2 < radSquared)
{
RwReal lum;
RwReal recipDist;
RwReal dist;
rwSqrt(&dist, dist2);
recipDist =
(dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
/*
* The following simplifies down to:
*
* -scale *
* (dot/dist) *
* (1 - dist/lightRadius)
*
* Where
* scale
* takes care of the light intensity and
* diffuse lighting coefficient
* (dot/dist)
* is a normalised dot product of
* light->vertex vector and vertex normal
* (1 - dist/lightRadius)
* is a linear falloff factor
*/
lum = scale * dot * (recipDist - recipRad);
/* Calculate the luminance at vertex */
#undef FALLOFFCALC
#define FALLOFFCALC FALLOFFPOINT
CAMVERTADDRGBA(1, 1, 1, 0);
}
}
OBJCAMVERTINC();
}
}
else
{
scale = (((RwReal) (255)) * (surfaceProps->diffuse));
while (numVert--)
{
RwV3d objVertex, objNormal;
RwReal dot, dist2;
OBJVERTGETPOS(&objVertex);
OBJVERTGETNORMAL(&objNormal);
/* Discover the vector between vertex and light and it's length */
RwV3dSub(&vertToLight, &lightPos, &objVertex);
/* Ensure that this vertex is facing the light source */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
if (dot > 0.0f)
{
dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
/* Ensure vertex lies within the light's radius */
if (dist2 < radSquared)
{
RwReal lum;
RwReal recipDist;
RwReal dist;
/* Only now calculate the actual length of vector */
rwSqrt(&dist, dist2);
recipDist =
(dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
lum = scale * dot * (recipDist - recipRad);
/* Alter the luminance according to light colour */
#define FALLOFFCALC FALLOFFPOINT
CAMVERTADDRGBA(light->color.red, light->color.green,
light->color.blue, 0);
}
}
/* Next point */
OBJCAMVERTINC();
}
}
RWRETURNVOID();
}
/***************************************************************************
_rwApplySpotLight
On entry : Instanced data
: Light
: Optional inverse object matrix
: (to transform light to object space)
: Inverse scale of object
: Surface properties of the light
On exit :
*/
static void
_rwApplySpotLight(VERTSARG,
const void *voidLight,
const RwMatrix * inverseMat,
RwReal invScale, const RwSurfaceProperties * surfaceProps)
{
OBJCAMVERTDECL;
NUMVERTDECL;
const RpLight *light = (const RpLight *) voidLight;
RwReal recipRad;
RwReal radSquared;
RwV3d lightPos, at;
RWFUNCTION(RWSTRING("_rwApplySpotLight"));
RWASSERT(light);
RWASSERT(surfaceProps);
OBJCAMVERTINIT();
NUMVERTINIT();
/* rpLIGHTSPOT - Linear falloff with distance, cone to restrict
* angle that light has effect, constant intensity across cone,
* scaled by dot product of vertex normal and light to vertex vector.
*/
lightPos = RwFrameGetLTM(RpLightGetFrame(light))->pos;
at = RwFrameGetLTM(RpLightGetFrame(light))->at;
if (inverseMat)
{
RwReal scaledRad;
scaledRad = ((light->radius) * (invScale));
recipRad = (((RwReal) (1)) / (scaledRad));
radSquared = ((scaledRad) * (scaledRad));
/* Transform light into object space */
/* The at is required to ensure within cone */
RwV3dTransformPoints(&lightPos, &lightPos, 1, inverseMat);
RwV3dTransformVectors(&at, &at, 1, inverseMat);
_rwV3dNormalize(&at, &at);
}
else
{
recipRad = (((RwReal) (1)) / (light->radius));
radSquared = ((light->radius) * (light->radius));
}
if (rwObjectTestPrivateFlags(light, rpLIGHTPRIVATENOCHROMA))
{
RwReal scale =
((RwReal) 255) * (light->color.red) * (surfaceProps->diffuse);
while (numVert--)
{
RwV3d vertToLight, objVertex, objNormal;
RwReal dot;
OBJVERTGETPOS(&objVertex);
OBJVERTGETNORMAL(&objNormal);
/* Find the squared distance from light point to vertex */
RwV3dSub(&vertToLight, &lightPos, &objVertex);
/* Ensure that this vertex is facing the light source */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
if (dot > 0.0f)
{
RwReal dist2;
/* Ensure vertex lies within the light's radius */
dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
if (dist2 < radSquared)
{
RwReal dist;
RwReal compare;
RwReal proj;
rwSqrt(&dist, dist2);
compare = dist * light->minusCosAngle;
proj = RwV3dDotProduct(&vertToLight, &at);
if (proj < compare)
{
RwReal lum;
RwReal recipDist;
/* Get the real distance from the light
* to the vertex (not squared) */
recipDist =
(dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
/* This model is the same as the point source
* inside the cone, zero outside the cone */
lum = scale * dot * (recipDist - recipRad);
#undef FALLOFFCALC
#define FALLOFFCALC FALLOFFSPOT
CAMVERTADDRGBA(1, 1, 1, 0);
}
}
/* Next vertex */
OBJCAMVERTINC();
}
}
}
else
{
RwReal scale =
(((RwReal) (255)) * (surfaceProps->diffuse));
while (numVert--)
{
RwV3d vertToLight, objVertex, objNormal;
RwReal dot;
OBJVERTGETPOS(&objVertex);
OBJVERTGETNORMAL(&objNormal);
/* Find the squared distance from light point to vertex */
RwV3dSub(&vertToLight, &lightPos, &objVertex);
/* Ensure that this vertex is facing the light source */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
if (dot > 0.0f)
{
RwReal dist2;
/* Ensure vertex lies within the light's radius */
dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
if (dist2 < radSquared)
{
RwReal dist;
RwReal compare;
RwReal proj;
rwSqrt(&dist, dist2);
compare = dist * light->minusCosAngle;
proj = RwV3dDotProduct(&vertToLight, &at);
if (proj < compare)
{
RwReal lum;
RwReal recipDist;
recipDist =
(dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
/* This model is the same as the point source
* inside the cone, zero outside the cone */
lum = scale * dot * (recipDist - recipRad);
/* Introduce the light colours as a
* scaling factor for luminance */
#define FALLOFFCALC FALLOFFSPOT
CAMVERTADDRGBA(light->color.red,
light->color.green, light->color.blue,
0);
}
}
}
/* Next */
OBJCAMVERTINC();
}
}
RWRETURNVOID();
}
/***************************************************************************
_rwApplySpotSoftLight
On entry : Instanced data
: Light
: Optional inverse object matrix
: (to transform light to object space)
: Inverse scale of object
: Surface properties of the light
On exit :
*/
static void
_rwApplySpotSoftLight(VERTSARG, const void *voidLight,
const RwMatrix * inverseMat, RwReal invScale,
const RwSurfaceProperties * surfaceProps)
{
OBJCAMVERTDECL;
NUMVERTDECL;
const RpLight *light = (const RpLight *) voidLight;
RwReal recipRad;
RwReal radSquared;
RwV3d lightPos, at;
RWFUNCTION(RWSTRING("_rwApplySpotSoftLight"));
RWASSERT(light);
RWASSERT(surfaceProps);
OBJCAMVERTINIT();
NUMVERTINIT();
/* rpLIGHTSPOTSOFT - Linear falloff with distance, cone to restrict
* angle that light has effect, falloff to edge of cone, scaled by
* dot product of vertex normal and light to vertex vector.
*/
lightPos = RwFrameGetLTM(RpLightGetFrame(light))->pos;
at = RwFrameGetLTM(RpLightGetFrame(light))->at;
if (inverseMat)
{
RwReal scaledRad;
scaledRad = ((light->radius) * (invScale));
recipRad = (((RwReal) (1)) / (scaledRad));
radSquared = ((scaledRad) * (scaledRad));
/* Transform light into object space */
/* The at is required to ensure within cone */
RwV3dTransformPoints(&lightPos, &lightPos, 1, inverseMat);
RwV3dTransformVectors(&at, &at, 1, inverseMat);
_rwV3dNormalize(&at, &at);
}
else
{
recipRad = 1.0f / light->radius;
radSquared = light->radius * light->radius;
}
if (rwObjectTestPrivateFlags(light, rpLIGHTPRIVATENOCHROMA))
{
RwReal scale =
((RwReal) 255) * (light->color.red) * (surfaceProps->diffuse);
while (numVert--)
{
RwV3d vertToLight, objVertex, objNormal;
RwReal dot;
OBJVERTGETPOS(&objVertex);
OBJVERTGETNORMAL(&objNormal);
/* Find the squared distance from light point to vertex */
RwV3dSub(&vertToLight, &lightPos, &objVertex);
/* Ensure that this vertex is facing the light source */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
if (dot > 0.0f)
{
RwReal dist2;
/* Ensure vertex lies within the light's radius */
dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
if (dist2 < radSquared)
{
RwReal dist;
RwReal compare;
RwReal proj;
rwSqrt(&dist, dist2);
compare = dist * light->minusCosAngle;
proj = RwV3dDotProduct(&vertToLight, &at);
if (proj < compare)
{
RwReal lum;
RwReal recipDist;
RwReal normalise;
recipDist =
(dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
/* This model is the same as the point source
* inside the cone, zero outside the cone */
lum = scale * dot * (recipDist - recipRad);
/* It has an extra term for quadratic falloff
* across the cone though */
normalise = (dist + compare);
RWASSERT(normalise >= 0.0f);
if (normalise > 0.0f)
{
normalise = (dist + proj) / normalise;
normalise *= normalise;
lum *= (((RwReal) 1) - normalise);
}
#undef FALLOFFCALC
#define FALLOFFCALC FALLOFFSOFTSPOT
CAMVERTADDRGBA(1, 1, 1, 0);
}
}
}
/* Next */
OBJCAMVERTINC();
}
}
else
{
RwReal scale = 255.0f * surfaceProps->diffuse;
while (numVert--)
{
RwV3d vertToLight, objVertex, objNormal;
RwReal dot;
OBJVERTGETPOS(&objVertex);
OBJVERTGETNORMAL(&objNormal);
/* Find the squared distance from light point to vertex */
RwV3dSub(&vertToLight, &lightPos, &objVertex);
/* Ensure that this vertex is facing the light source */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
if (dot > 0.0f)
{
RwReal dist2;
/* Ensure vertex lies within the light's radius */
dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
if (dist2 < radSquared)
{
RwReal dist;
RwReal compare;
RwReal proj;
rwSqrt(&dist, dist2);
compare = dist * light->minusCosAngle;
proj = RwV3dDotProduct(&vertToLight, &at);
if (proj < compare)
{
RwReal lum;
RwReal normalise;
RwReal recipDist;
/* Get the real distance from the light
* to the vertex (not squared) */
recipDist =
(dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
/* This model is the same as the point source
* inside the cone, zero outside the cone */
lum = scale * dot * (recipDist - recipRad);
/* It has an extra term for quadratic falloff
* across the cone though */
/* It has an extra term for quadratic falloff
* across the cone though */
normalise = (dist + compare);
RWASSERT(normalise >= 0.0f);
if (normalise > 0.0f)
{
normalise = (dist + proj) / normalise;
normalise *= normalise;
lum *= (((RwReal) 1) - normalise);
}
/* Introduce the light colours as a
* scaling factor for luminance */
#undef FALLOFFCALC
#define FALLOFFCALC FALLOFFSOFTSPOT
CAMVERTADDRGBA(light->color.red,
light->color.green,
light->color.blue, 0);
}
}
}
/* Next */
OBJCAMVERTINC();
}
}
RWRETURNVOID();
}

View File

@ -7,7 +7,7 @@
/** /**
* \defgroup rpanisot RpAnisot * \defgroup rpanisot RpAnisot
* \ingroup rpplugin * \ingroup mipmapping
* *
* Anisotropic Texture Sampling Plugin for RenderWare Graphics. * Anisotropic Texture Sampling Plugin for RenderWare Graphics.
*/ */
@ -22,7 +22,7 @@
* \li \b Plugin \b attachments: \ref RpWorldPluginAttach, \ref RpAnisotPluginAttach * \li \b Plugin \b attachments: \ref RpWorldPluginAttach, \ref RpAnisotPluginAttach
* *
* \subsection anisotoverview Overview * \subsection anisotoverview Overview
* The RpAnisot plugin is used to extend an RwTexture with a maximum * The RpAnisot plugin is used to extend an \ref RwTexture with a maximum
* anisotropy value that will be used when a particular texture is drawn. * anisotropy value that will be used when a particular texture is drawn.
* When textured polygons are viewed nearly edge on, for example when looking * When textured polygons are viewed nearly edge on, for example when looking
* dowm a road or a football pitch, distant pixels are not sampled very well * dowm a road or a football pitch, distant pixels are not sampled very well

View File

@ -139,472 +139,6 @@

View File

@ -31,7 +31,7 @@
/** /**
* \defgroup rpcollis RpCollision * \defgroup rpcollis RpCollision
* \ingroup rpplugin * \ingroup collisiondetection
* *
* Collision Plugin for RenderWare Graphics. * Collision Plugin for RenderWare Graphics.
*/ */
@ -67,12 +67,12 @@ enum RpIntersectType
}; };
typedef enum RpIntersectType RpIntersectType; typedef enum RpIntersectType RpIntersectType;
typedef union RpIntersectData RpIntersectData;
/** /**
* \ingroup rpcollis * \ingroup rpcollis
* RpIntersectData, this union type is used to specify the parameters * RpIntersectData, this union type is used to specify the parameters
* for an intersection primitive of the desired type (\ref RpIntersectType) * for an intersection primitive of the desired type (\ref RpIntersectType)
*/ */
typedef union RpIntersectData RpIntersectData;
union RpIntersectData union RpIntersectData
{ {
RwLine line; /**<For type rpINTERSECTLINE */ RwLine line; /**<For type rpINTERSECTLINE */
@ -144,7 +144,6 @@ struct RpCollisionBuildParam
/** /**
* \ingroup rpcollis * \ingroup rpcollis
* \typedef RpIntersectionCallBackWorldTriangle
* \ref RpIntersectionCallBackWorldTriangle represents the function called * \ref RpIntersectionCallBackWorldTriangle represents the function called
* from \ref RpCollisionWorldForAllIntersections for all intersections between * from \ref RpCollisionWorldForAllIntersections for all intersections between
* the specified primitive and the static geometry in a given world. This * the specified primitive and the static geometry in a given world. This
@ -152,6 +151,10 @@ struct RpCollisionBuildParam
* indicate success. The callback may return NULL to terminate further * indicate success. The callback may return NULL to terminate further
* callbacks on the world. * callbacks on the world.
* *
* \note The memory pointed to by collTriangle is stored on the stack.
* This memory should be considered volatile. To use this data outside
* of the iterator, copy the contents.
*
* \param intersection Pointer to the intersection primitive. * \param intersection Pointer to the intersection primitive.
* \param sector Pointer to the world sector containing the triangle. * \param sector Pointer to the world sector containing the triangle.
* \param collTriangle Pointer to the \ref RpCollisionTriangle representing * \param collTriangle Pointer to the \ref RpCollisionTriangle representing
@ -181,7 +184,6 @@ typedef RpCollisionTriangle *(*RpIntersectionCallBackWorldTriangle)
/** /**
* \ingroup rpcollis * \ingroup rpcollis
* \typedef RpIntersectionCallBackAtomic
* \ref RpIntersectionCallBackAtomic represents the function called from * \ref RpIntersectionCallBackAtomic represents the function called from
* \ref RpWorldForAllAtomicIntersections for all intersections between the * \ref RpWorldForAllAtomicIntersections for all intersections between the
* specified primitive and collision atomics in a given world. This function * specified primitive and collision atomics in a given world. This function
@ -215,7 +217,6 @@ typedef RpAtomic *(*RpIntersectionCallBackAtomic)
/** /**
* \ingroup rpcollis * \ingroup rpcollis
* \typedef RpIntersectionCallBackWorldSector
* \ref RpIntersectionCallBackWorldSector represents the function called from * \ref RpIntersectionCallBackWorldSector represents the function called from
* \ref RpWorldForAllWorldSectorIntersections for all intersections between the * \ref RpWorldForAllWorldSectorIntersections for all intersections between the
* specified primitive and world sectors in a given world. This function should * specified primitive and world sectors in a given world. This function should
@ -234,7 +235,6 @@ typedef RpWorldSector *(*RpIntersectionCallBackWorldSector)
/** /**
* \ingroup rpcollis * \ingroup rpcollis
* \typedef RpIntersectionCallBackGeometryTriangle
* \ref RpIntersectionCallBackGeometryTriangle represents the function called * \ref RpIntersectionCallBackGeometryTriangle represents the function called
* from \ref RpAtomicForAllIntersections and * from \ref RpAtomicForAllIntersections and
* \ref RpCollisionGeometryForAllIntersections * \ref RpCollisionGeometryForAllIntersections

View File

@ -137,472 +137,6 @@

View File

@ -1,261 +1,6 @@
/* Doxygen Core Library groups */ #ifdef DOXYGEN
#include "doxygen.h"
/** #endif /* DOXYGEN */
* \defgroup rwcore Core Library
*
* Core Library
*/
/**
* \defgroup datatypes Data Types
* \ingroup rwcore
*
* Basic Data Types
*/
#ifndef RWPLCORE
/**
* \defgroup rwbbox RwBBox
* \ingroup rwcore
*
* Bounding Box
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwcamera RwCamera
* \ingroup rwcore
*
* Cameras define how and what things can be seen. They also define the
* depth and width of the view by the use of clip-planes and the view
* window.
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwcameravertex RwCameraVertex
* \ingroup rwcore
*
* Camera space vertex data access
*/
#endif /* RWPLCORE */
/**
* \defgroup rwdebug RwDebug
* \ingroup rwcore
*
* Debug handling
*/
/**
* \defgroup rwengine RwEngine
* \ingroup rwcore
*
* Device handling.
*/
/**
* \defgroup rwerror RwError
* \ingroup rwcore
*
* Error code handling
*/
#ifndef RWPLCORE
/**
* \defgroup rwframe RwFrame
* \ingroup rwcore
*
* Frames define relationships between objects and the world
*/
#endif /* RWPLCORE */
/**
* \defgroup rwfreelist RwFreeList
* \ingroup rwcore
*
* Free lists
*/
#ifndef RWPLCORE
/**
* \defgroup rwimage RwImage
* \ingroup rwcore
*
* Image handling.
*/
#endif /* RWPLCORE */
/**
* \defgroup rwim2d RwIm2D
* \ingroup rwcore
*
* 2D immediate mode support
*/
#ifndef RWPLCORE
/**
* \defgroup rwim2dcameravertex RwIm2DCameraVertex
* \ingroup rwcore
*
* 2D Camera space vertex data access
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwim2dvertex RwIm2DVertex
* \ingroup rwcore
*
* Im2D Vertex data access
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwim3d RwIm3D
* \ingroup rwcore
*
* 3D immediate mode support
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwim3dvertex RwIm3DVertex
* \ingroup rwcore
*
* Im3D Vertex data access
*/
#endif /* RWPLCORE */
/**
* \defgroup rwmatrix RwMatrix
* \ingroup rwcore
*
* Handling binary matrix representations.
*/
/**
* \defgroup rwmem RwMem
* \ingroup rwcore
*
* Memory
*/
#ifndef RWPLCORE
/**
* \defgroup rwobject RwObject
* \ingroup rwcore
*
* object
*/
#endif /* RWPLCORE */
/**
* \defgroup rwos RwOs
* \ingroup rwcore
*
* Operating System
*/
#ifndef RWPLCORE
/**
* \defgroup rwraster RwRaster
* \ingroup rwcore
*
* Image/raster coupling handling.
*/
#endif /* RWPLCORE */
/**
* \defgroup rwrenderstate RwRenderState
* \ingroup rwcore
*
* Render states
*/
/**
* \defgroup rwresources RwResources
* \ingroup rwcore
*
* Resource handling.
* Resources are used to instance objects into.
*/
/**
* \defgroup rwrgba RwRGBA
* \ingroup rwcore
*
* Color space functionality.
*/
/**
* \defgroup rwstream RwStream
* \ingroup rwcore
*
* Stream
*/
#ifndef RWPLCORE
/**
* \defgroup rwtexdict RwTexDictionary
* \ingroup rwcore
*
* Texture Dictionary
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwtexture RwTexture
* \ingroup rwcore
*
* Texture handling.
* Textures are special cases of rasters that can be applied to polygons.
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwv2d RwV2d
* \ingroup rwcore
*
* 2D Vector mathematics.
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwv3d RwV3d
* \ingroup rwcore
*
* 3D Vector mathematics.
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwcorepowerpipe PowerPipe
* \ingroup rwcore
*
* PowerPipe
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwcoregeneric Generic
* \ingroup rwcorepowerpipe
*
* Generic Pipeline
*
*/
#endif /* RWPLCORE */
/* These are plugins */ /* These are plugins */
#define rwID_METRICSPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x01) #define rwID_METRICSPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x01)
@ -306,137 +51,10 @@
#define rwID_MULTITEXPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2c) #define rwID_MULTITEXPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2c)
#define rwID_CHAINPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2d) #define rwID_CHAINPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2d)
#define rwID_TOONPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2e) #define rwID_TOONPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2e)
#define rwID_PTANKPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2f) #define rwID_PTANKPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2f)
#define rwID_PRTSTDPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x30)
#define rwID_PRTSTDPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x30) #define rwID_PDSPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x31)
#define rwID_PRTADVPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x32)
/********************************************************/
/* Doxygen plugin groups. */
#ifndef RWPLCORE
/**
* \defgroup rpplugin Plugins
*
* API Plugins
*
*/
/**
* \defgroup rpworld RpWorld
* \ingroup rpplugin
*
* World handling Plugin
*
* Gives objects context,
* and provides a mechanism for efficient static object rendering.
*/
/********************************************************/
/**
* \defgroup rpworlddatatypes Data Types
* \ingroup rpworld
*
* RpWorld Data types
*/
/**
* \defgroup rpatomic RpAtomic
* \ingroup rpworld
*
* Atomics
*/
/**
* \defgroup rpclump RpClump
* \ingroup rpworld
*
* Clumps
*/
/**
* \defgroup rpgeometry RpGeometry
* \ingroup rpworld
*
* Handling atomic's geometry
*/
/**
* \defgroup rpinterpolator RpInterpolator
* \ingroup rpworld
*
* Interpolators
*/
/**
* \defgroup rplight RpLight
* \ingroup rpworld
*
* Lighting 3D objects.
* Lights are used to illuminate atomics and worlds
*/
/**
* \defgroup rpmaterial RpMaterial
* \ingroup rpworld
*
* Handling surface materials
* Materials describe how things are to appear when rendered
*/
/**
* \defgroup rpmesh RpMesh
* \ingroup rpworld
*
* Provide construction and enumeration facilities for meshes.
*/
/**
* \defgroup rpmorphtarget RpMorphTarget
* \ingroup rpworld
*
* Morph Targets
*/
/**
* \defgroup rpworldsub RpWorld
* \ingroup rpworld
*
* RpWorld sub group
*/
/**
* \defgroup rpworldsector RpWorldSector
* \ingroup rpworld
*
* Handling atomic sectors
*/
/**
* \defgroup rpworldrwcamera RwCamera
* \ingroup rpworld
*
* Cameras
*/
/**
* \defgroup rpworldpowerpipe PowerPipe
* \ingroup rpworld
*
* PowerPipe
*/
/**
* \defgroup rpworldp2generic Generic
* \ingroup rpworldpowerpipe
*
* Generic
*/
#endif /* RWPLCORE */
/* These are toolkits */ /* These are toolkits */
#define rwID_CHARSEPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x80) #define rwID_CHARSEPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x80)
@ -480,93 +98,9 @@
#define rwID_BARYCENTRIC MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb2) #define rwID_BARYCENTRIC MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb2)
#define rwID_PITEXDICTIONARYTK MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb3) #define rwID_PITEXDICTIONARYTK MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb3)
#define rwID_TOCTOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb4) #define rwID_TOCTOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb4)
#define rwID_TPLTOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb5)
/**********************************************************************/ #define rwID_ALTPIPETOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb6)
#define rwID_ANIMTOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb7)
/* Doxygen Toolkit groups */ #define rwID_SKINSPLITTOOKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb8)
/**
* \defgroup rttool Toolkits
*
* API Toolkits
*/
/**
* \defgroup fxpack FXPack
*
* FXPack component group
*/
/**********************************************************************/
/**
* \defgroup platformspecific Platform Specific
*
* Links to all platform specific information in the API Reference can
* be found in this folder.
*/
/**********************************************************************/
/* Index Page definition for API Reference. Don't mess with it unless you know what you're doing. */
/**
* \mainpage RenderWare Graphics API Reference
*
* \image html rwglogo.jpg
*
* This document provides an API Reference for release 3.3 of the RenderWare
* Graphics SDK.
*
* You do not have to wait for a major release to obtain a current API
* Reference. An up-to-date API Reference is compiled every week and goes out
* with the weekly build. The footer declares when it was generated.
*
* \section otherdocs Documentation Available
* RenderWare Graphics is supplied with:
*
* - A top-level README.PDF -- If you read nothing else, at least read this!
* - this API Reference
* - the User Guide
* - Artist's documentation (if installed)
* - Examples documentation
* - Maestro documentation
* - Tools documentation
* - White Papers
* - readme.txt files for each of the supplied Examples
*
* \section contactus Contact Us
*
* \subsection csl Criterion Software Ltd.
* For general information about RenderWare e-mail info@csl.com.
*
* \subsection devrels Developer Relations
*
* For information regarding Support please email devrels@csl.com
*
* \subsection sales Sales
*
* For sales information contact: rw-sales@csl.com
*
* \section copyright Copyright Notice
*
* The information in this document is subject to change without notice and does not represent
* a commitment on the part of Criterion Software Ltd. The software described in this document is
* furnished under a license agreement or a non-disclosure agreement. The software may be used or
* copied only in accordance with the terms of the agreement. It is against the law to copy the
* software on any medium except as specifically allowed in the license or non-disclosure agreement.
*
* No part of this documentation may be reproduced or transmitted in any form or by any means for any
* purpose without the express written permis­sion of Criterion Software Ltd.
*
* Copyright © 1993 - 2002 Criterion Software Ltd. All rights reserved.
*
* Canon and RenderWare are registered trademarks of Canon Inc. Nintendo is a registered trademark
* and NINTENDO GAMECUBE a trademark of Nintendo Co., Ltd. Microsoft is a registered trademark and
* Xbox is a trademark of Microsoft Corporation. PlayStation is a registered trademark of Sony Computer
* Entertainment Inc.
*
* All other trademarks mentioned herein are the property of their respective companies.
*
*/

View File

@ -31,7 +31,7 @@
#include <rwcore.h> #include <rwcore.h>
#include <rpdbgerr.h> #include <rpdbgerr.h>
static const char rcsid[] __RWUNUSED__ = "@@(#)$Id: //RenderWare/RW33Active/dev/rwsdk/src/plcore/rpdbgerr.c#1 $"; static const char rcsid[] __RWUNUSED__ = "@@(#)$Id: rpdbgerr.c,v 1.2 2004/08/31 17:40:34 gtristram Exp $";
#ifdef RWDEBUG #ifdef RWDEBUG

View File

@ -16,8 +16,6 @@
/* Pick up _ASSERTE macro */ /* Pick up _ASSERTE macro */
#ifdef _XBOX #ifdef _XBOX
#include <xtl.h> #include <xtl.h>
#else /* _XBOX */
#include <windows.h>
#endif /* _XBOX */ #endif /* _XBOX */
#if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) #if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC))
#define _CRTDBG_MAP_ALLOC #define _CRTDBG_MAP_ALLOC
@ -235,6 +233,22 @@ do \
} \ } \
while (0) while (0)
#define RWASSERTM(condition, messageArgs) \
do \
{ \
if (!(condition)) \
{ \
RwDebugSendMessage(rwDEBUGASSERT, \
__dbFunctionName, \
RWSTRING(#condition)); \
RwDebugSendMessage(rwDEBUGMESSAGE, \
__dbFunctionName, \
_rwdbsprintf messageArgs); \
} \
RWASSERTE(condition); \
} \
while (0)
#else /* RWDEBUG */ #else /* RWDEBUG */
#define RWRETURN(value) return(value) #define RWRETURN(value) return(value)
@ -253,6 +267,7 @@ while (0)
#define RWFUNCTION(name) #define RWFUNCTION(name)
#define RWAPIFUNCTION(name) #define RWAPIFUNCTION(name)
#define RWASSERT(condition) #define RWASSERT(condition)
#define RWASSERTM(condition, messageArgs)
#define RWMESSAGE(args) #define RWMESSAGE(args)
#endif #endif

View File

@ -28,7 +28,7 @@
/** /**
* \defgroup rpdmorph RpDMorph * \defgroup rpdmorph RpDMorph
* \ingroup rpplugin * \ingroup deltamorphing
* \file rpdmorph.h * \file rpdmorph.h
* *
* Delta Morphing Plugin for RenderWare Graphics. * Delta Morphing Plugin for RenderWare Graphics.
@ -153,7 +153,7 @@ RpDMorphTargetGetFlags( RpDMorphTarget *dMorphTarget );
* These functions work at the DMorphAtomic level. * These functions work at the DMorphAtomic level.
*/ */
extern RpAtomic * extern RpAtomic *
RpDMorphAtomicInitalize( RpAtomic *atomic ); RpDMorphAtomicInitialize( RpAtomic *atomic );
extern RwReal * extern RwReal *
RpDMorphAtomicGetDMorphValues( RpAtomic *atomic ); RpDMorphAtomicGetDMorphValues( RpAtomic *atomic );

View File

@ -139,472 +139,6 @@

File diff suppressed because it is too large Load Diff

View File

@ -139,472 +139,6 @@
@ -630,11 +164,6 @@ enum e_rwdb_CriterionHANIM
{ {
E_RP_HANIM_INTERP_IDINUSE,
E_RP_HANIM_INTERP_BLOCKFULL,
E_RP_HANIM_INTERP_IDUNKNOWN,
e_rwdb_CriterionHANIMLAST = RWFORCEENUMSIZEINT e_rwdb_CriterionHANIMLAST = RWFORCEENUMSIZEINT
}; };

View File

@ -34,7 +34,7 @@
/** /**
* \defgroup rplodatm RpLODAtomic * \defgroup rplodatm RpLODAtomic
* \ingroup rpplugin * \ingroup scenemanagement
* *
* Level of Detail Management Plugin for RenderWare Graphics. * Level of Detail Management Plugin for RenderWare Graphics.
*/ */
@ -72,6 +72,9 @@ extern "C"
{ {
#endif /* __cplusplus */ #endif /* __cplusplus */
extern void
RpLODAtomicCacheSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern RwBool extern RwBool
RpLODAtomicPluginAttach( void ); RpLODAtomicPluginAttach( void );

View File

@ -142,472 +142,6 @@

View File

@ -33,7 +33,7 @@
/** /**
* \defgroup rplogo RpLogo * \defgroup rplogo RpLogo
* \ingroup rpplugin * \ingroup 2dtools
* *
* Logo Plugin for RenderWare Graphics. * Logo Plugin for RenderWare Graphics.
*/ */

View File

@ -139,472 +139,6 @@

View File

@ -1,7 +1,7 @@
/** /**
* \defgroup rpltmap RpLtMap * \defgroup rpltmap RpLtMap
* \ingroup rpplugin * \ingroup lighting
* *
* Lightmap Plugin for RenderWare Graphics. * Lightmap Plugin for RenderWare Graphics.
*/ */
@ -17,6 +17,15 @@
#include "rpworld.h" #include "rpworld.h"
/* Used during lightmap illumination (sliver triangles are skipped
* (their texels should be filled by dilate()), because their normals
* can't be accurately calculated) */
#define rpLTMAPDEFAULTSLIVERAREATHRESHOLD (0.001f)
/* Used during lightmap UV calculation (polySets may be
* joined on the basis of vertices with equal positions) */
#define rpLTMAPDEFAULTVERTEXWELDTHRESHOLD (0.1f)
#define rpLTMAPDEFAULTLIGHTMAPSIZE 128 #define rpLTMAPDEFAULTLIGHTMAPSIZE 128
#define rpLTMAPMINLIGHTMAPSIZE 16 #define rpLTMAPMINLIGHTMAPSIZE 16
#define rpLTMAPMAXLIGHTMAPSIZE 512/*?? any better way of determining this ??*/ #define rpLTMAPMAXLIGHTMAPSIZE 512/*?? any better way of determining this ??*/

View File

@ -138,472 +138,6 @@

View File

@ -17,7 +17,7 @@
/** /**
* \defgroup rpmatfx RpMatFX * \defgroup rpmatfx RpMatFX
* \ingroup rpplugin * \ingroup materials
* *
* Material Effects Plugin for RenderWare Graphics. * Material Effects Plugin for RenderWare Graphics.
*/ */
@ -58,6 +58,10 @@ extern "C"
#endif /* __cplusplus */ #endif /* __cplusplus */
/*--- Plugin functions ------------------------------------------------------*/ /*--- Plugin functions ------------------------------------------------------*/
extern void
RpMatFXMaterialDataSetFreeListCreateParams( RwInt32 blockSize,
RwInt32 numBlocksToPrealloc );
extern RwBool extern RwBool
RpMatFXPluginAttach( void ); RpMatFXPluginAttach( void );

View File

@ -138,472 +138,6 @@

View File

@ -7,9 +7,9 @@
/** /**
* \defgroup rpmipkl RpMipmapKL * \defgroup rpmipkl RpMipmapKL
* \ingroup rpplugin * \ingroup mipmapping
* *
* PS2/MipMap KL Value Plugin for RenderWare Graphics. * PlayStation 2 / MipMap KL Value Plugin for RenderWare Graphics.
*/ */
#include <rwcore.h> #include <rwcore.h>
@ -19,6 +19,28 @@ extern "C"
{ {
#endif #endif
#if (defined(SKY2_DRVMODEL_H)) || (defined(NULLSKY_DRVMODEL_H))
#define RpMipmapKLTextureSetDefaultK RpSkyTextureSetDefaultMipmapK
#define RpMipmapKLTextureSetDefaultL RpSkyTextureSetDefaultMipmapL
#define RpMipmapKLTextureGetDefaultK RpSkyTextureGetDefaultMipmapK
#define RpMipmapKLTextureGetDefaultL RpSkyTextureGetDefaultMipmapL
#define RpMipmapKLTextureSetK RpSkyTextureSetMipmapK
#define RpMipmapKLTextureSetL RpSkyTextureSetMipmapL
#define RpMipmapKLTextureGetK RpSkyTextureGetMipmapK
#define RpMipmapKLTextureGetL RpSkyTextureGetMipmapL
#define RpMipmapKLPluginAttach() (TRUE)
#else /* (defined(SKY2_DRVMODEL_H)) || (defined(NULLSKY_DRVMODEL_H)) */
extern RwReal RpMipmapKLTextureSetDefaultK(RwReal val); extern RwReal RpMipmapKLTextureSetDefaultK(RwReal val);
extern RwUInt32 RpMipmapKLTextureSetDefaultL(RwUInt32 val); extern RwUInt32 RpMipmapKLTextureSetDefaultL(RwUInt32 val);
extern RwReal RpMipmapKLTextureGetDefaultK(void); extern RwReal RpMipmapKLTextureGetDefaultK(void);
@ -31,6 +53,8 @@ extern RwUInt32 RpMipmapKLTextureGetL(RwTexture *tex);
extern RwBool RpMipmapKLPluginAttach(void); extern RwBool RpMipmapKLPluginAttach(void);
#endif /* (defined(SKY2_DRVMODEL_H)) || (defined(NULLSKY_DRVMODEL_H)) */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -139,472 +139,6 @@

View File

@ -38,7 +38,7 @@
/** /**
* \defgroup rpmorph RpMorph * \defgroup rpmorph RpMorph
* \ingroup rpplugin * \ingroup morphing
* *
* Morphing Plugin for RenderWare Graphics. * Morphing Plugin for RenderWare Graphics.
*/ */
@ -76,7 +76,6 @@ struct RpMorphInterpolator
/** /**
* \ingroup rpmorph * \ingroup rpmorph
* \typedef RpMorphGeometryCallBack
* This is the callback function supplied to \ref RpMorphGeometrySetCallBack * This is the callback function supplied to \ref RpMorphGeometrySetCallBack
* and returned from \ref RpMorphGeometryGetCallBack. * and returned from \ref RpMorphGeometryGetCallBack.
* The supplied function will be passed a pointer to the geometry's parent atomic, * The supplied function will be passed a pointer to the geometry's parent atomic,

View File

@ -138,472 +138,6 @@

View File

@ -4,7 +4,7 @@
/** /**
* \defgroup rppatch RpPatch * \defgroup rppatch RpPatch
* \ingroup rpplugin * \ingroup bezierpatches
* *
* Bezier patch library * Bezier patch library
* *
@ -124,7 +124,7 @@
* \ingroup rppatch * \ingroup rppatch
* \ref RpPatchMeshFlag * \ref RpPatchMeshFlag
* When creating a \ref RpPatchMesh, these flags can be OR'ed together to * When creating a \ref RpPatchMesh, these flags can be OR'ed together to
* specify the format along with the \ref rpPATCHMESHTEXCOORDSETS (n) macro * specify the format along with the \ref rpPATCHMESHTEXCOORDSETS(num) macro
* to specify the number of texture coordinate sets required. * to specify the number of texture coordinate sets required.
* *
* \see RpPatchMeshCreate * \see RpPatchMeshCreate
@ -220,7 +220,7 @@ typedef struct RpPatchMesh RpPatchMesh;
* The patch mesh should be unlocked with \ref RpPatchMeshUnlock before it is * The patch mesh should be unlocked with \ref RpPatchMeshUnlock before it is
* added to an \ref RpAtomic with \ref RpPatchAtomicSetPatchMesh. * added to an \ref RpAtomic with \ref RpPatchAtomicSetPatchMesh.
* *
* \see RpPatchMesDefinition * \see RpPatchMeshDefinition
*/ */
struct RpPatchMesh struct RpPatchMesh
{ {
@ -278,7 +278,7 @@ struct RpPatchLODRange
/** /**
* \ingroup rppatch * \ingroup rppatch
* \typedef RpPatchLODUserData * \ref RpPatchLODUserData
* typedef for the user data passed to the \ref RpPatchLODCallBack * typedef for the user data passed to the \ref RpPatchLODCallBack
* function which calculates the atomics' LOD. * function which calculates the atomics' LOD.
* *
@ -289,9 +289,14 @@ typedef void *RpPatchLODUserData;
/** /**
* \ingroup rppatch * \ingroup rppatch
* \typedef RpPatchLODCallBack * \ref RpPatchLODCallBack
* typedef for the patch atomic LOD calculation function. * typedef for the patch atomic LOD calculation function.
* *
* \param atomic
* \param userData
*
* \return
*
* \see RpPatchAtomicSetPatchLODCallBack * \see RpPatchAtomicSetPatchLODCallBack
* \see RpPatchAtomicGetPatchLODCallBack * \see RpPatchAtomicGetPatchLODCallBack
*/ */
@ -309,6 +314,13 @@ extern "C"
/*---------------------------------------------------------------------------* /*---------------------------------------------------------------------------*
*- Plugin functions -* *- Plugin functions -*
*---------------------------------------------------------------------------*/ *---------------------------------------------------------------------------*/
extern void
RpPatchGeometrySetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern void
RpPatchAtomicSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern RwBool extern RwBool
RpPatchPluginAttach(void); RpPatchPluginAttach(void);

View File

@ -138,472 +138,6 @@

View File

@ -28,7 +28,7 @@
/** /**
* \defgroup rpprtstd RpPrtStd * \defgroup rpprtstd RpPrtStd
* \ingroup rpplugin * \ingroup particles
* *
* Particle Animation Plugin for RenderWare Graphics. * Particle Animation Plugin for RenderWare Graphics.
*/ */
@ -52,7 +52,7 @@
#define PRTSTD_RSRAND2(_seed) (((RwReal)((RwReal) (_seed) * PRTSTD_SRAND_IMAX) * \ #define PRTSTD_2RSRAND2(_seed) (((RwReal)((RwReal) (_seed) * PRTSTD_SRAND_IMAX) * \
(RwReal)1.0)) (RwReal)1.0))
/** /**
@ -84,6 +84,8 @@ enum RpPrtStdEmitterFlags
rpPRTSTDEMITTERFLAGUPDATEPARTICLE = 0x00000020, /**< This indicated if the emitter's particles are updated. */ rpPRTSTDEMITTERFLAGUPDATEPARTICLE = 0x00000020, /**< This indicated if the emitter's particles are updated. */
rpPRTSTDEMITTERFLAGRENDER = 0x00000040, /**< This indicates if the emitter is rendered. */ rpPRTSTDEMITTERFLAGRENDER = 0x00000040, /**< This indicates if the emitter is rendered. */
rpPRTSTDEMITTERFLAGRENDERPARTICLE = 0x00000080, /**< This indicates if the emitter's particles are rendered. */ rpPRTSTDEMITTERFLAGRENDERPARTICLE = 0x00000080, /**< This indicates if the emitter's particles are rendered. */
rpPRTSTDEMITTERFLAGNOBUFFERSWAP = 0x00000100, /**< Internal usage */
rpPRTSTDEMITTERFLAGSTREAMREAD = 0x00000200, /**< Internal usage */
rpPRTSTDEMITTERFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT rpPRTSTDEMITTERFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}; };
@ -109,15 +111,12 @@ enum RpPrtStdParticleCallBackCode
rpPRTSTDPARTICLECALLBACKRENDER, /**< Particle render callback */ rpPRTSTDPARTICLECALLBACKRENDER, /**< Particle render callback */
rpPRTSTDPARTICLECALLBACKCREATE, /**< Particle create callback */ rpPRTSTDPARTICLECALLBACKCREATE, /**< Particle create callback */
rpPRTSTDPARTICLECALLBACKDESTROY, /**< Particle destroy callback */ rpPRTSTDPARTICLECALLBACKDESTROY, /**< Particle destroy callback */
rpPRTSTDPARTICLECALLBACKSTREAMREAD, /**< Particle stream input callback */
rpPRTSTDPARTICLECALLBACKSTREAMWRITE, /**< Particle stream outout callback */
rpPRTSTDPARTICLECALLBACKSTREAMGETSIZE, /**< Particle stream get size callback */
rpPRTSTDPARTICLECALLBACKFORCEENUMSIZEINT = RWFORCEENUMSIZEINT rpPRTSTDPARTICLECALLBACKFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}; };
typedef enum RpPrtStdParticleCallBackCode RpPrtStdParticleCallBackCode; typedef enum RpPrtStdParticleCallBackCode RpPrtStdParticleCallBackCode;
#define rpPRTSTDEMITTERCALLBACKMAX 10 #define rpPRTSTDEMITTERCALLBACKMAX 11
/** /**
* \ingroup rpprtstd * \ingroup rpprtstd
@ -137,6 +136,7 @@ enum RpPrtStdEmitterCallBackCode
rpPRTSTDEMITTERCALLBACKSTREAMREAD, /**< Emitter stream input callback */ rpPRTSTDEMITTERCALLBACKSTREAMREAD, /**< Emitter stream input callback */
rpPRTSTDEMITTERCALLBACKSTREAMWRITE, /**< Emitter stream output callback */ rpPRTSTDEMITTERCALLBACKSTREAMWRITE, /**< Emitter stream output callback */
rpPRTSTDEMITTERCALLBACKSTREAMGETSIZE, /**< Emitter stream get size callback */ rpPRTSTDEMITTERCALLBACKSTREAMGETSIZE, /**< Emitter stream get size callback */
rpPRTSTDEMITTERCALLBACKCLONE, /**< Emitter clone callback */
rpPRTSTDEMITTERCALLBACKFORCEENUMSIZEINT = RWFORCEENUMSIZEINT rpPRTSTDEMITTERCALLBACKFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}; };
@ -154,7 +154,7 @@ typedef struct RpPrtStdEmitter RWALIGN(RpPrtStdEmitter, rwMATRIXALIGNMENT);
/** /**
* \ingroup rpprtstd * \ingroup rpprtstd
* \typedef RpPrtStdEmitterCallBack * \ref RpPrtStdEmitterCallBack
* \ref RpPrtStdEmitterCallBack represents the function called for processing * \ref RpPrtStdEmitterCallBack represents the function called for processing
* a \ref RpPrtStdEmitter. There can several types of the functions, each performing a * a \ref RpPrtStdEmitter. There can several types of the functions, each performing a
* specific task defined by \ref RpPrtStdEmitterCallBackCode. * specific task defined by \ref RpPrtStdEmitterCallBackCode.
@ -172,7 +172,6 @@ typedef RpPrtStdEmitter *
typedef struct RpPrtStdParticleBatch RWALIGN(RpPrtStdParticleBatch, rwMATRIXALIGNMENT); typedef struct RpPrtStdParticleBatch RWALIGN(RpPrtStdParticleBatch, rwMATRIXALIGNMENT);
/** /**
* \ingroup rpprtstd * \ingroup rpprtstd
* \typedef RpPrtStdParticleCallBack
* \ref RpPrtStdParticleCallBack represents the function called for processing * \ref RpPrtStdParticleCallBack represents the function called for processing
* a \ref RpPrtStdParticleBatch. There can be several types of the functions, each * a \ref RpPrtStdParticleBatch. There can be several types of the functions, each
* performing a specific task defined by \ref RpPrtStdParticleCallBackCode. * performing a specific task defined by \ref RpPrtStdParticleCallBackCode.
@ -189,7 +188,6 @@ typedef RpPrtStdParticleBatch *
/** /**
* \ingroup rpprtstd * \ingroup rpprtstd
* \typedef RpPrtStdEmitterCallBackArray
* \ref RpPrtStdEmitterCallBackArray represents a set of callback functions for * \ref RpPrtStdEmitterCallBackArray represents a set of callback functions for
* processing a \ref RpPrtStdEmitter. All the functions are of the type \ref * processing a \ref RpPrtStdEmitter. All the functions are of the type \ref
* RpPrtStdEmitterCallBack. * RpPrtStdEmitterCallBack.
@ -201,7 +199,6 @@ typedef RpPrtStdEmitterCallBack
/** /**
* \ingroup rpprtstd * \ingroup rpprtstd
* \typedef RpPrtStdParticleCallBackArray
* \ref RpPrtStdParticleCallBackArray represents a set of callback functions for * \ref RpPrtStdParticleCallBackArray represents a set of callback functions for
* processing a \ref RpPrtStdParticleBatch. All the functions are of the type \ref * processing a \ref RpPrtStdParticleBatch. All the functions are of the type \ref
* RpPrtStdParticleCallBack. * RpPrtStdParticleCallBack.
@ -221,7 +218,6 @@ typedef RpPrtStdParticleCallBack
typedef struct RpPrtStdEmitterClass RpPrtStdEmitterClass; typedef struct RpPrtStdEmitterClass RpPrtStdEmitterClass;
/** /**
* \ingroup rpprtstd * \ingroup rpprtstd
* \typedef RpPrtStdEClassSetupCallBack
* \ref RpPrtStdEClassSetupCallBack represents the function called for setting up an * \ref RpPrtStdEClassSetupCallBack represents the function called for setting up an
* emitter class's set of callback function. The callback function is called * emitter class's set of callback function. The callback function is called
* after an emitter class is streamed in. * after an emitter class is streamed in.
@ -237,7 +233,6 @@ typedef RpPrtStdEmitterClass *
typedef struct RpPrtStdParticleClass RpPrtStdParticleClass; typedef struct RpPrtStdParticleClass RpPrtStdParticleClass;
/** /**
* \ingroup rpprtstd * \ingroup rpprtstd
* \typedef RpPrtStdPClassSetupCallBack
* \ref RpPrtStdPClassSetupCallBack represents the function called for setting up an * \ref RpPrtStdPClassSetupCallBack represents the function called for setting up an
* emitter class's set of callback function. The callback function is called * emitter class's set of callback function. The callback function is called
* after an emitter class is streamed in. * after an emitter class is streamed in.
@ -273,6 +268,7 @@ struct RpPrtStdPropertyTable
RpPrtStdPropertyTable *next; /**< Internal usage */ RpPrtStdPropertyTable *next; /**< Internal usage */
RwInt32 id; /**< Property table's id */ RwInt32 id; /**< Property table's id */
RwInt32 refCount; /**< Reference count. Internal usage */
RwInt32 numProp; /**< Number of properties in the table */ RwInt32 numProp; /**< Number of properties in the table */
RwInt32 maxProp; /**< Internal usage */ RwInt32 maxProp; /**< Internal usage */
@ -295,6 +291,7 @@ struct RpPrtStdEmitterClass
RpPrtStdEmitterClass *next; /**< Internal usage */ RpPrtStdEmitterClass *next; /**< Internal usage */
RwInt32 id; /**< Emitter class's id */ RwInt32 id; /**< Emitter class's id */
RwInt32 refCount; /**< Reference count. Internal usage */
RwInt32 objSize; /**< Size of the emitter */ RwInt32 objSize; /**< Size of the emitter */
RpPrtStdPropertyTable *propTab; /**< Reference to a table of emitter properties */ RpPrtStdPropertyTable *propTab; /**< Reference to a table of emitter properties */
@ -316,6 +313,7 @@ struct RpPrtStdParticleClass
RpPrtStdParticleClass *next; /**< Internal usage */ RpPrtStdParticleClass *next; /**< Internal usage */
RwInt32 id; /**< Particle class's id */ RwInt32 id; /**< Particle class's id */
RwInt32 refCount; /**< Reference count. Internal usage */
RwInt32 objSize; /**< Size of a particle */ RwInt32 objSize; /**< Size of a particle */
RpPrtStdPropertyTable *propTab; /**< Reference to a table of particle properties */ RpPrtStdPropertyTable *propTab; /**< Reference to a table of particle properties */
@ -403,7 +401,6 @@ struct RpPrtStdEmitter
#define rpPRTSTDPROPERTYCODEEMITTERSTANDARD 1 #define rpPRTSTDPROPERTYCODEEMITTERSTANDARD 1
#define rpPRTSTDPROPERTYCODEEMITTERPRTCOLOR 2 #define rpPRTSTDPROPERTYCODEEMITTERPRTCOLOR 2
#define rpPRTSTDPROPERTYCODEEMITTERPRTTEXCOORDS 3 #define rpPRTSTDPROPERTYCODEEMITTERPRTTEXCOORDS 3
#define rpPRTSTDPROPERTYCODEEMITTERPRTANIMFRAME 4
#define rpPRTSTDPROPERTYCODEEMITTERPRTSIZE 5 #define rpPRTSTDPROPERTYCODEEMITTERPRTSIZE 5
#define rpPRTSTDPROPERTYCODEEMITTERPTANK 6 #define rpPRTSTDPROPERTYCODEEMITTERPTANK 6
#define rpPRTSTDPROPERTYCODEEMITTERPRTVELOCITY 7 #define rpPRTSTDPROPERTYCODEEMITTERPRTVELOCITY 7
@ -414,7 +411,6 @@ struct RpPrtStdEmitter
#define rpPRTSTDEMITTERDATAFLAGSTANDARD 0x00000001 #define rpPRTSTDEMITTERDATAFLAGSTANDARD 0x00000001
#define rpPRTSTDEMITTERDATAFLAGPRTCOLOR 0x00000002 #define rpPRTSTDEMITTERDATAFLAGPRTCOLOR 0x00000002
#define rpPRTSTDEMITTERDATAFLAGPRTTEXCOORDS 0x00000004 #define rpPRTSTDEMITTERDATAFLAGPRTTEXCOORDS 0x00000004
#define rpPRTSTDEMITTERDATAFLAGPRTANIMFRAME 0x00000008
#define rpPRTSTDEMITTERDATAFLAGPRTSIZE 0x00000010 #define rpPRTSTDEMITTERDATAFLAGPRTSIZE 0x00000010
#define rpPRTSTDEMITTERDATAFLAGPTANK 0x00000020 #define rpPRTSTDEMITTERDATAFLAGPTANK 0x00000020
#define rpPRTSTDEMITTERDATAFLAGPRTMATRIX 0x00000040 #define rpPRTSTDEMITTERDATAFLAGPRTMATRIX 0x00000040
@ -436,7 +432,7 @@ typedef struct RpPrtStdEmitterStandard RpPrtStdEmitterStandard;
* particles. Once an emitter has reached its maximum number of particles, no further particles are * particles. Once an emitter has reached its maximum number of particles, no further particles are
* emitted until some of the existing particles have died. * emitted until some of the existing particles have died.
* *
* Most properties have a bias value to vary the property value. This uses the seed field * Most properties have a bias value to vary the property's value. This uses the seed field
* to give a degreee of randomness. * to give a degreee of randomness.
*/ */
struct RpPrtStdEmitterStandard struct RpPrtStdEmitterStandard
@ -522,15 +518,6 @@ struct RpPrtStdEmitterPrtTexCoords
prtEndUV1Bias; /**< Particle end bottom right texcoords bias */ prtEndUV1Bias; /**< Particle end bottom right texcoords bias */
}; };
typedef struct RpPrtStdEmitterPrtAnimFrame RpPrtStdEmitterPrtAnimFrame;
struct RpPrtStdEmitterPrtAnimFrame
{
RwInt32 prtNumFrames;
RwTexCoords *prtAnimFrameTexCoords;
};
typedef struct RpPrtStdEmitterPrtSize RpPrtStdEmitterPrtSize; typedef struct RpPrtStdEmitterPrtSize RpPrtStdEmitterPrtSize;
/** /**
@ -550,18 +537,47 @@ struct RpPrtStdEmitterPrtSize
prtEndSizeBias; /**< Particle end size bias */ prtEndSizeBias; /**< Particle end size bias */
}; };
/**
* \ingroup rpprtstd
* A set of flag settings for use in the \ref RpPrtStdEmitterPrtMatrix flag
*/
enum RpPrtStdEmitterPrtMatrixFlags
{
rpPRTSTDEMITTERPRTMTXFLAGSCNSMTX = 0x00000001, /**< Apply the prtCnsMtx matrix to
* each particle if set */
RPPRTSTDEMITTERPRTMTXFLAGSFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RpPrtStdEmitterPrtMatrixFlags RpPrtStdEmitterPrtMatrixFlags;
typedef struct RpPrtStdEmitterPrtMatrix RWALIGN(RpPrtStdEmitterPrtMatrix, rwMATRIXALIGNMENT); typedef struct RpPrtStdEmitterPrtMatrix RWALIGN(RpPrtStdEmitterPrtMatrix, rwMATRIXALIGNMENT);
/**
* \ingroup rpprtstd
* \struct RpPrtStdEmitterPrtMatrix
*
* An optional structure to construct a matrix for each particle during emissions. A particle
* can be represented as a single matrix. This gives the particles an orientation rather than
* just a simple position.
*
* This allows transformation to be applied to the particles, such as rotation. If
* \ref rpPRTSTDEMITTERPRTMTXFLAGSCNSMTX is set in the flag, then the prtCnsMatrix is applied to each
* particle during particle update.
*
* If this structure is not present, then it assumes the particles will have just a position
* property.
*/
struct RpPrtStdEmitterPrtMatrix struct RpPrtStdEmitterPrtMatrix
{ {
RwMatrix prtCnsMtx; RwMatrix prtCnsMtx; /**< Transformation matrix to be applied to each particle */
RwV3d prtPosMtxAt, RwV3d prtPosMtxAt, /**< Particle initial look at vector */
prtPosMtxAtBias; prtPosMtxAtBias; /**< Particle initial look at vector bias */
RwV3d prtPosMtxUp, RwV3d prtPosMtxUp, /**< Particle initial up vector. */
prtPosMtxUpBias; prtPosMtxUpBias; /**< Particle initial up vector bias */
RwInt32 flags; RwInt32 flags; /**< Particle matrix flag. See \ref RpPrtStdEmitterPrtMatrixFlags */
}; };
/************************************************************************ /************************************************************************
@ -584,18 +600,42 @@ enum RpPrtStdPTankPropertyCode
typedef enum RpPrtStdPTankPropertyCode RpPrtStdPTankPropertyCode; typedef enum RpPrtStdPTankPropertyCode RpPrtStdPTankPropertyCode;
typedef struct RpPrtStdEmitterPTank RpPrtStdEmitterPTank; typedef struct RpPrtStdEmitterPTank RpPrtStdEmitterPTank;
/**
* \ingroup rpprtstd
* \struct RpPrtStdEmitterPTank
*
* A structure for storing the data required to create a RpPTank for use
* with the emitter. The structure allows the user to create a RpPTank
* manually.
*/
struct RpPrtStdEmitterPTank struct RpPrtStdEmitterPTank
{ {
RwUInt32 dataFlags, RwUInt32 dataFlags, /**< Data flag used in RpPTank creation. See
platFlags, * \ref RpPTankAtomicCreate */
numPrt, platFlags, /**< Platform flag used in RpPTank creation. See
maxPrt, * \ref RpPTankAtomicCreate */
updateFlags, numPrt, /**< An integer representing the current number of active
emitFlags; * particles */
RpAtomic *pTank; maxPrt, /**< An integer representing the maxiumum number of particles
RwChar **dataInPtrs, * stored in the RpPTank */
**dataOutPtrs; updateFlags, /**< A flag representing the properties to be updated by
RwInt32 *dataStride; * the particle emiiter during update. A user may select to
* update some properties manually by unsetting the relevant
* bits in the flag.
* The flag settings are the same as \ref RpPTankDataFlags */
emitFlags; /**< A flag representing the properties to be initialised
* by the particle emitter during particles emission. A user
* may select to initialise some properties manually by
* unsetting the relevant bits in the flag.
* The flag settings are the same as \ref RpPTankDataFlags */
RpAtomic *pTank; /**< Pointer to the RpPTank */
RwChar **dataInPtrs, /**< Internal usage */
**dataOutPtrs; /**< Internal usage */
RwInt32 *dataStride; /**< Internal usage */
RwUInt32 strSrcBlend; /**< Internal usage */
RwUInt32 strDstBlend; /**< Internal usage */
RwBool strVtxABlend; /**< Internal usage */
}; };
/************************************************************************ /************************************************************************
@ -608,7 +648,6 @@ struct RpPrtStdEmitterPTank
#define rpPRTSTDPROPERTYCODEPARTICLEPOSITION 1 #define rpPRTSTDPROPERTYCODEPARTICLEPOSITION 1
#define rpPRTSTDPROPERTYCODEPARTICLECOLOR 2 #define rpPRTSTDPROPERTYCODEPARTICLECOLOR 2
#define rpPRTSTDPROPERTYCODEPARTICLETEXCOORDS 3 #define rpPRTSTDPROPERTYCODEPARTICLETEXCOORDS 3
#define rpPRTSTDPROPERTYCODEPARTICLEANIMFRAME 4
#define rpPRTSTDPROPERTYCODEPARTICLESIZE 5 #define rpPRTSTDPROPERTYCODEPARTICLESIZE 5
#define rpPRTSTDPROPERTYCODEPARTICLEVELOCITY 6 #define rpPRTSTDPROPERTYCODEPARTICLEVELOCITY 6
#define rpPRTSTDPROPERTYCODEPARTICLEMATRIX 7 #define rpPRTSTDPROPERTYCODEPARTICLEMATRIX 7
@ -619,7 +658,6 @@ struct RpPrtStdEmitterPTank
#define rpPRTSTDPARTICLEDATAFLAGPOSITION 0x00000002 #define rpPRTSTDPARTICLEDATAFLAGPOSITION 0x00000002
#define rpPRTSTDPARTICLEDATAFLAGCOLOR 0x00000004 #define rpPRTSTDPARTICLEDATAFLAGCOLOR 0x00000004
#define rpPRTSTDPARTICLEDATAFLAGTEXCOORDS 0x00000008 #define rpPRTSTDPARTICLEDATAFLAGTEXCOORDS 0x00000008
#define rpPRTSTDPARTICLEDATAFLAGANIMFRAME 0x00000010
#define rpPRTSTDPARTICLEDATAFLAGSIZE 0x00000020 #define rpPRTSTDPARTICLEDATAFLAGSIZE 0x00000020
#define rpPRTSTDPARTICLEDATAFLAGVELOCITY 0x00000040 #define rpPRTSTDPARTICLEDATAFLAGVELOCITY 0x00000040
#define rpPRTSTDPARTICLEDATAFLAGMATRIX 0x00000080 #define rpPRTSTDPARTICLEDATAFLAGMATRIX 0x00000080
@ -675,15 +713,6 @@ struct RpPrtStdParticleTexCoords
deltaUV1; /**< Particle's bottom right texcoords rate of change */ deltaUV1; /**< Particle's bottom right texcoords rate of change */
}; };
typedef struct RpPrtStdParticleAnimFrame RpPrtStdParticleAnimFrame;
struct RpPrtStdParticleAnimFrame
{
RwInt32 frame;
RwReal delta;
};
typedef struct RpPrtStdParticleSize RpPrtStdParticleSize; typedef struct RpPrtStdParticleSize RpPrtStdParticleSize;
/** /**
@ -714,10 +743,13 @@ extern "C"
/************************************************************************/ /************************************************************************/
extern RwBool extern RwBool
RpParticleStandardPluginAttach( void ); RpPrtStdPluginAttach( void );
/************************************************************************/ /************************************************************************/
extern RwBool
RpAtomicIsParticleEmitter(RpAtomic *atomic);
extern RpAtomic * extern RpAtomic *
RpPrtStdAtomicCreate(RpPrtStdEmitterClass *eClass, void *data); RpPrtStdAtomicCreate(RpPrtStdEmitterClass *eClass, void *data);
@ -749,6 +781,9 @@ RpPrtStdEmitterCreate(RpPrtStdEmitterClass *eClass);
extern RwBool extern RwBool
RpPrtStdEmitterDestroy(RpPrtStdEmitter *emt); RpPrtStdEmitterDestroy(RpPrtStdEmitter *emt);
extern RpPrtStdEmitter *
RpPrtStdEmitterClone(RpPrtStdEmitter *emt);
extern RpPrtStdEmitter * extern RpPrtStdEmitter *
RpPrtStdEmitterForAllParticleBatch(RpPrtStdEmitter *emt, RpPrtStdEmitterForAllParticleBatch(RpPrtStdEmitter *emt,
RpPrtStdParticleCallBack callback, RpPrtStdParticleCallBack callback,
@ -835,7 +870,6 @@ RpPrtStdPropTabStreamWrite(RpPrtStdPropertyTable *eClass,
extern RwInt32 extern RwInt32
RpPrtStdPropTabStreamGetSize(RpPrtStdPropertyTable *eClass); RpPrtStdPropTabStreamGetSize(RpPrtStdPropertyTable *eClass);
/************************************************************************/ /************************************************************************/
extern RwBool extern RwBool
@ -941,6 +975,11 @@ RpPrtStdGlobalDataStreamWrite(RwStream *stream);
extern RwInt32 extern RwInt32
RpPrtStdGlobalDataStreamGetSize( void ); RpPrtStdGlobalDataStreamGetSize( void );
extern void
RpPrtStdGlobalDataSetStreamEmbedded( RwBool embedded );
extern RwBool
RpPrtStdGlobalDataGetStreamEmbedded( void );
/************************************************************************/ /************************************************************************/
@ -963,10 +1002,18 @@ extern RpPrtStdEmitter *
RpPrtStdEmitterStdEmitCB(RpAtomic *atomic, RpPrtStdEmitterStdEmitCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data); RpPrtStdEmitter *emt, void *data);
extern RpPrtStdEmitter *
RpPrtStdEmitterStdCloneCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data);
extern RpPrtStdEmitter * extern RpPrtStdEmitter *
RpPrtStdEmitterStdCreateCB(RpAtomic *atomic, RpPrtStdEmitterStdCreateCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data); RpPrtStdEmitter *emt, void *data);
extern RpPrtStdEmitter *
RpPrtStdEmitterStdDestroyCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data);
extern RpPrtStdEmitter * extern RpPrtStdEmitter *
RpPrtStdEmitterStdBeginUpdateCB(RpAtomic *atomic, RpPrtStdEmitterStdBeginUpdateCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data); RpPrtStdEmitter *emt, void *data);

View File

@ -160,480 +160,14 @@
enum e_rwdb_CriterionPrtStandard
enum e_rwdb_CriterionParticleStandard
{ {
e_rwdb_CriterionParticleStandardLAST = RWFORCEENUMSIZEINT e_rwdb_CriterionPrtStandardLAST = RWFORCEENUMSIZEINT
}; };
typedef enum e_rwdb_CriterionParticleStandard e_rwdb_CriterionParticleStandard; typedef enum e_rwdb_CriterionPrtStandard e_rwdb_CriterionPrtStandard;

View File

@ -13,12 +13,13 @@
/** /**
* \defgroup rpptank RpPTank * \defgroup rpptank RpPTank
* \ingroup rpplugin * \ingroup particles
* *
* PTank Plugin for RenderWare. * PTank Plugin for RenderWare.
*/ */
/*--- Include files ---*/ /*--- Include files ---*/
#include <string.h> #include <string.h>
#include "rwcore.h" #include "rwcore.h"
@ -139,7 +140,7 @@ enum RpPTankInstanceFlags
rpPTANKIFLAGCENTER = ((int)0x01000000), /**<Center position changed*/ rpPTANKIFLAGCENTER = ((int)0x01000000), /**<Center position changed*/
/* free = ((int)0x04000000), */ /* free = ((int)0x04000000), */
/* free = ((int)0x08000000), */ /* free = ((int)0x08000000), */
/* free = ((int)0x10000000), */ rpPTANKIFLAGALPHABLENDING = ((int)0x10000000), /**<Internal Use*/
rpPTANKIFLAGALL = ((int)0xFFFFFFFF), rpPTANKIFLAGALL = ((int)0xFFFFFFFF),
RPPTANKINSTANCEFLAGSFORCEENUMSIZEINT = RWFORCEENUMSIZEINT RPPTANKINSTANCEFLAGSFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
@ -244,20 +245,22 @@ extern const RwInt32 datasize[];
/** /**
* \ingroup rpptank * \ingroup rpptank
* \typedef rpptankAllocCallBack * \ref RpPTankAllocCallBack
*
* ... * ...
*/ */
typedef void *(* rpPTankAllocCallBack)(RpPTankData *ptankGlobal, typedef void *(* RpPTankAllocCallBack)(RpPTankData *ptankGlobal,
RwInt32 maxPCount, RwInt32 maxPCount,
RwUInt32 dataFlags, RwUInt32 dataFlags,
RwUInt32 platFlags); RwUInt32 platFlags);
/** /**
* \ingroup rpptank * \ingroup rpptank
* \typedef rpPTankCreateCallBack * \ref RpPTankCreateCallBack
*
* ... * ...
*/ */
typedef RwBool (* rpPTankCreateCallBack)(RpAtomic *atomic, typedef RwBool (* RpPTankCreateCallBack)(RpAtomic *atomic,
RpPTankData *ptankGlobal, RpPTankData *ptankGlobal,
RwInt32 maxPCount, RwInt32 maxPCount,
RwUInt32 dataFlags, RwUInt32 dataFlags,
@ -265,37 +268,37 @@ typedef RwBool (* rpPTankCreateCallBack)(RpAtomic *atomic,
/** /**
* \ingroup rpptank * \ingroup rpptank
* \typedef rpPTankInstanceCallBack * \ref RpPTankInstanceCallBack
* ... * ...
*/ */
typedef RwBool (* rpPTankInstanceCallBack)(RpAtomic *atomic, typedef RwBool (* RpPTankInstanceCallBack)(RpAtomic *atomic,
RpPTankData *ptankGlobal, RpPTankData *ptankGlobal,
RwInt32 actPCount, RwInt32 actPCount,
RwUInt32 instFlags); RwUInt32 instFlags);
/** /**
* \ingroup rpptank * \ingroup rpptank
* \typedef rpPTankRenderCallBack * \ref RpPTankRenderCallBack
* ... * ...
*/ */
typedef RwBool (* rpPTankRenderCallBack)(RpAtomic *atomic, typedef RwBool (* RpPTankRenderCallBack)(RpAtomic *atomic,
RpPTankData *ptankGlobal, RpPTankData *ptankGlobal,
RwInt32 actPCount); RwInt32 actPCount);
typedef struct rpPTankCallBacks rpPTankCallBacks; typedef struct RpPTankCallBacks RpPTankCallBacks;
struct rpPTankCallBacks struct RpPTankCallBacks
{ {
rpPTankAllocCallBack alloc; RpPTankAllocCallBack alloc;
rpPTankCreateCallBack create; RpPTankCreateCallBack create;
rpPTankInstanceCallBack instance; RpPTankInstanceCallBack instance;
rpPTankRenderCallBack render; RpPTankRenderCallBack render;
}; };
/* private typedefs */ /* private typedefs */
typedef struct rpPTANKInstanceSetupData rpPTANKInstanceSetupData; typedef struct RpPTANKInstanceSetupData RpPTANKInstanceSetupData;
struct rpPTANKInstanceSetupData struct RpPTANKInstanceSetupData
{ {
RwBool instancePositions; RwBool instancePositions;
RwBool instanceUVs; RwBool instanceUVs;
@ -312,27 +315,27 @@ struct rpPTANKInstanceSetupData
}; };
typedef void (* rpPTankGENInstancePosCallback)( typedef void (* RpPTankGENInstancePosCallback)(
RpPTankLockStruct *dstCluster, RpPTankLockStruct *dstCluster,
RwV3d *right, RwV3d *right,
RwV3d *up, RwV3d *up,
RwInt32 pCount, RwInt32 pCount,
RpPTankData *ptankGlobal); RpPTankData *ptankGlobal);
typedef void (* rpPTankGENInstanceCallback)( typedef void (* RpPTankGENInstanceCallback)(
RpPTankLockStruct *dstCluster, RpPTankLockStruct *dstCluster,
RwInt32 pCount, RwInt32 pCount,
RpPTankData *ptankGlobal); RpPTankData *ptankGlobal);
typedef void (* rpPTankGENInstanceSetupCallback)( typedef void (* RpPTankGENInstanceSetupCallback)(
rpPTANKInstanceSetupData *data, RpPTANKInstanceSetupData *data,
RpAtomic *atomic, RpAtomic *atomic,
RpPTankData *ptankGlobal, RpPTankData *ptankGlobal,
RwInt32 actPCount, RwInt32 actPCount,
RwUInt32 instFlags); RwUInt32 instFlags);
typedef void (* rpPTankGENInstanceEndingCallback)( typedef void (* RpPTankGENInstanceEndingCallback)(
rpPTANKInstanceSetupData *data, RpPTANKInstanceSetupData *data,
RpAtomic *atomic, RpAtomic *atomic,
RpPTankData *ptankGlobal, RpPTankData *ptankGlobal,
RwInt32 actPCount, RwInt32 actPCount,
@ -351,15 +354,15 @@ struct RpPTankAtomicExtPrv
/* Rendering callback */ /* Rendering callback */
RpAtomicCallBackRender defaultRenderCB; RpAtomicCallBackRender defaultRenderCB;
rpPTankCallBacks ptankCallBacks; RpPTankCallBacks ptankCallBacks;
/* Instancing CallBacks */ /* Instancing CallBacks */
rpPTankGENInstanceSetupCallback insSetupCB; RpPTankGENInstanceSetupCallback insSetupCB;
rpPTankGENInstancePosCallback insPosCB; RpPTankGENInstancePosCallback insPosCB;
rpPTankGENInstanceCallback insUVCB; RpPTankGENInstanceCallback insUVCB;
rpPTankGENInstanceCallback insColorsCB; RpPTankGENInstanceCallback insColorsCB;
rpPTankGENInstanceCallback insNormalsCB; RpPTankGENInstanceCallback insNormalsCB;
rpPTankGENInstanceEndingCallback insEndingCB; RpPTankGENInstanceEndingCallback insEndingCB;
RwUInt32 lockFlags; RwUInt32 lockFlags;
RwUInt32 instFlags; RwUInt32 instFlags;
@ -390,7 +393,6 @@ extern RwInt32 _rpPTankGlobalsOffset; /* Offset in RwEngine */
#endif #endif
extern RwBool extern RwBool
RpPTankPluginAttach(void); RpPTankPluginAttach(void);
@ -523,7 +525,7 @@ MACRO_START\
RPATOMICPTANKPLUGINDATA(atm_)->publicData.cColor = *col_;\ RPATOMICPTANKPLUGINDATA(atm_)->publicData.cColor = *col_;\
if( RpGeometryGetMaterial(RpAtomicGetGeometry(atm_),0) )\ if( RpGeometryGetMaterial(RpAtomicGetGeometry(atm_),0) )\
{\ {\
RpMaterialSetColor(\ (void)RpMaterialSetColor(\
RpGeometryGetMaterial(RpAtomicGetGeometry(atm_),0),\ RpGeometryGetMaterial(RpAtomicGetGeometry(atm_),0),\
&RPATOMICPTANKPLUGINDATA(atm_)->publicData.cColor);\ &RPATOMICPTANKPLUGINDATA(atm_)->publicData.cColor);\
}\ }\
@ -759,6 +761,14 @@ extern RpAtomic *
RpPTankAtomicUnlock(RpAtomic *atomic); RpPTankAtomicUnlock(RpAtomic *atomic);
/*
* Stealth functions *********************************************************
*/
RpAtomic*
_rpPTankAtomicCreateCustom(RwInt32 maxParticleNum,
RwUInt32 dataFlags, RwUInt32 platFlags,
RpPTankCallBacks *callbacks);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
@ -767,6 +777,41 @@ RpPTankAtomicUnlock(RpAtomic *atomic);
/*---- start: c:/daily/rwsdk/plugin/ptank/d3d8/ptankplatform.h----*/ /*---- start: c:/daily/rwsdk/plugin/ptank/d3d8/ptankplatform.h----*/
/**
* \defgroup rpptankd3d8 D3D8
* \ingroup rpptank
*
* D3D8 specific documentation.
*/
/**
* \ingroup rpptankd3d8
* \par D3D8 specific data flags
*
* <ul>
* <li> rpPTANKD3D8FLAGSUSEPOINTSPRITES selects the D3D8 optimized pipeline. At the
* moment, this pipeline use point sprites when the hardware supports them,
* which don't allow use of all the PTank flags. Only the following flags are
* supported when using the D3D8 optimized pipes:
*
* <ul>
* <li> rpPTANKDFLAGPOSITION
* <li> rpPTANKDFLAGNORMAL
* <li> rpPTANKDFLAGSIZE (if the hardware supports the D3DFVF_PSIZE vertex format flag)
* <li> rpPTANKDFLAGCOLOR
* <li> rpPTANKDFLAGUSECENTER
* <li> rpPTANKDFLAGARRAY
* <li> rpPTANKDFLAGSTRUCTURE
* </ul>
*
* The texture coordinates are generated by the hardware and can't be specified.
* </ul>
*
* If the hardware does not support point sprites, the default pipeline is used
* instead.
*
*/
enum RpPTankD3D8Flags enum RpPTankD3D8Flags
{ {
rpPTANKD3D8FLAGSUSEPOINTSPRITES = 0x00000001, rpPTANKD3D8FLAGSUSEPOINTSPRITES = 0x00000001,
@ -774,6 +819,8 @@ enum RpPTankD3D8Flags
rpPTANKD3D8FLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT rpPTANKD3D8FLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}; };
typedef enum RpPTankD3D8Flags RpPTankD3D8Flags;
/*---- end: c:/daily/rwsdk/plugin/ptank/d3d8/ptankplatform.h----*/ /*---- end: c:/daily/rwsdk/plugin/ptank/d3d8/ptankplatform.h----*/
#endif /* RPPTANK_H */ #endif /* RPPTANK_H */

View File

@ -143,472 +143,6 @@

View File

@ -32,7 +32,7 @@
/** /**
* \defgroup rppvs RpPVS * \defgroup rppvs RpPVS
* \ingroup rpplugin * \ingroup pvs
* *
* Geometric Potentially Visible Set Plugin for RenderWare Graphics. * Geometric Potentially Visible Set Plugin for RenderWare Graphics.
*/ */
@ -122,11 +122,14 @@ typedef RpWorldSector *(*RpPVSCallBack) (RpWorldSector * worldSector,
#define RpPVSCallback RpPVSCallBack #define RpPVSCallback RpPVSCallBack
typedef struct _RpPVSCallBack _RpPVSCallBack; typedef struct _RpPVSCallBack _RpPVSCallBack;
#if (!defined(DOXYGEN))
struct _RpPVSCallBack struct _RpPVSCallBack
{ {
RpPVSCallBack callback; RpPVSCallBack callback;
void *data; void *data;
}; };
#endif /* (!defined(DOXYGEN)) */
enum _rpPVSPartitionId enum _rpPVSPartitionId
{ {
@ -145,6 +148,7 @@ typedef struct _rpPVSPolyList *_rpPVSPolyListPtr;
typedef struct _rpPVSPoly _rpPVSPoly; typedef struct _rpPVSPoly _rpPVSPoly;
typedef struct _rpPVSPoly *_rpPVSPolyPtr; typedef struct _rpPVSPoly *_rpPVSPolyPtr;
#if (!defined(DOXYGEN))
typedef struct _rpPVSPlaneEq _rpPVSPlaneEq; typedef struct _rpPVSPlaneEq _rpPVSPlaneEq;
struct _rpPVSPlaneEq struct _rpPVSPlaneEq
{ {
@ -158,12 +162,13 @@ struct _rpPVSPlaneEq
_rpPVSPartitionId lastresult; /* temp: stores result of last polygon wrt this plane */ _rpPVSPartitionId lastresult; /* temp: stores result of last polygon wrt this plane */
}; };
typedef struct typedef struct RwV3i RwV3i;
struct RwV3i
{ {
RwInt32 x; RwInt32 x;
RwInt32 y; RwInt32 y;
RwInt32 z; RwInt32 z;
}RwV3i; };
typedef struct _rpPVSPolyRecord _rpPVSPolyRecord; typedef struct _rpPVSPolyRecord _rpPVSPolyRecord;
struct _rpPVSPolyRecord struct _rpPVSPolyRecord
@ -205,47 +210,45 @@ struct _rpPVSPolyList
}; };
typedef struct RpPVS RpPVS; typedef struct RpPVS RpPVS;
struct RpPVS struct RpPVS
{ {
RwInt32 sectorID; /* Id of the sector */ RwInt32 sectorID;
RwInt32 vismaplength; /* Length of vismap */ RwInt32 vismaplength;
RwInt32 sampleKey; /* Currently unused, for future use */ RwInt32 sampleKey;
RpPVSVisMap *vismap; RpPVSVisMap *vismap;
_rpPVSPolyListPtr sectailpoly; /* Pointer to last polygon in polygons list that is in this sector */ _rpPVSPolyListPtr sectailpoly;
_rpPVSPartitionId potential;
_rpPVSPartitionId potential; /* temp: is sector in out or split from current shadow volume - for heirarchical clip */
RwUInt32 numpols; RwUInt32 numpols;
RwBBox sbox; /* Bounding box of the sector */ RwBBox sbox;
RwBBox gbox; /* Bounding box of the geometry of the sector */ RwBBox gbox;
RwReal diagonal; /* Diagonal size of bounding box of the sector */ RwReal diagonal;
RwV3d centre; /* Centre of the sector */ RwV3d centre;
RwInt32 axessig[3]; /* sampling significance of the axes of the gbox */ RwInt32 axessig[3];
}; };
typedef struct RpPVSCache RpPVSCache; typedef struct RpPVSCache RpPVSCache;
struct RpPVSCache struct RpPVSCache
{ {
RwBool processed; /* flag to indicate exisiting PVS data for the world */ RwBool processed;
RwBool formatted; /* flag to indicate exisiting intermediate polygonal data for PVS generation */ RwBool formatted;
RwInt32 NumWorldSectors;
/* stats collection */
RwInt32 ptotal; RwInt32 ptotal;
RwInt32 paccept; RwInt32 paccept;
/* pipeline hooking */
RwBool hooked; RwBool hooked;
/* used during vismap allocation */
RwUInt32 nextID; RwUInt32 nextID;
RwInt32 viscount; RwInt32 viscount;
/* Used during construction */
RpPVSProgressCallBack progressCallBack; RpPVSProgressCallBack progressCallBack;
_rpPVSPolyListPtr polygons; /* A copy of the input data set of all world polygons */ _rpPVSPolyListPtr polygons;
RpWorldSectorCallBackRender renderCallBack; RpWorldSectorCallBackRender renderCallBack;
}; };
@ -255,23 +258,23 @@ struct RpPVSGlobalVars
{ {
RpWorld *World; RpWorld *World;
RwInt32 worldOffset; /* Offset into global data */ RwInt32 worldOffset;
RwInt32 sectorOffset; /* Offset into global data */ RwInt32 sectorOffset;
RwBool collis; /* Collision detection */ RwBool collis;
RwBool bfc; /* Backface culling */ RwBool bfc;
RwInt32 NumWorldSectors;
RwInt32 progress_count; RwInt32 progress_count;
RwReal diagonal; RwReal diagonal;
RwReal gran; RwReal gran;
RwInt32 InSector; /* Current sector id */ RwInt32 InSector;
RwV3d ViewPos; /* Current view pos */ RwV3d ViewPos;
RpPVS *CurrPVS; /* Current PVS sector */ RpPVS *CurrPVS;
}; };
#endif /* (!defined(DOXYGEN)) */
/**************************************************************************** /****************************************************************************

View File

@ -140,472 +140,6 @@

View File

@ -28,7 +28,7 @@
/** /**
* \defgroup rprandom RpRandom * \defgroup rprandom RpRandom
* \ingroup rpplugin * \ingroup mathtools
* *
* Random Number Generation Plugin for RenderWare Graphics. * Random Number Generation Plugin for RenderWare Graphics.
*/ */

View File

@ -138,472 +138,6 @@

View File

@ -4,7 +4,7 @@
/** /**
* \defgroup rpskin RpSkin * \defgroup rpskin RpSkin
* \ingroup rpplugin * \ingroup skinning
* *
* Skin Plugin for RenderWare Graphics. * Skin Plugin for RenderWare Graphics.
*/ */
@ -48,7 +48,7 @@ struct RwMatrixWeights
/** /**
* \ingroup rpskin * \ingroup rpskin
* \typedef RpSkin * \struct RpSkin
* *
* Skin object. This should be considered an opaque type. * Skin object. This should be considered an opaque type.
* Use the RpSkin API functions to access. * Use the RpSkin API functions to access.
@ -69,6 +69,9 @@ extern "C"
/*---------------------------------------------------------------------------* /*---------------------------------------------------------------------------*
*- Plugin functions -* *- Plugin functions -*
*---------------------------------------------------------------------------*/ *---------------------------------------------------------------------------*/
extern void RpSkinSetFreeListCreateParams(
RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern RwBool extern RwBool
RpSkinPluginAttach(void); RpSkinPluginAttach(void);
@ -114,6 +117,9 @@ RpSkinGetVertexBoneIndices( RpSkin *skin );
extern const RwMatrix * extern const RwMatrix *
RpSkinGetSkinToBoneMatrices( RpSkin *skin ); RpSkinGetSkinToBoneMatrices( RpSkin *skin );
extern RwBool
RpSkinIsSplit( RpSkin *skin );
/*---------------------------------------------------------------------------* /*---------------------------------------------------------------------------*
*- Skin pipeline -* *- Skin pipeline -*
*---------------------------------------------------------------------------*/ *---------------------------------------------------------------------------*/
@ -131,7 +137,6 @@ enum RpSkinType
rpSKINTYPEGENERIC = 1, /**<Generic skin rendering. */ rpSKINTYPEGENERIC = 1, /**<Generic skin rendering. */
rpSKINTYPEMATFX = 2, /**<Material effects skin rendering. */ rpSKINTYPEMATFX = 2, /**<Material effects skin rendering. */
rpSKINTYPETOON = 3, /**<Toon skin rendering. */ rpSKINTYPETOON = 3, /**<Toon skin rendering. */
rpSKINTYPEMATFXTOON = 4, /**<Note Toon + MatFX on same object NOT currently supported */
rpSKINTYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT rpSKINTYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}; };
typedef enum RpSkinType RpSkinType; typedef enum RpSkinType RpSkinType;
@ -143,6 +148,32 @@ RpSkinAtomicSetType( RpAtomic *atomic,
extern RpSkinType extern RpSkinType
RpSkinAtomicGetType( RpAtomic *atomic ); RpSkinAtomicGetType( RpAtomic *atomic );
/*---------------------------------------------------------------------------*
*- Internal API -*
*---------------------------------------------------------------------------*/
extern RpGeometry *
_rpSkinInitialize(RpGeometry *geometry);
extern RpGeometry *
_rpSkinDeinitialize(RpGeometry *geometry);
extern RwUInt8 *
_rpSkinGetMeshBoneRemapIndices( RpSkin *skin );
extern RwUInt8 *
_rpSkinGetMeshBoneRLECount( RpSkin *skin );
extern RwUInt8 *
_rpSkinGetMeshBoneRLE( RpSkin *skin );
extern RpSkin *
_rpSkinSplitDataCreate( RpSkin *skin, RwUInt32 boneLimit,
RwUInt32 numMatrices, RwUInt32 numMeshes,
RwUInt32 numRLE );
extern RwBool
_rpSkinSplitDataDestroy( RpSkin *skin );
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#ifdef __cplusplus #ifdef __cplusplus
@ -167,6 +198,29 @@ RpSkinAtomicGetType( RpAtomic *atomic );
* D3D8 skin pipeline extension. * D3D8 skin pipeline extension.
*/ */
/**
* \defgroup rpskind3d8features Features
* \ingroup rpskind3d8
*
* D3D8 skin pipeline features.
*/
/**
* \defgroup rpskind3d8restrictions Restrictions
* \ingroup rpskind3d8
*
* D3D8 skin pipeline restrictions.
*/
/**
* \defgroup rpskinbonelimit Bone limit
* \ingroup rpskind3d8restrictions
*
* \par Bone limit
* The bone limit is 256 as skinning is performed on the CPU.
*
*/
/*===========================================================================* /*===========================================================================*
*--- D3D8 Defines -----------------------------------------------------------* *--- D3D8 Defines -----------------------------------------------------------*

View File

@ -138,472 +138,6 @@

View File

@ -39,7 +39,7 @@
/** /**
* \defgroup rpspline RpSpline * \defgroup rpspline RpSpline
* \ingroup rpplugin * \ingroup mathtools
* *
* Spline Plugin for RenderWare Graphics. * Spline Plugin for RenderWare Graphics.
*/ */

View File

@ -138,472 +138,6 @@

View File

@ -1,141 +0,0 @@
/*
* Stereo camera plugin
*/
/**********************************************************************
*
* File : rpstereo.h
*
* Abstract : Add Stereo Camera support to RenderWare
*
**********************************************************************
*
* This file is a product of Criterion Software Ltd.
*
* This file is provided as is with no warranties of any kind and is
* provided without any obligation on Criterion Software Ltd. or
* Canon Inc. to assist in its use or modification.
*
* Criterion Software Ltd. will not, under any
* circumstances, be liable for any lost revenue or other damages arising
* from the use of this file.
*
* Copyright (c) 1998 Criterion Software Ltd.
* All Rights Reserved.
*
* RenderWare is a trademark of Canon Inc.
*
************************************************************************/
#ifndef RPSTEREO_H
#define RPSTEREO_H
/**
* \defgroup rpstereo RpStereo
* \ingroup rpplugin
*
* Stereo Camera Plugin for RenderWare Graphics.
*/
/*--- Include files ---*/
#include <rwcore.h>
#include <rpworld.h>
#include "rpstereo.rpe" /* automatically generated header file */
/*--- Global Structures ---*/
/* Supported Stereo Modes */
/**
* \ingroup rpstereo
* \ref RpStereoCameraMode
* Stereo camera mode enumeration.
*/
enum RpStereoCameraMode
{
rpNASTEREOMODE = 0,
rpSTEREOMONO, /**< Render as Mono camera - single
* image
*/
rpSTEREOLEFTRIGHT, /**< Vertical split screen. Left eye
* image on left of screen. Right eye
* image on right of screen.
*/
rpSTEREORIGHTLEFT, /**< Vertical split screen. Right eye
* image on left of screen. Left eye image
* on right of screen.
*/
rpSTEREOROTATE90, /**< As for rpSTEREOLEFTRIGHT - with
* the images rotated inwards by 90 degrees
*/
rpSTEREOINTERLACEDLEFTRIGHT, /**< Left and right eye images on
* alternate scanlines. The left eye image
* on the topmost line of the display.
*/
rpSTEREOINTERLACEDRIGHTLEFT, /**< Left and right eye images on
* alternate scanlines. The right eye
* image is on the topmost line of the
* display.
*/
rpSTEREOLASTMODE,
rpSTEREOCAMERAMODEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
/*
* typedef for stereo camera mode enumeration.
*/
typedef enum RpStereoCameraMode RpStereoCameraMode;
/*--- Constants ---*/
/* These may be used to quickly adapt an existing application to a
* stereo version.
*/
#ifdef RPSTEREO_OVERLOAD
#define RwCameraBeginUpdate RpStereoCameraBeginUpdate
#define RwCameraEndUpdate RpStereoCameraEndUpdate
#undef RpWorldRender
#define RpWorldRender RpStereoWorldRender
#undef RpClumpRender
#define RpClumpRender RpStereoClumpRender
#undef RpAtomicRender
#define RpAtomicRender RpStereoAtomicRender
#undef RpWorldSectorRender
#define RpWorldSectorRender RpStereoWorldSectorRender
#endif
/*--- Plugin API Functions ---*/
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
RwBool RpStereoPluginAttach(void);
RpWorld *RpStereoWorldRender(RpWorld *world);
RpClump *RpStereoClumpRender(RpClump *clump);
RpAtomic *RpStereoAtomicRender(RpAtomic *atomic);
RpWorldSector *RpStereoWorldSectorRender(RpWorldSector *sector);
RwCamera *RpStereoCameraBeginUpdate(RwCamera *camera);
RwCamera *RpStereoCameraEndUpdate(RwCamera *stereoCam);
RwReal RpStereoCameraGetSeparation(RwCamera *stereoCam);
RwReal RpStereoCameraGetFocal(RwCamera *stereoCam);
RpStereoCameraMode RpStereoCameraGetMode(RwCamera *stereoCam);
RwCamera *RpStereoCameraSetSeparation(RwCamera *stereoCam, RwReal dist);
RwCamera *RpStereoCameraSetFocal(RwCamera *stereoCam, RwReal focal);
RwCamera *RpStereoCameraSetMode(RwCamera *stereoCam, RpStereoCameraMode newMode);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* RPSTEREO_H */

View File

@ -1,641 +0,0 @@
enum e_rwdb_CriterionStereo
{
E_RP_STEREO_INVMODE,
E_RP_STEREO_INVFOCAL,
e_rwdb_CriterionStereoLAST = RWFORCEENUMSIZEINT
};
typedef enum e_rwdb_CriterionStereo e_rwdb_CriterionStereo;

View File

@ -3,7 +3,7 @@
/** /**
* \defgroup rpuserdata RpUserData * \defgroup rpuserdata RpUserData
* \ingroup rpplugin * \ingroup scenemanagement
* *
* User Data Plugin for RenderWare Graphics. * User Data Plugin for RenderWare Graphics.
*/ */

View File

@ -139,472 +139,6 @@

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,7 @@
/** /**
* \defgroup rt2d Rt2d * \defgroup rt2d Rt2d
* \ingroup rttool * \ingroup 2dtools
* *
* 2D Rendering Toolkit for RenderWare. * 2D Rendering Toolkit for RenderWare.
*/ */
@ -117,6 +117,7 @@
Includes Includes
*/ */
#include "rpworld.h"
#include "rt2d.rpe" /* automatically generated header file */ #include "rt2d.rpe" /* automatically generated header file */
/**************************************************************************** /****************************************************************************
@ -132,6 +133,13 @@
#define Rt2dCTMReadMacro(_result) \ #define Rt2dCTMReadMacro(_result) \
(RwMatrixCopy((_result), _rt2dCTMGet()), (_result)) (RwMatrixCopy((_result), _rt2dCTMGet()), (_result))
#if defined (GCN_DRVMODEL_H)
#define VERTEXCACHESIZE 64
#else
#define VERTEXCACHESIZE 256
#endif
/**************************************************************************** /****************************************************************************
Global Types Global Types
*/ */
@ -152,16 +160,21 @@ typedef struct rt2dShadeParameters rt2dShadeParameters;
* rt2dShadeParameters * rt2dShadeParameters
* describes Shade Parameters * describes Shade Parameters
*/ */
#if (!defined(DOXYGEN))
struct rt2dShadeParameters struct rt2dShadeParameters
{ {
RwRGBAReal col; /* col */ RwRGBAReal col; /* col */
RwV2d uv; /* uv */ RwV2d uv; /* uv */
}; };
#endif /* (!defined(DOXYGEN)) */
/** /**
* \ingroup rt2ddatatypes * \ingroup rt2ddatatypes
* \typedef Rt2dBrush * \struct Rt2dBrush
* typedef for a structure describing a Brush (opaque) * Brush object.
* This should be considered an opaque type.
* Use Rt2dBrush API functions to access.
*/ */
typedef struct Rt2dBrush Rt2dBrush; typedef struct Rt2dBrush Rt2dBrush;
@ -169,35 +182,37 @@ typedef struct Rt2dBrush Rt2dBrush;
* Rt2dBrush * Rt2dBrush
* structure describing a Brush * structure describing a Brush
*/ */
#if defined (GCN_DRVMODEL_H) #if (!defined(DOXYGEN))
#define VERTEXCACHESIZE 64
#else
#define VERTEXCACHESIZE 256
#endif
struct Rt2dBrush struct Rt2dBrush
{ {
RWIM3DVERTEX vertex[VERTEXCACHESIZE];
rt2dShadeParameters top; rt2dShadeParameters top;
rt2dShadeParameters dtop; rt2dShadeParameters dtop;
rt2dShadeParameters bottom; rt2dShadeParameters bottom;
rt2dShadeParameters dbottom; rt2dShadeParameters dbottom;
RwInt32 calcFields; RwRGBA colorCache;
RwInt32 flag;
RwTexture *texture; RwTexture *texture;
RpMaterial *material;
RwReal halfwidth; RwReal halfwidth;
RwInt32 refCount;
}; };
#endif /* (!defined(DOXYGEN)) */
/** /**
* \ingroup rt2ddatatypes * \ingroup rt2ddatatypes
* \typedef Rt2dPath * \struct Rt2dPath
* typedef for a structure describing a Path (opaque) * Path object.
* This should be considered an opaque type.
* Use Rt2dPath API functions to access.
*/ */
typedef struct Rt2dPath Rt2dPath; typedef struct Rt2dPath Rt2dPath;
/** /**
* \ingroup rt2ddatatypes * \ingroup rt2ddatatypes
* \typedef Rt2dFont * \struct Rt2dFont
* typedef for a structure describing a Font (opaque) * Font object.
* This should be considered an opaque type.
* Use Rt2dFont API functions to access.
*/ */
typedef struct Rt2dFont Rt2dFont; typedef struct Rt2dFont Rt2dFont;
@ -206,11 +221,6 @@ typedef struct Rt2dFont Rt2dFont;
*/ */
typedef struct _rt2dFontDictionaryNode _rt2dFontDictionaryNode; typedef struct _rt2dFontDictionaryNode _rt2dFontDictionaryNode;
/**
* \ingroup rt2ddatatypes
* \typedef Rt2dBBox
* typedef for a structure describing a Bounding Box
*/
typedef struct Rt2dBBox Rt2dBBox; typedef struct Rt2dBBox Rt2dBBox;
/** /**
@ -228,8 +238,8 @@ struct Rt2dBBox
/** /**
* \ingroup rt2ddatatypes * \ingroup rt2ddatatypes
* \typedef Rt2dObject * \struct Rt2dObject
* typedef for a structure describing a 2d Object * Structure describing a 2d Object
* This should be considered an opaque type. * This should be considered an opaque type.
* Use Rt2dObject, Rt2dScene, Rt2dShape, Rt2dPickRegion or Rt2dObjectString * Use Rt2dObject, Rt2dScene, Rt2dShape, Rt2dPickRegion or Rt2dObjectString
* API functions to access. * API functions to access.
@ -246,6 +256,7 @@ typedef struct _rt2dScene _rt2dScene;
*/ */
typedef struct _rt2dDepthOfObject _rt2dDepthOfObject; typedef struct _rt2dDepthOfObject _rt2dDepthOfObject;
#if (!defined(DOXYGEN))
/* /*
* typedef for a structure describing the depth of an object * typedef for a structure describing the depth of an object
*/ */
@ -265,15 +276,47 @@ struct _rt2dScene
RwSList *depths; /* depths for depthsort */ RwSList *depths; /* depths for depthsort */
RwBool isDirtyDepths; /* depthsort needs updating */ RwBool isDirtyDepths; /* depthsort needs updating */
}; };
#endif /* (!defined(DOXYGEN)) */
/* /*
* typedef for a structure describing a shape (opaque) * typedef for a structure describing a shape (opaque)
*/ */
typedef struct _rt2dShape _rt2dShape; typedef struct _rt2dShape _rt2dShape;
#if (!defined(DOXYGEN))
typedef struct _rt2dShapeRep _rt2dShapeRep;
struct _rt2dShapeRep
{
RwSList *nodes; /* individual stroked/filled regions of the shape */
RwUInt32 refCount; /* number of shapes referencing this rep */
RpGeometry *geometry; /* Shareable geometry */
};
extern _rt2dShapeRep *
_rt2dShapeRepCreate();
extern RwBool
_rt2dShapeRepDestroy(_rt2dShapeRep *);
extern RwUInt32
_rt2dShapeRepAddRef(_rt2dShapeRep *);
typedef struct _rt2dSceneResourcePool _rt2dSceneResourcePool;
struct _rt2dSceneResourcePool
{
_rt2dShapeRep **shapeReps;
RwUInt32 numShapeReps;
};
extern RwBool
_rt2dSceneResourcePoolFindShapeRep(const _rt2dSceneResourcePool * pool,
const _rt2dShapeRep * rep, RwInt32 * npIndex);
struct _rt2dShape struct _rt2dShape
{ {
RwSList *nodes; /* individual stroked/filled regions of the shape */ _rt2dShapeRep *rep;
RwRGBA *colorCache; /* Shape's color cache */
RpAtomic *atomic; /* Atomic repn */
}; };
/* /*
@ -295,6 +338,7 @@ struct _rt2dPickRegion
/* /*
* structure describing a renderable text string * structure describing a renderable text string
*/ */
struct _rt2dObjectString struct _rt2dObjectString
{ {
RwChar *textString; /* Text string to be rendered */ RwChar *textString; /* Text string to be rendered */
@ -303,6 +347,7 @@ struct _rt2dObjectString
RwReal height; /* Font rendering Height */ RwReal height; /* Font rendering Height */
_rt2dFontDictionaryNode *font; /* Dictionary node identifying font to be used */ _rt2dFontDictionaryNode *font; /* Dictionary node identifying font to be used */
}; };
#endif /* (!defined(DOXYGEN)) */
/* /*
* typedef for a renderable string * typedef for a renderable string
@ -324,6 +369,7 @@ enum Rt2dObjectTypeEnum {
typedef union _rt2dObjectdata _rt2dObjectdata; typedef union _rt2dObjectdata _rt2dObjectdata;
#if (!defined(DOXYGEN))
union _rt2dObjectdata union _rt2dObjectdata
{ {
_rt2dShape shape; _rt2dShape shape;
@ -335,11 +381,13 @@ union _rt2dObjectdata
/* /*
* A base structure for forming a hierarchy of 2D shapes * A base structure for forming a hierarchy of 2D shapes
*/ */
#if (!defined(DOXYGEN))
#define Rt2dObjectIsLocked 0x00000001 #define Rt2dObjectIsLocked 0x00000001
#define Rt2dObjectDirtyLTM 0x00000002 #define Rt2dObjectDirtyLTM 0x00000002
#define Rt2dObjectVisible 0x00000004 #define Rt2dObjectVisible 0x00000004
#define Rt2dObjectDirtyColor 0x00000008
#define Rt2dObjectStringGotNoFonts 0x01000000
struct Rt2dObject struct Rt2dObject
{ {
@ -357,11 +405,35 @@ struct Rt2dObject
/** /**
* \ingroup rt2ddatatypes * \ingroup rt2ddatatypes
* \typedef Rt2dObjectCallBack * \ref Rt2dObjectCallBack
* typedef for a callback on an object * typedef for a callback on an object in a collection
*
* \param object is a specific object
* \param parent is the containing scene
* \param data is user data
*
* \return return value is ignored
*/ */
typedef Rt2dObject *(* Rt2dObjectCallBack)(Rt2dObject *object, Rt2dObject *parent, void *data); typedef Rt2dObject *(* Rt2dObjectCallBack)(Rt2dObject *object, Rt2dObject *parent, void *data);
/**
* \ingroup rt2ddatatypes
* \ref Rt2dFontCallBackRead
* Rt2dFontCallBackRead represents the function used by Rt2dFontRead to read
* the specified font from a disk file. This function should return a
* pointer to the font to indicate success. The returned font is owned by
* the Rt2d internal font dictionary, and is destroyed on calling
* \ref Rt2dClose
*
* \param name is the name of the font to read
*
* \return return the font if successful, NULL otherwise
*
* \see Rt2dFontSetReadCallBack
* \see Rt2dFontGetReadCallBack
*/
typedef Rt2dFont*(* Rt2dFontCallBackRead)(const RwChar *name);
/** /**
* \ingroup rt2ddatatypes * \ingroup rt2ddatatypes
* \ref Rt2dJustificationType * \ref Rt2dJustificationType
@ -381,6 +453,20 @@ enum Rt2dJustificationType
*/ */
typedef enum Rt2dJustificationType Rt2dJustificationType; typedef enum Rt2dJustificationType Rt2dJustificationType;
/**
* \ingroup rt2ddatatypes
* \ref Rt2dShapeNodeFlag
* Passed to \ref Rt2dShapeAddNode, these flags specify
* the type and properties of the path.
*/
enum Rt2dShapeNodeFlag
{
rt2dSHAPENODEFLAGNONE = 0x0000,
rt2dSHAPENODEFLAGSOLID = 0x0001, /**< Shape's node is a solid, not outline */
rt2dSHAPENODEFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT /* Ensure sizeof(enum) == sizeof(RwInt32) */
};
#if (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) )) #if (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ))
#define Rt2dBrushSetWidth(_brush, _width) \ #define Rt2dBrushSetWidth(_brush, _width) \
@ -397,7 +483,20 @@ typedef enum Rt2dJustificationType Rt2dJustificationType;
/**************************************************************************** /****************************************************************************
Function prototypes Function prototypes
*/ */
extern void
Rt2dBrushSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern void
Rt2dFontSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern void
Rt2dFontDictNodeSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern void
Rt2dObjectSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern void
Rt2dPathSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
/* /*
* INITIALIZE * INITIALIZE
@ -407,6 +506,13 @@ Rt2dOpen(RwCamera *cam);
extern void extern void
Rt2dClose(void); Rt2dClose(void);
extern void
Rt2dTriVertSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern void
Rt2dTriPolySetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
/* /*
* PATHS * PATHS
*/ */
@ -518,6 +624,12 @@ Rt2dFontSetPath(const RwChar *path);
extern Rt2dFont * extern Rt2dFont *
Rt2dFontRead(const RwChar *name); Rt2dFontRead(const RwChar *name);
extern RwBool
Rt2dFontSetReadCallBack(Rt2dFontCallBackRead fpCallBack);
extern Rt2dFontCallBackRead
Rt2dFontGetReadCallBack (void);
extern RwUInt32 extern RwUInt32
_rt2dFontStreamGetSize(Rt2dFont *font); _rt2dFontStreamGetSize(Rt2dFont *font);
@ -695,6 +807,10 @@ Rt2dObjectIsObjectString(Rt2dObject *object);
extern Rt2dObject * extern Rt2dObject *
Rt2dObjectCopy(Rt2dObject *dst, Rt2dObject *src); Rt2dObjectCopy(Rt2dObject *dst, Rt2dObject *src);
/* in-place dst version, destruction not req */
extern Rt2dObject *
_rt2dObjectCopy(Rt2dObject *dst, Rt2dObject *src);
/* /*
* HIERARCHICAL SCENE FUNCTIONS - SCENE * HIERARCHICAL SCENE FUNCTIONS - SCENE
*/ */
@ -766,14 +882,8 @@ Rt2dShapeCreate(void);
extern RwBool extern RwBool
Rt2dShapeDestroy(Rt2dObject * shape); Rt2dShapeDestroy(Rt2dObject * shape);
extern Rt2dBrush *
Rt2dShapeGetNewBrush(Rt2dObject *shape);
extern Rt2dPath *
Rt2dShapeGetNewPath(Rt2dObject *shape);
extern Rt2dObject * extern Rt2dObject *
Rt2dShapeAddNode(Rt2dObject *shape, Rt2dPath *path, Rt2dBrush *fill, Rt2dBrush *stroke ); Rt2dShapeAddNode(Rt2dObject *shape, RwUInt32 flag, Rt2dPath *path, Rt2dBrush *brush );
extern RwInt32 extern RwInt32
Rt2dShapeGetNodeCount(Rt2dObject *shape); Rt2dShapeGetNodeCount(Rt2dObject *shape);
@ -792,9 +902,15 @@ Rt2dShapeRender(Rt2dObject *object);
extern Rt2dObject * extern Rt2dObject *
Rt2dShapeMorph(Rt2dObject *result, Rt2dShapeMorph(Rt2dObject *result,
Rt2dObject *source, Rt2dObject *source,
Rt2dObject *destination, Rt2dObject *destination,
RwReal alpha); RwReal alpha);
extern Rt2dObject *
Rt2dShapeLock(Rt2dObject * shape);
extern Rt2dObject *
Rt2dShapeUnlock(Rt2dObject * shape);
/* /*
* HIERARCHICAL SCENE FUNCTIONS - PICK REGION * HIERARCHICAL SCENE FUNCTIONS - PICK REGION
@ -895,6 +1011,7 @@ Rt2dCTMRead(RwMatrix * result);
#endif /* ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) */ #endif /* ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */

View File

@ -129,472 +129,6 @@
@ -620,6 +154,7 @@ enum e_rwdb_Criterion2D
{ {
E_RW_FONTNOTFOUND,
e_rwdb_Criterion2DLAST = RWFORCEENUMSIZEINT e_rwdb_Criterion2DLAST = RWFORCEENUMSIZEINT
}; };

View File

@ -10,8 +10,8 @@
#define RT2DANIM_H #define RT2DANIM_H
/** /**
* \defgroup rt2danim Rt2dAnim * \defgroup rt2danim Rt2dAnim (inc. Maestro)
* \ingroup rttool * \ingroup 2dtools
* *
* A toolkit to coordinate the display, storage and manipulation of 2D * A toolkit to coordinate the display, storage and manipulation of 2D
* animations. * animations.
@ -166,101 +166,132 @@ typedef enum Rt2dStringLabelType Rt2dStringLabelType;
/** /**
* \ingroup rt2danimsub * \ingroup rt2danimsub
* \typedef Rt2dAnimProps * \struct Rt2dAnimProps
* typedef for a structure describing the current state of a scene (opaque) * Structure describing the current state of a scene.
* This should be considered an opaque type. Use the
* Rt2dAnim API functions to access.
*/ */
typedef struct Rt2dAnimProps Rt2dAnimProps; typedef struct Rt2dAnimProps Rt2dAnimProps;
/** /**
* \ingroup rt2danimsub * \ingroup rt2danimsub
* \typedef Rt2dKeyFrameList * \struct Rt2dKeyFrameList
* typedef for a structure describing a list of keyframes * Structure describing an entire list of keyframes
* This should be considered an opaque type. Use the
* Rt2dKeyFrameList API functions to access.
*/ */
typedef struct Rt2dKeyFrameList Rt2dKeyFrameList; typedef struct Rt2dKeyFrameList Rt2dKeyFrameList;
/** /**
* \ingroup rt2danimsub * \ingroup rt2danimsub
* \typedef Rt2dAnimObjectUpdate * \struct Rt2dKeyFrameSet
* typedef for a structure describing a set of changes to a 2d object (opaque) * structure describing a set of keyframe actions to be applied to a 2D object.
* This should be considered an opaque type. Use the
* Rt2dAnim API functions to access.
*/
typedef struct Rt2dKeyFrameSet Rt2dKeyFrameSet;
/**
* \ingroup rt2danimsub
* \struct Rt2dAnimObjectUpdate
* Structure describing an unoptimized update to an object
* This should be considered an opaque type. Use the
* Rt2dAnim API functions to access.
*/ */
typedef struct Rt2dAnimObjectUpdate Rt2dAnimObjectUpdate; typedef struct Rt2dAnimObjectUpdate Rt2dAnimObjectUpdate;
/** /**
* \ingroup rt2danimsub * \ingroup rt2danimsub
* \typedef Rt2dKeyFrameTransform * \struct Rt2dKeyFrameTransform
* typedef for a structure describing a transform change to a 2d object (opaque) * Structure describing a transform change to a 2d object.
* This should be considered an opaque type. Use the
* Rt2dAnim API functions to access.
*/ */
typedef struct Rt2dKeyFrameTransform Rt2dKeyFrameTransform; typedef struct Rt2dKeyFrameTransform Rt2dKeyFrameTransform;
/** /*
* \ingroup rt2danimsub * Typedef for struct Rt2dKeyFrameColor describing a color
* \typedef Rt2dKeyFrameColor * change to a 2d object.
* typedef for a structure describing a color change to a 2d object (opaque)
*/ */
typedef struct Rt2dKeyFrameColor Rt2dKeyFrameColor; typedef struct Rt2dKeyFrameColor Rt2dKeyFrameColor;
/** /*
* \ingroup rt2danimsub * Structure describing a displayable or depth change to a 2d object.
* \typedef Rt2dKeyFrameShow
* typedef for a structure describing a displayable or depth change to a 2d object (opaque)
*/ */
typedef struct Rt2dKeyFrameShow Rt2dKeyFrameShow; typedef struct Rt2dKeyFrameShow Rt2dKeyFrameShow;
/** /*
* \ingroup rt2danimsub * Structure describing a morph change to a 2d object.
* \typedef Rt2dKeyFrameMorph
* typedef for a structure describing a morph change to a 2d object (opaque)
*/ */
typedef struct Rt2dKeyFrameMorph Rt2dKeyFrameMorph; typedef struct Rt2dKeyFrameMorph Rt2dKeyFrameMorph;
/** /**
* \ingroup rt2danimsub * \ingroup rt2danimsub
* \typedef Rt2dAnim * \struct Rt2dAnim
* typedef for a structure describing a 2d animation (opaque) * Structure describing a 2d animation.
* This should be considered an opaque type. Use the
* Rt2dAnim API functions to access.
*/ */
typedef struct Rt2dAnim Rt2dAnim; typedef struct Rt2dAnim Rt2dAnim;
/** /**
* \ingroup rt2dbutton * \ingroup rt2dbutton
* \typedef Rt2dButton * \struct Rt2dButton
* typedef for a structure describing a button (opaque) * Structure describing a button.
* This should be considered an opaque type. Use the
* Rt2dButton API functions to access.
*/ */
typedef struct Rt2dButton Rt2dButton; typedef struct Rt2dButton Rt2dButton;
/** /**
* \ingroup rt2dcel * \ingroup rt2dcel
* \typedef Rt2dCel * \struct Rt2dCel
* typedef for a structure describing a cel (opaque) * Structure describing a cel.
* This should be considered an opaque type. Use the
* Rt2dCel API functions to access.
*/ */
typedef struct Rt2dCel Rt2dCel; typedef struct Rt2dCel Rt2dCel;
/** /**
* \ingroup rt2dcel * \ingroup rt2dcel
* \typedef Rt2dCelList * \struct Rt2dCelList
* typedef for a structure describing a cel list (opaque) * Structure describing a cel list.
* This should be considered an opaque type. Use the
* Rt2dCel API functions to access.
*/ */
typedef struct Rt2dCelList Rt2dCelList; typedef struct Rt2dCelList Rt2dCelList;
/** /**
* \ingroup rt2dmaestro * \ingroup rt2dmaestro
* \typedef Rt2dMaestro * \struct Rt2dMaestro
* typedef for a structure describing a maestro (opaque) * Structure describing a maestro.
* This should be considered an opaque type. Use the
* Rt2dMaestro API functions to access.
*/ */
typedef struct Rt2dMaestro Rt2dMaestro; typedef struct Rt2dMaestro Rt2dMaestro;
/** /*
* \ingroup rt2dmessage * Structure describing a message.
* \typedef Rt2dMessage
* typedef for a structure describing a message (opaque)
*/ */
typedef struct Rt2dMessage Rt2dMessage; typedef struct Rt2dMessage Rt2dMessage;
/**
* \ingroup rt2dmessage
* \struct Rt2dMessageList
* Structure describing a message.
* This should be considered an opaque type. Use the
* Rt2dMessage API functions to access.
*/
typedef struct Rt2dMessageList Rt2dMessageList; typedef struct Rt2dMessageList Rt2dMessageList;
/** /**
* \ingroup rt2dstringlabel * \ingroup rt2dstringlabel
* \typedef Rt2dStringLabel * \struct Rt2dStringLabel
* typedef for a structure describing a string label (opaque) * Structure used to store and access named data, either internal or user.
* A type and a name may be used to access internal and user data.
*
* This should be considered an opaque type. Use the
* Rt2dStringLabel API functions to access.
*/ */
typedef struct Rt2dStringLabel Rt2dStringLabel; typedef struct Rt2dStringLabel Rt2dStringLabel;
@ -277,7 +308,8 @@ struct Rt2dKeyFrameTransform
/** /**
* \ingroup rt2danimsub * \ingroup rt2danimsub
* \struct Rt2dKeyFrameColor * \struct Rt2dKeyFrameColor
* structure describing a color setting action * Structure describing a color
* change to a 2d object.
*/ */
struct Rt2dKeyFrameColor struct Rt2dKeyFrameColor
{ {
@ -287,7 +319,7 @@ struct Rt2dKeyFrameColor
/** /**
* \ingroup rt2danimsub * \ingroup rt2danimsub
* \struct Rt2dKeyFrameShow * \struct Rt2dKeyFrameShow
* structure describing a show/hide action * Structure describing a show/hide change and a depth change to a 2d object.
*/ */
struct Rt2dKeyFrameShow struct Rt2dKeyFrameShow
{ {
@ -299,7 +331,7 @@ struct Rt2dKeyFrameShow
/** /**
* \ingroup rt2danimsub * \ingroup rt2danimsub
* \struct Rt2dKeyFrameMorph * \struct Rt2dKeyFrameMorph
* structure describing a morph action * Structure describing a morph change to a 2d object.
*/ */
struct Rt2dKeyFrameMorph struct Rt2dKeyFrameMorph
{ {
@ -355,69 +387,73 @@ MACRO_START \
} \ } \
MACRO_STOP MACRO_STOP
/** /*
* \ingroup rt2dstringlabel * structure containing label information. The entityType identifies the type
* \struct Rt2dStringLabel
* structure containing label information. The enitityType identifies the type
* of the label. The label's name is stored as an index * of the label. The label's name is stored as an index
* in common storage area. The entityType and name of the label are used as keys * in common storage area. The entityType and name of the label are used as keys
* during a search. Additional internal and user data can be stored with the * during a search. Additional internal and user data can be stored with the
* label. * label.
*/ */
#if (!defined(DOXYGEN))
struct Rt2dStringLabel struct Rt2dStringLabel
{ {
RwUInt32 entityType; /**< type of the label RwUInt32 entityType; /* type of the label
(\ref Rt2dStringLabelType) */ (see Rt2dStringLabelType) */
RwInt32 nameIndex; /**< index of name in internal data RwInt32 nameIndex; /* index of name in internal data
area */ area */
void *internalData; /**< internal data */ void *internalData; /* internal data */
void *userData; /**< customizable data */ void *userData; /* customizable data */
}; };
#endif /* (!defined(DOXYGEN)) */
#define _rt2dStringLabelGetStringLabelTypeMacro(_strLabel) \ #define _rt2dStringLabelGetStringLabelTypeMacro(_strLabel) \
((_strLabel)->entityType); ((_strLabel)->entityType)
#define _rt2dStringLabelSetStringLabelTypeMacro(_strLabel, _entityType) \ #define _rt2dStringLabelSetStringLabelTypeMacro(_strLabel, _entityType) \
((_strLabel)->entityType = (_entityType)); ((_strLabel)->entityType = (_entityType))
#define _rt2dStringLabelGetNameIndexMacro(_strLabel) \ #define _rt2dStringLabelGetNameIndexMacro(_strLabel) \
((_strLabel)->nameIndex); ((_strLabel)->nameIndex)
#define _rt2dStringLabelSetNameIndexMacro(_strLabel, _index) \ #define _rt2dStringLabelSetNameIndexMacro(_strLabel, _index) \
((_strLabel)->nameIndex = (_index)); ((_strLabel)->nameIndex = (_index))
#define _rt2dStringLabelGetInternalDataMacro(_strLabel) \ #define _rt2dStringLabelGetInternalDataMacro(_strLabel) \
((_strLabel)->internalData); ((_strLabel)->internalData)
#define _rt2dStringLabelSetInternalDataMacro(_strLabel, _internalData) \ #define _rt2dStringLabelSetInternalDataMacro(_strLabel, _internalData) \
((_strLabel)->internalData = (_internalData)); ((_strLabel)->internalData = (_internalData))
#define _rt2dStringLabelGetUserDataMacro(_strLabel) \ #define _rt2dStringLabelGetUserDataMacro(_strLabel) \
((_strLabel)->userData); ((_strLabel)->userData)
#define _rt2dStringLabelSetUserDataMacro(_strLabel, _userData) \ #define _rt2dStringLabelSetUserDataMacro(_strLabel, _userData) \
((_strLabel)->userData = (_userData)); ((_strLabel)->userData = (_userData))
/** /*
* \ingroup rt2dcel
* \struct Rt2dCel
* structure containing cel information. The name of the cel is stored as an * structure containing cel information. The name of the cel is stored as an
* index into a label table. The buttons in the cel are stored as indices. These * index into a label table. The buttons in the cel are stored as indices. These
* reference a list of buttons held by the cel's parent maestro. Any messages * reference a list of buttons held by the cel's parent maestro. Any messages
* to be process when the cel is active is stored as index into the parent's * to be process when the cel is active is stored as index into the parent's
* maestro's message storage area. * maestro's message storage area.
*/ */
#if (!defined(DOXYGEN))
struct Rt2dCel struct Rt2dCel
{ {
RwInt32 strLabelIndex; /**< Frame label */ RwInt32 strLabelIndex; /* Frame label */
RwInt32 celIndex; /**< Frame number */ RwInt32 celIndex; /* Frame number */
RwSList *buttonIndices; /**< List of buttons active in RwSList *buttonIndices; /* List of buttons active in
this frame */ this frame */
RwInt32 messageListIndex; /**< Messages to be posted after RwInt32 messageListIndex; /* Messages to be posted after
displaying this frame */ displaying this frame */
}; };
#endif /* (!defined(DOXYGEN)) */
#define _rt2dCelGetStringLabelIndexMacro(_cel) \ #define _rt2dCelGetStringLabelIndexMacro(_cel) \
((_cel)->strLabelIndex); ((_cel)->strLabelIndex);
@ -443,14 +479,16 @@ typedef Rt2dAnim *(*Rt2dAnimCallBack)(Rt2dAnim *object,
void *data); void *data);
/** /**
* \ingroup rt2danimsub * \ingroup rt2danimsub
* \typedef Rt2dKeyFrameListCallBack * \ref Rt2dKeyFrameListCallBack
* This typedef defines a callback function to apply to a frame list. * This typedef defines a callback function to apply to a frame list.
* *
* \param anim Pointer to the animation * \param anim Pointer to the animation
* \param props Pointer to the props that the animation acts upon * \param props Pointer to the props that the animation acts upon
* \param keyframeList The key frame list * \param keyframeList The key frame list
* \param keyframeListTime The key frame list time * \param keyframeListTime The key frame list time
* \param data User defined data * \param data User defined data
*
* \return return value is ignored
*/ */
typedef Rt2dKeyFrameList *(Rt2dKeyFrameListCallBack)( typedef Rt2dKeyFrameList *(Rt2dKeyFrameListCallBack)(
Rt2dAnim *anim, Rt2dAnim *anim,
@ -461,12 +499,14 @@ typedef Rt2dKeyFrameList *(Rt2dKeyFrameListCallBack)(
/** /**
* \ingroup rt2danimsub * \ingroup rt2danimsub
* \typedef Rt2dAnimOnEndReachedCallBack * \ref Rt2dAnimOnEndReachedCallBack
* This typedef defines a callback function called at the end of an animation. * This typedef defines a callback function called at the end of an animation.
* *
* \param anim Pointer to the animation ending * \param anim Pointer to the animation ending
* \param props Pointer to the props that the animation acts upon * \param props Pointer to the props that the animation acts upon
* \param remainingDeltaTime Remaining time * \param remainingDeltaTime Remaining time
*
* \return return value is ignored
*/ */
typedef Rt2dAnim *(*Rt2dAnimOnEndReachedCallBack)(Rt2dAnim *anim, typedef Rt2dAnim *(*Rt2dAnimOnEndReachedCallBack)(Rt2dAnim *anim,
Rt2dAnimProps *props, Rt2dAnimProps *props,
@ -474,14 +514,14 @@ typedef Rt2dAnim *(*Rt2dAnimOnEndReachedCallBack)(Rt2dAnim *anim,
/** /**
* \ingroup rt2dmaestro * \ingroup rt2dmaestro
* \typedef Rt2dMaestroAnimationsCallBack * \ref Rt2dMaestroAnimationsCallBack
* \ref Rt2dMaestroAnimationsCallBack represents the function called from * \ref Rt2dMaestroAnimationsCallBack represents the function called from
* \ref Rt2dMaestroForAllAnimations for all animations in the maestro. * \ref Rt2dMaestroForAllAnimations for all animations in the maestro.
* This function * This function
* should return the current maestro to indicate success. The callback may * should return the current maestro to indicate success. The callback may
* return NULL to terminate further callbacks on the maestro. * return NULL to terminate further callbacks on the maestro.
* *
* \param maestro Pointer to parent maestro. * \param maestro Pointer to parent maestro.
* \param anim Pointer to the animation. * \param anim Pointer to the animation.
* \param props Pointer to the anim's props. * \param props Pointer to the anim's props.
* \param pData Pointer to private data. * \param pData Pointer to private data.
@ -494,7 +534,6 @@ typedef Rt2dMaestro *(*Rt2dMaestroAnimationsCallBack)
/** /**
* \ingroup rt2dmessage * \ingroup rt2dmessage
* \typedef Rt2dMessageHandlerCallBack
* \ref Rt2dMessageHandlerCallBack represents the function called from * \ref Rt2dMessageHandlerCallBack represents the function called from
* \ref Rt2dMaestroProcessMessages for all messages in the maestro's * \ref Rt2dMaestroProcessMessages for all messages in the maestro's
* process message queue. The maestro does not filter any messages. The * process message queue. The maestro does not filter any messages. The
@ -504,7 +543,7 @@ typedef Rt2dMaestro *(*Rt2dMaestroAnimationsCallBack)
* callback may return NULL to terminate further callbacks on the maestro. * callback may return NULL to terminate further callbacks on the maestro.
* *
* \param maestro Pointer to parent maestro. * \param maestro Pointer to parent maestro.
* \param message Pointer to the message. * \param message Pointer to the message.
* *
* \return Pointer to the message. * \return Pointer to the message.
*/ */
@ -530,6 +569,18 @@ typedef Rt2dMessage *
* Data access macros. * Data access macros.
*/ */
/*
* Toolkit-level initialization / finalization
*/
/*
* INITIALIZE
*/
extern void
Rt2dAnimOpen(void);
extern void
Rt2dAnimClose(void);
/* /*
* Rt2dAnim * Rt2dAnim
*/ */
@ -747,7 +798,7 @@ Rt2dMaestroAddButton(Rt2dMaestro *maestro, RwInt32 strLabelIdx, RwInt32 objectId
extern Rt2dCel * extern Rt2dCel *
Rt2dCelCreate(Rt2dMaestro *maestro, Rt2dCelCreate(Rt2dMaestro *maestro,
RwChar *name, const RwChar *name,
RwInt32 celIndex, RwInt32 messageListIndex); RwInt32 celIndex, RwInt32 messageListIndex);
extern Rt2dCelList * extern Rt2dCelList *
@ -966,7 +1017,7 @@ Rt2dMessageHandlerDefaultCallBack(Rt2dMaestro *maestro, Rt2dMessage *message);
*/ */
extern Rt2dStringLabel * extern Rt2dStringLabel *
Rt2dMaestroFindStringLabel(Rt2dMaestro *maestro, Rt2dMaestroFindStringLabel(Rt2dMaestro *maestro,
Rt2dStringLabelType entityType, RwChar *lookupName, Rt2dStringLabelType entityType, const RwChar *lookupName,
RwInt32 *index); RwInt32 *index);
extern Rt2dStringLabel * extern Rt2dStringLabel *
@ -974,7 +1025,7 @@ Rt2dMaestroGetStringLabelByIndex(Rt2dMaestro *maestro, RwInt32 index);
extern Rt2dMaestro * extern Rt2dMaestro *
Rt2dMaestroAddStringLabel(Rt2dMaestro *maestro, Rt2dMaestroAddStringLabel(Rt2dMaestro *maestro,
Rt2dStringLabelType entityType, RwChar *name, Rt2dStringLabelType entityType, const RwChar *name,
void *internalData, RwInt32 *index); void *internalData, RwInt32 *index);
extern const RwChar * extern const RwChar *
@ -985,28 +1036,28 @@ Rt2dMaestroGetStringLabelName(Rt2dMaestro *maestro,
#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) #if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE))
#define Rt2dStringLabelGetStringLabelType(_strLabel) \ #define Rt2dStringLabelGetStringLabelType(_strLabel) \
_rt2dStringLabelGetStringLabelTypeMacro((_strLabel)); _rt2dStringLabelGetStringLabelTypeMacro((_strLabel))
#define Rt2dStringLabelSetStringLabelType(_strLabel, _entityType) \ #define Rt2dStringLabelSetStringLabelType(_strLabel, _entityType) \
_rt2dStringLabelSetStringLabelTypeMacro((_strLabel), (_entityType)); _rt2dStringLabelSetStringLabelTypeMacro((_strLabel), (_entityType))
#define Rt2dStringLabelGetNameIndex(_strLabel) \ #define Rt2dStringLabelGetNameIndex(_strLabel) \
_rt2dStringLabelGetNameIndexMacro((_strLabel)); _rt2dStringLabelGetNameIndexMacro((_strLabel))
#define Rt2dStringLabelSetNameIndex(_strLabel, _index) \ #define Rt2dStringLabelSetNameIndex(_strLabel, _index) \
_rt2dStringLabelSetNameIndexMacro((_strLabel), (_index)); _rt2dStringLabelSetNameIndexMacro((_strLabel), (_index))
#define Rt2dStringLabelGetInternalData(_strLabel) \ #define Rt2dStringLabelGetInternalData(_strLabel) \
_rt2dStringLabelGetInternalDataMacro((_strLabel)); _rt2dStringLabelGetInternalDataMacro((_strLabel))
#define Rt2dStringLabelSetInternalData(_strLabel, _internalData) \ #define Rt2dStringLabelSetInternalData(_strLabel, _internalData) \
_rt2dStringLabelSetInternalDataMacro((_strLabel), (_internalData)); _rt2dStringLabelSetInternalDataMacro((_strLabel), (_internalData))
#define Rt2dStringLabelGetUserData(_strLabel) \ #define Rt2dStringLabelGetUserData(_strLabel) \
_rt2dStringLabelGetUserDataMacro((_strLabel)); _rt2dStringLabelGetUserDataMacro((_strLabel))
#define Rt2dStringLabelSetUserData(_strLabel, _userData) \ #define Rt2dStringLabelSetUserData(_strLabel, _userData) \
_rt2dStringLabelSetUserDataMacro((_strLabel), (_userData)); _rt2dStringLabelSetUserDataMacro((_strLabel), (_userData))
#else /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ #else /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */

View File

@ -150,480 +150,14 @@
enum e_rwdb_Criterion2DAnim
enum rwPLUGIN_ERRENUM
{ {
rwPLUGIN_ERRENUMLAST = RWFORCEENUMSIZEINT e_rwdb_Criterion2DAnimLAST = RWFORCEENUMSIZEINT
}; };
typedef enum rwPLUGIN_ERRENUM rwPLUGIN_ERRENUM; typedef enum e_rwdb_Criterion2DAnim e_rwdb_Criterion2DAnim;

View File

@ -11,7 +11,7 @@
/** /**
* \defgroup rtbary RtBary * \defgroup rtbary RtBary
* \ingroup rttool * \ingroup mathtools
* *
* Barycentric Toolkit for RenderWare. * Barycentric Toolkit for RenderWare.
*/ */
@ -32,7 +32,7 @@
/** /**
* \ingroup rtbary * \ingroup rtbary
* \typedef RtBaryV4d * \ref RtBaryV4d
* typedef for the 4 element homogeneous row of a transform matrix mapping * typedef for the 4 element homogeneous row of a transform matrix mapping
* a point from Cartesian space to the barycentric space defined by a triangle. * a point from Cartesian space to the barycentric space defined by a triangle.
*/ */
@ -40,7 +40,7 @@ typedef RwReal RtBaryV4d[4];
/** /**
* \ingroup rtbary * \ingroup rtbary
* \typedef RtBaryTransform * \ref RtBaryTransform
* typedef for the 4x4 homogeneous transform matrix mapping a point * typedef for the 4x4 homogeneous transform matrix mapping a point
* from Cartesian space to the barycentric space defined by a triangle. * from Cartesian space to the barycentric space defined by a triangle.
*/ */

View File

@ -145,472 +145,6 @@

View File

@ -8,17 +8,12 @@
/** /**
* \defgroup rtbezpatch RtBezPat * \defgroup rtbezpatch RtBezPat
* \ingroup rttool * \ingroup mathtools
* *
* The Bezier Patch Toolkit is a group of functions that support the way * The Bezier Patch Toolkit is a group of functions that support the way
* RenderWare processes patches. * RenderWare processes patches.
*/ */
/**
* \ingroup rtbezpatch
* \typedef RtBezierV4d
* typedef for struct RtBezierV4d.
*/
typedef struct RtBezierV4d RtBezierV4d; typedef struct RtBezierV4d RtBezierV4d;
/** /**
@ -42,7 +37,7 @@ struct RtBezierV4d
/** /**
* \ingroup rtbezpatch * \ingroup rtbezpatch
* \typedef RtBezierRow * \ref RtBezierRow
* typedef for a row of vectors. * typedef for a row of vectors.
* RtBezierRow is an array of 4 vectors * RtBezierRow is an array of 4 vectors
*/ */
@ -50,7 +45,7 @@ typedef RtBezierV4d RtBezierRow[4];
/** /**
* \ingroup rtbezpatch * \ingroup rtbezpatch
* \typedef RtBezierMatrix * \ref RtBezierMatrix
* typedef for a matrix of 4*4 vectors. * typedef for a matrix of 4*4 vectors.
* RtBezierMatrix is an array of 4 rows. * RtBezierMatrix is an array of 4 rows.
*/ */

View File

@ -129,472 +129,6 @@

View File

@ -12,7 +12,7 @@
/** /**
* \defgroup rtbmp RtBMP * \defgroup rtbmp RtBMP
* \ingroup rttool * \ingroup imageconversiontools
* *
* BMP Image Format Toolkit for RenderWare. * BMP Image Format Toolkit for RenderWare.
* *

View File

@ -129,472 +129,6 @@

View File

@ -16,7 +16,7 @@
/** /**
* \defgroup rtcharset RtCharset * \defgroup rtcharset RtCharset
* \ingroup rttool * \ingroup 2dtools
* *
* Character Set/Foot Toolkit for RenderWare. * Character Set/Foot Toolkit for RenderWare.
*/ */
@ -61,7 +61,7 @@ struct RtCharsetDesc
/** /**
* \ingroup rtcharset * \ingroup rtcharset
* \typedef RtCharset * \ref RtCharset
* typedef for a structure defining a character set (opaque). * typedef for a structure defining a character set (opaque).
* \see RtCharsetCreate * \see RtCharsetCreate
*/ */

View File

@ -129,472 +129,6 @@

View File

@ -10,15 +10,15 @@
#define RTIMPORT_H #define RTIMPORT_H
/** /**
* \defgroup rtimport RtWorldImport * \defgroup rtworldimport RtWorldImport
* \ingroup rttool * \ingroup basicgeometry
* *
* World Import Toolkit for Renderware. * World Import Toolkit for RenderWare.
*/ */
/** /**
* \defgroup selectors RtWorldImportPartitionSelectors * \defgroup selectors RtWorldImportPartitionSelectors
* \ingroup rtimport * \ingroup rtworldimport
* *
* The set of provided RtWorldImportPartitionSelectors: * The set of provided RtWorldImportPartitionSelectors:
* Selects a good partition by calling one of the * Selects a good partition by calling one of the
@ -29,7 +29,7 @@
/** /**
* \defgroup iterators RtWorldImportPartitionIterators * \defgroup iterators RtWorldImportPartitionIterators
* \ingroup rtimport * \ingroup rtworldimport
* *
* The set of provided RtWorldImportPartitionIterators: * The set of provided RtWorldImportPartitionIterators:
* Iterates through a set of candidate partitions, possibly * Iterates through a set of candidate partitions, possibly
@ -39,7 +39,7 @@
/** /**
* \defgroup evaluators RtWorldImportPartitionEvaluators * \defgroup evaluators RtWorldImportPartitionEvaluators
* \ingroup rtimport * \ingroup rtworldimport
* *
* The set of provided RtWorldImportPartitionEvaluators: * The set of provided RtWorldImportPartitionEvaluators:
* Uses a combination of statistics, build sector, build status, and * Uses a combination of statistics, build sector, build status, and
@ -51,7 +51,7 @@
/** /**
* \defgroup terminators RtWorldImportPartitionTerminators * \defgroup terminators RtWorldImportPartitionTerminators
* \ingroup rtimport * \ingroup rtworldimport
* *
* The set of provided RtWorldImportPartitionTerminators: * The set of provided RtWorldImportPartitionTerminators:
* Checks given criteria about the statistics, build sector, build status, and * Checks given criteria about the statistics, build sector, build status, and
@ -61,7 +61,7 @@
/** /**
* \defgroup kd RtWorldImportGuideKD * \defgroup kd RtWorldImportGuideKD
* \ingroup rtimport * \ingroup rtworldimport
* *
* Tools to manipulate the \ref RtWorldImportGuideKDTree that is used to * Tools to manipulate the \ref RtWorldImportGuideKDTree that is used to
* manually build the sectors of a world. * manually build the sectors of a world.
@ -69,7 +69,7 @@
/** /**
* \defgroup hints RtWorldImportHints * \defgroup hints RtWorldImportHints
* \ingroup rtimport * \ingroup rtworldimport
* *
* Tools to aid the build process by giving hints as to what geometry should * Tools to aid the build process by giving hints as to what geometry should
* not be split, and what geometry makes for a good partitioning guide. * not be split, and what geometry makes for a good partitioning guide.
@ -96,7 +96,7 @@
#define rtWORLDIMPORTPROGRESSBSPCOMPRESSEND 5 #define rtWORLDIMPORTPROGRESSBSPCOMPRESSEND 5
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \def rtWORLDIMPORTINVALIDPARTITION * \def rtWORLDIMPORTINVALIDPARTITION
* *
* This value means that no partition was found, or that the partition was * This value means that no partition was found, or that the partition was
@ -104,51 +104,61 @@
*/ */
#define rtWORLDIMPORTINVALIDPARTITION RwRealMAXVAL #define rtWORLDIMPORTINVALIDPARTITION RwRealMAXVAL
/* maintained in Bin-tree */
#define CONGRUENTVERTEXCHILDREN 2
/* maintained in Quad-tree */
#define WELDVERTEXCHILDREN 4
/**************************************************************************** /****************************************************************************
Global types Global types
*/ */
#if (!defined(DOXYGEN))
/**
* Internal use only
*/
typedef union RtWorldImportVertexState RtWorldImportVertexState;
/**
* \ingroup rtimport
* \typedef RtWorldImportVertex
*
* typedef for struct \ref RtWorldImportVertex
*/
typedef struct RtWorldImportVertex RtWorldImportVertex; typedef struct RtWorldImportVertex RtWorldImportVertex;
/**
* \ingroup rtimport
* \typedef RtWorldImportWeldVertex
*
* typedef for struct \ref RtWorldImportWeldVertex
*/
typedef struct RtWorldImportWeldVertex RtWorldImportWeldVertex; typedef struct RtWorldImportWeldVertex RtWorldImportWeldVertex;
/**
* \ingroup rtimport
* \typedef RtWorldImportBuildVertex
*
* typedef for struct \ref RtWorldImportBuildVertex
*/
typedef struct RtWorldImportBuildVertex RtWorldImportBuildVertex; typedef struct RtWorldImportBuildVertex RtWorldImportBuildVertex;
/* Internal use only */
typedef union RtWorldImportVertexState RtWorldImportVertexState;
/* Internal use only */
union RtWorldImportVertexState
{
/* clipFlags, two types, first is based on partition only, 2nd is
* also based on partition, but takes overlaps into consideration. i.e.
* number splits is usually higher in clipFlags[0] than [1] */
RwInt32 clipFlags[2]; /* Internal use only */
RwInt32 forwardingAddress; /* Internal use only */
RtWorldImportVertex *vpVert; /* Internal use only */
RtWorldImportWeldVertex *vpWeldVert; /* Internal use only */
RtWorldImportBuildVertex *vpBuildVert; /* Internal use only */
RwSList *slist; /* Internal use only */
};
#endif /* (!defined(DOXYGEN)) */
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \typedef RtWorldImportBuildPolyInfo * \struct RtWorldImportVertex
* Holds data for each vertex in the import world.
* *
* typedef for struct \ref RtWorldImportBuildPolyInfo
*/ */
struct RtWorldImportVertex
{
RwV3d OC; /**< World space vertex position */
RwV3d normal; /**< World space vertex normal */
RwRGBA preLitCol; /**< Vertex Prelight color */
RwTexCoords texCoords[rwMAXTEXTURECOORDS];
/**< Vertex texture coordinates */
RtWorldImportVertexState state; /**< Internal use only */
RwInt32 matIndex; /**< Vertex material index */
void *pUserdata; /**< Pointer to unspecified per vertex user data */
};
typedef struct RtWorldImportBuildPolyInfo RtWorldImportBuildPolyInfo; typedef struct RtWorldImportBuildPolyInfo RtWorldImportBuildPolyInfo;
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \struct RtWorldImportBuildPolyInfo * \struct RtWorldImportBuildPolyInfo
* *
* Information about a polygon * Information about a polygon
@ -167,7 +177,7 @@ struct RtWorldImportBuildPolyInfo
typedef union RtWorldImportBuildVertexMode RtWorldImportBuildVertexMode; typedef union RtWorldImportBuildVertexMode RtWorldImportBuildVertexMode;
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \struct RtWorldImportBuildVertexMode * \struct RtWorldImportBuildVertexMode
* *
* Mode of the vertex. * Mode of the vertex.
@ -182,7 +192,7 @@ union RtWorldImportBuildVertexMode
}; };
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \struct RtWorldImportBuildVertex * \struct RtWorldImportBuildVertex
* *
* A list of polygons as a list of vertices where the end of poly boundary * A list of polygons as a list of vertices where the end of poly boundary
@ -198,30 +208,16 @@ struct RtWorldImportBuildVertex
/**< we store some poly info in the end marker of a boundary */ /**< we store some poly info in the end marker of a boundary */
}; };
/**
* \ingroup rtimport
* \typedef RtWorldImportGuideKDTree
*
* typedef for struct \ref RtWorldImportGuideKDTree
*/
typedef struct RtWorldImportGuideKDTree RtWorldImportGuideKDTree;
/* NB Merged RtWorldImportPartition with RtWorldImportBuildClipStatistics because /* NB Merged RtWorldImportPartition with RtWorldImportBuildClipStatistics because
* there was a unique one-to-one relationship between them, and it made things easier * there was a unique one-to-one relationship between them, and it made things easier
* just updating one stucture, without having to update both in sequence... * just updating one stucture, without having to update both in sequence...
*/ */
/**
* \ingroup rtimport
* \typedef RtWorldImportBuildClipStatistics
*
* typedef for struct \ref RtWorldImportBuildClipStatistics
*/
typedef struct RtWorldImportBuildClipStatistics RtWorldImportBuildClipStatistics; typedef struct RtWorldImportBuildClipStatistics RtWorldImportBuildClipStatistics;
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \struct RtWorldImportBuildClipStatistics * \struct RtWorldImportBuildClipStatistics
* *
* Holds statistics about a partition or candidate partition during * Holds statistics about a partition or candidate partition during
@ -231,15 +227,15 @@ struct RtWorldImportBuildClipStatistics
{ {
RwInt32 numPotentialSplit; RwInt32 numPotentialSplit;
/**< The number of polygons split by the partition, /**< The number of polygons split by the partition,
* disgregarding overlaps */ * disregarding overlaps */
RwInt32 numPotentialLeft; RwInt32 numPotentialLeft;
/**< The number of potential polygons and fragments on the /**< The number of potential polygons and fragments on the
* left of the partition, disgregarding overlaps */ * left of the partition, disregarding overlaps */
RwInt32 numPotentialRight; RwInt32 numPotentialRight;
/**< The number of potential polygons and fragments on the /**< The number of potential polygons and fragments on the
* right of the partition, disgregarding overlaps */ * right of the partition, disregarding overlaps */
RwInt32 numActualSplit; RwInt32 numActualSplit;
@ -276,15 +272,13 @@ struct RtWorldImportBuildClipStatistics
/**< The actual, relative size of the overlap on the right of the partition */ /**< The actual, relative size of the overlap on the right of the partition */
}; };
/** /*
* \ingroup rtimport * typedef for struct RtWorldImportPartition
* \typedef RtWorldImportPartition
*
* typedef for struct \ref RtWorldImportPartition
*/ */
typedef struct RtWorldImportPartition RtWorldImportPartition; typedef struct RtWorldImportPartition RtWorldImportPartition;
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \struct RtWorldImportPartition * \struct RtWorldImportPartition
* *
* A partitioning plane. * A partitioning plane.
@ -311,8 +305,14 @@ struct RtWorldImportPartition
/**< The statistics for the partition */ /**< The statistics for the partition */
}; };
/*
* typedef for struct \ref RtWorldImportGuideKDTree
*/
typedef struct RtWorldImportGuideKDTree RtWorldImportGuideKDTree;
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \struct RtWorldImportGuideKDTree * \struct RtWorldImportGuideKDTree
* Represents the structure of a binary tree with * Represents the structure of a binary tree with
* no contents per se. It is used to build a BSP in a user specified * no contents per se. It is used to build a BSP in a user specified
@ -342,6 +342,7 @@ struct RtWorldImportGuideKDTree
typedef struct _rtWorldImportGuideKDStackElement _rtWorldImportGuideKDStackElement; typedef struct _rtWorldImportGuideKDStackElement _rtWorldImportGuideKDStackElement;
#if (!defined(DOXYGEN))
struct _rtWorldImportGuideKDStackElement struct _rtWorldImportGuideKDStackElement
{ {
RwBool terminal; RwBool terminal;
@ -357,16 +358,15 @@ struct _rtWorldImportGuideKDStack
_rtWorldImportGuideKDStackElement *current; _rtWorldImportGuideKDStackElement *current;
_rtWorldImportGuideKDStackElement *bottom; _rtWorldImportGuideKDStackElement *bottom;
}; };
#endif /* (!defined(DOXYGEN)) */
/** /*
* \ingroup rtimport * typedef for struct RtWorldImportBuildSector
* \typedef RtWorldImportBuildSector
*
* typedef for struct \ref RtWorldImportBuildSector
*/ */
typedef struct RtWorldImportBuildSector RtWorldImportBuildSector; typedef struct RtWorldImportBuildSector RtWorldImportBuildSector;
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \struct RtWorldImportBuildSector * \struct RtWorldImportBuildSector
* *
* Holds information about the sector that is being subdivided * Holds information about the sector that is being subdivided
@ -401,15 +401,13 @@ struct RtWorldImportBuildSector
/**< Maximum number of materials in the in the world */ /**< Maximum number of materials in the in the world */
}; };
/** /*
* \ingroup rtimport * typedef for struct RtWorldImportBuildStatus
* \typedef RtWorldImportBuildStatus
*
* typedef for struct \ref RtWorldImportBuildStatus
*/ */
typedef struct RtWorldImportBuildStatus RtWorldImportBuildStatus; typedef struct RtWorldImportBuildStatus RtWorldImportBuildStatus;
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \struct RtWorldImportBuildStatus * \struct RtWorldImportBuildStatus
* World Import Build Status Structure * World Import Build Status Structure
* Used to store the current tree's build status * Used to store the current tree's build status
@ -419,50 +417,41 @@ struct RtWorldImportBuildStatus
RwInt32 depth; /**< current depth in the tree */ RwInt32 depth; /**< current depth in the tree */
}; };
/** typedef struct RwRGBAUInt32 RwRGBAUInt32;
* Internal use only
*/ #if (!defined(DOXYGEN))
union RtWorldImportVertexState struct RwRGBAUInt32
{ {
/* clipFlags, two types, first is based on partition only, 2nd is RwUInt32 red, green, blue, alpha;
* also based on partition, but takes overlaps into consideration. i.e.
* number splits is usually higher in clipFlags[0] than [1] */
RwInt32 clipFlags[2]; /**< Internal use only */
RwInt32 forwardingAddress; /**< Internal use only */
RtWorldImportVertex *vpVert; /**< Internal use only */
RtWorldImportWeldVertex *vpWeldVert; /**< Internal use only */
RtWorldImportBuildVertex *vpBuildVert; /**< Internal use only */
RwSList *slist; /**< Internal use only */
}; };
/** typedef struct RtWorldImportCongruentVertex RtWorldImportCongruentVertex;
* \ingroup rtimport
* \struct RtWorldImportVertex struct RtWorldImportCongruentVertex
* Holds data for each vertex in the import world.
*
*/
struct RtWorldImportVertex
{ {
RwV3d OC; /**< World space vertex position */ RwInt32 destIdx;
RwV3d normal; /**< World space vertex normal */ RtWorldImportVertex vertex;
RwRGBA preLitCol; /**< Vertex Prelight color */ RtWorldImportVertex Mean;
RwTexCoords texCoords[rwMAXTEXTURECOORDS]; RwRGBAUInt32 preLitMean;
/**< Vertex texture coordinates */ RwInt32 refCount;
RtWorldImportVertexState state; /**< Internal use only */ RtWorldImportCongruentVertex *child[CONGRUENTVERTEXCHILDREN];
RwInt32 matIndex; /**< Vertex material index */
void *pUserdata; /**< Pointer to unspecified per vertex user data */
}; };
/** struct RtWorldImportWeldVertex
* \ingroup rtimport {
* \typedef RtWorldImportTriangle RtWorldImportVertex *sourcePtr;
RtWorldImportCongruentVertex *CongruentVertex;
RtWorldImportWeldVertex *child[WELDVERTEXCHILDREN];
};
#endif /* (!defined(DOXYGEN)) */
/*
* Holds data for each triangle in the import world. * Holds data for each triangle in the import world.
*
* \see RtWorldImportTriangle
*/ */
typedef struct RtWorldImportTriangle RtWorldImportTriangle; typedef struct RtWorldImportTriangle RtWorldImportTriangle;
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \struct RtWorldImportTriangle * \struct RtWorldImportTriangle
* Holds data for each triangle in the import world. * Holds data for each triangle in the import world.
* *
@ -476,38 +465,69 @@ struct RtWorldImportTriangle
}; };
/*
* typedef for struct RtWorldImportBBoxHintDesc
*/
typedef struct RtWorldImportBBoxHintDesc RtWorldImportBBoxHintDesc;
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \typedef RtWorldImportHints * \struct RtWorldImportBBoxHintDesc
* * Bounding box hints and (priority) values used to control the world
* typedef for struct \ref RtWorldImportHints * sectorization process.
*/
struct RtWorldImportBBoxHintDesc
{
RwBBox bBox; /**< The (necessarily orthogonal) bounding box */
RwReal value; /**< The value or priority of the hint (highest is most important) */
};
/*
* typedef for struct RtWorldImportHints
*/ */
typedef struct RtWorldImportHints RtWorldImportHints; typedef struct RtWorldImportHints RtWorldImportHints;
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \struct RtWorldImportHints * \struct RtWorldImportHints
* Bounding box hints used to control the world sectorization process. * Bounding box hints used to control the world sectorization process.
* \see RtWorldImportHintsSet * \see RtWorldImportHintsSet
*/ */
struct RtWorldImportHints struct RtWorldImportHints
{ {
/** The bounding box hints */ RtWorldImportBBoxHintDesc *boundingBoxes; /**< The bounding box hints */
RwBBox *boundingBoxes; RwInt32 numBoundingBoxes; /**< The number of bounding box hints */
/** The number of bounding box hints */
RwInt32 numBoundingBoxes;
}; };
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \typedef RtWorldImportParameters * \ref RtWorldImportHintGroup
* *
* An enumeration that can be passed to
* \ref RtWorldImportHintsSetGroup and \ref RtWorldImportHintsGetGroup to determine
* whether hints will contribute towards the shield hint group or partition hint group
*/
typedef enum
{
rtWORLDIMPORTSHIELDHINT = 0,
rtWORLDIMPORTPARTITIONHINT,
rtWORLDIMPORTFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
RtWorldImportHintGroup;
/*
* typedef for struct \ref RtWorldImportParameters * typedef for struct \ref RtWorldImportParameters
*/ */
typedef struct RtWorldImportParameters RtWorldImportParameters; typedef struct RtWorldImportParameters RtWorldImportParameters;
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \struct RtWorldImportParameters * \struct RtWorldImportParameters
* Parameters used with \ref RtWorldImportCreateWorld. * Parameters used with \ref RtWorldImportCreateWorld.
* They are initialized to default values using \ref RtWorldImportParametersInit. * They are initialized to default values using \ref RtWorldImportParametersInit.
@ -563,15 +583,13 @@ struct RtWorldImportParameters
/**< If TRUE the world will be checked for validity during the build process. */ /**< If TRUE the world will be checked for validity during the build process. */
}; };
/** /*
* \ingroup rtimport * typedef for struct RtWorldImport
* \typedef RtWorldImport
*
* typedef for struct \ref RtWorldImport
*/ */
typedef struct RtWorldImport RtWorldImport; typedef struct RtWorldImport RtWorldImport;
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \struct RtWorldImport * \struct RtWorldImport
* World Import State Structure * World Import State Structure
*/ */
@ -583,14 +601,10 @@ struct RtWorldImport
RtWorldImportTriangle *polygons; /**< Triangle array */ RtWorldImportTriangle *polygons; /**< Triangle array */
RwInt32 numPolygons; /**< Triangle count */ RwInt32 numPolygons; /**< Triangle count */
RwSurfaceProperties surfaceProps; /**< The world's surface
lighting properties */
}; };
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \ref RtWorldImportProgressCallBack is the type for the callback function supplied to * \ref RtWorldImportProgressCallBack is the type for the callback function supplied to
* \ref RtWorldImportSetProgressCallBack. * \ref RtWorldImportSetProgressCallBack.
* *
@ -626,65 +640,102 @@ struct RtWorldImport
typedef RwBool (*RtWorldImportProgressCallBack)(RwInt32 msg, RwReal value); typedef RwBool (*RtWorldImportProgressCallBack)(RwInt32 msg, RwReal value);
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \typedef RtWorldImportDestroyVertexUserdataCallBack * \ref RtWorldImportDestroyVertexUserdataCallBack
* *
* A pointer to the CallBack function that will be called during * A pointer to the CallBack function that will be called during
* vertex destruction. * vertex destruction.
*
* \param pUserdata
*
* \return
*/ */
typedef RwBool (*RtWorldImportDestroyVertexUserdataCallBack)(void **pUserdata); typedef RwBool (*RtWorldImportDestroyVertexUserdataCallBack)(void **pUserdata);
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \typedef RtWorldImportCloneVertexUserdataCallBack * \ref RtWorldImportCloneVertexUserdataCallBack
* *
* A pointer to the CallBack function that will be called during * A pointer to the CallBack function that will be called during
* vertex cloning. * vertex cloning.
*
* \param pUserdataDst
* \param pUserdataSrc
*
* \return
*/ */
typedef RwBool (*RtWorldImportCloneVertexUserdataCallBack)(void **pUserdataDst, void **pUserdataSrc); typedef RwBool (*RtWorldImportCloneVertexUserdataCallBack)(void **pUserdataDst, void **pUserdataSrc);
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \typedef RtWorldImportInterpVertexUserdataCallBack * \ref RtWorldImportInterpVertexUserdataCallBack
* *
* A pointer to the CallBack function that will be called during * A pointer to the CallBack function that will be called during
* vertex interpolation. * vertex interpolation.
*
* \param pUserdataDst
* \param pUserdata1
* \param pUserdata2
* \param delta
*
* \return
*/ */
typedef RwBool (*RtWorldImportInterpVertexUserdataCallBack)(void **pUserdataDst, void **pUserdata1, void **pUserdata2, RwReal delta); typedef RwBool (*RtWorldImportInterpVertexUserdataCallBack)(void **pUserdataDst, void **pUserdata1, void **pUserdata2, RwReal delta);
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \typedef RtWorldImportDestroyPolygonUserdataCallBack * \ref RtWorldImportDestroyPolygonUserdataCallBack
* *
* A pointer to the CallBack function that will be called during * A pointer to the CallBack function that will be called during
* polygon destruction. * polygon destruction.
*
* \param pUserdata
*
* \return
*/ */
typedef RwBool (*RtWorldImportDestroyPolygonUserdataCallBack)(void **pUserdata); typedef RwBool (*RtWorldImportDestroyPolygonUserdataCallBack)(void **pUserdata);
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \typedef RtWorldImportSplitPolygonUserdataCallBack * \ref RtWorldImportSplitPolygonUserdataCallBack
* *
* A pointer to the CallBack function that will be called during * A pointer to the CallBack function that will be called during
* polygon division. * polygon division.
*
* \param pUserdataDst
* \param pUserdataSrc
*
* \return
*/ */
typedef RwBool (*RtWorldImportSplitPolygonUserdataCallBack)(void **pUserdataDst, void **pUserdataSrc); typedef RwBool (*RtWorldImportSplitPolygonUserdataCallBack)(void **pUserdataDst, void **pUserdataSrc);
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \typedef RtWorldImportSectorSetVertexUserdataCallBack * \ref RtWorldImportSectorSetVertexUserdataCallBack
* *
* A pointer to the CallBack function that will be called during * A pointer to the CallBack function that will be called during
* the setting of the vertex user data. * the setting of the vertex user data.
*
* \param pUserdata
* \param sector
* \param index
*
* \return
*/ */
typedef RwBool (*RtWorldImportSectorSetVertexUserdataCallBack)(void **pUserdata, RpWorldSector *sector, RwInt32 index); typedef RwBool (*RtWorldImportSectorSetVertexUserdataCallBack)(void **pUserdata, RpWorldSector *sector, RwInt32 index);
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \typedef RtWorldImportSectorSetPolygonUserdataCallBack * \ref RtWorldImportSectorSetPolygonUserdataCallBack
* *
* A pointer to the CallBack function that will be called during * A pointer to the CallBack function that will be called during
* the setting of the polygon user data. * the setting of the polygon user data.
*
* \param pUserdata
* \param sector
* \param index
*
* \return
*/ */
typedef RwBool (*RtWorldImportSectorSetPolygonUserdataCallBack)(void **pUserdata, RpWorldSector *sector, RwInt32 index); typedef RwBool (*RtWorldImportSectorSetPolygonUserdataCallBack)(void **pUserdata, RpWorldSector *sector, RwInt32 index);
@ -692,12 +743,18 @@ typedef RwBool (*RtWorldImportSectorSetPolygonUserdataCallBack)(void **pUserdata
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \typedef RtWorldImportTerminationBuildCallBack * \ref RtWorldImportTerminationBuildCallBack
* *
* A pointer to the function that will be called during the * A pointer to the function that will be called during the
* build process to determine whether the current sector should * build process to determine whether the current sector should
* be subdivided further, or terminated. * be subdivided further, or terminated.
*
* \param buildSector
* \param buildStatus
* \param pData
*
* \return
*/ */
typedef RwBool (*RtWorldImportTerminationBuildCallBack) typedef RwBool (*RtWorldImportTerminationBuildCallBack)
(RtWorldImportBuildSector *buildSector, (RtWorldImportBuildSector *buildSector,
@ -705,11 +762,17 @@ typedef RwBool (*RtWorldImportTerminationBuildCallBack)
void *pData); void *pData);
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \typedef RtWorldImportPartitionBuildCallBack * \ref RtWorldImportPartitionBuildCallBack
* *
* A pointer to the function that will be called during the * A pointer to the function that will be called during the
* build process to select a suitable sector partition. * build process to select a suitable sector partition.
*
* \param buildSector
* \param buildStatus
* \param partition
*
* \return
*/ */
typedef RwReal (*RtWorldImportPartitionBuildCallBack) typedef RwReal (*RtWorldImportPartitionBuildCallBack)
(RtWorldImportBuildSector *buildSector, (RtWorldImportBuildSector *buildSector,
@ -717,15 +780,13 @@ typedef RwReal (*RtWorldImportPartitionBuildCallBack)
RtWorldImportPartition *partition, RtWorldImportPartition *partition,
void *pData); void *pData);
/** /*
* \ingroup rtimport
* \typedef RtWorldImportBuildCallBacks
*
* typedef for struct \ref RtWorldImportBuildCallBacks * typedef for struct \ref RtWorldImportBuildCallBacks
*/ */
typedef struct RtWorldImportBuildCallBacks RtWorldImportBuildCallBacks; /* MAYBE: rename to SectorCallBacks ?*/ typedef struct RtWorldImportBuildCallBacks RtWorldImportBuildCallBacks; /* MAYBE: rename to SectorCallBacks ?*/
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \struct RtWorldImportBuildCallBacks * \struct RtWorldImportBuildCallBacks
* Sectorization callbacks * Sectorization callbacks
*/ */
@ -741,15 +802,13 @@ struct RtWorldImportBuildCallBacks
/**< Termination callback user data */ /**< Termination callback user data */
}; };
/** /*
* \ingroup rtimport
* \typedef RtWorldImportUserdataCallBacks
*
* typedef for struct \ref RtWorldImportUserdataCallBacks * typedef for struct \ref RtWorldImportUserdataCallBacks
*/ */
typedef struct RtWorldImportUserdataCallBacks RtWorldImportUserdataCallBacks; typedef struct RtWorldImportUserdataCallBacks RtWorldImportUserdataCallBacks;
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \struct RtWorldImportUserdataCallBacks * \struct RtWorldImportUserdataCallBacks
* Bundle of callbacks * Bundle of callbacks
*/ */
@ -772,8 +831,8 @@ struct RtWorldImportUserdataCallBacks
}; };
/** /**
* \ingroup rtimport * \ingroup rtworldimport
* \typedef RtWorldImportBuildPartitionSelector * \ref RtWorldImportBuildPartitionSelector
* *
* An enumeration that can be passed to * An enumeration that can be passed to
* \ref RtWorldImportSetStandardBuildPartitionSelector to determine * \ref RtWorldImportSetStandardBuildPartitionSelector to determine
@ -821,8 +880,6 @@ extern "C"
extern RwBool extern RwBool
_rtImportBuildSectorFindBBox(RtWorldImportBuildSector *buildSector, RwBBox *bbpOut); _rtImportBuildSectorFindBBox(RtWorldImportBuildSector *buildSector, RwBBox *bbpOut);
/* TODO: decide where these scheme functions are going and which ones are public and
whether _rt or RT should be used */
extern void extern void
_rtWorldImportGuideKDCopy(RtWorldImportGuideKDTree *KD, RpSector *spSector, RwInt32 depth); _rtWorldImportGuideKDCopy(RtWorldImportGuideKDTree *KD, RpSector *spSector, RwInt32 depth);
extern void _rtWorldImportGuideKDStackDestroy(_rtWorldImportGuideKDStack *stack); extern void _rtWorldImportGuideKDStackDestroy(_rtWorldImportGuideKDStack *stack);
@ -862,6 +919,12 @@ RtWorldImportMaterialSeparatePartitionSelector(RtWorldImportBuildSector *buildSe
RtWorldImportBuildStatus *buildStatus, RtWorldImportBuildStatus *buildStatus,
RtWorldImportPartition *partition, RtWorldImportPartition *partition,
void *userData); void *userData);
extern RwReal
RtWorldImportPartitionHintPartitionSelector(RtWorldImportBuildSector *buildSector,
RtWorldImportBuildStatus *buildStatus,
RtWorldImportPartition *partition,
void * __RWUNUSED__ userData);
extern RwReal extern RwReal
RtWorldImportMaximumOccluderPartitionSelector(RtWorldImportBuildSector *buildSector, RtWorldImportMaximumOccluderPartitionSelector(RtWorldImportBuildSector *buildSector,
@ -1109,14 +1172,13 @@ RtWorldImportSectorAspectSizePartitionTerminator(RtWorldImportBuildSector * buil
/* END TODO */
/* WorldImport hints */ /* WorldImport hints */
extern void extern void
RtWorldImportHintsSet(RtWorldImportHints *hints); RtWorldImportHintsSetGroup(RtWorldImportHints *hints, RtWorldImportHintGroup group);
extern RtWorldImportHints * extern RtWorldImportHints *
RtWorldImportHintsGet(void); RtWorldImportHintsGetGroup(RtWorldImportHintGroup group);
extern RtWorldImportHints * extern RtWorldImportHints *
RtWorldImportHintsCreate(void); RtWorldImportHintsCreate(void);
@ -1175,14 +1237,6 @@ extern RwInt32 RtWorldImportGetNumTriangles(RtWorldImport * nohsworld);
extern RtWorldImportTriangle * extern RtWorldImportTriangle *
RtWorldImportGetTriangles(RtWorldImport * nohsworld); RtWorldImportGetTriangles(RtWorldImport * nohsworld);
/* Surface lighting characteristics */
extern RtWorldImport *
RtWorldImportSetSurfaceProperties(RtWorldImport * world,
RwSurfaceProperties *
surface);
extern RwSurfaceProperties *
RtWorldImportGetSurfaceProperties(RtWorldImport * world);
/* Progress callbacks */ /* Progress callbacks */
extern void extern void
@ -1254,6 +1308,12 @@ RtWorldImportSetStandardBuildPartitionSelector(RtWorldImportBuildPartitionSelect
#define RtWorldImportParametersInitialize(_paramsPtr) \ #define RtWorldImportParametersInitialize(_paramsPtr) \
*(_paramsPtr) = *RtWorldImportParametersInit(); *(_paramsPtr) = *RtWorldImportParametersInit();
/* Back compatibility with former hints which only permitted type zero (shield) hints... */
#define RtWorldImportHintsSet(_hints) \
RtWorldImportHintsSetGroup(_hints, rtWORLDIMPORTSHIELDHINT);
#define RtWorldImportHintsGet() \
RtWorldImportHintsGetGroup(rtWORLDIMPORTSHIELDHINT);
#endif /* RTIMPORT_H */ #endif /* RTIMPORT_H */

View File

@ -128,472 +128,6 @@

File diff suppressed because it is too large Load Diff

View File

@ -1,645 +0,0 @@
enum e_rwdb_CriterionIntel
{
e_rwdb_CriterionIntelLAST = RWFORCEENUMSIZEINT
};
typedef enum e_rwdb_CriterionIntel e_rwdb_CriterionIntel;

View File

@ -10,8 +10,8 @@
#define RTINTSEC_H #define RTINTSEC_H
/** /**
* \defgroup rtintersect RtIntersection * \defgroup rtintersection RtIntersection
* \ingroup rttool * \ingroup mathtools
* *
* Object Intersection Toolkit for RenderWare. * Object Intersection Toolkit for RenderWare.
*/ */

View File

@ -128,472 +128,6 @@

View File

@ -1,7 +1,7 @@
/** /**
* \defgroup rtltmap RtLtMap * \defgroup rtltmap RtLtMap
* \ingroup rttool * \ingroup lighting
* *
* Lightmap Generation Toolkit for RenderWare. * Lightmap Generation Toolkit for RenderWare.
*/ */
@ -21,7 +21,6 @@
/** /**
* \ingroup rtltmap * \ingroup rtltmap
* \typedef RtLtMapIlluminateSampleCallBack
* \ref RtLtMapIlluminateSampleCallBack is the callback to be called, from * \ref RtLtMapIlluminateSampleCallBack is the callback to be called, from
* within \ref RtLtMapIlluminate, for groups of samples in the objects * within \ref RtLtMapIlluminate, for groups of samples in the objects
* currently being illuminated. * currently being illuminated.
@ -32,7 +31,7 @@
* *
* This callback will receive an array of color values to fill in, each * This callback will receive an array of color values to fill in, each
* representing one sample in the current object - this may correspond to * representing one sample in the current object - this may correspond to
* a texel in the current object's lightmap or the prelight colour of a * a texel in the current object's lightmap or the prelight color of a
* vertex, depending on whether the object is lightmapped and/or vertex-lit. * vertex, depending on whether the object is lightmapped and/or vertex-lit.
* It will receive positions (in world-space) for each sample and the normal * It will receive positions (in world-space) for each sample and the normal
* vector (again, in world-space) of each sample (normals are interpolated * vector (again, in world-space) of each sample (normals are interpolated
@ -82,7 +81,6 @@ typedef RwRGBA *(*RtLtMapIlluminateSampleCallBack)(RwRGBA *results,
/** /**
* \ingroup rtltmap * \ingroup rtltmap
* \typedef RtLtMapIlluminateVisCallBack
* \ref RtLtMapIlluminateVisCallBack is the callback to be called, from * \ref RtLtMapIlluminateVisCallBack is the callback to be called, from
* within \ref RtLtMapIlluminate, to determine the visibility between a * within \ref RtLtMapIlluminate, to determine the visibility between a
* sample and a light. * sample and a light.
@ -111,11 +109,11 @@ typedef RwRGBA *(*RtLtMapIlluminateSampleCallBack)(RwRGBA *results,
* expressed by modifying the RwRGBAReal value. This defaults to bright * expressed by modifying the RwRGBAReal value. This defaults to bright
* white but may be reduced to signify that the light from the light * white but may be reduced to signify that the light from the light
* source should be attenuated. This could be used to take into account * source should be attenuated. This could be used to take into account
* light-filtering objects in the scene (such as coloured glass or fog). * light-filtering objects in the scene (such as colored glass or fog).
* *
* The default RtLtMapIlluminateVisCallBack supplied with RtLtMap is * The default RtLtMapIlluminateVisCallBack supplied with RtLtMap is
* \ref RtLtMapDefaultVisCallBack. This callback performs visibility * \ref RtLtMapDefaultVisCallBack. This callback performs visibility
* tests using the line-intersection tests from \ref rtintersect. It tests * tests using the line-intersection tests from \ref rtintersection. It tests
* for occlusion by RpWorldSectors and RpAtomics and it respects the * for occlusion by RpWorldSectors and RpAtomics and it respects the
* relevant \ref RtLtMapObjectFlags and \ref RtLtMapMaterialFlags but it * relevant \ref RtLtMapObjectFlags and \ref RtLtMapMaterialFlags but it
* does not filter light; visibility is determined to be either one or zero. * does not filter light; visibility is determined to be either one or zero.
@ -141,7 +139,6 @@ typedef RwBool (*RtLtMapIlluminateVisCallBack)(RpWorld *world,
/** /**
* \ingroup rtltmap * \ingroup rtltmap
* \typedef RtLtMapIlluminateProgressCallBack
* \ref RtLtMapIlluminateProgressCallBack is the callback to be called, from * \ref RtLtMapIlluminateProgressCallBack is the callback to be called, from
* within \ref RtLtMapIlluminate, to allow a user to track lighting progress. * within \ref RtLtMapIlluminate, to allow a user to track lighting progress.
* *
@ -214,17 +211,17 @@ typedef enum RtLtMapProgressMessage RtLtMapProgressMessage;
typedef struct RtLtMapLightingSession RtLtMapLightingSession; typedef struct RtLtMapLightingSession RtLtMapLightingSession;
/** /**
* \ingroup rtltmap * \ingroup rtltmap
* \typedef RtLtMapLightingSession * \struct RtLtMapLightingSession
* The \ref RtLtMapLightingSession structure holds information to be passed to * The RtLtMapLightingSession structure holds information to be passed to
* \ref RtLtMapIlluminate. It is used to parameterize the lighting process. * \ref RtLtMapIlluminate. It is used to parameterize the lighting process.
* *
* The \ref RtLtMapLightingSession structure encapsulates a set of objects and * The RtLtMapLightingSession structure encapsulates a set of objects and
* keeps track of the proportion of samples, within that set, that have already * keeps track of the proportion of samples, within that set, that have already
* been lit by calls to \ref RtLtMapIlluminate. Each call performs lighting for * been lit by calls to \ref RtLtMapIlluminate. Each call performs lighting for
* one 'slice' of the whole 'session'. If the camera member is non-NULL, it is * one 'slice' of the whole 'session'. If the camera member is non-NULL, it is
* important that the camera is not moved between lighting slices. * important that the camera is not moved between lighting slices.
* *
* The \ref RtLtMapLightingSession is also passed to * The RtLtMapLightingSession is also passed to
* \ref RtLtMapLightMapsCreate, \ref RtLtMapLightMapsClear, * \ref RtLtMapLightMapsCreate, \ref RtLtMapLightMapsClear,
* \ref RtLtMapLightMapsDestroy and \ref RtLtMapAreaLightGroupCreate, * \ref RtLtMapLightMapsDestroy and \ref RtLtMapAreaLightGroupCreate,
* though not all of the session structure's member will be used in * though not all of the session structure's member will be used in
@ -327,7 +324,7 @@ typedef enum RtLtMapMaterialFlags RtLtMapMaterialFlags;
/** /**
* \ingroup rtltmap * \ingroup rtltmap
* \ref RtLtMapObjectFlags is an enumerated type specifying the different * RtLtMapObjectFlags is an enumerated type specifying the different
* lightmap-related flags which may be applied to world sectors and * lightmap-related flags which may be applied to world sectors and
* atomics. These values will be taken into consideration within * atomics. These values will be taken into consideration within
* \ref RtLtMapLightMapsCreate and \ref RtLtMapIlluminate. * \ref RtLtMapLightMapsCreate and \ref RtLtMapIlluminate.
@ -345,11 +342,11 @@ enum RtLtMapObjectFlags
rtLTMAPOBJECTNAFLAG = 0, rtLTMAPOBJECTNAFLAG = 0,
rtLTMAPOBJECTLIGHTMAP = 1, /**< This object is to be lightmapped */ rtLTMAPOBJECTLIGHTMAP = 1, /**< This object is to be lightmapped */
rtLTMAPOBJECTVERTEXLIGHT = 2, /**< This object's vertex prelight colours should rtLTMAPOBJECTVERTEXLIGHT = 2, /**< This object's vertex prelight colors should
* be lit within \ref RtLtMapIlluminate. */ be lit within \ref RtLtMapIlluminate. */
rtLTMAPOBJECTNOSHADOW = 4, /**< This object does not cast shadows (useful, for rtLTMAPOBJECTNOSHADOW = 4, /**< This object does not cast shadows (useful, for
* example, for moving objects for which dynamic example, for moving objects for which dynamic
* shadows are to be rendered - such as doors) */ shadows are to be rendered - such as doors) */
rtLTMAPOBJECTFLAGFORCEENUMSIZEINT = 0x7FFFFFFF rtLTMAPOBJECTFLAGFORCEENUMSIZEINT = 0x7FFFFFFF
}; };
@ -358,10 +355,13 @@ typedef enum RtLtMapObjectFlags RtLtMapObjectFlags;
/* Area-lighting stuff:* /* Area-lighting stuff:*
***********************/ ***********************/
typedef struct RtLtMapAreaLightGroup RtLtMapAreaLightGroup;
/** /**
* \ingroup rtltmap * \ingroup rtltmap
* \typedef RtLtMapAreaLightGroup * \struct RtLtMapAreaLightGroup
* \ref RtLtMapAreaLightGroup is a structure which acts as a container * RtLtMapAreaLightGroup is a structure which acts as a container
* for area lights created by a call to \ref RtLtMapAreaLightGroupCreate. * for area lights created by a call to \ref RtLtMapAreaLightGroupCreate.
* The containers may be chained and passed to \ref RtLtMapIlluminate. * The containers may be chained and passed to \ref RtLtMapIlluminate.
* Each container has an optional pointer to a RwFrame which is used to * Each container has an optional pointer to a RwFrame which is used to
@ -376,7 +376,6 @@ typedef enum RtLtMapObjectFlags RtLtMapObjectFlags;
* \see RtLtMapIlluminate * \see RtLtMapIlluminate
* \see RtLtMapIlluminateVisCallBack * \see RtLtMapIlluminateVisCallBack
*/ */
typedef struct RtLtMapAreaLightGroup RtLtMapAreaLightGroup;
struct RtLtMapAreaLightGroup struct RtLtMapAreaLightGroup
{ {
RwSList *meshes; /**< A list of hierarchically-grouped area lights */ RwSList *meshes; /**< A list of hierarchically-grouped area lights */
@ -388,13 +387,15 @@ struct RtLtMapAreaLightGroup
/* Area light triangles are grouped by source mesh (this may change) */ /* Area light triangles are grouped by source mesh (this may change) */
typedef struct LtMapAreaLightMesh LtMapAreaLightMesh; typedef struct LtMapAreaLightMesh LtMapAreaLightMesh;
#if (!defined(DOXYGEN))
struct LtMapAreaLightMesh struct LtMapAreaLightMesh
{ {
RwUInt32 flags; /* To hold hierarchical visibility culling flags, RwUInt32 flags; /* To hold hierarchical visibility culling flags,
* relevant to the object/triangle *currently* being lit. */ * relevant to the object/triangle *currently* being lit. */
RpMaterial *material; /* The emitter material, containing colour, etc */ RpMaterial *material; /* The emitter material, containing color, etc */
RwSphere sphere; /* Each mesh has an associated center and radius */ RwSphere sphere; /* Each mesh has an associated center and radius */
RwReal ROI; /* Centred on the above sphere, the R.O.I. of the RwReal ROI; /* Centered on the above sphere, the R.O.I. of the
* samples in this mesh (a conservative estimate) */ * samples in this mesh (a conservative estimate) */
RwSList *triangles; /* A list of the area light triangles in this mesh */ RwSList *triangles; /* A list of the area light triangles in this mesh */
}; };
@ -412,6 +413,37 @@ struct LtMapAreaLight
* not worth storing 3 points, coarse culling is fine) */ * not worth storing 3 points, coarse culling is fine) */
RwV3d *lights; /* Array of area light sample positions (in world-space) */ RwV3d *lights; /* Array of area light sample positions (in world-space) */
}; };
#endif /* (!defined(DOXYGEN)) */
#if (defined(SKY2_DRVMODEL_H) || defined(NULLSKY_DRVMODEL_H))
/**
* \ingroup rtltmapps2
* \ref RtLtMapSkyLumCalcCallBack is the callback to be called, from
* within \ref RtLtMapSkyBaseTextureProcess, to allow a user to select the
* function to process the textures for rendering on the PlayStation 2.
*
* The function is called for each span of a full color image, or for the
* CLUT in a palettised image, to compute the luminance and stores it in
* the alpha component of the texel.
*
* \param scanline A pointer to a scanline of \ref RwRGBA data.
* \param width Width of the scanline, in pixels.
*
* \return A pointer to the scanline on success, NULL otherwise.
*
* \see RtLtMapSkyBaseTextureProcess
* \see RtLtMapSkyLightingSessionBaseTexturesProcess
* \see RtLtMapSkyLightMapMakeDarkMap
* \see RtLtMapSkyLumCalcMaxCallBack
* \see RtLtMapSkyLumCalcSigmaCallBack
* \see RtLtMapSkySetLumCalcCallBack
* \see RtLtMapSkyGetLumCalcCallBack
*/
typedef RwRGBA *(*RtLtMapSkyLumCalcCallBack)(RwRGBA *scanline,
RwUInt32 width );
#endif /* (defined(SKY2_DRVMODEL_H) || defined(NULLSKY_DRVMODEL_H)) */
#ifdef __cplusplus #ifdef __cplusplus
@ -487,6 +519,12 @@ RtLtMapDefaultVisCallBack(RpWorld *world,
RwV3d *lightPos, RwV3d *lightPos,
RpLight __RWUNUSED__ *light); RpLight __RWUNUSED__ *light);
extern void
RtLtMapSetVisCallBackCollisionScalar(RwReal scalar);
extern RwReal
RtLtMapGetVisCallBackCollisionScalar(void);
extern RtLtMapLightingSession * extern RtLtMapLightingSession *
RtLtMapLightingSessionInitialize(RtLtMapLightingSession *session, RtLtMapLightingSessionInitialize(RtLtMapLightingSession *session,
RpWorld *world); RpWorld *world);
@ -562,7 +600,6 @@ extern RwBool
RtLtMapSetAreaLightErrorCutoff(RwReal tolerance); RtLtMapSetAreaLightErrorCutoff(RwReal tolerance);
/* Texture-saving functionality: */ /* Texture-saving functionality: */
extern RwTexDictionary * extern RwTexDictionary *
RtLtMapTexDictionaryCreate(RtLtMapLightingSession *session); RtLtMapTexDictionaryCreate(RtLtMapLightingSession *session);
@ -588,7 +625,13 @@ extern RpAtomic *RtLtMapSkyAtomicBaseTexturesProcess(RpAtomic *atomic);
extern RpWorldSector * extern RpWorldSector *
RtLtMapSkyWorldSectorBaseTexturesProcess(RpWorldSector *sector); RtLtMapSkyWorldSectorBaseTexturesProcess(RpWorldSector *sector);
extern RtLtMapLightingSession * extern RtLtMapLightingSession *
RtLtMapSkyBaseTexturesProcess(RtLtMapLightingSession *session); RtLtMapSkyLightingSessionBaseTexturesProcess(RtLtMapLightingSession *session);
extern RwRGBA *RtLtMapSkyLumCalcMaxCallBack( RwRGBA *scanline, RwUInt32 width );
extern RwRGBA *RtLtMapSkyLumCalcSigmaCallBack( RwRGBA *scanline, RwUInt32 width );
extern RwBool RtLtMapSkySetLumCalcCallBack(RtLtMapSkyLumCalcCallBack cback);
extern RtLtMapSkyLumCalcCallBack RtLtMapSkyGetLumCalcCallBack( void );
#endif /* (defined(SKY2_DRVMODEL_H) || defined(NULLSKY_DRVMODEL_H)) */ #endif /* (defined(SKY2_DRVMODEL_H) || defined(NULLSKY_DRVMODEL_H)) */

View File

@ -138,472 +138,6 @@

View File

@ -15,9 +15,9 @@
/** /**
* \defgroup rtmipk RtMipmapK * \defgroup rtmipk RtMipmapK
* \ingroup rttool * \ingroup mipmapping
* *
* Ps2/Mipmap K Value Toolkit for RenderWare. * PlayStation 2 / Mipmap K Value Toolkit for RenderWare.
*/ */
/**************************************************************************** /****************************************************************************

View File

@ -128,472 +128,6 @@

View File

@ -11,7 +11,7 @@
/** /**
* \defgroup rtpick RtPick * \defgroup rtpick RtPick
* \ingroup rttool * \ingroup collisiondetection
* *
* Picking Toolkit for RenderWare. * Picking Toolkit for RenderWare.
*/ */

View File

@ -128,472 +128,6 @@

View File

@ -11,7 +11,7 @@
/** /**
* \defgroup rtpitexd RtPITexD * \defgroup rtpitexd RtPITexD
* \ingroup rttool * \ingroup texturedictionaries
* *
* Platform Independent Texture Dictionaries * Platform Independent Texture Dictionaries
* *

View File

@ -182,472 +182,6 @@

View File

@ -12,7 +12,7 @@
/** /**
* \defgroup rtpng RtPNG * \defgroup rtpng RtPNG
* \ingroup rttool * \ingroup imageconversiontools
* *
* PNG/Portable Network Graphics Image Format Toolkit for RenderWare. * PNG/Portable Network Graphics Image Format Toolkit for RenderWare.
* *

View File

@ -129,472 +129,6 @@

View File

@ -10,7 +10,7 @@
/** /**
* \defgroup rtquat RtQuat * \defgroup rtquat RtQuat
* \ingroup rttool * \ingroup mathtools
* *
* Quaternion Toolkit for RenderWare. * Quaternion Toolkit for RenderWare.
* *
@ -392,7 +392,7 @@ MACRO_START \
\ \
/* Matrix is orthogonal */ \ /* Matrix is orthogonal */ \
rwMatrixSetFlags((mpMatrix), \ rwMatrixSetFlags((mpMatrix), \
(rwMATRIXTYPEORTHOGANAL & \ (rwMATRIXTYPEORTHOGONAL & \
~rwMATRIXINTERNALIDENTITY) ); \ ~rwMATRIXINTERNALIDENTITY) ); \
\ \
} \ } \

View File

@ -145,472 +145,6 @@

View File

@ -11,7 +11,7 @@
/** /**
* \defgroup rtras RtRAS * \defgroup rtras RtRAS
* \ingroup rttool * \ingroup imageconversiontools
* *
* RAS/Sun Raster Fule Format Image Format Toolkit for RenderWare. * RAS/Sun Raster Fule Format Image Format Toolkit for RenderWare.
* *

View File

@ -129,472 +129,6 @@

View File

@ -11,7 +11,7 @@
/** /**
* \defgroup rtray RtRay * \defgroup rtray RtRay
* \ingroup rttool * \ingroup mathtools
* *
* Line Toolkit for RenderWare. * Line Toolkit for RenderWare.
*/ */
@ -46,7 +46,9 @@ extern "C"
/* Line intersections */ /* Line intersections */
extern RwReal RtLineTriangleIntersectionTest(RwLine *line, RwV3d *normal, extern RwReal RtLineTriangleIntersectionTest(RwLine *line, RwV3d *normal,
RwV3d *v0, RwV3d *v1, RwV3d *v2); RwV3d *v0, RwV3d *v1, RwV3d *v2);
extern RwReal RtLineSphereIntersectionTest(RwLine *line, RwSphere *sphere); extern RwBool RtLineSphereIntersectionTest(RwLine *line,
RwSphere *sphere,
RwReal *centerDist);
/* Line clipping */ /* Line clipping */
extern RwLine *RtLineClipPlane(RwLine *line, RwPlane *plane); extern RwLine *RtLineClipPlane(RwLine *line, RwPlane *plane);

View File

@ -128,472 +128,6 @@

View File

@ -18,7 +18,7 @@
/** /**
* \defgroup rtslerp RtSlerp * \defgroup rtslerp RtSlerp
* \ingroup rttool * \ingroup mathtools
* *
* Slerp/Spherical Linear Interpolations Toolkit for RenderWare. * Slerp/Spherical Linear Interpolations Toolkit for RenderWare.
* *

View File

@ -146,472 +146,6 @@

View File

@ -12,7 +12,7 @@
/** /**
* \defgroup rtsplinepvs RtSplinePVS * \defgroup rtsplinepvs RtSplinePVS
* \ingroup rttool * \ingroup pvs
* *
* Spline PVS Toolkit for RenderWare. * Spline PVS Toolkit for RenderWare.
*/ */

View File

@ -128,472 +128,6 @@

View File

@ -11,7 +11,7 @@
/** /**
* \defgroup rttiff RtTIFF * \defgroup rttiff RtTIFF
* \ingroup rttool * \ingroup imageconversiontools
* *
* TIFF/Tag Image File Format Image Format Toolkit for RenderWare. * TIFF/Tag Image File Format Image Format Toolkit for RenderWare.
* *

View File

@ -129,472 +129,6 @@

View File

@ -11,7 +11,7 @@
/** /**
* \defgroup rttilerender RtTileRender * \defgroup rttilerender RtTileRender
* \ingroup rttool * \ingroup cameras
* *
* Tile renderer - e.g. grabbing screen shots - Toolkit for RenderWare. * Tile renderer - e.g. grabbing screen shots - Toolkit for RenderWare.
*/ */

View File

@ -129,472 +129,6 @@

View File

@ -1,37 +1,38 @@
/*************************************************************************** /******************************************************************************
* * * *
* Module : rttoc.h * * Module : rttoc.h *
* * * *
* Purpose : Table Of Contents (TOC) * * Purpose : Table Of Contents (TOC) *
* * * *
**************************************************************************/ ******************************************************************************/
#ifndef RTTOC_H #ifndef RTTOC_H
#define RTTOC_H #define RTTOC_H
/** /**
* \defgroup rttoc RtTOC * \defgroup rttoc RtTOC
* \ingroup rttool * \ingroup streaming
* *
* Table Of Contents (TOC) - e.g. creating a TOC for a RwStream. * Table Of Contents (TOC) - creating a TOC for a stream.
*/ */
/**************************************************************************** /******************************************************************************
Includes Includes
*/ */
#include "rwcore.h" #include "rwcore.h"
#include "rpcriter.h" #include "rpcriter.h"
/**************************************************************************** /******************************************************************************
Defines Defines
*/ */
/**************************************************************************** /******************************************************************************
Global Types Global Types
*/ */
typedef struct _rtTOCGUID _rtTOCGUID; typedef struct _rtTOCGUID _rtTOCGUID;
#if (!defined(DOXYGEN))
struct _rtTOCGUID struct _rtTOCGUID
{ {
RwUInt32 data1; RwUInt32 data1;
@ -39,20 +40,22 @@ struct _rtTOCGUID
RwUInt16 data3; RwUInt16 data3;
RwUInt8 data4[8]; RwUInt8 data4[8];
}; };
#endif /* (!defined(DOXYGEN)) */
typedef struct RtTOCEntry RtTOCEntry; typedef struct RtTOCEntry RtTOCEntry;
/** /**
* \ingroup rttoc * \ingroup rttoc
* \struct RtTOCEntry * \struct RtTOCEntry
* *
* BLAH * A Table Of Contents (TOC) entry structure.
*/ */
struct RtTOCEntry struct RtTOCEntry
{ {
RwCorePluginID id; /**< Chunk ID */ RwCorePluginID id; /**< Chunk ID */
RwUInt32 offset;/**< Offset of chunk from the start of the file RwUInt32 gid; /**< Game ID */
* including TOC */ RwUInt32 offset; /**< Offset of chunk from the start of the file
_rtTOCGUID guid; /**< GUID */ including TOC */
_rtTOCGUID guid; /**< GUID */
}; };
typedef struct RtTOC RtTOC; typedef struct RtTOC RtTOC;
@ -61,15 +64,15 @@ typedef struct RtTOC RtTOC;
* \ingroup rttoc * \ingroup rttoc
* \struct RtTOC * \struct RtTOC
* *
* BLAH * Table Of Contents (TOC) structure.
*/ */
struct RtTOC struct RtTOC
{ {
RwInt32 numEntries; /**< Number of entries*/ RwInt32 numEntries; /**< Number of entries */
RtTOCEntry entry[1]; /**< Entry*/ RtTOCEntry entry[1]; /**< Entry */
}; };
/**************************************************************************** /******************************************************************************
Function prototypes Function prototypes
*/ */

View File

@ -129,472 +129,6 @@

View File

@ -129,472 +129,6 @@

View File

@ -14,7 +14,7 @@
/** /**
* \defgroup rtworld RtWorld * \defgroup rtworld RtWorld
* \ingroup rttool * \ingroup basicgeometry
* *
* World Import Toolkit for RenderWare. * World Import Toolkit for RenderWare.
*/ */

View File

@ -128,472 +128,6 @@

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -169,7 +169,11 @@ RpAnimBlendClumpInitSkinned(RpClump *clump)
for(i = 0; i < numBones; i++){ for(i = 0; i < numBones; i++){
frames[i].nodeID = HIERNODEID(hier, i); frames[i].nodeID = HIERNODEID(hier, i);
frames[i].resetPos = boneTab[i]; frames[i].resetPos = boneTab[i];
#ifdef LIBRW
frames[i].hanimFrame = (RpHAnimStdKeyFrame*)rpHANIMHIERARCHYGETINTERPFRAME(hier, i); frames[i].hanimFrame = (RpHAnimStdKeyFrame*)rpHANIMHIERARCHYGETINTERPFRAME(hier, i);
#else
frames[i].hanimFrame = (RpHAnimStdKeyFrame*)rtANIMGETINTERPFRAME(hier->currentAnim, i);
#endif
} }
clumpData->ForAllFrames(FrameInitCBskin, nil); clumpData->ForAllFrames(FrameInitCBskin, nil);
clumpData->frames[0].flag |= AnimBlendFrameData::VELOCITY_EXTRACTION; clumpData->frames[0].flag |= AnimBlendFrameData::VELOCITY_EXTRACTION;

View File

@ -303,7 +303,12 @@ PluginAttach(void)
return FALSE; return FALSE;
} }
#ifndef LIBRW
if (!RtAnimInitialize())
{
return FALSE;
}
#endif
if( !RpHAnimPluginAttach() ) if( !RpHAnimPluginAttach() )
{ {
printf("Couldn't attach RpHAnim plugin\n"); printf("Couldn't attach RpHAnim plugin\n");

View File

@ -108,7 +108,7 @@ DefinedState(void)
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA); RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA); RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
RwRenderStateSet(rwRENDERSTATEALPHAPRIMITIVEBUFFER, (void*)FALSE); //RwRenderStateSet(rwRENDERSTATEALPHAPRIMITIVEBUFFER, (void*)FALSE);
RwRenderStateSet(rwRENDERSTATEBORDERCOLOR, (void*)RWRGBALONG(0, 0, 0, 255)); RwRenderStateSet(rwRENDERSTATEBORDERCOLOR, (void*)RWRGBALONG(0, 0, 0, 255));
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE);
RwRenderStateSet(rwRENDERSTATEFOGCOLOR, RwRenderStateSet(rwRENDERSTATEFOGCOLOR,
@ -358,9 +358,9 @@ AtomicRemoveAnimFromSkinCB(RpAtomic *atomic, void *data)
hier->interpolator->currentAnim = nil; hier->interpolator->currentAnim = nil;
} }
#else #else
if(hier && hier->pCurrentAnim){ if(hier && hier->currentAnim){
RpHAnimAnimationDestroy(hier->pCurrentAnim); RpHAnimAnimationDestroy(hier->currentAnim->pCurrentAnim);
hier->pCurrentAnim = nil; hier->currentAnim = nil;
} }
#endif #endif
} }