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" }
platforms {
"win-x86-RW33_d3d8-mss",
"win-x86-RW34_d3d8-mss",
"win-x86-librw_d3d9-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_gl3_glfw-oal",
}
@ -128,7 +128,7 @@ project "librw"
targetdir "lib/%{cfg.platform}/%{cfg.buildcfg}"
files { path.join(Librw, "src/*.*") }
files { path.join(Librw, "src/*/*.*") }
filter "platforms:*RW33*"
filter "platforms:*RW34*"
flags { "ExcludeFromBuild" }
filter {}
end
@ -218,11 +218,11 @@ project "reVC"
filter "platforms:linux*oal"
links { "openal", "mpg123", "sndfile", "pthread" }
filter "platforms:*RW33*"
filter "platforms:*RW34*"
staticruntime "on"
includedirs { "rwsdk/include/d3d8" }
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" }
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
* \ingroup rpplugin
* \ingroup mipmapping
*
* Anisotropic Texture Sampling Plugin for RenderWare Graphics.
*/
@ -22,7 +22,7 @@
* \li \b Plugin \b attachments: \ref RpWorldPluginAttach, \ref RpAnisotPluginAttach
*
* \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.
* 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

View File

@ -139,472 +139,6 @@

View File

@ -31,7 +31,7 @@
/**
* \defgroup rpcollis RpCollision
* \ingroup rpplugin
* \ingroup collisiondetection
*
* Collision Plugin for RenderWare Graphics.
*/
@ -67,12 +67,12 @@ enum RpIntersectType
};
typedef enum RpIntersectType RpIntersectType;
typedef union RpIntersectData RpIntersectData;
/**
* \ingroup rpcollis
* RpIntersectData, this union type is used to specify the parameters
* for an intersection primitive of the desired type (\ref RpIntersectType)
*/
typedef union RpIntersectData RpIntersectData;
union RpIntersectData
{
RwLine line; /**<For type rpINTERSECTLINE */
@ -144,7 +144,6 @@ struct RpCollisionBuildParam
/**
* \ingroup rpcollis
* \typedef RpIntersectionCallBackWorldTriangle
* \ref RpIntersectionCallBackWorldTriangle represents the function called
* from \ref RpCollisionWorldForAllIntersections for all intersections between
* 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
* 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 sector Pointer to the world sector containing the triangle.
* \param collTriangle Pointer to the \ref RpCollisionTriangle representing
@ -181,7 +184,6 @@ typedef RpCollisionTriangle *(*RpIntersectionCallBackWorldTriangle)
/**
* \ingroup rpcollis
* \typedef RpIntersectionCallBackAtomic
* \ref RpIntersectionCallBackAtomic represents the function called from
* \ref RpWorldForAllAtomicIntersections for all intersections between the
* specified primitive and collision atomics in a given world. This function
@ -215,7 +217,6 @@ typedef RpAtomic *(*RpIntersectionCallBackAtomic)
/**
* \ingroup rpcollis
* \typedef RpIntersectionCallBackWorldSector
* \ref RpIntersectionCallBackWorldSector represents the function called from
* \ref RpWorldForAllWorldSectorIntersections for all intersections between the
* specified primitive and world sectors in a given world. This function should
@ -234,7 +235,6 @@ typedef RpWorldSector *(*RpIntersectionCallBackWorldSector)
/**
* \ingroup rpcollis
* \typedef RpIntersectionCallBackGeometryTriangle
* \ref RpIntersectionCallBackGeometryTriangle represents the function called
* from \ref RpAtomicForAllIntersections and
* \ref RpCollisionGeometryForAllIntersections

View File

@ -137,472 +137,6 @@

View File

@ -1,261 +1,6 @@
/* Doxygen Core Library groups */
/**
* \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 */
#ifdef DOXYGEN
#include "doxygen.h"
#endif /* DOXYGEN */
/* These are plugins */
#define rwID_METRICSPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x01)
@ -306,137 +51,10 @@
#define rwID_MULTITEXPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2c)
#define rwID_CHAINPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2d)
#define rwID_TOONPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2e)
#define rwID_PTANKPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2f)
#define rwID_PRTSTDPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x30)
/********************************************************/
/* 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 */
#define rwID_PTANKPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2f)
#define rwID_PRTSTDPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x30)
#define rwID_PDSPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x31)
#define rwID_PRTADVPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x32)
/* These are toolkits */
#define rwID_CHARSEPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x80)
@ -480,93 +98,9 @@
#define rwID_BARYCENTRIC MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb2)
#define rwID_PITEXDICTIONARYTK MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb3)
#define rwID_TOCTOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb4)
/**********************************************************************/
/* Doxygen Toolkit groups */
/**
* \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. */
#define rwID_TPLTOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb5)
#define rwID_ALTPIPETOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb6)
#define rwID_ANIMTOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb7)
#define rwID_SKINSPLITTOOKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb8)
/**
* \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 <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

View File

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

View File

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

View File

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

View File

@ -142,472 +142,6 @@

View File

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

View File

@ -139,472 +139,6 @@

View File

@ -1,7 +1,7 @@
/**
* \defgroup rpltmap RpLtMap
* \ingroup rpplugin
* \ingroup lighting
*
* Lightmap Plugin for RenderWare Graphics.
*/
@ -17,6 +17,15 @@
#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 rpLTMAPMINLIGHTMAPSIZE 16
#define rpLTMAPMAXLIGHTMAPSIZE 512/*?? any better way of determining this ??*/

View File

@ -138,472 +138,6 @@

View File

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

View File

@ -138,472 +138,6 @@

View File

@ -7,9 +7,9 @@
/**
* \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>
@ -19,6 +19,28 @@ extern "C"
{
#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 RwUInt32 RpMipmapKLTextureSetDefaultL(RwUInt32 val);
extern RwReal RpMipmapKLTextureGetDefaultK(void);
@ -31,6 +53,8 @@ extern RwUInt32 RpMipmapKLTextureGetL(RwTexture *tex);
extern RwBool RpMipmapKLPluginAttach(void);
#endif /* (defined(SKY2_DRVMODEL_H)) || (defined(NULLSKY_DRVMODEL_H)) */
#ifdef __cplusplus
}
#endif

View File

@ -139,472 +139,6 @@

View File

@ -38,7 +38,7 @@
/**
* \defgroup rpmorph RpMorph
* \ingroup rpplugin
* \ingroup morphing
*
* Morphing Plugin for RenderWare Graphics.
*/
@ -76,7 +76,6 @@ struct RpMorphInterpolator
/**
* \ingroup rpmorph
* \typedef RpMorphGeometryCallBack
* This is the callback function supplied to \ref RpMorphGeometrySetCallBack
* and returned from \ref RpMorphGeometryGetCallBack.
* 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
* \ingroup rpplugin
* \ingroup bezierpatches
*
* Bezier patch library
*
@ -124,7 +124,7 @@
* \ingroup rppatch
* \ref RpPatchMeshFlag
* 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.
*
* \see RpPatchMeshCreate
@ -220,7 +220,7 @@ typedef struct RpPatchMesh RpPatchMesh;
* The patch mesh should be unlocked with \ref RpPatchMeshUnlock before it is
* added to an \ref RpAtomic with \ref RpPatchAtomicSetPatchMesh.
*
* \see RpPatchMesDefinition
* \see RpPatchMeshDefinition
*/
struct RpPatchMesh
{
@ -278,7 +278,7 @@ struct RpPatchLODRange
/**
* \ingroup rppatch
* \typedef RpPatchLODUserData
* \ref RpPatchLODUserData
* typedef for the user data passed to the \ref RpPatchLODCallBack
* function which calculates the atomics' LOD.
*
@ -289,9 +289,14 @@ typedef void *RpPatchLODUserData;
/**
* \ingroup rppatch
* \typedef RpPatchLODCallBack
* \ref RpPatchLODCallBack
* typedef for the patch atomic LOD calculation function.
*
* \param atomic
* \param userData
*
* \return
*
* \see RpPatchAtomicSetPatchLODCallBack
* \see RpPatchAtomicGetPatchLODCallBack
*/
@ -309,6 +314,13 @@ extern "C"
/*---------------------------------------------------------------------------*
*- Plugin functions -*
*---------------------------------------------------------------------------*/
extern void
RpPatchGeometrySetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern void
RpPatchAtomicSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern RwBool
RpPatchPluginAttach(void);

View File

@ -138,472 +138,6 @@

View File

@ -28,7 +28,7 @@
/**
* \defgroup rpprtstd RpPrtStd
* \ingroup rpplugin
* \ingroup particles
*
* 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))
/**
@ -84,6 +84,8 @@ enum RpPrtStdEmitterFlags
rpPRTSTDEMITTERFLAGUPDATEPARTICLE = 0x00000020, /**< This indicated if the emitter's particles are updated. */
rpPRTSTDEMITTERFLAGRENDER = 0x00000040, /**< This indicates if the emitter is rendered. */
rpPRTSTDEMITTERFLAGRENDERPARTICLE = 0x00000080, /**< This indicates if the emitter's particles are rendered. */
rpPRTSTDEMITTERFLAGNOBUFFERSWAP = 0x00000100, /**< Internal usage */
rpPRTSTDEMITTERFLAGSTREAMREAD = 0x00000200, /**< Internal usage */
rpPRTSTDEMITTERFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
@ -109,15 +111,12 @@ enum RpPrtStdParticleCallBackCode
rpPRTSTDPARTICLECALLBACKRENDER, /**< Particle render callback */
rpPRTSTDPARTICLECALLBACKCREATE, /**< Particle create callback */
rpPRTSTDPARTICLECALLBACKDESTROY, /**< Particle destroy callback */
rpPRTSTDPARTICLECALLBACKSTREAMREAD, /**< Particle stream input callback */
rpPRTSTDPARTICLECALLBACKSTREAMWRITE, /**< Particle stream outout callback */
rpPRTSTDPARTICLECALLBACKSTREAMGETSIZE, /**< Particle stream get size callback */
rpPRTSTDPARTICLECALLBACKFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RpPrtStdParticleCallBackCode RpPrtStdParticleCallBackCode;
#define rpPRTSTDEMITTERCALLBACKMAX 10
#define rpPRTSTDEMITTERCALLBACKMAX 11
/**
* \ingroup rpprtstd
@ -137,6 +136,7 @@ enum RpPrtStdEmitterCallBackCode
rpPRTSTDEMITTERCALLBACKSTREAMREAD, /**< Emitter stream input callback */
rpPRTSTDEMITTERCALLBACKSTREAMWRITE, /**< Emitter stream output callback */
rpPRTSTDEMITTERCALLBACKSTREAMGETSIZE, /**< Emitter stream get size callback */
rpPRTSTDEMITTERCALLBACKCLONE, /**< Emitter clone callback */
rpPRTSTDEMITTERCALLBACKFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
@ -154,7 +154,7 @@ typedef struct RpPrtStdEmitter RWALIGN(RpPrtStdEmitter, rwMATRIXALIGNMENT);
/**
* \ingroup rpprtstd
* \typedef RpPrtStdEmitterCallBack
* \ref RpPrtStdEmitterCallBack
* \ref RpPrtStdEmitterCallBack represents the function called for processing
* a \ref RpPrtStdEmitter. There can several types of the functions, each performing a
* specific task defined by \ref RpPrtStdEmitterCallBackCode.
@ -172,7 +172,6 @@ typedef RpPrtStdEmitter *
typedef struct RpPrtStdParticleBatch RWALIGN(RpPrtStdParticleBatch, rwMATRIXALIGNMENT);
/**
* \ingroup rpprtstd
* \typedef RpPrtStdParticleCallBack
* \ref RpPrtStdParticleCallBack represents the function called for processing
* a \ref RpPrtStdParticleBatch. There can be several types of the functions, each
* performing a specific task defined by \ref RpPrtStdParticleCallBackCode.
@ -189,7 +188,6 @@ typedef RpPrtStdParticleBatch *
/**
* \ingroup rpprtstd
* \typedef RpPrtStdEmitterCallBackArray
* \ref RpPrtStdEmitterCallBackArray represents a set of callback functions for
* processing a \ref RpPrtStdEmitter. All the functions are of the type \ref
* RpPrtStdEmitterCallBack.
@ -201,7 +199,6 @@ typedef RpPrtStdEmitterCallBack
/**
* \ingroup rpprtstd
* \typedef RpPrtStdParticleCallBackArray
* \ref RpPrtStdParticleCallBackArray represents a set of callback functions for
* processing a \ref RpPrtStdParticleBatch. All the functions are of the type \ref
* RpPrtStdParticleCallBack.
@ -221,7 +218,6 @@ typedef RpPrtStdParticleCallBack
typedef struct RpPrtStdEmitterClass RpPrtStdEmitterClass;
/**
* \ingroup rpprtstd
* \typedef RpPrtStdEClassSetupCallBack
* \ref RpPrtStdEClassSetupCallBack represents the function called for setting up an
* emitter class's set of callback function. The callback function is called
* after an emitter class is streamed in.
@ -237,7 +233,6 @@ typedef RpPrtStdEmitterClass *
typedef struct RpPrtStdParticleClass RpPrtStdParticleClass;
/**
* \ingroup rpprtstd
* \typedef RpPrtStdPClassSetupCallBack
* \ref RpPrtStdPClassSetupCallBack represents the function called for setting up an
* emitter class's set of callback function. The callback function is called
* after an emitter class is streamed in.
@ -273,6 +268,7 @@ struct RpPrtStdPropertyTable
RpPrtStdPropertyTable *next; /**< Internal usage */
RwInt32 id; /**< Property table's id */
RwInt32 refCount; /**< Reference count. Internal usage */
RwInt32 numProp; /**< Number of properties in the table */
RwInt32 maxProp; /**< Internal usage */
@ -295,6 +291,7 @@ struct RpPrtStdEmitterClass
RpPrtStdEmitterClass *next; /**< Internal usage */
RwInt32 id; /**< Emitter class's id */
RwInt32 refCount; /**< Reference count. Internal usage */
RwInt32 objSize; /**< Size of the emitter */
RpPrtStdPropertyTable *propTab; /**< Reference to a table of emitter properties */
@ -316,6 +313,7 @@ struct RpPrtStdParticleClass
RpPrtStdParticleClass *next; /**< Internal usage */
RwInt32 id; /**< Particle class's id */
RwInt32 refCount; /**< Reference count. Internal usage */
RwInt32 objSize; /**< Size of a particle */
RpPrtStdPropertyTable *propTab; /**< Reference to a table of particle properties */
@ -403,7 +401,6 @@ struct RpPrtStdEmitter
#define rpPRTSTDPROPERTYCODEEMITTERSTANDARD 1
#define rpPRTSTDPROPERTYCODEEMITTERPRTCOLOR 2
#define rpPRTSTDPROPERTYCODEEMITTERPRTTEXCOORDS 3
#define rpPRTSTDPROPERTYCODEEMITTERPRTANIMFRAME 4
#define rpPRTSTDPROPERTYCODEEMITTERPRTSIZE 5
#define rpPRTSTDPROPERTYCODEEMITTERPTANK 6
#define rpPRTSTDPROPERTYCODEEMITTERPRTVELOCITY 7
@ -414,7 +411,6 @@ struct RpPrtStdEmitter
#define rpPRTSTDEMITTERDATAFLAGSTANDARD 0x00000001
#define rpPRTSTDEMITTERDATAFLAGPRTCOLOR 0x00000002
#define rpPRTSTDEMITTERDATAFLAGPRTTEXCOORDS 0x00000004
#define rpPRTSTDEMITTERDATAFLAGPRTANIMFRAME 0x00000008
#define rpPRTSTDEMITTERDATAFLAGPRTSIZE 0x00000010
#define rpPRTSTDEMITTERDATAFLAGPTANK 0x00000020
#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
* 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.
*/
struct RpPrtStdEmitterStandard
@ -522,15 +518,6 @@ struct RpPrtStdEmitterPrtTexCoords
prtEndUV1Bias; /**< Particle end bottom right texcoords bias */
};
typedef struct RpPrtStdEmitterPrtAnimFrame RpPrtStdEmitterPrtAnimFrame;
struct RpPrtStdEmitterPrtAnimFrame
{
RwInt32 prtNumFrames;
RwTexCoords *prtAnimFrameTexCoords;
};
typedef struct RpPrtStdEmitterPrtSize RpPrtStdEmitterPrtSize;
/**
@ -550,18 +537,47 @@ struct RpPrtStdEmitterPrtSize
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);
/**
* \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
{
RwMatrix prtCnsMtx;
RwMatrix prtCnsMtx; /**< Transformation matrix to be applied to each particle */
RwV3d prtPosMtxAt,
prtPosMtxAtBias;
RwV3d prtPosMtxUp,
prtPosMtxUpBias;
RwV3d prtPosMtxAt, /**< Particle initial look at vector */
prtPosMtxAtBias; /**< Particle initial look at vector bias */
RwV3d prtPosMtxUp, /**< Particle initial up vector. */
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 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
{
RwUInt32 dataFlags,
platFlags,
numPrt,
maxPrt,
updateFlags,
emitFlags;
RpAtomic *pTank;
RwChar **dataInPtrs,
**dataOutPtrs;
RwInt32 *dataStride;
RwUInt32 dataFlags, /**< Data flag used in RpPTank creation. See
* \ref RpPTankAtomicCreate */
platFlags, /**< Platform flag used in RpPTank creation. See
* \ref RpPTankAtomicCreate */
numPrt, /**< An integer representing the current number of active
* particles */
maxPrt, /**< An integer representing the maxiumum number of particles
* stored in the RpPTank */
updateFlags, /**< A flag representing the properties to be updated by
* 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 rpPRTSTDPROPERTYCODEPARTICLECOLOR 2
#define rpPRTSTDPROPERTYCODEPARTICLETEXCOORDS 3
#define rpPRTSTDPROPERTYCODEPARTICLEANIMFRAME 4
#define rpPRTSTDPROPERTYCODEPARTICLESIZE 5
#define rpPRTSTDPROPERTYCODEPARTICLEVELOCITY 6
#define rpPRTSTDPROPERTYCODEPARTICLEMATRIX 7
@ -619,7 +658,6 @@ struct RpPrtStdEmitterPTank
#define rpPRTSTDPARTICLEDATAFLAGPOSITION 0x00000002
#define rpPRTSTDPARTICLEDATAFLAGCOLOR 0x00000004
#define rpPRTSTDPARTICLEDATAFLAGTEXCOORDS 0x00000008
#define rpPRTSTDPARTICLEDATAFLAGANIMFRAME 0x00000010
#define rpPRTSTDPARTICLEDATAFLAGSIZE 0x00000020
#define rpPRTSTDPARTICLEDATAFLAGVELOCITY 0x00000040
#define rpPRTSTDPARTICLEDATAFLAGMATRIX 0x00000080
@ -675,15 +713,6 @@ struct RpPrtStdParticleTexCoords
deltaUV1; /**< Particle's bottom right texcoords rate of change */
};
typedef struct RpPrtStdParticleAnimFrame RpPrtStdParticleAnimFrame;
struct RpPrtStdParticleAnimFrame
{
RwInt32 frame;
RwReal delta;
};
typedef struct RpPrtStdParticleSize RpPrtStdParticleSize;
/**
@ -714,10 +743,13 @@ extern "C"
/************************************************************************/
extern RwBool
RpParticleStandardPluginAttach( void );
RpPrtStdPluginAttach( void );
/************************************************************************/
extern RwBool
RpAtomicIsParticleEmitter(RpAtomic *atomic);
extern RpAtomic *
RpPrtStdAtomicCreate(RpPrtStdEmitterClass *eClass, void *data);
@ -749,6 +781,9 @@ RpPrtStdEmitterCreate(RpPrtStdEmitterClass *eClass);
extern RwBool
RpPrtStdEmitterDestroy(RpPrtStdEmitter *emt);
extern RpPrtStdEmitter *
RpPrtStdEmitterClone(RpPrtStdEmitter *emt);
extern RpPrtStdEmitter *
RpPrtStdEmitterForAllParticleBatch(RpPrtStdEmitter *emt,
RpPrtStdParticleCallBack callback,
@ -835,7 +870,6 @@ RpPrtStdPropTabStreamWrite(RpPrtStdPropertyTable *eClass,
extern RwInt32
RpPrtStdPropTabStreamGetSize(RpPrtStdPropertyTable *eClass);
/************************************************************************/
extern RwBool
@ -941,6 +975,11 @@ RpPrtStdGlobalDataStreamWrite(RwStream *stream);
extern RwInt32
RpPrtStdGlobalDataStreamGetSize( void );
extern void
RpPrtStdGlobalDataSetStreamEmbedded( RwBool embedded );
extern RwBool
RpPrtStdGlobalDataGetStreamEmbedded( void );
/************************************************************************/
@ -963,10 +1002,18 @@ extern RpPrtStdEmitter *
RpPrtStdEmitterStdEmitCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data);
extern RpPrtStdEmitter *
RpPrtStdEmitterStdCloneCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data);
extern RpPrtStdEmitter *
RpPrtStdEmitterStdCreateCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data);
extern RpPrtStdEmitter *
RpPrtStdEmitterStdDestroyCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data);
extern RpPrtStdEmitter *
RpPrtStdEmitterStdBeginUpdateCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data);

View File

@ -160,480 +160,14 @@
enum e_rwdb_CriterionParticleStandard
enum e_rwdb_CriterionPrtStandard
{
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
* \ingroup rpplugin
* \ingroup particles
*
* PTank Plugin for RenderWare.
*/
/*--- Include files ---*/
#include <string.h>
#include "rwcore.h"
@ -139,7 +140,7 @@ enum RpPTankInstanceFlags
rpPTANKIFLAGCENTER = ((int)0x01000000), /**<Center position changed*/
/* free = ((int)0x04000000), */
/* free = ((int)0x08000000), */
/* free = ((int)0x10000000), */
rpPTANKIFLAGALPHABLENDING = ((int)0x10000000), /**<Internal Use*/
rpPTANKIFLAGALL = ((int)0xFFFFFFFF),
RPPTANKINSTANCEFLAGSFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
@ -244,20 +245,22 @@ extern const RwInt32 datasize[];
/**
* \ingroup rpptank
* \typedef rpptankAllocCallBack
* \ref RpPTankAllocCallBack
*
* ...
*/
typedef void *(* rpPTankAllocCallBack)(RpPTankData *ptankGlobal,
typedef void *(* RpPTankAllocCallBack)(RpPTankData *ptankGlobal,
RwInt32 maxPCount,
RwUInt32 dataFlags,
RwUInt32 platFlags);
/**
* \ingroup rpptank
* \typedef rpPTankCreateCallBack
* \ref RpPTankCreateCallBack
*
* ...
*/
typedef RwBool (* rpPTankCreateCallBack)(RpAtomic *atomic,
typedef RwBool (* RpPTankCreateCallBack)(RpAtomic *atomic,
RpPTankData *ptankGlobal,
RwInt32 maxPCount,
RwUInt32 dataFlags,
@ -265,37 +268,37 @@ typedef RwBool (* rpPTankCreateCallBack)(RpAtomic *atomic,
/**
* \ingroup rpptank
* \typedef rpPTankInstanceCallBack
* \ref RpPTankInstanceCallBack
* ...
*/
typedef RwBool (* rpPTankInstanceCallBack)(RpAtomic *atomic,
typedef RwBool (* RpPTankInstanceCallBack)(RpAtomic *atomic,
RpPTankData *ptankGlobal,
RwInt32 actPCount,
RwUInt32 instFlags);
/**
* \ingroup rpptank
* \typedef rpPTankRenderCallBack
* \ref RpPTankRenderCallBack
* ...
*/
typedef RwBool (* rpPTankRenderCallBack)(RpAtomic *atomic,
typedef RwBool (* RpPTankRenderCallBack)(RpAtomic *atomic,
RpPTankData *ptankGlobal,
RwInt32 actPCount);
typedef struct rpPTankCallBacks rpPTankCallBacks;
typedef struct RpPTankCallBacks RpPTankCallBacks;
struct rpPTankCallBacks
struct RpPTankCallBacks
{
rpPTankAllocCallBack alloc;
rpPTankCreateCallBack create;
rpPTankInstanceCallBack instance;
rpPTankRenderCallBack render;
RpPTankAllocCallBack alloc;
RpPTankCreateCallBack create;
RpPTankInstanceCallBack instance;
RpPTankRenderCallBack render;
};
/* private typedefs */
typedef struct rpPTANKInstanceSetupData rpPTANKInstanceSetupData;
typedef struct RpPTANKInstanceSetupData RpPTANKInstanceSetupData;
struct rpPTANKInstanceSetupData
struct RpPTANKInstanceSetupData
{
RwBool instancePositions;
RwBool instanceUVs;
@ -312,27 +315,27 @@ struct rpPTANKInstanceSetupData
};
typedef void (* rpPTankGENInstancePosCallback)(
typedef void (* RpPTankGENInstancePosCallback)(
RpPTankLockStruct *dstCluster,
RwV3d *right,
RwV3d *up,
RwInt32 pCount,
RpPTankData *ptankGlobal);
typedef void (* rpPTankGENInstanceCallback)(
typedef void (* RpPTankGENInstanceCallback)(
RpPTankLockStruct *dstCluster,
RwInt32 pCount,
RpPTankData *ptankGlobal);
typedef void (* rpPTankGENInstanceSetupCallback)(
rpPTANKInstanceSetupData *data,
typedef void (* RpPTankGENInstanceSetupCallback)(
RpPTANKInstanceSetupData *data,
RpAtomic *atomic,
RpPTankData *ptankGlobal,
RwInt32 actPCount,
RwUInt32 instFlags);
typedef void (* rpPTankGENInstanceEndingCallback)(
rpPTANKInstanceSetupData *data,
typedef void (* RpPTankGENInstanceEndingCallback)(
RpPTANKInstanceSetupData *data,
RpAtomic *atomic,
RpPTankData *ptankGlobal,
RwInt32 actPCount,
@ -351,15 +354,15 @@ struct RpPTankAtomicExtPrv
/* Rendering callback */
RpAtomicCallBackRender defaultRenderCB;
rpPTankCallBacks ptankCallBacks;
RpPTankCallBacks ptankCallBacks;
/* Instancing CallBacks */
rpPTankGENInstanceSetupCallback insSetupCB;
rpPTankGENInstancePosCallback insPosCB;
rpPTankGENInstanceCallback insUVCB;
rpPTankGENInstanceCallback insColorsCB;
rpPTankGENInstanceCallback insNormalsCB;
rpPTankGENInstanceEndingCallback insEndingCB;
RpPTankGENInstanceSetupCallback insSetupCB;
RpPTankGENInstancePosCallback insPosCB;
RpPTankGENInstanceCallback insUVCB;
RpPTankGENInstanceCallback insColorsCB;
RpPTankGENInstanceCallback insNormalsCB;
RpPTankGENInstanceEndingCallback insEndingCB;
RwUInt32 lockFlags;
RwUInt32 instFlags;
@ -390,7 +393,6 @@ extern RwInt32 _rpPTankGlobalsOffset; /* Offset in RwEngine */
#endif
extern RwBool
RpPTankPluginAttach(void);
@ -523,7 +525,7 @@ MACRO_START\
RPATOMICPTANKPLUGINDATA(atm_)->publicData.cColor = *col_;\
if( RpGeometryGetMaterial(RpAtomicGetGeometry(atm_),0) )\
{\
RpMaterialSetColor(\
(void)RpMaterialSetColor(\
RpGeometryGetMaterial(RpAtomicGetGeometry(atm_),0),\
&RPATOMICPTANKPLUGINDATA(atm_)->publicData.cColor);\
}\
@ -759,6 +761,14 @@ extern RpAtomic *
RpPTankAtomicUnlock(RpAtomic *atomic);
/*
* Stealth functions *********************************************************
*/
RpAtomic*
_rpPTankAtomicCreateCustom(RwInt32 maxParticleNum,
RwUInt32 dataFlags, RwUInt32 platFlags,
RpPTankCallBacks *callbacks);
#ifdef __cplusplus
}
#endif /* __cplusplus */
@ -767,6 +777,41 @@ RpPTankAtomicUnlock(RpAtomic *atomic);
/*---- 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
{
rpPTANKD3D8FLAGSUSEPOINTSPRITES = 0x00000001,
@ -774,6 +819,8 @@ enum RpPTankD3D8Flags
rpPTANKD3D8FLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RpPTankD3D8Flags RpPTankD3D8Flags;
/*---- end: c:/daily/rwsdk/plugin/ptank/d3d8/ptankplatform.h----*/
#endif /* RPPTANK_H */

View File

@ -143,472 +143,6 @@

View File

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

View File

@ -140,472 +140,6 @@

View File

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

View File

@ -138,472 +138,6 @@

View File

@ -4,7 +4,7 @@
/**
* \defgroup rpskin RpSkin
* \ingroup rpplugin
* \ingroup skinning
*
* Skin Plugin for RenderWare Graphics.
*/
@ -48,7 +48,7 @@ struct RwMatrixWeights
/**
* \ingroup rpskin
* \typedef RpSkin
* \struct RpSkin
*
* Skin object. This should be considered an opaque type.
* Use the RpSkin API functions to access.
@ -69,6 +69,9 @@ extern "C"
/*---------------------------------------------------------------------------*
*- Plugin functions -*
*---------------------------------------------------------------------------*/
extern void RpSkinSetFreeListCreateParams(
RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern RwBool
RpSkinPluginAttach(void);
@ -114,6 +117,9 @@ RpSkinGetVertexBoneIndices( RpSkin *skin );
extern const RwMatrix *
RpSkinGetSkinToBoneMatrices( RpSkin *skin );
extern RwBool
RpSkinIsSplit( RpSkin *skin );
/*---------------------------------------------------------------------------*
*- Skin pipeline -*
*---------------------------------------------------------------------------*/
@ -131,7 +137,6 @@ enum RpSkinType
rpSKINTYPEGENERIC = 1, /**<Generic skin rendering. */
rpSKINTYPEMATFX = 2, /**<Material effects skin rendering. */
rpSKINTYPETOON = 3, /**<Toon skin rendering. */
rpSKINTYPEMATFXTOON = 4, /**<Note Toon + MatFX on same object NOT currently supported */
rpSKINTYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RpSkinType RpSkinType;
@ -143,6 +148,32 @@ RpSkinAtomicSetType( RpAtomic *atomic,
extern RpSkinType
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
@ -167,6 +198,29 @@ RpSkinAtomicGetType( RpAtomic *atomic );
* 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 -----------------------------------------------------------*

View File

@ -138,472 +138,6 @@

View File

@ -39,7 +39,7 @@
/**
* \defgroup rpspline RpSpline
* \ingroup rpplugin
* \ingroup mathtools
*
* 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
* \ingroup rpplugin
* \ingroup scenemanagement
*
* 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
* \ingroup rttool
* \ingroup 2dtools
*
* 2D Rendering Toolkit for RenderWare.
*/
@ -117,6 +117,7 @@
Includes
*/
#include "rpworld.h"
#include "rt2d.rpe" /* automatically generated header file */
/****************************************************************************
@ -132,6 +133,13 @@
#define Rt2dCTMReadMacro(_result) \
(RwMatrixCopy((_result), _rt2dCTMGet()), (_result))
#if defined (GCN_DRVMODEL_H)
#define VERTEXCACHESIZE 64
#else
#define VERTEXCACHESIZE 256
#endif
/****************************************************************************
Global Types
*/
@ -152,16 +160,21 @@ typedef struct rt2dShadeParameters rt2dShadeParameters;
* rt2dShadeParameters
* describes Shade Parameters
*/
#if (!defined(DOXYGEN))
struct rt2dShadeParameters
{
RwRGBAReal col; /* col */
RwV2d uv; /* uv */
};
#endif /* (!defined(DOXYGEN)) */
/**
* \ingroup rt2ddatatypes
* \typedef Rt2dBrush
* typedef for a structure describing a Brush (opaque)
* \struct Rt2dBrush
* Brush object.
* This should be considered an opaque type.
* Use Rt2dBrush API functions to access.
*/
typedef struct Rt2dBrush Rt2dBrush;
@ -169,35 +182,37 @@ typedef struct Rt2dBrush Rt2dBrush;
* Rt2dBrush
* structure describing a Brush
*/
#if defined (GCN_DRVMODEL_H)
#define VERTEXCACHESIZE 64
#else
#define VERTEXCACHESIZE 256
#endif
#if (!defined(DOXYGEN))
struct Rt2dBrush
{
RWIM3DVERTEX vertex[VERTEXCACHESIZE];
rt2dShadeParameters top;
rt2dShadeParameters dtop;
rt2dShadeParameters bottom;
rt2dShadeParameters dbottom;
RwInt32 calcFields;
RwRGBA colorCache;
RwInt32 flag;
RwTexture *texture;
RpMaterial *material;
RwReal halfwidth;
RwInt32 refCount;
};
#endif /* (!defined(DOXYGEN)) */
/**
* \ingroup rt2ddatatypes
* \typedef Rt2dPath
* typedef for a structure describing a Path (opaque)
* \struct Rt2dPath
* Path object.
* This should be considered an opaque type.
* Use Rt2dPath API functions to access.
*/
typedef struct Rt2dPath Rt2dPath;
/**
* \ingroup rt2ddatatypes
* \typedef Rt2dFont
* typedef for a structure describing a Font (opaque)
* \struct Rt2dFont
* Font object.
* This should be considered an opaque type.
* Use Rt2dFont API functions to access.
*/
typedef struct Rt2dFont Rt2dFont;
@ -206,11 +221,6 @@ typedef struct Rt2dFont Rt2dFont;
*/
typedef struct _rt2dFontDictionaryNode _rt2dFontDictionaryNode;
/**
* \ingroup rt2ddatatypes
* \typedef Rt2dBBox
* typedef for a structure describing a Bounding Box
*/
typedef struct Rt2dBBox Rt2dBBox;
/**
@ -228,8 +238,8 @@ struct Rt2dBBox
/**
* \ingroup rt2ddatatypes
* \typedef Rt2dObject
* typedef for a structure describing a 2d Object
* \struct Rt2dObject
* Structure describing a 2d Object
* This should be considered an opaque type.
* Use Rt2dObject, Rt2dScene, Rt2dShape, Rt2dPickRegion or Rt2dObjectString
* API functions to access.
@ -246,6 +256,7 @@ typedef struct _rt2dScene _rt2dScene;
*/
typedef struct _rt2dDepthOfObject _rt2dDepthOfObject;
#if (!defined(DOXYGEN))
/*
* typedef for a structure describing the depth of an object
*/
@ -265,15 +276,47 @@ struct _rt2dScene
RwSList *depths; /* depths for depthsort */
RwBool isDirtyDepths; /* depthsort needs updating */
};
#endif /* (!defined(DOXYGEN)) */
/*
* typedef for a structure describing a shape (opaque)
*/
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
{
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
*/
struct _rt2dObjectString
{
RwChar *textString; /* Text string to be rendered */
@ -303,6 +347,7 @@ struct _rt2dObjectString
RwReal height; /* Font rendering Height */
_rt2dFontDictionaryNode *font; /* Dictionary node identifying font to be used */
};
#endif /* (!defined(DOXYGEN)) */
/*
* typedef for a renderable string
@ -324,6 +369,7 @@ enum Rt2dObjectTypeEnum {
typedef union _rt2dObjectdata _rt2dObjectdata;
#if (!defined(DOXYGEN))
union _rt2dObjectdata
{
_rt2dShape shape;
@ -335,11 +381,13 @@ union _rt2dObjectdata
/*
* A base structure for forming a hierarchy of 2D shapes
*/
#if (!defined(DOXYGEN))
#define Rt2dObjectIsLocked 0x00000001
#define Rt2dObjectDirtyLTM 0x00000002
#define Rt2dObjectVisible 0x00000004
#define Rt2dObjectIsLocked 0x00000001
#define Rt2dObjectDirtyLTM 0x00000002
#define Rt2dObjectVisible 0x00000004
#define Rt2dObjectDirtyColor 0x00000008
#define Rt2dObjectStringGotNoFonts 0x01000000
struct Rt2dObject
{
@ -357,11 +405,35 @@ struct Rt2dObject
/**
* \ingroup rt2ddatatypes
* \typedef Rt2dObjectCallBack
* typedef for a callback on an object
* \ref Rt2dObjectCallBack
* 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);
/**
* \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
* \ref Rt2dJustificationType
@ -381,6 +453,20 @@ enum 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) ))
#define Rt2dBrushSetWidth(_brush, _width) \
@ -397,7 +483,20 @@ typedef enum Rt2dJustificationType Rt2dJustificationType;
/****************************************************************************
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
@ -407,6 +506,13 @@ Rt2dOpen(RwCamera *cam);
extern void
Rt2dClose(void);
extern void
Rt2dTriVertSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern void
Rt2dTriPolySetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
/*
* PATHS
*/
@ -518,6 +624,12 @@ Rt2dFontSetPath(const RwChar *path);
extern Rt2dFont *
Rt2dFontRead(const RwChar *name);
extern RwBool
Rt2dFontSetReadCallBack(Rt2dFontCallBackRead fpCallBack);
extern Rt2dFontCallBackRead
Rt2dFontGetReadCallBack (void);
extern RwUInt32
_rt2dFontStreamGetSize(Rt2dFont *font);
@ -695,6 +807,10 @@ Rt2dObjectIsObjectString(Rt2dObject *object);
extern Rt2dObject *
Rt2dObjectCopy(Rt2dObject *dst, Rt2dObject *src);
/* in-place dst version, destruction not req */
extern Rt2dObject *
_rt2dObjectCopy(Rt2dObject *dst, Rt2dObject *src);
/*
* HIERARCHICAL SCENE FUNCTIONS - SCENE
*/
@ -766,14 +882,8 @@ Rt2dShapeCreate(void);
extern RwBool
Rt2dShapeDestroy(Rt2dObject * shape);
extern Rt2dBrush *
Rt2dShapeGetNewBrush(Rt2dObject *shape);
extern Rt2dPath *
Rt2dShapeGetNewPath(Rt2dObject *shape);
extern Rt2dObject *
Rt2dShapeAddNode(Rt2dObject *shape, Rt2dPath *path, Rt2dBrush *fill, Rt2dBrush *stroke );
Rt2dShapeAddNode(Rt2dObject *shape, RwUInt32 flag, Rt2dPath *path, Rt2dBrush *brush );
extern RwInt32
Rt2dShapeGetNodeCount(Rt2dObject *shape);
@ -792,9 +902,15 @@ Rt2dShapeRender(Rt2dObject *object);
extern Rt2dObject *
Rt2dShapeMorph(Rt2dObject *result,
Rt2dObject *source,
Rt2dObject *destination,
RwReal alpha);
Rt2dObject *source,
Rt2dObject *destination,
RwReal alpha);
extern Rt2dObject *
Rt2dShapeLock(Rt2dObject * shape);
extern Rt2dObject *
Rt2dShapeUnlock(Rt2dObject * shape);
/*
* HIERARCHICAL SCENE FUNCTIONS - PICK REGION
@ -895,6 +1011,7 @@ Rt2dCTMRead(RwMatrix * result);
#endif /* ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) */
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

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

View File

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

View File

@ -150,480 +150,14 @@
enum rwPLUGIN_ERRENUM
enum e_rwdb_Criterion2DAnim
{
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
* \ingroup rttool
* \ingroup mathtools
*
* Barycentric Toolkit for RenderWare.
*/
@ -32,7 +32,7 @@
/**
* \ingroup rtbary
* \typedef RtBaryV4d
* \ref RtBaryV4d
* 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.
*/
@ -40,7 +40,7 @@ typedef RwReal RtBaryV4d[4];
/**
* \ingroup rtbary
* \typedef RtBaryTransform
* \ref RtBaryTransform
* typedef for the 4x4 homogeneous transform matrix mapping a point
* 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
* \ingroup rttool
* \ingroup mathtools
*
* The Bezier Patch Toolkit is a group of functions that support the way
* RenderWare processes patches.
*/
/**
* \ingroup rtbezpatch
* \typedef RtBezierV4d
* typedef for struct RtBezierV4d.
*/
typedef struct RtBezierV4d RtBezierV4d;
/**
@ -42,7 +37,7 @@ struct RtBezierV4d
/**
* \ingroup rtbezpatch
* \typedef RtBezierRow
* \ref RtBezierRow
* typedef for a row of vectors.
* RtBezierRow is an array of 4 vectors
*/
@ -50,7 +45,7 @@ typedef RtBezierV4d RtBezierRow[4];
/**
* \ingroup rtbezpatch
* \typedef RtBezierMatrix
* \ref RtBezierMatrix
* typedef for a matrix of 4*4 vectors.
* RtBezierMatrix is an array of 4 rows.
*/

View File

@ -129,472 +129,6 @@

View File

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

View File

@ -129,472 +129,6 @@

View File

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

View File

@ -129,472 +129,6 @@

View File

@ -10,15 +10,15 @@
#define RTIMPORT_H
/**
* \defgroup rtimport RtWorldImport
* \ingroup rttool
* \defgroup rtworldimport RtWorldImport
* \ingroup basicgeometry
*
* World Import Toolkit for Renderware.
* World Import Toolkit for RenderWare.
*/
/**
* \defgroup selectors RtWorldImportPartitionSelectors
* \ingroup rtimport
* \ingroup rtworldimport
*
* The set of provided RtWorldImportPartitionSelectors:
* Selects a good partition by calling one of the
@ -29,7 +29,7 @@
/**
* \defgroup iterators RtWorldImportPartitionIterators
* \ingroup rtimport
* \ingroup rtworldimport
*
* The set of provided RtWorldImportPartitionIterators:
* Iterates through a set of candidate partitions, possibly
@ -39,7 +39,7 @@
/**
* \defgroup evaluators RtWorldImportPartitionEvaluators
* \ingroup rtimport
* \ingroup rtworldimport
*
* The set of provided RtWorldImportPartitionEvaluators:
* Uses a combination of statistics, build sector, build status, and
@ -51,7 +51,7 @@
/**
* \defgroup terminators RtWorldImportPartitionTerminators
* \ingroup rtimport
* \ingroup rtworldimport
*
* The set of provided RtWorldImportPartitionTerminators:
* Checks given criteria about the statistics, build sector, build status, and
@ -61,7 +61,7 @@
/**
* \defgroup kd RtWorldImportGuideKD
* \ingroup rtimport
* \ingroup rtworldimport
*
* Tools to manipulate the \ref RtWorldImportGuideKDTree that is used to
* manually build the sectors of a world.
@ -69,7 +69,7 @@
/**
* \defgroup hints RtWorldImportHints
* \ingroup rtimport
* \ingroup rtworldimport
*
* 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.
@ -96,7 +96,7 @@
#define rtWORLDIMPORTPROGRESSBSPCOMPRESSEND 5
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \def rtWORLDIMPORTINVALIDPARTITION
*
* This value means that no partition was found, or that the partition was
@ -104,51 +104,61 @@
*/
#define rtWORLDIMPORTINVALIDPARTITION RwRealMAXVAL
/* maintained in Bin-tree */
#define CONGRUENTVERTEXCHILDREN 2
/* maintained in Quad-tree */
#define WELDVERTEXCHILDREN 4
/****************************************************************************
Global types
*/
/**
* Internal use only
*/
typedef union RtWorldImportVertexState RtWorldImportVertexState;
/**
* \ingroup rtimport
* \typedef RtWorldImportVertex
*
* typedef for struct \ref RtWorldImportVertex
*/
#if (!defined(DOXYGEN))
typedef struct RtWorldImportVertex RtWorldImportVertex;
/**
* \ingroup rtimport
* \typedef RtWorldImportWeldVertex
*
* typedef for struct \ref RtWorldImportWeldVertex
*/
typedef struct RtWorldImportWeldVertex RtWorldImportWeldVertex;
/**
* \ingroup rtimport
* \typedef RtWorldImportBuildVertex
*
* typedef for struct \ref 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
* \typedef RtWorldImportBuildPolyInfo
* \ingroup rtworldimport
* \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;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportBuildPolyInfo
*
* Information about a polygon
@ -167,7 +177,7 @@ struct RtWorldImportBuildPolyInfo
typedef union RtWorldImportBuildVertexMode RtWorldImportBuildVertexMode;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportBuildVertexMode
*
* Mode of the vertex.
@ -182,7 +192,7 @@ union RtWorldImportBuildVertexMode
};
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportBuildVertex
*
* 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 */
};
/**
* \ingroup rtimport
* \typedef RtWorldImportGuideKDTree
*
* typedef for struct \ref RtWorldImportGuideKDTree
*/
typedef struct RtWorldImportGuideKDTree RtWorldImportGuideKDTree;
/* NB Merged RtWorldImportPartition with RtWorldImportBuildClipStatistics because
* 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...
*/
/**
* \ingroup rtimport
* \typedef RtWorldImportBuildClipStatistics
*
* typedef for struct \ref RtWorldImportBuildClipStatistics
*/
typedef struct RtWorldImportBuildClipStatistics RtWorldImportBuildClipStatistics;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportBuildClipStatistics
*
* Holds statistics about a partition or candidate partition during
@ -231,15 +227,15 @@ struct RtWorldImportBuildClipStatistics
{
RwInt32 numPotentialSplit;
/**< The number of polygons split by the partition,
* disgregarding overlaps */
* disregarding overlaps */
RwInt32 numPotentialLeft;
/**< The number of potential polygons and fragments on the
* left of the partition, disgregarding overlaps */
* left of the partition, disregarding overlaps */
RwInt32 numPotentialRight;
/**< The number of potential polygons and fragments on the
* right of the partition, disgregarding overlaps */
* right of the partition, disregarding overlaps */
RwInt32 numActualSplit;
@ -276,15 +272,13 @@ struct RtWorldImportBuildClipStatistics
/**< The actual, relative size of the overlap on the right of the partition */
};
/**
* \ingroup rtimport
* \typedef RtWorldImportPartition
*
* typedef for struct \ref RtWorldImportPartition
/*
* typedef for struct RtWorldImportPartition
*/
typedef struct RtWorldImportPartition RtWorldImportPartition;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportPartition
*
* A partitioning plane.
@ -311,8 +305,14 @@ struct RtWorldImportPartition
/**< The statistics for the partition */
};
/*
* typedef for struct \ref RtWorldImportGuideKDTree
*/
typedef struct RtWorldImportGuideKDTree RtWorldImportGuideKDTree;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportGuideKDTree
* Represents the structure of a binary tree with
* 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;
#if (!defined(DOXYGEN))
struct _rtWorldImportGuideKDStackElement
{
RwBool terminal;
@ -357,16 +358,15 @@ struct _rtWorldImportGuideKDStack
_rtWorldImportGuideKDStackElement *current;
_rtWorldImportGuideKDStackElement *bottom;
};
#endif /* (!defined(DOXYGEN)) */
/**
* \ingroup rtimport
* \typedef RtWorldImportBuildSector
*
* typedef for struct \ref RtWorldImportBuildSector
/*
* typedef for struct RtWorldImportBuildSector
*/
typedef struct RtWorldImportBuildSector RtWorldImportBuildSector;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportBuildSector
*
* Holds information about the sector that is being subdivided
@ -401,15 +401,13 @@ struct RtWorldImportBuildSector
/**< Maximum number of materials in the in the world */
};
/**
* \ingroup rtimport
* \typedef RtWorldImportBuildStatus
*
* typedef for struct \ref RtWorldImportBuildStatus
/*
* typedef for struct RtWorldImportBuildStatus
*/
typedef struct RtWorldImportBuildStatus RtWorldImportBuildStatus;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportBuildStatus
* World Import Build Status Structure
* Used to store the current tree's build status
@ -419,50 +417,41 @@ struct RtWorldImportBuildStatus
RwInt32 depth; /**< current depth in the tree */
};
/**
* Internal use only
*/
union RtWorldImportVertexState
typedef struct RwRGBAUInt32 RwRGBAUInt32;
#if (!defined(DOXYGEN))
struct RwRGBAUInt32
{
/* 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 */
RwUInt32 red, green, blue, alpha;
};
/**
* \ingroup rtimport
* \struct RtWorldImportVertex
* Holds data for each vertex in the import world.
*
*/
struct RtWorldImportVertex
typedef struct RtWorldImportCongruentVertex RtWorldImportCongruentVertex;
struct RtWorldImportCongruentVertex
{
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 */
RwInt32 destIdx;
RtWorldImportVertex vertex;
RtWorldImportVertex Mean;
RwRGBAUInt32 preLitMean;
RwInt32 refCount;
RtWorldImportCongruentVertex *child[CONGRUENTVERTEXCHILDREN];
};
/**
* \ingroup rtimport
* \typedef RtWorldImportTriangle
struct RtWorldImportWeldVertex
{
RtWorldImportVertex *sourcePtr;
RtWorldImportCongruentVertex *CongruentVertex;
RtWorldImportWeldVertex *child[WELDVERTEXCHILDREN];
};
#endif /* (!defined(DOXYGEN)) */
/*
* Holds data for each triangle in the import world.
*
* \see RtWorldImportTriangle
*/
typedef struct RtWorldImportTriangle RtWorldImportTriangle;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportTriangle
* 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
* \typedef RtWorldImportHints
*
* typedef for struct \ref RtWorldImportHints
* \ingroup rtworldimport
* \struct RtWorldImportBBoxHintDesc
* Bounding box hints and (priority) values used to control the world
* 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;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportHints
* Bounding box hints used to control the world sectorization process.
* \see RtWorldImportHintsSet
*/
struct RtWorldImportHints
{
/** The bounding box hints */
RwBBox *boundingBoxes;
/** The number of bounding box hints */
RwInt32 numBoundingBoxes;
RtWorldImportBBoxHintDesc *boundingBoxes; /**< The bounding box hints */
RwInt32 numBoundingBoxes; /**< The number of bounding box hints */
};
/**
* \ingroup rtimport
* \typedef RtWorldImportParameters
* \ingroup rtworldimport
* \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 struct RtWorldImportParameters RtWorldImportParameters;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportParameters
* Parameters used with \ref RtWorldImportCreateWorld.
* 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. */
};
/**
* \ingroup rtimport
* \typedef RtWorldImport
*
* typedef for struct \ref RtWorldImport
/*
* typedef for struct RtWorldImport
*/
typedef struct RtWorldImport RtWorldImport;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImport
* World Import State Structure
*/
@ -583,14 +601,10 @@ struct RtWorldImport
RtWorldImportTriangle *polygons; /**< Triangle array */
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 RtWorldImportSetProgressCallBack.
*
@ -626,65 +640,102 @@ struct RtWorldImport
typedef RwBool (*RtWorldImportProgressCallBack)(RwInt32 msg, RwReal value);
/**
* \ingroup rtimport
* \typedef RtWorldImportDestroyVertexUserdataCallBack
* \ingroup rtworldimport
* \ref RtWorldImportDestroyVertexUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* vertex destruction.
*
* \param pUserdata
*
* \return
*/
typedef RwBool (*RtWorldImportDestroyVertexUserdataCallBack)(void **pUserdata);
/**
* \ingroup rtimport
* \typedef RtWorldImportCloneVertexUserdataCallBack
* \ingroup rtworldimport
* \ref RtWorldImportCloneVertexUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* vertex cloning.
*
* \param pUserdataDst
* \param pUserdataSrc
*
* \return
*/
typedef RwBool (*RtWorldImportCloneVertexUserdataCallBack)(void **pUserdataDst, void **pUserdataSrc);
/**
* \ingroup rtimport
* \typedef RtWorldImportInterpVertexUserdataCallBack
* \ingroup rtworldimport
* \ref RtWorldImportInterpVertexUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* vertex interpolation.
*
* \param pUserdataDst
* \param pUserdata1
* \param pUserdata2
* \param delta
*
* \return
*/
typedef RwBool (*RtWorldImportInterpVertexUserdataCallBack)(void **pUserdataDst, void **pUserdata1, void **pUserdata2, RwReal delta);
/**
* \ingroup rtimport
* \typedef RtWorldImportDestroyPolygonUserdataCallBack
* \ingroup rtworldimport
* \ref RtWorldImportDestroyPolygonUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* polygon destruction.
*
* \param pUserdata
*
* \return
*/
typedef RwBool (*RtWorldImportDestroyPolygonUserdataCallBack)(void **pUserdata);
/**
* \ingroup rtimport
* \typedef RtWorldImportSplitPolygonUserdataCallBack
* \ingroup rtworldimport
* \ref RtWorldImportSplitPolygonUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* polygon division.
*
* \param pUserdataDst
* \param pUserdataSrc
*
* \return
*/
typedef RwBool (*RtWorldImportSplitPolygonUserdataCallBack)(void **pUserdataDst, void **pUserdataSrc);
/**
* \ingroup rtimport
* \typedef RtWorldImportSectorSetVertexUserdataCallBack
* \ingroup rtworldimport
* \ref RtWorldImportSectorSetVertexUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* the setting of the vertex user data.
*
* \param pUserdata
* \param sector
* \param index
*
* \return
*/
typedef RwBool (*RtWorldImportSectorSetVertexUserdataCallBack)(void **pUserdata, RpWorldSector *sector, RwInt32 index);
/**
* \ingroup rtimport
* \typedef RtWorldImportSectorSetPolygonUserdataCallBack
* \ingroup rtworldimport
* \ref RtWorldImportSectorSetPolygonUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* the setting of the polygon user data.
*
* \param pUserdata
* \param sector
* \param index
*
* \return
*/
typedef RwBool (*RtWorldImportSectorSetPolygonUserdataCallBack)(void **pUserdata, RpWorldSector *sector, RwInt32 index);
@ -692,12 +743,18 @@ typedef RwBool (*RtWorldImportSectorSetPolygonUserdataCallBack)(void **pUserdata
/**
* \ingroup rtimport
* \typedef RtWorldImportTerminationBuildCallBack
* \ingroup rtworldimport
* \ref RtWorldImportTerminationBuildCallBack
*
* A pointer to the function that will be called during the
* build process to determine whether the current sector should
* be subdivided further, or terminated.
*
* \param buildSector
* \param buildStatus
* \param pData
*
* \return
*/
typedef RwBool (*RtWorldImportTerminationBuildCallBack)
(RtWorldImportBuildSector *buildSector,
@ -705,11 +762,17 @@ typedef RwBool (*RtWorldImportTerminationBuildCallBack)
void *pData);
/**
* \ingroup rtimport
* \typedef RtWorldImportPartitionBuildCallBack
* \ingroup rtworldimport
* \ref RtWorldImportPartitionBuildCallBack
*
* A pointer to the function that will be called during the
* build process to select a suitable sector partition.
*
* \param buildSector
* \param buildStatus
* \param partition
*
* \return
*/
typedef RwReal (*RtWorldImportPartitionBuildCallBack)
(RtWorldImportBuildSector *buildSector,
@ -717,15 +780,13 @@ typedef RwReal (*RtWorldImportPartitionBuildCallBack)
RtWorldImportPartition *partition,
void *pData);
/**
* \ingroup rtimport
* \typedef RtWorldImportBuildCallBacks
*
/*
* typedef for struct \ref RtWorldImportBuildCallBacks
*/
typedef struct RtWorldImportBuildCallBacks RtWorldImportBuildCallBacks; /* MAYBE: rename to SectorCallBacks ?*/
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportBuildCallBacks
* Sectorization callbacks
*/
@ -741,15 +802,13 @@ struct RtWorldImportBuildCallBacks
/**< Termination callback user data */
};
/**
* \ingroup rtimport
* \typedef RtWorldImportUserdataCallBacks
*
/*
* typedef for struct \ref RtWorldImportUserdataCallBacks
*/
typedef struct RtWorldImportUserdataCallBacks RtWorldImportUserdataCallBacks;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportUserdataCallBacks
* Bundle of callbacks
*/
@ -772,8 +831,8 @@ struct RtWorldImportUserdataCallBacks
};
/**
* \ingroup rtimport
* \typedef RtWorldImportBuildPartitionSelector
* \ingroup rtworldimport
* \ref RtWorldImportBuildPartitionSelector
*
* An enumeration that can be passed to
* \ref RtWorldImportSetStandardBuildPartitionSelector to determine
@ -821,8 +880,6 @@ extern "C"
extern RwBool
_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
_rtWorldImportGuideKDCopy(RtWorldImportGuideKDTree *KD, RpSector *spSector, RwInt32 depth);
extern void _rtWorldImportGuideKDStackDestroy(_rtWorldImportGuideKDStack *stack);
@ -862,6 +919,12 @@ RtWorldImportMaterialSeparatePartitionSelector(RtWorldImportBuildSector *buildSe
RtWorldImportBuildStatus *buildStatus,
RtWorldImportPartition *partition,
void *userData);
extern RwReal
RtWorldImportPartitionHintPartitionSelector(RtWorldImportBuildSector *buildSector,
RtWorldImportBuildStatus *buildStatus,
RtWorldImportPartition *partition,
void * __RWUNUSED__ userData);
extern RwReal
RtWorldImportMaximumOccluderPartitionSelector(RtWorldImportBuildSector *buildSector,
@ -1109,14 +1172,13 @@ RtWorldImportSectorAspectSizePartitionTerminator(RtWorldImportBuildSector * buil
/* END TODO */
/* WorldImport hints */
extern void
RtWorldImportHintsSet(RtWorldImportHints *hints);
RtWorldImportHintsSetGroup(RtWorldImportHints *hints, RtWorldImportHintGroup group);
extern RtWorldImportHints *
RtWorldImportHintsGet(void);
RtWorldImportHintsGetGroup(RtWorldImportHintGroup group);
extern RtWorldImportHints *
RtWorldImportHintsCreate(void);
@ -1175,14 +1237,6 @@ extern RwInt32 RtWorldImportGetNumTriangles(RtWorldImport * nohsworld);
extern RtWorldImportTriangle *
RtWorldImportGetTriangles(RtWorldImport * nohsworld);
/* Surface lighting characteristics */
extern RtWorldImport *
RtWorldImportSetSurfaceProperties(RtWorldImport * world,
RwSurfaceProperties *
surface);
extern RwSurfaceProperties *
RtWorldImportGetSurfaceProperties(RtWorldImport * world);
/* Progress callbacks */
extern void
@ -1254,6 +1308,12 @@ RtWorldImportSetStandardBuildPartitionSelector(RtWorldImportBuildPartitionSelect
#define RtWorldImportParametersInitialize(_paramsPtr) \
*(_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 */

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
/**
* \defgroup rtintersect RtIntersection
* \ingroup rttool
* \defgroup rtintersection RtIntersection
* \ingroup mathtools
*
* Object Intersection Toolkit for RenderWare.
*/

View File

@ -128,472 +128,6 @@

View File

@ -1,7 +1,7 @@
/**
* \defgroup rtltmap RtLtMap
* \ingroup rttool
* \ingroup lighting
*
* Lightmap Generation Toolkit for RenderWare.
*/
@ -21,7 +21,6 @@
/**
* \ingroup rtltmap
* \typedef RtLtMapIlluminateSampleCallBack
* \ref RtLtMapIlluminateSampleCallBack is the callback to be called, from
* within \ref RtLtMapIlluminate, for groups of samples in the objects
* currently being illuminated.
@ -32,7 +31,7 @@
*
* This callback will receive an array of color values to fill in, each
* 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.
* It will receive positions (in world-space) for each sample and the normal
* vector (again, in world-space) of each sample (normals are interpolated
@ -82,7 +81,6 @@ typedef RwRGBA *(*RtLtMapIlluminateSampleCallBack)(RwRGBA *results,
/**
* \ingroup rtltmap
* \typedef RtLtMapIlluminateVisCallBack
* \ref RtLtMapIlluminateVisCallBack is the callback to be called, from
* within \ref RtLtMapIlluminate, to determine the visibility between a
* sample and a light.
@ -111,11 +109,11 @@ typedef RwRGBA *(*RtLtMapIlluminateSampleCallBack)(RwRGBA *results,
* expressed by modifying the RwRGBAReal value. This defaults to bright
* 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
* 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
* \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
* relevant \ref RtLtMapObjectFlags and \ref RtLtMapMaterialFlags but it
* does not filter light; visibility is determined to be either one or zero.
@ -141,7 +139,6 @@ typedef RwBool (*RtLtMapIlluminateVisCallBack)(RpWorld *world,
/**
* \ingroup rtltmap
* \typedef RtLtMapIlluminateProgressCallBack
* \ref RtLtMapIlluminateProgressCallBack is the callback to be called, from
* within \ref RtLtMapIlluminate, to allow a user to track lighting progress.
*
@ -214,17 +211,17 @@ typedef enum RtLtMapProgressMessage RtLtMapProgressMessage;
typedef struct RtLtMapLightingSession RtLtMapLightingSession;
/**
* \ingroup rtltmap
* \typedef RtLtMapLightingSession
* The \ref RtLtMapLightingSession structure holds information to be passed to
* \struct RtLtMapLightingSession
* The RtLtMapLightingSession structure holds information to be passed to
* \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
* 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
* 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 RtLtMapLightMapsDestroy and \ref RtLtMapAreaLightGroupCreate,
* though not all of the session structure's member will be used in
@ -327,7 +324,7 @@ typedef enum RtLtMapMaterialFlags RtLtMapMaterialFlags;
/**
* \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
* atomics. These values will be taken into consideration within
* \ref RtLtMapLightMapsCreate and \ref RtLtMapIlluminate.
@ -345,11 +342,11 @@ enum RtLtMapObjectFlags
rtLTMAPOBJECTNAFLAG = 0,
rtLTMAPOBJECTLIGHTMAP = 1, /**< This object is to be lightmapped */
rtLTMAPOBJECTVERTEXLIGHT = 2, /**< This object's vertex prelight colours should
* be lit within \ref RtLtMapIlluminate. */
rtLTMAPOBJECTVERTEXLIGHT = 2, /**< This object's vertex prelight colors should
be lit within \ref RtLtMapIlluminate. */
rtLTMAPOBJECTNOSHADOW = 4, /**< This object does not cast shadows (useful, for
* example, for moving objects for which dynamic
* shadows are to be rendered - such as doors) */
example, for moving objects for which dynamic
shadows are to be rendered - such as doors) */
rtLTMAPOBJECTFLAGFORCEENUMSIZEINT = 0x7FFFFFFF
};
@ -358,10 +355,13 @@ typedef enum RtLtMapObjectFlags RtLtMapObjectFlags;
/* Area-lighting stuff:*
***********************/
typedef struct RtLtMapAreaLightGroup RtLtMapAreaLightGroup;
/**
* \ingroup rtltmap
* \typedef RtLtMapAreaLightGroup
* \ref RtLtMapAreaLightGroup is a structure which acts as a container
* \struct RtLtMapAreaLightGroup
* RtLtMapAreaLightGroup is a structure which acts as a container
* for area lights created by a call to \ref RtLtMapAreaLightGroupCreate.
* The containers may be chained and passed to \ref RtLtMapIlluminate.
* Each container has an optional pointer to a RwFrame which is used to
@ -376,7 +376,6 @@ typedef enum RtLtMapObjectFlags RtLtMapObjectFlags;
* \see RtLtMapIlluminate
* \see RtLtMapIlluminateVisCallBack
*/
typedef struct RtLtMapAreaLightGroup RtLtMapAreaLightGroup;
struct RtLtMapAreaLightGroup
{
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) */
typedef struct LtMapAreaLightMesh LtMapAreaLightMesh;
#if (!defined(DOXYGEN))
struct LtMapAreaLightMesh
{
RwUInt32 flags; /* To hold hierarchical visibility culling flags,
* 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 */
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) */
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) */
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
@ -487,6 +519,12 @@ RtLtMapDefaultVisCallBack(RpWorld *world,
RwV3d *lightPos,
RpLight __RWUNUSED__ *light);
extern void
RtLtMapSetVisCallBackCollisionScalar(RwReal scalar);
extern RwReal
RtLtMapGetVisCallBackCollisionScalar(void);
extern RtLtMapLightingSession *
RtLtMapLightingSessionInitialize(RtLtMapLightingSession *session,
RpWorld *world);
@ -562,7 +600,6 @@ extern RwBool
RtLtMapSetAreaLightErrorCutoff(RwReal tolerance);
/* Texture-saving functionality: */
extern RwTexDictionary *
RtLtMapTexDictionaryCreate(RtLtMapLightingSession *session);
@ -588,7 +625,13 @@ extern RpAtomic *RtLtMapSkyAtomicBaseTexturesProcess(RpAtomic *atomic);
extern RpWorldSector *
RtLtMapSkyWorldSectorBaseTexturesProcess(RpWorldSector *sector);
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)) */

View File

@ -138,472 +138,6 @@

View File

@ -15,9 +15,9 @@
/**
* \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
* \ingroup rttool
* \ingroup collisiondetection
*
* Picking Toolkit for RenderWare.
*/

View File

@ -128,472 +128,6 @@

View File

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

View File

@ -182,472 +182,6 @@

View File

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

View File

@ -129,472 +129,6 @@

View File

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

View File

@ -145,472 +145,6 @@

View File

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

View File

@ -128,472 +128,6 @@

View File

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

View File

@ -146,472 +146,6 @@

View File

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

View File

@ -128,472 +128,6 @@

View File

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

View File

@ -129,472 +129,6 @@

View File

@ -129,472 +129,6 @@

View File

@ -14,7 +14,7 @@
/**
* \defgroup rtworld RtWorld
* \ingroup rttool
* \ingroup basicgeometry
*
* 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++){
frames[i].nodeID = HIERNODEID(hier, i);
frames[i].resetPos = boneTab[i];
#ifdef LIBRW
frames[i].hanimFrame = (RpHAnimStdKeyFrame*)rpHANIMHIERARCHYGETINTERPFRAME(hier, i);
#else
frames[i].hanimFrame = (RpHAnimStdKeyFrame*)rtANIMGETINTERPFRAME(hier->currentAnim, i);
#endif
}
clumpData->ForAllFrames(FrameInitCBskin, nil);
clumpData->frames[0].flag |= AnimBlendFrameData::VELOCITY_EXTRACTION;

View File

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

View File

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