diff options
author | Fire_Head <Fire-Head@users.noreply.github.com> | 2020-07-29 11:20:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-29 11:20:02 +0200 |
commit | 52e77c66345399f7f1064b80676a2495e299bb46 (patch) | |
tree | 358b7762beb8809084c65358087d5899e4546f18 /rwsdk/include/d3d8 | |
parent | miami shadows (diff) | |
parent | some fakerw additions for shadows; update librw (diff) | |
download | re3-52e77c66345399f7f1064b80676a2495e299bb46.tar re3-52e77c66345399f7f1064b80676a2495e299bb46.tar.gz re3-52e77c66345399f7f1064b80676a2495e299bb46.tar.bz2 re3-52e77c66345399f7f1064b80676a2495e299bb46.tar.lz re3-52e77c66345399f7f1064b80676a2495e299bb46.tar.xz re3-52e77c66345399f7f1064b80676a2495e299bb46.tar.zst re3-52e77c66345399f7f1064b80676a2495e299bb46.zip |
Diffstat (limited to 'rwsdk/include/d3d8')
92 files changed, 2509 insertions, 25404 deletions
diff --git a/rwsdk/include/d3d8/baaplylt.c b/rwsdk/include/d3d8/baaplylt.c deleted file mode 100644 index ad518e6a..00000000 --- a/rwsdk/include/d3d8/baaplylt.c +++ /dev/null @@ -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(); -} diff --git a/rwsdk/include/d3d8/rpanisot.h b/rwsdk/include/d3d8/rpanisot.h index 4f4445a4..323786f4 100644 --- a/rwsdk/include/d3d8/rpanisot.h +++ b/rwsdk/include/d3d8/rpanisot.h @@ -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 diff --git a/rwsdk/include/d3d8/rpanisot.rpe b/rwsdk/include/d3d8/rpanisot.rpe index 5216ec9c..0464081f 100644 --- a/rwsdk/include/d3d8/rpanisot.rpe +++ b/rwsdk/include/d3d8/rpanisot.rpe @@ -160,472 +160,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionLabel { diff --git a/rwsdk/include/d3d8/rpcollis.h b/rwsdk/include/d3d8/rpcollis.h index 908fb68e..23e67f35 100644 --- a/rwsdk/include/d3d8/rpcollis.h +++ b/rwsdk/include/d3d8/rpcollis.h @@ -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 diff --git a/rwsdk/include/d3d8/rpcollis.rpe b/rwsdk/include/d3d8/rpcollis.rpe index 3e891755..49ad286f 100644 --- a/rwsdk/include/d3d8/rpcollis.rpe +++ b/rwsdk/include/d3d8/rpcollis.rpe @@ -158,472 +158,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionCollis { diff --git a/rwsdk/include/d3d8/rpcriter.h b/rwsdk/include/d3d8/rpcriter.h index c1af25b8..de55389f 100644 --- a/rwsdk/include/d3d8/rpcriter.h +++ b/rwsdk/include/d3d8/rpcriter.h @@ -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 permission 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. - * - */ diff --git a/rwsdk/include/d3d8/rpdbgerr.c b/rwsdk/include/d3d8/rpdbgerr.c index 0c83c04e..70bc941d 100644 --- a/rwsdk/include/d3d8/rpdbgerr.c +++ b/rwsdk/include/d3d8/rpdbgerr.c @@ -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 diff --git a/rwsdk/include/d3d8/rpdbgerr.h b/rwsdk/include/d3d8/rpdbgerr.h index 6918469a..e0500057 100644 --- a/rwsdk/include/d3d8/rpdbgerr.h +++ b/rwsdk/include/d3d8/rpdbgerr.h @@ -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 diff --git a/rwsdk/include/d3d8/rpdmorph.h b/rwsdk/include/d3d8/rpdmorph.h index 1494bf3d..89c51b31 100644 --- a/rwsdk/include/d3d8/rpdmorph.h +++ b/rwsdk/include/d3d8/rpdmorph.h @@ -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 ); diff --git a/rwsdk/include/d3d8/rpdmorph.rpe b/rwsdk/include/d3d8/rpdmorph.rpe index a5202425..b35acc4e 100644 --- a/rwsdk/include/d3d8/rpdmorph.rpe +++ b/rwsdk/include/d3d8/rpdmorph.rpe @@ -160,472 +160,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionDMorph { diff --git a/rwsdk/include/d3d8/rphanim.h b/rwsdk/include/d3d8/rphanim.h index a9b0438a..0d1bba7a 100644 --- a/rwsdk/include/d3d8/rphanim.h +++ b/rwsdk/include/d3d8/rphanim.h @@ -26,7 +26,6 @@ * Purpose : Hierarchical animation * * * **************************************************************************/ - #ifndef RPHANIM_H #define RPHANIM_H @@ -38,7 +37,7 @@ /** * \defgroup rphanim RpHAnim - * \ingroup rpplugin + * \ingroup objectframehanim * * Hierarchical Animation Plugin for RenderWare Graphics. */ @@ -66,45 +65,26 @@ */ #include <rphanim.rpe> /* automatically generated header file */ #include <rtquat.h> +#include <rtanim.h> #define rpHANIMSTREAMCURRENTVERSION 0x100 -/** - * \ingroup rphanim - * \ref RpHAnimAtomicGlobalVars typedef for struct RpHAnimAtomicGlobalVars - */ +#if (!defined(DOXYGEN)) + typedef struct RpHAnimAtomicGlobalVars RpHAnimAtomicGlobalVars; -/** - * \ingroup rphanim - * \struct RpHAnimAtomicGlobalVars - */ struct RpHAnimAtomicGlobalVars { - RwInt32 engineOffset ; /* Offset into global data */ + RwInt32 engineOffset; RwFreeList *HAnimFreeList; - RwFreeList *HAnimAnimationFreeList; }; -extern RpHAnimAtomicGlobalVars RpHAnimAtomicGlobals; +#endif /* (!defined(DOXYGEN)) */ -#define rpHANIMSTDKEYFRAMESIZE sizeof(RpHAnimStdKeyFrame) +#define rpHANIMSTDKEYFRAMESIZE sizeof(RpHAnimKeyFrame) #define rpHANIMSTDKEYFRAMETYPEID 0x1 -#define RwAnimMalloc() \ - RwFreeListAlloc(RpHAnimAtomicGlobals.HAnimFreeList) - -#define RwAnimFree(_anim) \ - RwFreeListFree(RpHAnimAtomicGlobals.HAnimFreeList, (_anim)) - -#define RwAnimAnimationMalloc() \ - RwFreeListAlloc(RpHAnimAtomicGlobals.HAnimAnimationFreeList) - -#define RwAnimAnimationFree(_animAnimation) \ - RwFreeListFree(RpHAnimAtomicGlobals.HAnimAnimationFreeList, \ - (_animAnimation)) - -#define RpV3dInterpolate(o, a, s, b) \ +#define RpV3dInterpolate(o,a,s,b) \ MACRO_START \ { \ (o)->x = (((a)->x) + ((s)) * (((b)->x) - ((a)->x))); \ @@ -113,223 +93,57 @@ MACRO_START \ } \ MACRO_STOP -/** - * \ingroup rphanim - * \ref RpHAnimHierarchy typedef for struct RpHAnimHierarchy - */ -typedef struct RpHAnimHierarchy RpHAnimHierarchy; - -/** - * \ingroup rphanim - * \ref RpHAnimAnimation typedef for struct RpHAnimAnimation - */ -typedef struct RpHAnimAnimation RpHAnimAnimation; - -/** - * \ingroup rphanim - * \ref RpHAnimHierarchyCallBack - * This typedef defines a callback function for use with the - * \ref RpHAnimHierarchySetAnimCallBack and - * \ref RpHAnimHierarchySetAnimLoopCallBack functions. - * - * \param hierarchy - * A pointer to the AnimHierarchy structure. - * - * \param data User-defined data. - * You can use this to pass your own data - * structure(s) to the callback function. - * - * \see RpHAnimHierarchySetAnimCallBack - * \see RpHAnimHierarchySetAnimLoopCallBack - * - */ - -typedef RpHAnimHierarchy * (*RpHAnimHierarchyCallBack) (RpHAnimHierarchy *hierarchy, - void *data); - -/* - * The following CallBacks are needed for each overloaded interpolation - * scheme. See RpHAnimInterpolatorInfo. - */ - -/** - * \ingroup rphanim - * \ref RpHAnimKeyFrameToMatrixCallBack - * This typedef defines a callback function for converting - * an animation keyframe into a modeling matrix. The output matrix will be - * used to construct the array of world or local space matrices for the - * hierarchy as obtained with \ref RpHAnimHierarchyGetMatrixArray, and - * possibly used for updating an external \ref RwFrame hierarchy. - * - * \param matrix This is the matrix to store the output of the conversion - * \param voidIFrame This is a void pointer to the keyframe and should be cast - * to the keyframe type this callback is for. - */ -typedef void (*RpHAnimKeyFrameToMatrixCallBack) (RwMatrix *matrix, void *voidIFrame); - -/** - * \ingroup rphanim - * \ref RpHAnimKeyFrameBlendCallBack - * This typedef defines a callback function for blending between two animation - * keyframes by the given blend factor. - * - * \param voidOut This is the void pointer for the output of the blend - * \param voidIn1 First input keyframe - * \param voidIn2 Second input keyframe - * \param alpha Blend factor - */ -typedef void (*RpHAnimKeyFrameBlendCallBack) (void *voidOut, void *voidIn1, - void *voidIn2, RwReal alpha); - -/** - * \ingroup rphanim - * \ref RpHAnimKeyFrameInterpolateCallBack - * This typedef defines a callback function for interpolating between two - * animation keyframes according to the given time. - * - * \param voidOut This is the void pointer for the output of the - * interpolation - * \param voidIn1 First input keyframe - * \param voidIn2 Second input keyframe - * \param time Time at which to interpolate - */ -typedef void (*RpHAnimKeyFrameInterpolateCallBack) (void *voidOut, void *voidIn1, - void *voidIn2, RwReal time); - -/** - * \ingroup rphanim - * \ref RpHAnimKeyFrameAddCallBack - * This typedef defines a callback function for adding together two animation - * keyframes. One of the keyframes would usually be a delta. - * - * \param voidOut This is the void pointer for the output summed keyframe - * \param voidIn1 First input keyframe - * \param voidIn2 Second input keyframe - */ -typedef void (*RpHAnimKeyFrameAddCallBack) (void *voidOut, void *voidIn1, - void *voidIn2); - -/** - * \ingroup rphanim - * \ref RpHAnimKeyFrameMulRecipCallBack - * This typedef defines a callback function for multiplying a keyframe - * by the inverse of another keyframe - * - * \param voidFrame This is the void pointer for the keyframe to be modified - * \param voidStart First start keyframe to take the reciprocal of. - */ -typedef void (*RpHAnimKeyFrameMulRecipCallBack) (void *voidFrame, void *voidStart); - -/** - * \ingroup rphanim - * \ref RpHAnimKeyFrameStreamReadCallBack - * This typedef defines a callback function for reading in keyframes - * from an \ref RwStream for the given animation. - * - * \param stream The stream to read the keyframes from - * \param animation The animation to read the keyframes into - * - * \return Pointer to the animation. - */ -typedef RpHAnimAnimation * (*RpHAnimKeyFrameStreamReadCallBack) (RwStream *stream, RpHAnimAnimation *animation); - -/** - * \ingroup rphanim - * \ref RpHAnimKeyFrameStreamWriteCallBack - * This typedef defines a callback function for writing keyframes from the - * given animation to an \ref RwStream. - * - * \param animation The animation to write out from - * \param stream The stream to write the keyframes to - * - * \return TRUE if successful. - */ -typedef RwBool (*RpHAnimKeyFrameStreamWriteCallBack) (RpHAnimAnimation *animation, RwStream *stream); - -/** - * \ingroup rphanim - * \ref RpHAnimKeyFrameStreamGetSizeCallBack - * This typedef defines a callback function for calculating the binary stream - * size of keyframe data within an animation. - * - * \param animation The animation to calculate sizes of - * - * \return Size in bytes of the keyframe data. - */ -typedef RwInt32 (*RpHAnimKeyFrameStreamGetSizeCallBack) (RpHAnimAnimation *animation); /** * \ingroup rphanim - * \ref RpHAnimInterpolatorInfo - * typedef for struct \ref RpHAnimInterpolatorInfo + * \ref RpHAnimKeyFrame + * typedef for struct RpHAnimKeyFrame. Based on \ref RtAnimKeyFrameHeader. */ -typedef struct RpHAnimInterpolatorInfo RpHAnimInterpolatorInfo; +typedef struct RpHAnimKeyFrame RpHAnimKeyFrame; /** * \ingroup rphanim - * \struct RpHAnimInterpolatorInfo - * This is used to hold information for a keyframe interpolation scheme. - * - * \see RpHAnimRegisterInterpolationScheme - * \see RpHAnimGetInterpolatorInfo + * \struct RpHAnimKeyFrame + * A structure representing the standard keyframe data. Sequences of + * such keyframes in an \ref RtAnimAnimation defines the animation of each + * node in a hierarchy. */ -struct RpHAnimInterpolatorInfo +struct RpHAnimKeyFrame { - RwInt32 typeID; /**< The ID of the interpolation scheme */ - RwInt32 keyFrameSize; /**< Size in bytes of the keyframe structure */ - RpHAnimKeyFrameToMatrixCallBack keyFrameToMatrixCB; /**< Pointer to a function that converts a keyframe to a matrix */ - RpHAnimKeyFrameBlendCallBack keyFrameBlendCB; /**< Pointer to a function that blends between a pair of keyframes for a given delta value */ - RpHAnimKeyFrameInterpolateCallBack keyFrameInterpolateCB; /**< Pointer to a function that interpolates between two keyframes for a given time in between */ - RpHAnimKeyFrameAddCallBack keyFrameAddCB; /**< Pointer to a function that adds two keyframes (one of which may be a delta) */ - RpHAnimKeyFrameMulRecipCallBack keyFrameMulRecipCB; /**< Pointer to a function that multiplies a keyframe by the reciprocal of another */ - RpHAnimKeyFrameStreamReadCallBack keyFrameStreamReadCB; /**< Pointer to a function that reads the keyframes from a stream for a given animation */ - RpHAnimKeyFrameStreamWriteCallBack keyFrameStreamWriteCB; /**< Pointer to a function that writes the keyframes to a stream for a given animation */ - RpHAnimKeyFrameStreamGetSizeCallBack keyFrameStreamGetSizeCB; /**< Pointer to a function that returns the binary stream size of the keyframes for a given animation */ + RpHAnimKeyFrame *prevFrame; /**< Pointer to the previous keyframe */ + RwReal time; /**< Time at keyframe */ + RtQuat q; /**< Quaternion rotation at keyframe */ + RwV3d t; /**< Translation at keyframe */ }; /** * \ingroup rphanim - * \ref RpHAnimKeyFrameHeader - * typedef for struct RpHAnimKeyFrameHeader + * \ref RpHAnimInterpFrame + * typedef for struct RpHAnimInterpFrame. Based on \ref RtAnimInterpFrameHeader. */ -typedef struct RpHAnimKeyFrameHeader RpHAnimKeyFrameHeader; +typedef struct RpHAnimInterpFrame RpHAnimInterpFrame; /** * \ingroup rphanim - * \struct RpHAnimKeyFrameHeader - * Holds header information for a keyframe. All keyframe structures used with - * the overloadable interpolation system should start with this data. - * - * \see RpHAnimStdKeyFrame - * \see RpHAnimRegisterInterpolationScheme + * \struct RpHAnimInterpFrame + * A structure representing an interpolated keyframe. The initial part of the + * structure matches \ref RtAnimInterpFrameHeader. */ -struct RpHAnimKeyFrameHeader +struct RpHAnimInterpFrame { - void *prevFrame; /**< Previous keyframe for particular hierarchy node */ - RwReal time; /**< Time at keyframe */ + RpHAnimKeyFrame *keyFrame1; + /**< Pointer to 1st keyframe of current interpolation pair */ + RpHAnimKeyFrame *keyFrame2; + /**< Pointer to 2nd keyframe of current interpolation pair */ + RtQuat q; /**< Quaternion rotation */ + RwV3d t; /**< Translation */ }; /** * \ingroup rphanim - * \ref RpHAnimStdKeyFrame - * typedef for struct RpHAnimStdKeyFrame - */ -typedef struct RpHAnimStdKeyFrame RpHAnimStdKeyFrame; - -/** - * \ingroup rphanim - * \struct RpHAnimStdKeyFrame - * A structure representing the standard keyframe data. Sequences of - * such keyframes in an \ref RpHAnimAnimation defines the animation of each - * node in a hierarchy. + * \ref RpHAnimHierarchy typedef for struct RpHAnimHierarchy */ -struct RpHAnimStdKeyFrame -{ - RpHAnimStdKeyFrame *prevFrame; /**< Previous keyframe for particular hierarchy node */ - RwReal time; /**< Time at keyframe */ - RtQuat q; /**< Quaternion rotation at keyframe */ - RwV3d t; /**< Translation at keyframe */ -}; +typedef struct RpHAnimHierarchy RpHAnimHierarchy; /* Flags for FrameInfos */ @@ -347,54 +161,23 @@ typedef struct RpHAnimNodeInfo RpHAnimNodeInfo; * \ingroup rphanim * \struct RpHAnimNodeInfo * + * Used to describe a hierarchy toplogy. + * It holds flags representing its position in the + * hierarchy as well as a pointer to the matching \ref RwFrame if the + * hierarchy has been attached to a \ref RwFrame hierarchy. + * */ struct RpHAnimNodeInfo { - RwInt32 nodeID; /**< User defined ID for this node */ - RwInt32 nodeIndex; /**< Array index of node */ + RwInt32 nodeID; /**< User defined ID for this node */ + RwInt32 nodeIndex; /**< Array index of node */ RwInt32 flags; /**< Matrix push/pop flags */ RwFrame * pFrame; /**< Pointer to an attached RwFrame (see \ref RpHAnimHierarchyAttach) */ }; /** * \ingroup rphanim - * \struct RpHAnimAnimation - * A hierarchical animation consists of an array of keyframe structures, - * along with some flags and a duration. - * - * The keyframes should be presented in the order they are needed - * to animate forwards through time. Pointers link all of the keyframes - * for a particular node backwards through time in a list. - * - * For example, a 3 node animation, with keyframes at the following times: - * - * Node 1: 0.0, 1.0, 2.0, 3.0 - * Node 2: 0.0, 3.0 - * Node 3: 0.0, 2.0, 2.5, 3.0 - * - * should be formatted in an RpHAnimAnimation animation like this: - * - * B1,0.0 B2,0.0 B3,0.0 B1,1.0, B2,3.0, B3,2.0, B1,2.0, B1,3.0, B3,2.5 B3,3.0 - * - * Each node MUST start at time = 0.0, and each node must terminate with a keyframe - * at time = duration of animation. - * - * \see RpHAnimAnimationCreate - */ -struct RpHAnimAnimation -{ - RpHAnimInterpolatorInfo *interpInfo; /**< Pointer to interpolation scheme information */ - RwInt32 numFrames; /**< Number of keyframes in the animation */ - RwInt32 flags; /**< Specifies details about animation, relative translation modes etc */ - RwReal duration; /**< Duration of animation in seconds */ - void *pFrames; /**< Pointer to the animation keyframes */ -}; - -/** - * \ingroup rphanim * \ref RpHAnimHierarchyFlag defines type and update modes in HAnimHierarchies - * - * \see RpAnimHierarchyFlag */ enum RpHAnimHierarchyFlag { @@ -411,9 +194,7 @@ enum RpHAnimHierarchyFlag rpHANIMHIERARCHYFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }; -/** - * \ingroup rphanim - * \typedef RpHAnimHierarchyFlag +/* * These flags are used to control the creation and * update status of the hierarchy */ @@ -422,13 +203,7 @@ typedef enum RpHAnimHierarchyFlag RpHAnimHierarchyFlag; /** * \ingroup rphanim * \struct RpHAnimHierarchy - * An RpHAnimHierarchy is used to "play back" an animation - it holds the - * interpolated keyframe data for the current state of an animation - * concatenated on the end of the structure. - * - * The rpHANIMHIERARCHYGETINTERPFRAME() macro can be used to access the current - * interpolated data, for the current time or to write to this data to override - * it with procedural animation. + * An RpHAnimHierarchy is used to "play back" an animation. * * The structure of a hierarchy is defined by an array * of \ref RpHAnimNodeInfo structures. @@ -443,48 +218,18 @@ struct RpHAnimHierarchy { RwInt32 flags; /**< Flags for the hierarchy */ RwInt32 numNodes; /**< Number of nodes in the hierarchy */ - RpHAnimAnimation *pCurrentAnim; /**< Current animation applied to hierarchy */ - RwReal currentTime; /**< Current animation time */ - void *pNextFrame; /**< Next animation keyframe to be played */ - RpHAnimHierarchyCallBack pAnimCallBack; /**< Animation callback function pointer */ - void *pAnimCallBackData; /**< Animation callback function user data */ - RwReal animCallBackTime; /**< Trigger time for callback function */ - RpHAnimHierarchyCallBack pAnimLoopCallBack; /**< Animation loop callback function pointer */ - void *pAnimLoopCallBackData; /**< Animation loop callback function data */ + RwMatrix *pMatrixArray; /**< Pointer to node matrices*/ void *pMatrixArrayUnaligned; /**< Pointer to memory used for node matrices * from which the aligned pMatrixArray is allocated */ RpHAnimNodeInfo *pNodeInfo; /**< Array of node information (push/pop flags etc) */ RwFrame *parentFrame; /**< Pointer to the Root RwFrame of the hierarchy this * RpHAnimHierarchy represents */ - RwInt32 maxKeyFrameSize; /**< Maximum size of keyframes usable on this hierarhcy - * (set at creation time) */ - RwInt32 currentKeyFrameSize; /**< Size of keyframes in the current animation */ - RpHAnimKeyFrameToMatrixCallBack keyFrameToMatrixCB; /**< Internal use */ - RpHAnimKeyFrameBlendCallBack keyFrameBlendCB; /**< Internal use */ - RpHAnimKeyFrameInterpolateCallBack keyFrameInterpolateCB; /**< Internal use */ - RpHAnimKeyFrameAddCallBack keyFrameAddCB; /**< Internal use */ RpHAnimHierarchy *parentHierarchy; /**< Internal use */ - RwInt32 offsetInParent; /**< Internal use */ RwInt32 rootParentOffset; /**< Internal use */ -}; -#define rpHANIMHIERARCHYGETINTERPFRAME( hierarchy, nodeIndex ) \ - ( (void *)( ( (RwUInt8 *)&(hierarchy[1]) + \ - ((nodeIndex) * \ - hierarchy->currentKeyFrameSize) ) ) ) - -#define rpHANIMHIERARCHYGETINTERPFRAME1( hierarchy, nodeIndex ) \ - ( (void *)( ( (RwUInt8 *)&(hierarchy[1]) + \ - ((hierarchy->numNodes + \ - (nodeIndex)) * \ - hierarchy->currentKeyFrameSize) ) ) ) - -#define rpHANIMHIERARCHYGETINTERPFRAME2( hierarchy, nodeIndex ) \ - ( (void *)( ( (RwUInt8 *)&(hierarchy[1]) + \ - ((hierarchy->numNodes * 2 + \ - (nodeIndex)) * \ - hierarchy->currentKeyFrameSize) ) ) ) + RtAnimInterpolator *currentAnim; /**< Internal use */ +}; /** * \ingroup rphanim @@ -496,36 +241,40 @@ typedef struct RpHAnimFrameExtension RpHAnimFrameExtension; /** * \ingroup rphanim * \struct RpHAnimFrameExtension + * + * Used to extend \ref RwFrame objects, and thus + * allow the mapping between animation hierarchy node ID and \ref RwFrame. + * */ struct RpHAnimFrameExtension { - RwInt32 id; /**< ID given to this RwFrame (default of -1) */ + RwInt32 id; /**< ID given to this RwFrame (default of -1) */ RpHAnimHierarchy *hierarchy; /**< Pointer to Animation hierarchy attached to this RwFrame */ }; /*--- Plugin API Functions ---*/ -#define RpHAnimHierarchySetFlagsMacro(hierarchy, _flags) \ +#define RpHAnimHierarchySetFlagsMacro(hierarchy,_flags) \ MACRO_START \ { \ - (hierarchy)->flags = _flags; \ + (hierarchy)->flags = _flags; \ } \ MACRO_STOP #define RpHAnimHierarchyGetFlagsMacro(hierarchy) \ ((hierarchy)->flags) -#define RpHAnimStdKeyFrameToMatrixMacro(_matrix, _voidIFrame) \ +#define RpHAnimKeyFrameToMatrixMacro(_matrix,_voidIFrame) \ MACRO_START \ { \ - RpHAnimStdKeyFrame * iFrame = (RpHAnimStdKeyFrame *)(_voidIFrame); \ + RpHAnimInterpFrame * iFrame = (RpHAnimInterpFrame *)(_voidIFrame); \ \ /* \ * RpHAnim uses the same types of quaternion as RtQuat \ * hence no conjugate call as in RpSkin \ */ \ \ - RtQuatUnitConvertToMatrix(&iFrame->q, (_matrix)); \ + RtQuatUnitConvertToMatrix(&iFrame->q,(_matrix)); \ \ (_matrix)->pos.x = iFrame->t.x; \ (_matrix)->pos.y = iFrame->t.y; \ @@ -534,14 +283,14 @@ MACRO_START \ MACRO_STOP + #if (! defined(RWDEBUG)) -#define RpHAnimHierarchySetFlags(hierarchy, _flags) \ - RpHAnimHierarchySetFlagsMacro(hierarchy, _flags) +#define RpHAnimHierarchySetFlags(hierarchy,_flags) \ + RpHAnimHierarchySetFlagsMacro(hierarchy,_flags) #define RpHAnimHierarchyGetFlags(hierarchy) \ (RpHAnimHierarchyFlag)RpHAnimHierarchyGetFlagsMacro(hierarchy) - #endif /* (! defined(RWDEBUG)) */ #ifdef __cplusplus @@ -549,6 +298,8 @@ extern "C" { #endif /* __cplusplus */ +extern RpHAnimAtomicGlobalVars RpHAnimAtomicGlobals; + #if (defined(RWDEBUG)) extern RpHAnimHierarchy * @@ -560,15 +311,9 @@ RpHAnimHierarchyGetFlags(RpHAnimHierarchy *hierarchy); #endif /* (defined(RWDEBUG)) */ -/* Keyframe Interpolator Types */ - -extern RwBool -RpHAnimRegisterInterpolationScheme(RpHAnimInterpolatorInfo *interpolatorInfo); - -extern RpHAnimInterpolatorInfo * -RpHAnimGetInterpolatorInfo(RwInt32 typeID); - /* Animation hierarchy creation */ +extern void +RpHAnimHierarchySetFreeListCreateParams(RwInt32 blockSize,RwInt32 numBlocksToPrealloc); extern RpHAnimHierarchy * RpHAnimHierarchyCreate(RwInt32 numNodes, @@ -613,45 +358,10 @@ extern RpHAnimHierarchy * RpHAnimFrameGetHierarchy(RwFrame *frame); /* Macros for legacy support of old function names */ -#define RpHAnimSetHierarchy(frame, hierarchy) \ - RpHAnimFrameSetHierarchy(frame, hierarchy) +#define RpHAnimSetHierarchy(frame,hierarchy) \ + RpHAnimFrameSetHierarchy(frame,hierarchy) #define RpHAnimGetHierarchy(frame) RpHAnimFrameGetHierarchy(frame) -extern RwBool -RpHAnimHierarchySetKeyFrameCallBacks(RpHAnimHierarchy *hierarchy, - RwInt32 keyFrameTypeID); - -extern RwBool -RpHAnimHierarchySetCurrentAnim(RpHAnimHierarchy *hierarchy, - RpHAnimAnimation *anim); - -extern RwBool -RpHAnimHierarchySetCurrentAnimTime(RpHAnimHierarchy *hierarchy, - RwReal time); - -extern RwBool -RpHAnimHierarchySubAnimTime(RpHAnimHierarchy *hierarchy, - RwReal time); - -extern RwBool -RpHAnimHierarchyStdKeyFrameAddAnimTime(RpHAnimHierarchy *hierarchy, - RwReal time); - -extern RwBool -RpHAnimHierarchyAddAnimTime(RpHAnimHierarchy *hierarchy, - RwReal time); - -extern RpHAnimHierarchy * -RpHAnimHierarchySetAnimCallBack(RpHAnimHierarchy *hierarchy, - RpHAnimHierarchyCallBack callBack, - RwReal time, - void *data ); - -extern RpHAnimHierarchy * -RpHAnimHierarchySetAnimLoopCallBack(RpHAnimHierarchy *hierarchy, - RpHAnimHierarchyCallBack callBack, - void *data ); - extern RwMatrix * RpHAnimHierarchyGetMatrixArray(RpHAnimHierarchy *hierarchy); @@ -665,209 +375,267 @@ extern RwInt32 RpHAnimIDGetIndex(RpHAnimHierarchy *hierarchy, RwInt32 ID); -/* Animations */ - -extern RpHAnimAnimation * -RpHAnimAnimationCreate(RwInt32 typeID, - RwInt32 numFrames, - RwInt32 flags, - RwReal duration); - -extern RpHAnimAnimation * -RpHAnimAnimationDestroy(RpHAnimAnimation *animation); +/* Plugin support */ -#ifdef RWDEBUG +extern RwBool +RpHAnimPluginAttach(void); -extern RwInt32 -RpHAnimAnimationGetTypeID(RpHAnimAnimation *animation); +/* Hanim keyframe functions */ -#else /* RWDEBUG */ +extern void +RpHAnimKeyFrameApply(void *matrix, + void *voidIFrame); -#define RpHAnimAnimationGetTypeID(animation) \ - (animation->interpInfo->typeID) +extern void +RpHAnimKeyFrameBlend(void *voidOut, + void *voidIn1, + void *voidIn2, + RwReal alpha); -#endif /* RWDEBUG */ +extern void +RpHAnimKeyFrameInterpolate(void *voidOut, + void *voidIn1, + void *voidIn2, + RwReal time); -extern RpHAnimAnimation * -RpHAnimAnimationRead(const RwChar * filename); +extern void +RpHAnimKeyFrameAdd(void *voidOut, + void *voidIn1, + void *voidIn2); -extern RwBool -RpHAnimAnimationWrite(RpHAnimAnimation *animation, - const RwChar * filename); +extern void +RpHAnimKeyFrameMulRecip(void *voidFrame, + void *voidStart); -extern RpHAnimAnimation * -RpHAnimAnimationStreamRead(RwStream *stream); +extern RtAnimAnimation * +RpHAnimKeyFrameStreamRead(RwStream *stream, + RtAnimAnimation *animation); extern RwBool -RpHAnimAnimationStreamWrite(RpHAnimAnimation *animation, - RwStream *stream); +RpHAnimKeyFrameStreamWrite(RtAnimAnimation *animation, + RwStream *stream); extern RwInt32 -RpHAnimAnimationStreamGetSize(RpHAnimAnimation *animation); +RpHAnimKeyFrameStreamGetSize(RtAnimAnimation *animation); -extern RwBool -RpHAnimAnimationMakeDelta(RpHAnimAnimation *animation, - RwInt32 numNodes, - RwReal time); - -/* Plugin support */ +/* Access to RwFrame ID's */ extern RwBool -RpHAnimPluginAttach(void); +RpHAnimFrameSetID(RwFrame *frame, + RwInt32 id); -/* Overloadable keyframe functions */ +extern RwInt32 +RpHAnimFrameGetID(RwFrame *frame); -#define RpHAnimFrameToMatrixMacro(hierarchy, matrix, iFrame) \ -MACRO_START \ -{ \ - const RpHAnimKeyFrameToMatrixCallBack keyFrameToMatrixCB = \ - (hierarchy)->keyFrameToMatrixCB; \ - \ - if (RpHAnimStdKeyFrameToMatrix == keyFrameToMatrixCB) \ - { \ - RpHAnimStdKeyFrameToMatrixMacro((matrix), (iFrame)); \ - } \ - else \ - { \ - keyFrameToMatrixCB((matrix), (iFrame)); \ - } \ -} \ -MACRO_STOP +/* + * Utility Functions + */ +#define RpHAnimHierarchySetCurrentAnimMacro(hierarchy,anim)\ + RtAnimInterpolatorSetCurrentAnim((hierarchy)->currentAnim,anim) -#define RpHAnimFrameInterpolateMacro(hierarchy, out, in1, in2, time) \ -MACRO_START \ -{ \ - (hierarchy)->keyFrameInterpolateCB((out), (in1), (in2), (time)); \ -} \ -MACRO_STOP +#define RpHAnimHierarchyGetCurrentAnimMacro(hierarchy)\ + RtAnimInterpolatorGetCurrentAnim((hierarchy)->currentAnim) -#define RpHAnimFrameBlendMacro(hierarchy, out, in1, in2, fAlpha) \ -MACRO_START \ -{ \ - (hierarchy)->keyFrameBlendCB((out), (in1), (in2), (fAlpha)); \ -} \ -MACRO_STOP +#define RpHAnimHierarchySetCurrentAnimTimeMacro(hierarchy,time)\ + RtAnimInterpolatorSetCurrentTime((hierarchy)->currentAnim,time) -#define RpHAnimFrameAddTogetherMacro(hierarchy, out, in1, in2) \ -MACRO_START \ -{ \ - (hierarchy)->keyFrameAddCB((out), (in1), (in2)); \ -} \ -MACRO_STOP +#define RpHAnimHierarchyAddAnimTimeMacro(hierarchy,time)\ + RtAnimInterpolatorAddAnimTime((hierarchy)->currentAnim,time) -#ifdef RWDEBUG -void -RpHAnimFrameInterpolate(RpHAnimHierarchy *hierarchy, - void *out, void *in1, - void *in2, RwReal time); +#define RpHAnimHierarchySubAnimTimeMacro(hierarchy,time)\ + RtAnimInterpolatorSubAnimTime((hierarchy)->currentAnim,time) -void -RpHAnimFrameBlend(RpHAnimHierarchy *hierarchy, - void *out, - void *in1, - void *in2, - RwReal alpha); +#define RpHAnimHierarchySetKeyFrameCallBacksMacro(hierarchy,keyFrameTypeID) \ + RtAnimInterpolatorSetKeyFrameCallBacks((hierarchy)->currentAnim,\ + keyFrameTypeID) -void -RpHAnimFrameToMatrix(RpHAnimHierarchy *hierarchy, - RwMatrix *matrix, void *iFrame); +#define RpHAnimHierarchyBlendMacro(outHierarchy,inHierarchy1,inHierarchy2,alpha)\ + RtAnimInterpolatorBlend((outHierarchy)->currentAnim,\ + (inHierarchy1)->currentAnim,\ + (inHierarchy2)->currentAnim,\ + alpha) -void -RpHAnimFrameAddTogether(RpHAnimHierarchy *hierarchy, - void *out, void *in1, void *in2); +#define RpHAnimHierarchyAddTogetherMacro(outHierarchy,inHierarchy1,inHierarchy2)\ + RtAnimInterpolatorAddTogether((outHierarchy)->currentAnim,\ + (inHierarchy1)->currentAnim,\ + (inHierarchy2)->currentAnim) -#else /* RWDEBUG */ -#define RpHAnimFrameToMatrix(hierarchy, matrix, iFrame) \ - RpHAnimFrameToMatrixMacro(hierarchy, matrix, iFrame) +#define RpHAnimHierarchySetAnimCallBackMacro(hierarchy,callBack,time,data)\ + RtAnimInterpolatorSetAnimCallBack((hierarchy)->currentAnim,callBack,time,data) -#define RpHAnimFrameInterpolate(hierarchy, out, in1, in2, time) \ - RpHAnimFrameInterpolateMacro(hierarchy, out, in1, in2, time) +#define RpHAnimHierarchySetAnimLoopCallBackMacro(hierarchy,callBack,data)\ + RtAnimInterpolatorSetAnimLoopCallBack((hierarchy)->currentAnim,callBack,data) -#define RpHAnimFrameBlend(hierarchy, out, in1, in2, alpha) \ - RpHAnimFrameBlendMacro(hierarchy, out, in1, in2, alpha) +#define RpHAnimHierarchyBlendSubHierarchyMacro(outHierarchy,inHierarchy1,inHierarchy2,alpha)\ + RtAnimInterpolatorBlendSubInterpolator((outHierarchy)->currentAnim,(inHierarchy1)->currentAnim,(inHierarchy2)->currentAnim,alpha) -#define RpHAnimFrameAddTogether(hierarchy, out, in1, in2) \ - RpHAnimFrameAddTogetherMacro(hierarchy, out, in1, in2) +#define RpHAnimHierarchyAddSubHierarchyMacro(outHierarchy,mainHierarchy,subHierarchy)\ + RtAnimInterpolatorAddSubInterpolator((outHierarchy)->currentAnim,(mainHierarchy)->currentAnim,(subHierarchy)->currentAnim) -#endif /* RWDEBUG */ - -/* Standard keyframe functions */ +#define RpHAnimHierarchyCopyMacro(outHierarchy,inHierarchy)\ + RtAnimInterpolatorCopy((outHierarchy)->currentAnim,(inHierarchy)->currentAnim) -extern void -RpHAnimStdKeyFrameToMatrix(RwMatrix *matrix, - void * voidIFrame); -extern void -RpHAnimStdKeyFrameBlend(void *voidOut, - void *voidIn1, - void *voidIn2, - RwReal alpha); -extern void -RpHAnimStdKeyFrameInterpolate(void *voidOut, - void *voidIn1, - void *voidIn2, - RwReal time); +#ifdef RWDEBUG +extern RwBool +RpHAnimHierarchySetCurrentAnim(RpHAnimHierarchy *hierarchy, + RtAnimAnimation *anim); -extern void -RpHAnimStdKeyFrameAdd(void *voidOut, - void *voidIn1, - void *voidIn2); +extern RtAnimAnimation * +RpHAnimHierarchyGetCurrentAnim(RpHAnimHierarchy *hierarchy); -extern void -RpHAnimStdKeyFrameMulRecip(void *voidFrame, - void *voidStart); +extern RwBool +RpHAnimHierarchySetCurrentAnimTime(RpHAnimHierarchy *hierarchy, + RwReal time); -extern RpHAnimAnimation * -RpHAnimStdKeyFrameStreamRead(RwStream *stream, - RpHAnimAnimation *animation); +extern RwBool +RpHAnimHierarchyAddAnimTime(RpHAnimHierarchy *hierarchy, + RwReal time); extern RwBool -RpHAnimStdKeyFrameStreamWrite(RpHAnimAnimation *animation, - RwStream *stream); +RpHAnimHierarchySubAnimTime(RpHAnimHierarchy *hierarchy, + RwReal time); -extern RwInt32 -RpHAnimStdKeyFrameStreamGetSize(RpHAnimAnimation *animation); +extern RwBool +RpHAnimHierarchySetKeyFrameCallBacks(RpHAnimHierarchy *hierarchy, + RwInt32 keyFrameTypeID); -/* Hierarchy blending/combination functions */ +extern void +RpHAnimHierarchySetAnimCallBack(RpHAnimHierarchy *hierarchy, + RtAnimCallBack callBack, + RwReal time, + void *data); extern RwBool RpHAnimHierarchyBlend(RpHAnimHierarchy *outHierarchy, RpHAnimHierarchy *inHierarchy1, RpHAnimHierarchy *inHierarchy2, RwReal alpha); + extern RwBool RpHAnimHierarchyAddTogether(RpHAnimHierarchy *outHierarchy, RpHAnimHierarchy *inHierarchy1, RpHAnimHierarchy *inHierarchy2); +extern void +RpHAnimHierarchySetAnimLoopCallBack(RpHAnimHierarchy *hierarchy, + RtAnimCallBack callBack, + void *data); extern RwBool RpHAnimHierarchyBlendSubHierarchy(RpHAnimHierarchy *outHierarchy, - RpHAnimHierarchy *inHierarchy1, - RpHAnimHierarchy *inHierarchy2, - RwReal alpha); + RpHAnimHierarchy *inHierarchy1, + RpHAnimHierarchy *inHierarchy2, + RwReal alpha); extern RwBool RpHAnimHierarchyAddSubHierarchy(RpHAnimHierarchy *outHierarchy, - RpHAnimHierarchy *mainHierarchy, - RpHAnimHierarchy *subHierarchy); - + RpHAnimHierarchy *mainHierarchy1, + RpHAnimHierarchy *subHierarchy2); extern RwBool RpHAnimHierarchyCopy(RpHAnimHierarchy *outHierarchy, RpHAnimHierarchy *inHierarchy); -/* Access to RwFrame ID's */ +#else -extern RwBool -RpHAnimFrameSetID(RwFrame *frame, - RwInt32 id); +#define RpHAnimHierarchySetCurrentAnim(hierarchy,anim) \ + RpHAnimHierarchySetCurrentAnimMacro((hierarchy),(anim)) -extern RwInt32 -RpHAnimFrameGetID(RwFrame *frame); +#define RpHAnimHierarchyGetCurrentAnim(hierarchy) \ + RpHAnimHierarchyGetCurrentAnimMacro((hierarchy)) + +#define RpHAnimHierarchySetCurrentAnimTime(hierarchy,time) \ + RpHAnimHierarchySetCurrentAnimTimeMacro((hierarchy),(time)) + +#define RpHAnimHierarchyAddAnimTime(hierarchy,time) \ + RpHAnimHierarchyAddAnimTimeMacro((hierarchy),(time)) + +#define RpHAnimHierarchySubAnimTime(hierarchy,time) \ + RpHAnimHierarchySubAnimTimeMacro((hierarchy),(time)) + +#define RpHAnimHierarchySetKeyFrameCallBacks(hierarchy,keyFrameTypeID) \ + RpHAnimHierarchySetKeyFrameCallBacksMacro((hierarchy),(keyFrameTypeID)) + +#define RpHAnimHierarchyBlend(outHierarchy,inHierarchy1,inHierarchy2,alpha) \ + RpHAnimHierarchyBlendMacro((outHierarchy),(inHierarchy1),(inHierarchy2),(alpha)) + +#define RpHAnimHierarchyAddTogether(outHierarchy,inHierarchy1,inHierarchy2) \ + RpHAnimHierarchyAddTogetherMacro((outHierarchy),(inHierarchy1),(inHierarchy2)) + +#define RpHAnimHierarchySetAnimCallBack(hierarchy,callBack,time,data)\ + RpHAnimHierarchySetAnimCallBackMacro((hierarchy),(callBack),(time),(data)) + +#define RpHAnimHierarchySetAnimLoopCallBack(hierarchy,callBack,data)\ + RpHAnimHierarchySetAnimLoopCallBackMacro((hierarchy),(callBack),(data)) + +#define RpHAnimHierarchyBlendSubHierarchy(outHierarchy,inHierarchy1,inHierarchy2,alpha)\ + RpHAnimHierarchyBlendSubHierarchyMacro((outHierarchy),(inHierarchy1),(inHierarchy2),(alpha)) + +#define RpHAnimHierarchyAddSubHierarchy(outHierarchy,mainHierarchy,subHierarchy)\ + RpHAnimHierarchyAddSubHierarchyMacro((outHierarchy),(mainHierarchy),(subHierarchy)) + +#define RpHAnimHierarchyCopy(outHierarchy,inHierarchy)\ + RpHAnimHierarchyCopyMacro((outHierarchy),(inHierarchy)) + +#endif /* RWDEBUG */ #ifdef __cplusplus } #endif /* __cplusplus */ +/* Legacy TypeDef */ + + +typedef RtAnimAnimation RpHAnimAnimation; +typedef RpHAnimKeyFrame RpHAnimStdKeyFrame; + +/* Legacy Macros */ + + +/* Animations */ + + +#define RpHAnimAnimationCreate(typeID,numFrames,flags,duration)\ + RtAnimAnimationCreate((typeID),(numFrames),(flags),(duration)) + + +#define RpHAnimAnimationDestroy(animation)\ + RtAnimAnimationDestroy((animation)) + +#define RpHAnimAnimationGetTypeID(animation)\ + RtAnimAnimationGetTypeID((animation)) + + +#define RpHAnimAnimationRead(filename)\ + RtAnimAnimationRead((filename)) + + +#define RpHAnimAnimationWrite(animation,filename)\ + RtAnimAnimationWrite((animation),(filename)) + + +#define RpHAnimAnimationStreamRead(stream)\ + RtAnimAnimationStreamRead((stream)) + + +#define RpHAnimAnimationStreamWrite(animation,stream)\ + RtAnimAnimationStreamWrite((animation),(stream)) + + +#define RpHAnimAnimationStreamGetSize(animation)\ + RtAnimAnimationStreamGetSize((animation)) + + +#define RpHAnimAnimationMakeDelta(animation,numNodes,time)\ + RtAnimAnimationMakeDelta((animation),(numNodes),(time)) + + +/* Animation Interpolator */ + +#define RpHAnimHierarchyStdKeyFrameAddAnimTime(hierarchy,time)\ + RpHAnimHierarchyHAnimKeyFrameAddAnimTime((hierarchy),(time)) + +#define RpHAnimHierarchyHAnimKeyFrameAddAnimTime(hierarchy,time)\ + RpHAnimHierarchyAddAnimTime((hierarchy),(time)) #endif /* RPHANIM_H */ diff --git a/rwsdk/include/d3d8/rphanim.rpe b/rwsdk/include/d3d8/rphanim.rpe index c60f8591..1c05d0e9 100644 --- a/rwsdk/include/d3d8/rphanim.rpe +++ b/rwsdk/include/d3d8/rphanim.rpe @@ -160,481 +160,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionHANIM { -E_RP_HANIM_INTERP_IDINUSE, - -E_RP_HANIM_INTERP_BLOCKFULL, - -E_RP_HANIM_INTERP_IDUNKNOWN, e_rwdb_CriterionHANIMLAST = RWFORCEENUMSIZEINT }; diff --git a/rwsdk/include/d3d8/rplodatm.h b/rwsdk/include/d3d8/rplodatm.h index d4583338..4e9c8648 100644 --- a/rwsdk/include/d3d8/rplodatm.h +++ b/rwsdk/include/d3d8/rplodatm.h @@ -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 ); diff --git a/rwsdk/include/d3d8/rplodatm.rpe b/rwsdk/include/d3d8/rplodatm.rpe index 649bc3bc..a5764cfc 100644 --- a/rwsdk/include/d3d8/rplodatm.rpe +++ b/rwsdk/include/d3d8/rplodatm.rpe @@ -163,472 +163,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionLODATM { diff --git a/rwsdk/include/d3d8/rplogo.h b/rwsdk/include/d3d8/rplogo.h index ed527a29..a46823ac 100644 --- a/rwsdk/include/d3d8/rplogo.h +++ b/rwsdk/include/d3d8/rplogo.h @@ -33,7 +33,7 @@ /** * \defgroup rplogo RpLogo - * \ingroup rpplugin + * \ingroup 2dtools * * Logo Plugin for RenderWare Graphics. */ diff --git a/rwsdk/include/d3d8/rplogo.rpe b/rwsdk/include/d3d8/rplogo.rpe index f37b6920..a7f66565 100644 --- a/rwsdk/include/d3d8/rplogo.rpe +++ b/rwsdk/include/d3d8/rplogo.rpe @@ -160,472 +160,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionLogo { diff --git a/rwsdk/include/d3d8/rpltmap.h b/rwsdk/include/d3d8/rpltmap.h index 5add9a26..18c91955 100644 --- a/rwsdk/include/d3d8/rpltmap.h +++ b/rwsdk/include/d3d8/rpltmap.h @@ -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 ??*/ diff --git a/rwsdk/include/d3d8/rpltmap.rpe b/rwsdk/include/d3d8/rpltmap.rpe index 413caf4c..6e58b62b 100644 --- a/rwsdk/include/d3d8/rpltmap.rpe +++ b/rwsdk/include/d3d8/rpltmap.rpe @@ -159,472 +159,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionLTMAP { diff --git a/rwsdk/include/d3d8/rpmatfx.h b/rwsdk/include/d3d8/rpmatfx.h index 9b091dd8..fb7ade45 100644 --- a/rwsdk/include/d3d8/rpmatfx.h +++ b/rwsdk/include/d3d8/rpmatfx.h @@ -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 ); diff --git a/rwsdk/include/d3d8/rpmatfx.rpe b/rwsdk/include/d3d8/rpmatfx.rpe index bbc588e3..ba83d96a 100644 --- a/rwsdk/include/d3d8/rpmatfx.rpe +++ b/rwsdk/include/d3d8/rpmatfx.rpe @@ -159,472 +159,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionMATERIALEFFECTS { diff --git a/rwsdk/include/d3d8/rpmipkl.h b/rwsdk/include/d3d8/rpmipkl.h index 5b8f7e51..82ad7f03 100644 --- a/rwsdk/include/d3d8/rpmipkl.h +++ b/rwsdk/include/d3d8/rpmipkl.h @@ -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 diff --git a/rwsdk/include/d3d8/rpmipkl.rpe b/rwsdk/include/d3d8/rpmipkl.rpe index 5216ec9c..0464081f 100644 --- a/rwsdk/include/d3d8/rpmipkl.rpe +++ b/rwsdk/include/d3d8/rpmipkl.rpe @@ -160,472 +160,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionLabel { diff --git a/rwsdk/include/d3d8/rpmorph.h b/rwsdk/include/d3d8/rpmorph.h index 4177fba8..52ea70df 100644 --- a/rwsdk/include/d3d8/rpmorph.h +++ b/rwsdk/include/d3d8/rpmorph.h @@ -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, diff --git a/rwsdk/include/d3d8/rpmorph.rpe b/rwsdk/include/d3d8/rpmorph.rpe index 14b13076..47834a81 100644 --- a/rwsdk/include/d3d8/rpmorph.rpe +++ b/rwsdk/include/d3d8/rpmorph.rpe @@ -159,472 +159,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionMorph { diff --git a/rwsdk/include/d3d8/rppatch.h b/rwsdk/include/d3d8/rppatch.h index eb80663f..0b54fb1b 100644 --- a/rwsdk/include/d3d8/rppatch.h +++ b/rwsdk/include/d3d8/rppatch.h @@ -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); diff --git a/rwsdk/include/d3d8/rppatch.rpe b/rwsdk/include/d3d8/rppatch.rpe index 6d433990..85dca470 100644 --- a/rwsdk/include/d3d8/rppatch.rpe +++ b/rwsdk/include/d3d8/rppatch.rpe @@ -159,472 +159,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionPATCH { diff --git a/rwsdk/include/d3d8/rpprtstd.h b/rwsdk/include/d3d8/rpprtstd.h index ad1b87f7..ba0bf1d6 100644 --- a/rwsdk/include/d3d8/rpprtstd.h +++ b/rwsdk/include/d3d8/rpprtstd.h @@ -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); @@ -750,6 +782,9 @@ extern RwBool RpPrtStdEmitterDestroy(RpPrtStdEmitter *emt); extern RpPrtStdEmitter * +RpPrtStdEmitterClone(RpPrtStdEmitter *emt); + +extern RpPrtStdEmitter * RpPrtStdEmitterForAllParticleBatch(RpPrtStdEmitter *emt, RpPrtStdParticleCallBack callback, void * data); @@ -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 ); /************************************************************************/ @@ -964,10 +1003,18 @@ 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); diff --git a/rwsdk/include/d3d8/rpprtstd.rpe b/rwsdk/include/d3d8/rpprtstd.rpe index df860d45..d628c6c0 100644 --- a/rwsdk/include/d3d8/rpprtstd.rpe +++ b/rwsdk/include/d3d8/rpprtstd.rpe @@ -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; diff --git a/rwsdk/include/d3d8/rpptank.h b/rwsdk/include/d3d8/rpptank.h index 20931f21..d4c1116d 100644 --- a/rwsdk/include/d3d8/rpptank.h +++ b/rwsdk/include/d3d8/rpptank.h @@ -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 */ diff --git a/rwsdk/include/d3d8/rpptank.rpe b/rwsdk/include/d3d8/rpptank.rpe index 485b5dd8..2a9b45d3 100644 --- a/rwsdk/include/d3d8/rpptank.rpe +++ b/rwsdk/include/d3d8/rpptank.rpe @@ -146,472 +146,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rwsdk/include/d3d8/rppvs.h b/rwsdk/include/d3d8/rppvs.h index 29fc2343..08738933 100644 --- a/rwsdk/include/d3d8/rppvs.h +++ b/rwsdk/include/d3d8/rppvs.h @@ -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)) */ /**************************************************************************** diff --git a/rwsdk/include/d3d8/rppvs.rpe b/rwsdk/include/d3d8/rppvs.rpe index dc060cff..62c983b0 100644 --- a/rwsdk/include/d3d8/rppvs.rpe +++ b/rwsdk/include/d3d8/rppvs.rpe @@ -161,472 +161,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionGPVS { diff --git a/rwsdk/include/d3d8/rprandom.h b/rwsdk/include/d3d8/rprandom.h index 8690c69a..aebbfed9 100644 --- a/rwsdk/include/d3d8/rprandom.h +++ b/rwsdk/include/d3d8/rprandom.h @@ -28,7 +28,7 @@ /** * \defgroup rprandom RpRandom - * \ingroup rpplugin + * \ingroup mathtools * * Random Number Generation Plugin for RenderWare Graphics. */ diff --git a/rwsdk/include/d3d8/rprandom.rpe b/rwsdk/include/d3d8/rprandom.rpe index 8e267eee..d3fe964b 100644 --- a/rwsdk/include/d3d8/rprandom.rpe +++ b/rwsdk/include/d3d8/rprandom.rpe @@ -159,472 +159,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionRandom { diff --git a/rwsdk/include/d3d8/rpskin.h b/rwsdk/include/d3d8/rpskin.h index df446c1b..8a6ea204 100644 --- a/rwsdk/include/d3d8/rpskin.h +++ b/rwsdk/include/d3d8/rpskin.h @@ -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 -----------------------------------------------------------* diff --git a/rwsdk/include/d3d8/rpskin.rpe b/rwsdk/include/d3d8/rpskin.rpe index 57cecd5e..02d7e162 100644 --- a/rwsdk/include/d3d8/rpskin.rpe +++ b/rwsdk/include/d3d8/rpskin.rpe @@ -159,472 +159,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionSKIN { diff --git a/rwsdk/include/d3d8/rpspline.h b/rwsdk/include/d3d8/rpspline.h index 53fd8484..df3a21d9 100644 --- a/rwsdk/include/d3d8/rpspline.h +++ b/rwsdk/include/d3d8/rpspline.h @@ -39,7 +39,7 @@ /** * \defgroup rpspline RpSpline - * \ingroup rpplugin + * \ingroup mathtools * * Spline Plugin for RenderWare Graphics. */ diff --git a/rwsdk/include/d3d8/rpspline.rpe b/rwsdk/include/d3d8/rpspline.rpe index 27670751..55748bdd 100644 --- a/rwsdk/include/d3d8/rpspline.rpe +++ b/rwsdk/include/d3d8/rpspline.rpe @@ -159,472 +159,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionSpline { diff --git a/rwsdk/include/d3d8/rpstereo.h b/rwsdk/include/d3d8/rpstereo.h deleted file mode 100644 index 5a8db912..00000000 --- a/rwsdk/include/d3d8/rpstereo.h +++ /dev/null @@ -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 */ - diff --git a/rwsdk/include/d3d8/rpstereo.rpe b/rwsdk/include/d3d8/rpstereo.rpe deleted file mode 100644 index b89dde2e..00000000 --- a/rwsdk/include/d3d8/rpstereo.rpe +++ /dev/null @@ -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; - - diff --git a/rwsdk/include/d3d8/rpusrdat.h b/rwsdk/include/d3d8/rpusrdat.h index 3665e064..92a56e31 100644 --- a/rwsdk/include/d3d8/rpusrdat.h +++ b/rwsdk/include/d3d8/rpusrdat.h @@ -3,7 +3,7 @@ /** * \defgroup rpuserdata RpUserData - * \ingroup rpplugin + * \ingroup scenemanagement * * User Data Plugin for RenderWare Graphics. */ diff --git a/rwsdk/include/d3d8/rpusrdat.rpe b/rwsdk/include/d3d8/rpusrdat.rpe index 31c37fd1..f5879a00 100644 --- a/rwsdk/include/d3d8/rpusrdat.rpe +++ b/rwsdk/include/d3d8/rpusrdat.rpe @@ -160,472 +160,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionUserData { diff --git a/rwsdk/include/d3d8/rpworld.h b/rwsdk/include/d3d8/rpworld.h index 21fdc31b..0d0489ce 100644 --- a/rwsdk/include/d3d8/rpworld.h +++ b/rwsdk/include/d3d8/rpworld.h @@ -22,7 +22,7 @@ /************************************************************************* * * Filename: <C:/daily/rwsdk/include/d3d8/rpworld.h> - * Automatically Generated on: Wed Jul 10 10:45:01 2002 + * Automatically Generated on: Thu Jan 23 11:06:24 2003 * ************************************************************************/ @@ -75,135 +75,32 @@ extern RxNodeDefinition *RxNodeDefinitionGetD3D8AtomicAllInOne(void); extern "C" { #endif /* __cplusplus */ -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodeWorldSectorInstance.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetWorldSectorInstance(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodeWorldSectorEnumerateLights.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetWorldSectorEnumerateLights(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodePreLight.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetPreLight(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodePostLight.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetPostLight(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodeMaterialScatter.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetMaterialScatter(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodeLight.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetLight(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodeFastPathSplitter.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetFastPathSplitter(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ +extern void RwD3D8VertexBufferManagerChangeDefaultSize(RwUInt32 defaultSize); -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodeAtomicInstance.h ---*/ +extern RwBool _rxD3D8VertexBufferManagerCreate(RwUInt32 fvf, + RwUInt32 size, + void **vertexBuffer, + RwUInt32 *baseIndex); -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetAtomicInstance(void); +extern void _rxD3D8VertexBufferManagerDestroy(RwUInt32 fvf, + RwUInt32 size, + void *vertexBuffer, + RwUInt32 baseIndex); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodeAtomicEnumerateLights.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern RwBool _rxD3D8VertexBufferManagerCreateNoFVF(RwUInt32 stride, + RwUInt32 size, + void **vertexBuffer, + RwUInt32 *baseIndex); -extern RxNodeDefinition *RxNodeDefinitionGetAtomicEnumerateLights(void); +extern void _rxD3D8VertexBufferManagerDestroyNoFVF(RwUInt32 stride, + RwUInt32 size, + void *vertexBuffer, + RwUInt32 baseIndex); #ifdef __cplusplus } -#endif /* __cplusplus */ - +#endif /* __cplusplus */ /*--- Automatically derived from: c:/daily/rwsdk/world/bamateri.h ---*/ @@ -222,15 +119,17 @@ extern RxNodeDefinition *RxNodeDefinitionGetAtomicEnumerateLights(void); typedef struct RpMaterialChunkInfo RpMaterialChunkInfo; typedef struct RpMaterialChunkInfo _rpMaterial; +#if (!defined(DOXYGEN)) struct RpMaterialChunkInfo { - RwInt32 flags; /**< Material flags - unused currently - - for future expansion */ - RwRGBA color; /**< Colour of material. */ - RwInt32 unused; /**< Not used */ - RwBool textured; /**< Are we textured? */ - RwSurfaceProperties surfaceProps; /**< Surface properties */ + RwInt32 flags; /* Material flags - unused currently - + * for future expansion */ + RwRGBA color; /* Color of material. */ + RwInt32 unused; /* Not used */ + RwBool textured; /* Are we textured? */ + RwSurfaceProperties surfaceProps;/* Surface properties */ }; +#endif /* (!defined(DOXYGEN)) */ #if (!defined(RwMaterialAssign)) #define RwMaterialAssign(_target, _source) \ @@ -238,8 +137,8 @@ struct RpMaterialChunkInfo #endif /* (!defined(RwMaterialAssign)) */ /** - * \ingroup rpworlddatatypes - * \typedef RpMaterial + * \ingroup rpmaterial + * \struct RpMaterial * Material object. This should be * considered an opaque type. Use the RpMaterial API functions to access. */ @@ -258,9 +157,8 @@ struct RpMaterial #endif /* (!defined(DOXYGEN)) */ /** - * \ingroup rpworlddatatypes - * \typedef RpMaterialCallBack - \ref RpMaterialCallBack + * \ingroup rpmaterial + * \ref RpMaterialCallBack * represents the function called from \ref RpGeometryForAllMaterials and * \ref RpWorldForAllMaterials for all materials referenced by polygons in a * given geometry. This function should return a pointer to the current @@ -268,7 +166,7 @@ struct RpMaterial * further callbacks on the materials. * * \param material Pointer to the current material - * \param data Pointer to developer-defined data structure. + * \param data Pointer to developer-defined data structure. * * \return Pointer to the current material. */ @@ -346,6 +244,9 @@ extern "C" #endif /* __cplusplus */ +extern void RpMaterialSetFreeListCreateParams( RwInt32 blockSize, + RwInt32 numBlocksToPrealloc ); + /* Creating, destroying and referencing materials */ extern RpMaterial *RpMaterialCreate(void); extern RwBool RpMaterialDestroy(RpMaterial *material); @@ -388,6 +289,8 @@ extern RwInt32 RpMaterialRegisterPluginStream(RwUInt32 pluginID, extern RwInt32 RpMaterialSetStreamAlwaysCallBack( RwUInt32 pluginID, RwPluginDataChunkAlwaysCallBack alwaysCB); +extern RwInt32 RpMaterialSetStreamRightsCallBack(RwUInt32 pluginID, + RwPluginDataChunkRightsCallBack rightsCB); extern RwInt32 RpMaterialGetPluginOffset(RwUInt32 pluginID); extern RwBool RpMaterialValidatePlugins(const RpMaterial *material); @@ -414,12 +317,15 @@ _rpMaterialChunkInfoRead(RwStream *stream, */ typedef struct RpMaterialList RpMaterialList; + +#if (!defined(DOXYGEN)) struct RpMaterialList { RpMaterial **materials; RwInt32 numMaterials; RwInt32 space; }; +#endif /* (!defined(DOXYGEN)) */ /**************************************************************************** Function prototypes @@ -531,16 +437,14 @@ extern RwModuleInfo meshModule; Global types */ -/** - * \ingroup rpworlddatatypes - * \typedef RpMeshHeader +/* * typedef for header structure listing all meshes * constituting a single RpGeometry or RpWorldSector */ typedef struct RpMeshHeader RpMeshHeader; /** - * \ingroup rpworlddatatypes + * \ingroup rpmesh * \ref RpMeshHeaderFlags * represents the different types of mesh. * \see RpMeshHeader @@ -549,18 +453,18 @@ enum RpMeshHeaderFlags { /* NOTE: trilists are denoted by absence of any other * primtype flags, so be careful that you test: - * (triListFlag == flags&triListFlag) + * (triListFlag == (flags&triListFlag)) * or: - * (0 == flags&rpMESHHEADERPRIMMASK) + * (0 == (flags&rpMESHHEADERPRIMMASK)) * and not: * (flags&triListFlag) */ rpMESHHEADERTRISTRIP = 0x0001, /**< Render as tristrips */ - rpMESHHEADERTRIFAN = 0x0002, /**< On PS2 these will be converted to trilists */ + rpMESHHEADERTRIFAN = 0x0002, /**< On PlayStation 2 these will be converted to trilists */ rpMESHHEADERLINELIST = 0x0004, /**< Render as linelists */ - rpMESHHEADERPOLYLINE = 0x0008, /**< On PS2 these will be converted to linelists */ + rpMESHHEADERPOLYLINE = 0x0008, /**< On PlayStation 2 these will be converted to linelists */ rpMESHHEADERPOINTLIST = 0x0010, /**< Pointlists are supported only if rendered by - * custom pipelines; there is no default RenderWare + * custom pipelines; there is no default RenderWare * way to render pointlists. */ rpMESHHEADERPRIMMASK = 0x00FF, /**< All bits reserved for specifying primitive type */ @@ -576,6 +480,8 @@ enum RpMeshHeaderFlags typedef enum RpMeshHeaderFlags RpMeshHeaderFlags; typedef struct rpMeshGlobals rpMeshGlobals; + +#if (!defined(DOXYGEN)) struct rpMeshGlobals { RwInt16 nextSerialNum; @@ -583,11 +489,12 @@ struct rpMeshGlobals RwUInt8 meshFlagsToPrimType[rpMESHHEADERPRIMTYPEOR]; RwUInt8 primTypeToMeshFlags[rwPRIMTYPEOR]; }; +#endif /* (!defined(DOXYGEN)) */ typedef struct RpBuildMeshTriangle RpBuildMeshTriangle; /** - * \ingroup rpworlddatatypes + * \ingroup rpmesh * \struct RpBuildMeshTriangle * This type represents an array of indices into * the object vertex array. Used during the construction @@ -613,7 +520,7 @@ struct RpBuildMeshTriangle typedef struct RpBuildMesh RpBuildMesh; /** - * \ingroup rpworlddatatypes + * \ingroup rpmesh * \struct RpBuildMesh * This type represents a mesh ready for tri stripping. * @@ -640,7 +547,7 @@ struct RpBuildMesh typedef struct RpMesh RpMesh; /** - * \ingroup rpworlddatatypes + * \ingroup rpmesh * \struct RpMesh * This type represents a single polygon mesh. * A mesh is defined as a collection of triangles derived from an RpGeometry @@ -659,7 +566,7 @@ struct RpMesh }; /** - * \ingroup rpworlddatatypes + * \ingroup rpmesh * \struct RpMeshHeader * Header for all meshes that constitute a single RpGeometry or RpWorldSector */ @@ -679,9 +586,8 @@ struct RpMeshHeader }; /** - * \ingroup rpworlddatatypes - * \typedef RpMeshCallBack - * \ref RpMeshCallBack is the callback + * \ingroup rpmesh + * \ref RpMeshCallBack is the callback * function supplied to \ref RpGeometryForAllMeshes and * \ref RpWorldSectorForAllMeshes for all meshes in a given geometry. * @@ -689,14 +595,13 @@ struct RpMeshHeader * success. The callback may return NULL to terminate further callbacks * on the meshes. * - * \param mesh Pointer to the current mesh, supplied by - * iterator. - * \param meshHeader Pointer to the meshes header - * \param data Pointer to developer-defined data structure. + * \param mesh Pointer to the current mesh, supplied by + * iterator. + * \param meshHeader Pointer to the meshes header + * \param data Pointer to developer-defined data structure. * - * \return - * Returns a pointer to the current mesh if successful or NULL if an error - * occurred. + * \return Returns a pointer to the current mesh if successful or NULL + * if an error occurred. */ typedef RpMesh *(*RpMeshCallBack) (RpMesh * mesh, RpMeshHeader * meshHeader, @@ -823,29 +728,29 @@ extern RpMeshHeader * _rpMeshHeaderCreate(RwUInt32 size); naTmp[1] = RwRealToFixed((v).y); \ naTmp[2] = RwRealToFixed((v).z); \ \ - if (naTmp[0] >= RwFixedCast(1)) \ + if (naTmp[0] >= RwIntToFixed(1)) \ { \ - naTmp[0] = RwFixedCast(1)-1; \ + naTmp[0] = RwIntToFixed(1)-1; \ } \ - if (naTmp[0] <= RwFixedCast(-1)) \ + if (naTmp[0] <= RwIntToFixed(-1)) \ { \ - naTmp[0] = RwFixedCast(-1)+1; \ + naTmp[0] = RwIntToFixed(-1)+1; \ } \ - if (naTmp[1] >= RwFixedCast(1)) \ + if (naTmp[1] >= RwIntToFixed(1)) \ { \ - naTmp[1] = RwFixedCast(1)-1; \ + naTmp[1] = RwIntToFixed(1)-1; \ } \ - if (naTmp[1] <= RwFixedCast(-1)) \ + if (naTmp[1] <= RwIntToFixed(-1)) \ { \ - naTmp[1] = RwFixedCast(-1)+1; \ + naTmp[1] = RwIntToFixed(-1)+1; \ } \ - if (naTmp[2] >= RwFixedCast(1)) \ + if (naTmp[2] >= RwIntToFixed(1)) \ { \ - naTmp[2] = RwFixedCast(1)-1; \ + naTmp[2] = RwIntToFixed(1)-1; \ } \ - if (naTmp[2] <= RwFixedCast(-1)) \ + if (naTmp[2] <= RwIntToFixed(-1)) \ { \ - naTmp[2] = RwFixedCast(-1)+1; \ + naTmp[2] = RwIntToFixed(-1)+1; \ } \ \ (n).x = (RwInt8)(naTmp[0]>>9); \ @@ -853,37 +758,13 @@ extern RpMeshHeader * _rpMeshHeaderCreate(RwUInt32 size); (n).z = (RwInt8)(naTmp[2]>>9); \ } -/* RpCollSector access macros - for pre v304 data */ -#define RWCOLLSECTORGETTYPE(sect) \ - ((sect).cType&0x80) - -#define RWCOLLSECTORGETPLANE(sect) \ - ((((sect).cType)>>3)&0xc) - -#define RWCOLLSECTORGETON(sect) \ - (((sect).cType)&0x1f) - -#define RWCOLLSECTORGETVERTEX(sect) \ - (sect).vertex - -#define RWCOLLSECTORGETSTART(sect) \ - (sect).start - -#define RWCOLLSECTORGETNOPOLYS(sect) \ - (sect).cType - -#define RWCOLLSECTORSETPOLYGONS(sect,no,st) \ - (sect).cType = (RwUInt8)(no); \ - (sect).start = (RwUInt8)(st) - -#define rwMAXCOLLISIONCUTS 7 - /**************************************************************************** Global types */ typedef struct RpVertexNormal RpVertexNormal; +#if (!defined(DOXYGEN)) struct RpVertexNormal { RwInt8 x; @@ -899,28 +780,11 @@ struct RpPolygon RwUInt16 matIndex; RwUInt16 vertIndex[3]; }; - -/* RpCollSector - for pre v304 data */ -#define RWCOLLSECTORSETPLANE(sect,plane,vert,no,st) \ - (sect).cType = (RwUInt8)(0x80|((plane)<<3)|(no)); \ - (sect).vertex = (RwUInt8)(vert); \ - (sect).start = (RwUInt8)(st) - -typedef struct RpCollSector RpCollSector; - -struct RpCollSector -{ - RwUInt8 cType; /* Bit 7 - 1 plane */ - /* 0 polygons */ - /* Bit 6-5 - plane */ - /* Bit 4-0 - amount ON plane */ - RwUInt8 vertex; /* Vertex index used for the split */ - RwUInt8 start; /* Starting polygon */ -}; +#endif /* (!defined(DOXYGEN)) */ /** - * \ingroup rpworlddatatypes - * \typedef RpWorldSector + * \ingroup rpworldsector + * \struct RpWorldSector * World Sector object. This should be * considered an opaque type. Use the RpWorldSector API functions to access. */ @@ -958,9 +822,6 @@ struct RpWorldSector /* Bounding box tightly enclosing geometry */ RwBBox tightBoundingBox; - /* The root of the bsp collision tree for pre v304 data */ - RpCollSector *colSectorRoot; - /* The mesh which groups same material polygons together */ RpMeshHeader *mesh; @@ -981,9 +842,8 @@ struct RpWorldSector #endif /* (!defined(DOXYGEN)) */ /** - * \ingroup rpworlddatatypes - * \typedef RpWorldSectorCallBack - \ref RpWorldSectorCallBack + * \ingroup rpworldsector + * \ref RpWorldSectorCallBack * represents the function called from \ref RpWorldForAllWorldSectors, * \ref RpAtomicForAllWorldSectors and \ref RpLightForAllWorldSectors for all * world sectors in a given world or world sectors a given atomic or light lies @@ -991,15 +851,17 @@ struct RpWorldSector * indicate success. The callback may return NULL to terminate further * callbacks on the atomic or light. * + * \param sector Pointer to the current world sector + * \param data Pointer to developer-defined data structure. + * * \return Pointer to the current world sector. * - * \param sector Pointer to the current world sector - * \param data Pointer to developer-defined data structure. */ typedef RpWorldSector *(*RpWorldSectorCallBack)(RpWorldSector *worldSector, void *data); typedef struct RpSector RpSector; +#if (!defined(DOXYGEN)) struct RpSector { RwInt32 type; @@ -1022,7 +884,7 @@ struct RpPlaneSector RwReal leftValue; RwReal rightValue; }; - +#endif /* (!defined(DOXYGEN)) */ #ifdef __cplusplus extern "C" @@ -1101,15 +963,16 @@ extern RwBool RpWorldSectorValidatePlugins(const RpWorldSector *sector); Defines */ +#define RPTRISTRIPPOLYGONMAXEDGES 3 + /** - * \ingroup rpworlddatatypes - * \typedef RpTriStripMeshCallBack + * \ingroup rpmesh * \ref RpTriStripMeshCallBack is the callback to generate triangle strips * when the triangle stripped geometries or world sectors are unlocked. * * \param buildMesh pointer to the mesh which the triangle strip will be - * generated from. - * \param data pointer to user-supplied data to pass to the callback + * generated from. + * \param data pointer to user-supplied data to pass to the callback * function. * * \return a pointer to the constructed mesh header. @@ -1119,10 +982,156 @@ typedef RpMeshHeader * (*RpTriStripMeshCallBack) (RpBuildMesh *buildMesh, void *data); + /**************************************************************************** Global types */ +typedef struct RpTriStripEdge RpTriStripEdge; + +typedef struct RpTriStripPolygon RpTriStripPolygon; +/** + * \ingroup rpmesh + * \struct RpTriStripPolygon + * This type represents a polygon. + * + * \see RpTriStripPolygonFollowStrip + * \see RpBuildMeshGenerateTriStrip + * \see RpTriStripMeshTunnel + */ +struct RpTriStripPolygon +{ + RwLLLink inEndLink; /**< link for list of polygons joined by fewer than + 2 strip edges */ + RwLLLink inUsedLink; /**< link for list of used polygons */ + RwLLLink inFreeLink; /**< link for list of free polygons */ + RwUInt32 numEdges; /**< number of edges */ + RpTriStripEdge *edges[RPTRISTRIPPOLYGONMAXEDGES]; /**< polygon edges */ + RxVertexIndex vertIndex[RPTRISTRIPPOLYGONMAXEDGES]; /**< polygon vertex + indices */ + RwUInt32 testFrame; /**< used to prevent a tri-strip being counted by + the cost function more than once */ +}; + +/** + * \ingroup rpmesh + * \struct RpTriStripEdge + * This type represents a polygon edge which may be part of a tri-strip. + * + * \see RpTriStripPolygonFollowStrip + * \see RpBuildMeshGenerateTriStrip + * \see RpTriStripMeshTunnel + */ +struct RpTriStripEdge +{ + RwLLLink inUsedLink; /**< link for list of used edges */ + RwLLLink inFreeLink; /**< link for list of free edges */ + RpTriStripPolygon *poly1; /**< first polygon including this edge */ + RpTriStripPolygon *poly2; /**< second polygon including this edge or NULL + if this edge is only included in one */ + RxVertexIndex vert1; /**< index of first vertex of edge */ + RxVertexIndex vert2; /**< index of second vertex of edge */ + RwBool strip; /**< TRUE if the edge is part of a tri-strip */ +}; + +typedef struct RpTriStripMesh RpTriStripMesh; +/** + * \ingroup rpmesh + * \struct RpTriStripMesh + * This type represents a mesh and the tri-strips it contains. + * + * \see RpBuildMeshGenerateTriStrip + * \see RpTriStripMeshTunnel + */ +struct RpTriStripMesh +{ + RwUInt32 numPolygons; /**< the number of polygons in the mesh */ + RwLinkList polygonEndList; /**< linked list of polygons joined by fewer + than 2 strip edges. */ + RwLinkList polygonUsedList; /**< linked list of used polygons */ + RwLinkList polygonFreeList; /**< linked list of free polygons */ + RwLinkList edgeUsedList; /**< linked list of used edges */ + RwLinkList edgeFreeList; /**< linked list of free edges */ +}; + +/** + * \ingroup rpmesh + * \ref RpTriStripMeshStripCallBack represents the callback function to + * tri-strip a mesh. + * + * \param mesh Pointer to the mesh to tri-strip. + * \param data Pointer to user-supplied data. + * + * \return Returns a pointer to the current mesh if successful or NULL if an + * error occurred. + */ +typedef RpTriStripMesh * +(*RpTriStripMeshStripCallBack) (RpTriStripMesh *mesh, void *data); + +typedef struct RpTriStripData RpTriStripData; +/** + * \ingroup rpmesh + * \struct RpTriStripData + * This type represents the data required by the + * \ref RpBuildMeshGenerateTriStrip function to tri-strip a mesh. This data must + * be the user-supplied data passed into RpMeshSetTriStripMethod when using + * \ref RpBuildMeshGenerateTriStrip. + * + * \see RpMeshGetTriStripMethod + * \see RpMeshSetTriStripMethod + * \see RpBuildMeshGenerateTriStrip + * \see RpTriStripMeshTunnel + */ +struct RpTriStripData +{ + RwBool ignoreWinding; /**< TRUE to ignore winding order */ + RpTriStripMeshStripCallBack stripCB; /**< callback to tri-strip mesh */ + void *data; /**< data to supply to callback */ +}; + +/** + * \ingroup rpmesh + * \ref RpTriStripCostCallBack represents the callback function used by the + * tunnelling tri-stripper to determine the cost of a tri-strip. + * + * \param startPolygon Pointer to polygon at the start of the tri-strip. + * \param testFrame Value that must be written to the testFrame of all + * polygons in the tri-strip + * \param data Pointer to user-supplied data. + * + * \return Returns the cost of the tri-strip. + */ +typedef RwUInt32 +(*RpTriStripCostCallBack) (RpTriStripPolygon *startPolygon, RwUInt32 testFrame, void *data); + +typedef struct RpTriStripTunnelData RpTriStripTunnelData; +/** + * \ingroup rpmesh + * \struct RpTriStripTunnelData + * This type represents the data required by the + * \ref RpTriStripMeshTunnel function to tri-strip a mesh. This data must + * be the user-supplied data in the RpTriStripData structure passed into + * \ref RpMeshSetTriStripMethod as the user-supplied data when using + * \ref RpTriStripMeshTunnel. + * + * \see RpMeshGetTriStripMethod + * \see RpMeshSetTriStripMethod + * \see RpBuildMeshGenerateTriStrip + * \see RpTriStripMeshTunnel + * \see RpTriStripDefaultCost + */ +struct RpTriStripTunnelData +{ + RwReal quality; /**< the higher the value the better the + output but the longer it will take; + values greater than 1 are unlikely to + be useful */ + RwUInt32 lengthLimit; /**< the maximum tunnel length to use */ + RpTriStripCostCallBack costCB; /**< callback to determine tri-strip cost */ + void *data; /**< data to supply to callbacks */ +}; + + /**************************************************************************** Global Variables @@ -1138,8 +1147,27 @@ extern "C" { #endif /* __cplusplus */ +/* Tri-strip manipulating functions */ +extern RpTriStripPolygon * +RpTriStripPolygonFollowStrip(RpTriStripPolygon *curr, RpTriStripPolygon *prev); + +/* Callback strip costing functions */ +extern RwUInt32 +RpTriStripDefaultCost(RpTriStripPolygon *startPolygon, RwUInt32 testFrame, + void *data); + +/* Callback mesh stripping functions */ +extern RpTriStripMesh * +RpTriStripMeshTunnel(RpTriStripMesh *mesh, void *data); -/* Callback mesh generating functions */ +extern RpTriStripMesh * +RpTriStripMeshQuick(RpTriStripMesh *mesh, void *data); + +/* New callback mesh generating function */ +extern RpMeshHeader * +RpBuildMeshGenerateTriStrip(RpBuildMesh *buildMesh, void *data); + +/* Old callback mesh generating functions. Probably obsolete */ extern RpMeshHeader * RpBuildMeshGenerateTrivialTriStrip(RpBuildMesh *buildMesh, void *data); @@ -1164,7 +1192,7 @@ extern RpMeshHeader * RpBuildMeshGenerateExhaustiveIgnoreWindingTriStrip(RpBuildMesh *buildmesh, void *data); -/* Functions to set and get the global mesh tristrip algorithm */ +/* Functions to set and get the global mesh tri-strip algorithm */ extern RwBool RpMeshSetTriStripMethod(RpTriStripMeshCallBack callback, void *data); @@ -1225,6 +1253,7 @@ _rpMeshOptimise(RpBuildMesh *buildmesh, RwUInt32 flags); typedef struct RpLightChunkInfo RpLightChunkInfo; typedef struct RpLightChunkInfo _rpLight; +#if (!defined(DOXYGEN)) struct RpLightChunkInfo { RwReal radius; /**< radius */ @@ -1234,6 +1263,7 @@ struct RpLightChunkInfo RwReal minusCosAngle; /**< minusCosAngle */ RwUInt32 typeAndFlags; /**< typeAndFlags */ }; +#endif /* (!defined(DOXYGEN)) */ /* Type ID */ #define rpLIGHT 3 @@ -1242,7 +1272,7 @@ struct RpLightChunkInfo #define rpLIGHTPOSITIONINGSTART 0x80 /** - * \ingroup rpworlddatatypes + * \ingroup rplight * \ref RpLightType are * light sub types. This type represents the different * types of light source that can be created using the API function \ref RpLightCreate. @@ -1265,12 +1295,17 @@ enum RpLightType typedef enum RpLightType RpLightType; #define rpLIGHTMINCONEANGLE ((RwReal)0.0f) -#if ((defined(XBOX_DRVMODEL_H)) || (defined(OPENGL_DRVMODEL_H)) || (defined(GCN_DRVMODEL_H))) -/* XBox has Micro$oft-penned drivers, no wonder it crashes... */ -/* OpenGL and GCN clamp to 90 internally, so we mirror that behaviour */ -#define rpLIGHTMAXCONEANGLE ((RwReal)89.9999f) + +#if (defined(XBOX_DRVMODEL_H)) +#define rpLIGHTMAXCONEANGLE (rwPIOVER2) +#elif (defined(OPENGL_DRVMODEL_H)) +#define rpLIGHTMAXCONEANGLE (rwPIOVER2) +#elif (defined(GCN_DRVMODEL_H)) +#define rpLIGHTMAXCONEANGLE (rwPIOVER2) +#elif (defined(D3D8_DRVMODEL_H)) +#define rpLIGHTMAXCONEANGLE (rwPIOVER2) #else -#define rpLIGHTMAXCONEANGLE ((RwReal)180.0f) +#define rpLIGHTMAXCONEANGLE (rwPI) #endif /*************/ @@ -1280,7 +1315,7 @@ typedef enum RpLightType RpLightType; /*************/ /** - * \ingroup rpworlddatatypes + * \ingroup rplight * \ref RpLightFlag defines what geometry is influenced by the light. * The bit-field RpLightFlag specifies the options available for controlling the scope * of a light source (see API function \ref RpLightSetFlags):*/ @@ -1327,10 +1362,10 @@ MACRO_STOP /** - * \ingroup rpworlddatatypes - * \typedef RpLight - * Light. This should be - * considered an opaque type. User the RpLight API functions to access. + * \ingroup rplight + * \struct RpLight + * Light object. This should be + * considered an opaque type. Use the RpLight API functions to access. */ typedef struct RpLight RpLight; @@ -1349,8 +1384,7 @@ struct RpLight #endif /* (!defined(DOXYGEN)) */ /** - * \ingroup rpworlddatatypes - * \typedef RpLightCallBack + * \ingroup rplight * \ref RpLightCallBack * represents the function called from \ref RpWorldForAllLights and * \ref RpWorld SectorForAllLights for all lights in a given world or world @@ -1358,25 +1392,34 @@ struct RpLight * indicate success. The callback may return NULL to terminate further * callbacks on the world sector. * + * \param light Pointer to the current light in the world + * sector. + * \param data Pointer to developer-defined data structure. + * * \return Pointer to the current light. - * - * \param light Pointer to the current light in the world - * sector. - * \param data Pointer to developer-defined data structure. */ typedef RpLight *(*RpLightCallBack) (RpLight * light, void *data); typedef struct RpLightTie RpLightTie; +/** + * \ingroup rplight + * \struct RpLightTie + * + * RpLightTie is a linked list of lights inside world sectors. These are + * created when frame hierarchies are updated as part of an \ref RwCameraBeginUpdate. + * This is used for determining which lights influence a world sector and the atomics inside it. + * Creation and destruction of RpLightTies is internal to the world plugin. + */ struct RpLightTie { /* Information for an atomic sector */ - RwLLLink lightInWorldSector; /* Lights IN this ATOMIC SECTOR */ - RpLight *light; + RwLLLink lightInWorldSector; /**< Lights IN this ATOMIC SECTOR */ + RpLight *light; /**< A pointer to a light */ /* Information for a atomic */ - RwLLLink WorldSectorInLight; /* Atomic sectors HOLDING this Light */ - RpWorldSector *sect; + RwLLLink WorldSectorInLight; /**< Atomic sectors HOLDING this Light */ + RpWorldSector *sect; /**< A pointer to a world sector */ }; @@ -1453,6 +1496,7 @@ extern RwUInt32 RpLightGetFlags(const RpLight *light); #endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ /* API Functions */ +extern void RpLightSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); extern RpLight *RpLightCreate(RwInt32 type); extern RwBool RpLightDestroy(RpLight *light); extern RpLight *RpLightSetRadius(RpLight *light, RwReal radius); @@ -1491,9 +1535,7 @@ extern RwBool RpLightValidatePlugins(const RpLight * light); /*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/d3d8/D3D8lights.h ---*/ -/** - * \ingroup rplightd3d8 - * \typedef RpD3D8AttenuationParams +/* * typedef for struct RpD3D8AttenuationParams */ typedef struct RpD3D8AttenuationParams RpD3D8AttenuationParams; @@ -1546,21 +1588,6 @@ _rwD3D8LightsClose(void); #endif /* __cplusplus */ -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/p2stdclsw.h ---*/ -typedef RpLight *RxLight; -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxClusterDefinition RxClLights; /* Uses the RxLight type (see above) */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - - /*--- Automatically derived from: c:/daily/rwsdk/world/bageomet.h ---*/ /* @@ -1579,7 +1606,7 @@ extern RxClusterDefinition RxClLights; /* Uses the RxLight type (see above) */ #define rpGEOMETRY 8 /** - * \ingroup rpworlddatatypes + * \ingroup rpgeometry * RpGeometryFlag * Geometry type flags * @@ -1630,7 +1657,7 @@ typedef enum RpGeometryFlag RpGeometryFlag; #define rpGEOMETRYTEXCOORDSETS(_num) ((_num & 0xff) << 16) /** - * \ingroup rpworlddatatypes + * \ingroup rpgeometry * RpGeometryLockMode * Geometry lock flags */ @@ -1665,22 +1692,25 @@ typedef enum RpGeometryLockMode RpGeometryLockMode; */ typedef struct rpGeometryGlobals rpGeometryGlobals; + +#if (!defined(DOXYGEN)) struct rpGeometryGlobals { RwFreeList *geomFreeList; }; +#endif /* (!defined(DOXYGEN)) */ /** - * \ingroup rpworlddatatypes - * \typedef RpGeometry + * \ingroup rpgeometry + * \struct RpGeometry * Geometry object. This should be considered an opaque type. * Use the RpGeometry API functions to access. */ typedef struct RpGeometry RpGeometry; /** - * \ingroup rpworlddatatypes - * \typedef RpMorphTarget + * \ingroup rpmorphtarget + * \struct RpMorphTarget * Morph target -- vertex positions and normals. * This should be considered an opaque type. * Use RpMorphTarget API functions to access. @@ -1700,7 +1730,7 @@ struct RpMorphTarget typedef struct RpTriangle RpTriangle; /** - * \ingroup rpworlddatatypes + * \ingroup rpgeometry * \struct RpTriangle * This type represents a triangle in a geometry specified * by three indices into the geometry's vertex list (vertIndex) @@ -1736,18 +1766,12 @@ struct RpGeometry RwTexCoords *texCoords[rwMAXTEXTURECOORDS]; /* Texture coordinates */ - RwSurfaceProperties ignoredSurfaceProps; /* Not used in pp rendering, but present - * so if pipe1 files are read and written these - * values are not lost - */ - RpMeshHeader *mesh; /* The mesh - groups polys of the same material */ RwResEntry *repEntry; /* Information for an instance */ RpMorphTarget *morphTarget; /* The Morph Target */ }; -#endif /* (!defined(DOXYGEN)) */ typedef struct RpGeometryChunkInfo RpGeometryChunkInfo; typedef struct RpGeometryChunkInfo _rpGeometry; @@ -1760,27 +1784,27 @@ struct RpGeometryChunkInfo RwInt32 numVertices; RwInt32 numMorphTargets; - - RwSurfaceProperties ignoredSurfaceProps; }; +#endif /* (!defined(DOXYGEN)) */ /* Callbacks */ /** - * \ingroup rpworlddatatypes - * \typedef RpGeometryCallBack + * \ingroup rpgeometry * \ref RpGeometryCallBack represents the simple callback function for the \ref RpGeometry object. * The callback may return NULL to terminate further callbacks on * the geometry. * * \param geometry Pointer to the current geometry, supplied by iterator. - * \param data Pointer to developer-defined data structure. + * \param data Pointer to developer-defined data structure. + * + * \return */ typedef RpGeometry *(*RpGeometryCallBack)(RpGeometry *geometry, void *data); /** - * \ingroup rpworlddatatypes - * \typedef RpGeometrySortByMaterialCallBack + * \ingroup rpgeometry + * \ref RpGeometrySortByMaterialCallBack * \ref RpGeometrySortByMaterialCallBack is used by * \ref RpGeometrySortByMaterial in order to preserve the validity of plugin * data when the vertices in an \ref RpGeometry are sorted (and some possibly @@ -1790,11 +1814,11 @@ typedef RpGeometry *(*RpGeometryCallBack)(RpGeometry *geometry, void *data); * vertex in the new geometry, the index of the corresponding vertex in the * original geometry. * - * \param oldGeom Pointer to the source geometry. - * \param newGeom Pointer to the new, sorted geometry. - * \param remapTable pointer to the vertex map table + * \param oldGeom Pointer to the source geometry. + * \param newGeom Pointer to the new, sorted geometry. + * \param remapTable Pointer to the vertex map table * \param numberOfEntries Number of vertices in the new - * geometry (size of the map table) + * geometry (size of the map table) */ typedef void (*RpGeometrySortByMaterialCallBack)(const RpGeometry *oldGeom, RpGeometry *newGeom, @@ -2106,25 +2130,10 @@ RpGeometrySetFlags(RpGeometry *geometry, #endif -/* Lighting characteristics */ - -extern const RwSurfaceProperties * -_rpGeometryGetSurfaceProperties(const RpGeometry *geometry); - -extern RpGeometry * -_rpGeometrySetSurfaceProperties(RpGeometry *geometry, - const RwSurfaceProperties *surfaceProperties); - #ifdef __cplusplus } #endif /* __cplusplus */ -#define RpGeometryGetSurfaceProperties(_geometry) \ - _rpGeometryGetSurfaceProperties(_geometry) - -#define RpGeometrySetSurfaceProperties(_geometry, _surfaceProperties) \ - _rpGeometrySetSurfaceProperties(_geometry, _surfaceProperties) - #define rpGeometryAddRef(_geometry) \ _rpGeometryAddRef(_geometry) @@ -2164,7 +2173,7 @@ enum RpInterpolatorFlag typedef enum RpInterpolatorFlag rpInterpolatorFlag; /** - * \ingroup rpworlddatatypes + * \ingroup rpatomic * The bit-field type RpAtomicFlag specifies the options available for * controlling the behavior of atomics. See API function \ref RpAtomicSetFlags. * @@ -2188,7 +2197,7 @@ enum RpAtomicFlag typedef enum RpAtomicFlag RpAtomicFlag; /** - * \ingroup rpworlddatatypes + * \ingroup rpatomic * \ref RpAtomicSetGeomFlag defines how an atomic references a new geometry * * \see RpAtomicSetGeometry @@ -2214,16 +2223,16 @@ typedef enum RpAtomicPrivateFlag rpAtomicPrivateFlag; /** - * \ingroup rpworlddatatypes - * \typedef RpAtomic + * \ingroup rpatomic + * \struct RpAtomic * Atomic Geometry object. This should be * considered an opaque type. Use the RpAtomic API functions to access. */ typedef struct RpAtomic RpAtomic; /** - * \ingroup rpworlddatatypes - * \typedef RpInterpolator + * \ingroup rpinterpolator + * \struct RpInterpolator * Morph Target Interpolator. * This should be considered an opaque type. * Use the RpInterpolator API functions to access. @@ -2245,16 +2254,15 @@ struct RpInterpolator /* More callbacks */ /** - * \ingroup rpworlddatatypes - * \typedef RpClump + * \ingroup rpclump + * \struct RpClump * Clump Geometry object. This should be * considered an opaque type. Use the RpClump API functions to access. */ typedef struct RpClump RpClump; /** - * \ingroup rpworlddatatypes - * \typedef RpClumpCallBack + * \ingroup rpclump * \ref RpClumpCallBack represents the * function called from \ref RwCameraForAllClumpsInFrustum and * \ref RwCameraForAllClumpsNotInFrustum when a clump lies inside the current camera's @@ -2263,8 +2271,8 @@ typedef struct RpClump RpClump; * NULL to terminate further callbacks on the clumps. * * \param clump Pointer to the current clump, supplied by - * iterator. - * \param data Pointer to developer-defined data structure. + * iterator. + * \param data Pointer to developer-defined data structure. * * \return Pointer to the current clump. * @@ -2303,8 +2311,7 @@ struct RpClump #endif /* (!defined(DOXYGEN)) */ /** - * \ingroup rpworlddatatypes - * \typedef RpAtomicCallBackRender + * \ingroup rpatomic * \ref RpAtomicCallBackRender represents the function called from * \ref RpAtomicRender when the specified atomic * lies inside the current camera's view frustum. The default callback @@ -2312,10 +2319,13 @@ struct RpClump * return a pointer to the atomic to indicate success. * * \param atomic Pointer to the current atomic, supplied by - * iterator. + * iterator. + * + * \return Returns a pointer to the atomic to indicate success. * * \see RpAtomicRender */ + typedef RpAtomic *(*RpAtomicCallBackRender) (RpAtomic * atomic); #if (!defined(DOXYGEN)) @@ -2356,8 +2366,7 @@ struct RpAtomic #endif /* (!defined(DOXYGEN)) */ /** - * \ingroup rpworlddatatypes - * \typedef RpAtomicCallBack + * \ingroup rpatomic * \ref RpAtomicCallBack represents the function called from \ref RpWorldSectorForAllAtomics and * \ref RpClumpForAllAtomics for all atomics in a given world sector or clump. * This function should return a pointer to the current atomic to indicate @@ -2365,28 +2374,40 @@ struct RpAtomic * the world sector. * * \param atomic Pointer to the current atomic, supplied by - * iterator. - * \param data Pointer to developer-defined data structure. + * iterator. + * \param data Pointer to developer-defined data structure. + * + * \return Returns a pointer to the current atomic */ typedef RpAtomic *(*RpAtomicCallBack) (RpAtomic * atomic, void *data); typedef struct RpTie RpTie; +/** + * \ingroup rpatomic + * \struct RpTie + * + * RpTie is a linked list of atomics inside world sectors. These are + * created when frame hierarchies are updated as part of an \ref RwCameraBeginUpdate. + * This is used for frustum culling atomics by world sector. + * Creation and destruction of RpTies is internal to the world plugin. + */ struct RpTie { /* Information for an atomic sector */ - RwLLLink lAtomicInWorldSector; /* Atomics IN this ATOMIC SECTOR */ - RpAtomic *apAtom; + RwLLLink lAtomicInWorldSector; /**< Atomics IN this ATOMIC SECTOR */ + RpAtomic *apAtom; /**< An atomic */ /* Information for a atomic */ - RwLLLink lWorldSectorInAtomic; /* Atomic sectors HOLDING this atomic */ - RpWorldSector *worldSector; + RwLLLink lWorldSectorInAtomic; /**< Atomic sectors HOLDING this atomic */ + RpWorldSector *worldSector; /**< A world sector */ }; typedef struct RpClumpChunkInfo RpClumpChunkInfo; typedef struct RpClumpChunkInfo _rpClump; typedef struct RpClumpChunkInfo33000 _rpClump33000; +#if (!defined(DOXYGEN)) struct RpClumpChunkInfo { RwInt32 numAtomics; @@ -2398,6 +2419,7 @@ struct RpClumpChunkInfo33000 { RwInt32 numAtomics; }; +#endif /* (!defined(DOXYGEN)) */ /**************************************************************************** <macro/inline functionality @@ -2608,6 +2630,12 @@ extern "C" #endif /* __cplusplus */ +extern void +RpAtomicSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + +extern void +RpClumpSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + /* Macro version of RpAtomicSetRenderCallBack needs this */ extern RpAtomic * AtomicDefaultRenderCallBack(RpAtomic * atomic); @@ -2918,7 +2946,7 @@ enum RpWorldPrivateFlag typedef enum RpWorldPrivateFlag RpWorldPrivateFlag; /** - * \ingroup rpworlddatatypes + * \ingroup rpworldsub * The bit-field type \ref RpWorldFlag specifies the options available * for creating the static geometry component of a world (see API function \ref RpWorldSetFlags): */ @@ -3027,7 +3055,7 @@ typedef enum RpWorldFlag RpWorldFlag; /** - * \ingroup rpworlddatatypes + * \ingroup rpworldsub * \ref RpWorldRenderOrder * represents the options available for * the rendering order of world sectors in the camera's view frustum (see @@ -3043,25 +3071,25 @@ enum RpWorldRenderOrder typedef enum RpWorldRenderOrder RpWorldRenderOrder; /** - * \ingroup rpworlddatatypes - * \typedef RpWorldSectorCallBackRender + * \ingroup rpworldsector * \ref RpWorldSectorCallBackRender represents the function called from * \ref RpWorldSectorRender when the specified world sector lies inside the * current camera's view frustum. The default callback initiates execution of * the world sector rendering pipeline. This function should return a pointer * to the world sector to indicate success * + * \param worldSector Pointer to the world sector to be + * rendered + * * \return Pointer to the world sector. * - * \param worldSector Pointer to the world sector to be - * rendered */ typedef RpWorldSector *(*RpWorldSectorCallBackRender) (RpWorldSector * worldSector); /** - * \ingroup rpworlddatatypes - * \typedef RpWorld + * \ingroup rpworldsub + * \struct RpWorld * World object. This should be considered an opaque type. * Use the RpWorld API functions to access. */ @@ -3104,9 +3132,6 @@ struct RpWorld /* Bounding box around the whole world */ RwBBox boundingBox; - /* Surface properties */ - RwSurfaceProperties surfaceProps; - /* The callbacks functions */ RpWorldSectorCallBackRender renderCallBack; @@ -3191,13 +3216,6 @@ extern RwBool RpWorldDestroy(RpWorld * world); extern RpWorld *RpWorldCreate(RwBBox * boundingBox); extern RwBool RpWorldInstance(RpWorld *world); -/* Getting/setting */ -extern RpWorld *_rpWorldSetSurfaceProperties(RpWorld * world, - const RwSurfaceProperties - * surface); -extern const RwSurfaceProperties * - _rpWorldGetSurfaceProperties(const RpWorld *world); - /* Sector callbacks */ extern RpWorld *RpWorldSetSectorRenderCallBack(RpWorld * world, RpWorldSectorCallBackRender @@ -3260,12 +3278,6 @@ extern RwUInt32 RpWorldGetFlags(const RpWorld *world); } #endif /* __cplusplus */ -#define RpWorldSetSurfaceProperties(_world, _surface) \ - _rpWorldSetSurfaceProperties(_world, _surface) - -#define RpWorldGetSurfaceProperties(_world) \ - _rpWorldGetSurfaceProperties(_world) - #define rpWorldFindBBox(_world, _boundingBox) \ _rpWorldFindBBox(_world, _boundingBox) @@ -3292,7 +3304,7 @@ extern RwUInt32 RpWorldGetFlags(const RpWorld *world); typedef struct RxD3D8ResEntryHeader RxD3D8ResEntryHeader; /** - * \ingroup rpworldd3d8 + * \ingroup worldextensionsd3d8 * \struct RxD3D8ResEntryHeader * This structure contains D3D8 resource specific components. */ @@ -3305,7 +3317,7 @@ struct RxD3D8ResEntryHeader /* This is what I keep in memory as part of the instance data setup */ typedef struct RxD3D8InstanceData RxD3D8InstanceData; /** - * \ingroup rpworldd3d8 + * \ingroup worldextensionsd3d8 * \struct RxD3D8InstanceData * This structure contains D3D8 resource specific components. */ @@ -3337,7 +3349,7 @@ struct RxD3D8InstanceData }; /** - * \ingroup rpworldd3d8 + * \ingroup worldextensionsd3d8 * \ref RxD3D8AllInOneInstanceCallBack callback function. * * \param object Pointer to the object. @@ -3354,7 +3366,7 @@ typedef RwBool (*RxD3D8AllInOneInstanceCallBack)(void *object, RwBool reinstance); /** - * \ingroup rpworldd3d8 + * \ingroup worldextensionsd3d8 * \ref RxD3D8AllInOneReinstanceCallBack callback function. * * \param object Pointer to the object. @@ -3373,7 +3385,7 @@ typedef RwBool (*RxD3D8AllInOneReinstanceCallBack)(void *object, RxD3D8AllInOneInstanceCallBack instanceCallback); /** - * \ingroup rpworldd3d8 + * \ingroup worldextensionsd3d8 * \ref RxD3D8AllInOneLightingCallBack callback function. * * \param object Void pointer to the object. @@ -3386,7 +3398,7 @@ typedef RwBool (*RxD3D8AllInOneReinstanceCallBack)(void *object, typedef void (*RxD3D8AllInOneLightingCallBack)(void *object); /** - * \ingroup rpworldd3d8 + * \ingroup worldextensionsd3d8 * \ref RxD3D8AllInOneRenderCallBack callback function. * * \param repEntry Pointer to a resource entry. @@ -3443,9 +3455,6 @@ RxD3D8AllInOneGetRenderCallBack(RxPipelineNode *node); /*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/bapipew.h ---*/ -#define RpWorldGetGenericSectorPipelineMacro() \ - (RXPIPELINEGLOBAL(genericWorldSectorPipeline)) - #define RpWorldGetDefaultSectorPipelineMacro() \ (RXPIPELINEGLOBAL(currentWorldSectorPipeline)) @@ -3461,9 +3470,6 @@ RxD3D8AllInOneGetRenderCallBack(RxPipelineNode *node); #define RpWorldSectorGetPipelineMacro(_sector, _pipeline) \ ( (*(_pipeline) = (_sector)->pipeline), _sector ) -#define RpAtomicGetGenericPipelineMacro() \ - (RXPIPELINEGLOBAL(genericAtomicPipeline)) - #define RpAtomicGetDefaultPipelineMacro() \ (RXPIPELINEGLOBAL(currentAtomicPipeline)) @@ -3473,9 +3479,6 @@ RxD3D8AllInOneGetRenderCallBack(RxPipelineNode *node); #define RpAtomicGetPipelineMacro(_atomic, _pipeline) \ ( (*(_pipeline) = (_atomic)->pipeline), _atomic ) -#define RpMaterialGetGenericPipelineMacro() \ - (RXPIPELINEGLOBAL(genericMaterialPipeline)) - #define RpMaterialGetDefaultPipelineMacro() \ (RXPIPELINEGLOBAL(currentMaterialPipeline)) @@ -3488,19 +3491,16 @@ RxD3D8AllInOneGetRenderCallBack(RxPipelineNode *node); #if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) -#define RpWorldGetGenericSectorPipeline RpWorldGetGenericSectorPipelineMacro #define RpWorldGetDefaultSectorPipeline RpWorldGetDefaultSectorPipelineMacro #define RpWorldSetSectorPipeline RpWorldSetSectorPipelineMacro #define RpWorldGetSectorPipeline RpWorldGetSectorPipelineMacro #define RpWorldSectorSetPipeline RpWorldSectorSetPipelineMacro #define RpWorldSectorGetPipeline RpWorldSectorGetPipelineMacro -#define RpAtomicGetGenericPipeline RpAtomicGetGenericPipelineMacro #define RpAtomicGetDefaultPipeline RpAtomicGetDefaultPipelineMacro #define RpAtomicSetPipeline RpAtomicSetPipelineMacro #define RpAtomicGetPipeline RpAtomicGetPipelineMacro -#define RpMaterialGetGenericPipeline RpMaterialGetGenericPipelineMacro #define RpMaterialGetDefaultPipeline RpMaterialGetDefaultPipelineMacro #define RpMaterialSetPipeline RpMaterialSetPipelineMacro #define RpMaterialGetPipeline RpMaterialGetPipelineMacro @@ -3556,7 +3556,6 @@ extern RpGeometry *RpGeometrySortByMaterial(const RpGeometry * geometry, #endif /* __cplusplus */ /* LEGACY-SUPPORT macros */ -#define RpWorldGetGenericSectorInstancePipeline RpWorldGetGenericSectorPipeline #define RpWorldSetDefaultSectorInstancePipeline RpWorldSetDefaultSectorPipeline #define RpWorldGetDefaultSectorInstancePipeline RpWorldGetDefaultSectorPipeline #define RpWorldSetSectorInstancePipeline RpWorldSetSectorPipeline @@ -3564,13 +3563,11 @@ extern RpGeometry *RpGeometrySortByMaterial(const RpGeometry * geometry, #define RpWorldSectorSetInstancePipeline RpWorldSectorSetPipeline #define RpWorldSectorGetInstancePipeline RpWorldSectorGetPipeline -#define RpAtomicGetGenericInstancePipeline RpAtomicGetGenericPipeline #define RpAtomicGetDefaultInstancePipeline RpAtomicGetDefaultPipeline #define RpAtomicSetDefaultInstancePipeline RpAtomicSetDefaultPipeline #define RpAtomicSetInstancePipeline RpAtomicSetPipeline #define RpAtomicGetInstancePipeline RpAtomicGetPipeline -#define RpMaterialGetGenericRenderPipeline RpMaterialGetGenericPipeline #define RpMaterialSetDefaultRenderPipeline RpMaterialSetDefaultPipeline #define RpMaterialGetDefaultRenderPipeline RpMaterialGetDefaultPipeline #define RpMaterialSetRenderPipeline RpMaterialSetPipeline @@ -3587,6 +3584,9 @@ extern "C" { #endif /* __cplusplus */ +extern void RpTieSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); +extern void RpLightTieSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + /* Adding and removing cameras to/from the world */ extern RpWorld *RpWorldRemoveCamera(RpWorld *world, RwCamera *camera); extern RpWorld *RpWorldAddCamera(RpWorld *world, RwCamera *camera); @@ -3648,6 +3648,7 @@ extern RpWorldSector *RpWorldSectorForAllLights(RpWorldSector *sector, typedef struct RpWorldChunkInfoSector RpWorldSectorChunkInfo; typedef struct RpWorldChunkInfoSector _rpWorldSector; +#if (!defined(DOXYGEN)) struct RpWorldChunkInfoSector { RwInt32 matListWindowBase; @@ -3655,10 +3656,11 @@ struct RpWorldChunkInfoSector RwInt32 numVertices; RwV3d inf; RwV3d sup; - RwBool collSectorPresent; + RwBool collSectorPresent; /* unused but retains same struct size */ RwBool unused; }; + typedef struct RpPlaneSectorChunkInfo RpPlaneSectorChunkInfo; typedef struct RpPlaneSectorChunkInfo _rpPlaneSector; @@ -3681,6 +3683,26 @@ struct RpWorldChunkInfo RwV3d invWorldOrigin; + RwInt32 numPolygons; + RwInt32 numVertices; + RwInt32 numPlaneSectors; + RwInt32 numWorldSectors; + RwInt32 colSectorSize; + + RwInt32 format; /* Flags about the world */ + + /* Added in 34003 */ + RwBBox boundingBox; +}; + +typedef struct rpWorldChunkInfo34000 rpWorldChunkInfo34000; + +struct rpWorldChunkInfo34000 +{ + RwBool rootIsWorldSector; + + RwV3d invWorldOrigin; + RwSurfaceProperties surfaceProps; RwInt32 numPolygons; @@ -3691,6 +3713,7 @@ struct RpWorldChunkInfo RwInt32 format; /* Flags about the world */ }; +#endif /* (!defined(DOXYGEN)) */ /**************************************************************************** Function prototypes diff --git a/rwsdk/include/d3d8/rt2d.h b/rwsdk/include/d3d8/rt2d.h index 5bf1faea..0584d3a5 100644 --- a/rwsdk/include/d3d8/rt2d.h +++ b/rwsdk/include/d3d8/rt2d.h @@ -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,13 +405,37 @@ 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 * enumeration describing Justification */ @@ -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 */ diff --git a/rwsdk/include/d3d8/rt2d.rpe b/rwsdk/include/d3d8/rt2d.rpe index 1f9f8881..b18db155 100644 --- a/rwsdk/include/d3d8/rt2d.rpe +++ b/rwsdk/include/d3d8/rt2d.rpe @@ -150,476 +150,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_Criterion2D { +E_RW_FONTNOTFOUND, e_rwdb_Criterion2DLAST = RWFORCEENUMSIZEINT }; diff --git a/rwsdk/include/d3d8/rt2danim.h b/rwsdk/include/d3d8/rt2danim.h index cd593a8e..996262af 100644 --- a/rwsdk/include/d3d8/rt2danim.h +++ b/rwsdk/include/d3d8/rt2danim.h @@ -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 Rt2dAnimObjectUpdate Rt2dAnimObjectUpdate; +typedef struct Rt2dKeyFrameSet Rt2dKeyFrameSet; /** * \ingroup rt2danimsub - * \typedef Rt2dKeyFrameTransform - * typedef for a structure describing a transform change to a 2d object (opaque) + * \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 Rt2dKeyFrameTransform Rt2dKeyFrameTransform; +typedef struct Rt2dAnimObjectUpdate Rt2dAnimObjectUpdate; /** * \ingroup rt2danimsub - * \typedef Rt2dKeyFrameColor - * typedef for a structure describing a color 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; + +/* + * 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. */ @@ -531,6 +570,18 @@ typedef Rt2dMessage * */ /* + * 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)) */ diff --git a/rwsdk/include/d3d8/rt2danim.rpe b/rwsdk/include/d3d8/rt2danim.rpe index 82a9dac9..0e61ec5c 100644 --- a/rwsdk/include/d3d8/rt2danim.rpe +++ b/rwsdk/include/d3d8/rt2danim.rpe @@ -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; diff --git a/rwsdk/include/d3d8/rtbary.h b/rwsdk/include/d3d8/rtbary.h index 61c39b07..2531914d 100644 --- a/rwsdk/include/d3d8/rtbary.h +++ b/rwsdk/include/d3d8/rtbary.h @@ -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. */ diff --git a/rwsdk/include/d3d8/rtbary.rpe b/rwsdk/include/d3d8/rtbary.rpe index fdfe3afe..0fec6a77 100644 --- a/rwsdk/include/d3d8/rtbary.rpe +++ b/rwsdk/include/d3d8/rtbary.rpe @@ -166,472 +166,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionBary { diff --git a/rwsdk/include/d3d8/rtbezpat.h b/rwsdk/include/d3d8/rtbezpat.h index 8a5960cb..f25f5ce9 100644 --- a/rwsdk/include/d3d8/rtbezpat.h +++ b/rwsdk/include/d3d8/rtbezpat.h @@ -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. */ diff --git a/rwsdk/include/d3d8/rtbezpat.rpe b/rwsdk/include/d3d8/rtbezpat.rpe index e49b65b4..0f6dc700 100644 --- a/rwsdk/include/d3d8/rtbezpat.rpe +++ b/rwsdk/include/d3d8/rtbezpat.rpe @@ -150,472 +150,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionBEZPATCH { diff --git a/rwsdk/include/d3d8/rtbmp.h b/rwsdk/include/d3d8/rtbmp.h index 37b5c97b..c3bb5c95 100644 --- a/rwsdk/include/d3d8/rtbmp.h +++ b/rwsdk/include/d3d8/rtbmp.h @@ -12,7 +12,7 @@ /** * \defgroup rtbmp RtBMP - * \ingroup rttool + * \ingroup imageconversiontools * * BMP Image Format Toolkit for RenderWare. * diff --git a/rwsdk/include/d3d8/rtbmp.rpe b/rwsdk/include/d3d8/rtbmp.rpe index 29dad089..37c546f9 100644 --- a/rwsdk/include/d3d8/rtbmp.rpe +++ b/rwsdk/include/d3d8/rtbmp.rpe @@ -150,472 +150,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionBMP { diff --git a/rwsdk/include/d3d8/rtcharse.h b/rwsdk/include/d3d8/rtcharse.h index 4fdc2568..6c7a3902 100644 --- a/rwsdk/include/d3d8/rtcharse.h +++ b/rwsdk/include/d3d8/rtcharse.h @@ -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 */ diff --git a/rwsdk/include/d3d8/rtcharse.rpe b/rwsdk/include/d3d8/rtcharse.rpe index 39c37312..30c5ff4d 100644 --- a/rwsdk/include/d3d8/rtcharse.rpe +++ b/rwsdk/include/d3d8/rtcharse.rpe @@ -150,472 +150,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionCharset { diff --git a/rwsdk/include/d3d8/rtimport.h b/rwsdk/include/d3d8/rtimport.h index cf4e6283..2cc6383b 100644 --- a/rwsdk/include/d3d8/rtimport.h +++ b/rwsdk/include/d3d8/rtimport.h @@ -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 -/**************************************************************************** - Global types - */ - -/** - * Internal use only - */ -typedef union RtWorldImportVertexState RtWorldImportVertexState; +/* maintained in Bin-tree */ +#define CONGRUENTVERTEXCHILDREN 2 +/* maintained in Quad-tree */ +#define WELDVERTEXCHILDREN 4 -/** - * \ingroup rtimport - * \typedef RtWorldImportVertex - * - * typedef for struct \ref RtWorldImportVertex +/**************************************************************************** + Global types */ +#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 */ diff --git a/rwsdk/include/d3d8/rtimport.rpe b/rwsdk/include/d3d8/rtimport.rpe index d4b7ad2b..ff8d3d5c 100644 --- a/rwsdk/include/d3d8/rtimport.rpe +++ b/rwsdk/include/d3d8/rtimport.rpe @@ -149,472 +149,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionNoHSWorld { diff --git a/rwsdk/include/d3d8/rtintel.h b/rwsdk/include/d3d8/rtintel.h deleted file mode 100644 index c11329df..00000000 --- a/rwsdk/include/d3d8/rtintel.h +++ /dev/null @@ -1,1206 +0,0 @@ -/** - * Intel specific support toolkit - */ - -/********************************************************************** - * - * File : rtintel.h - * - * Abstract : Intel specific support/emulation - * - ********************************************************************** - * - * 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 RTINTEL_H -#define RTINTEL_H - -/** - * \defgroup rtintel RtIntel - * \ingroup rttool - * - * Intel CPU Toolkit for RenderWare. - */ - -/**************************************************************************** - Include files - */ - -/* - * Pick up - * typedef struct _rwResEntryTag RwResEntry; - * from baresour.h (internal) / rwcore.h (external) - */ - -/**************************************************************************** - Global Types - */ - -#include "rtintel.rpe" /* automatically generated header file */ - -#if (!defined(RW_FIXED_64)) -typedef struct RwFixed64 RwFixed64; -struct RwFixed64 -{ - RwInt32 msb; - RwUInt32 lsb; -}; - -#define RW_FIXED_64 -#endif /* (!defined(RW_FIXED_64)) */ - -#define doubleFromRwFixed64(x) \ - ( ((double)((x).msb))*((double)(1<<16))*((double)(1<<16)) \ - + ((double)((x).lsb)) ) - -#if (!defined(RPINTELTIMEFUNCTION)) -typedef RwBool(*RtIntelTimeFunction) (void *data); - -#define RPINTELTIMEFUNCTION -#endif /* (!defined(RPINTELTIMEFUNCTION)) */ - -typedef struct RtIntelOverload RtIntelOverload; - -typedef void (*RwTransformFunction) (RwResEntry * repEntry); - -struct RtIntelOverload -{ - rwMatrixMultFn MatrixMultiplyFunction; - rwVectorMultFn VectorMultPointFunction; - rwVectorMultFn VectorMultVectorFunction; - RwTransformFunction TransformFunction; -}; - -#if (defined(__ICL)) -#define DEFINED__ICL " __ICL" -#define UNDEFINED__ICL "" -#else /* (defined(__ICL)) */ -#define DEFINED__ICL "" -#define UNDEFINED__ICL " __ICL" -#endif /* (defined(__ICL)) */ - -#if (defined(_MSC_VER)) - -# pragma comment ( user, "comment:" __FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) ") : " "DEFINED " DEFINED__ICL " ; UNDEFINED " UNDEFINED__ICL ) -/* # pragma message (__FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) ") : " "DEFINED " DEFINED__ICL " ; UNDEFINED " UNDEFINED__ICL ) */ -/* # pragma comment ( user, "comment:" __FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) ") : " "DEFINED " DEFINED__ICL " ; UNDEFINED " UNDEFINED__ICL ) */ -#if (! (defined(__ICL) || defined(XBOX_DRVMODEL_H)) ) -#pragma message (__DATE__ " " __TIME__ " " __FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) ") : No MMX intrinsics - defaulting to software emulation") -#pragma message (__DATE__ " " __TIME__ " " __FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) ") : No SSE intrinsics - defaulting to software emulation") -#pragma comment ( user, "comment:" __FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) ") : No MMX intrinsics - defaulting to software emulation") -#endif /* (! (defined(__ICL) || defined(XBOX_DRVMODEL_H)) ) */ -#endif /* (defined(_MSC_VER)) */ - -/* - * MMX - */ - -#if (defined(__ICL)) - -#if (!defined(MMINTRIN_H)) -#include "mmintrin.h" -#define MMINTRIN_H -#endif /* (!defined(MMINTRIN_H)) */ - -#else /* (defined(__ICL)) */ - -#if (defined(_MSC_VER)) - -#if (!defined(__M64)) -typedef __int64 Rt_m64; - -#define __M64 -#endif /* (!defined(__M64)) */ - -#else /* (defined(_MSC_VER)) -- e.g. __GNUC__ */ - -#if (!defined(__M64)) - -typedef RwInt64 Rt_m64; - -#define __M64 - -#endif /* (!defined(__M64)) */ - -#endif /* (defined(_MSC_VER)) */ - -#endif /* (defined(__ICL)) */ - -/* - * SSE - */ - -/* - * From - * ccomp.pdf - * 12 Intel C/C++ Compiler User's Guide - * for Win32 Systems With Katmai New Instruction Support - * -------------------------------------------------------- - * Functionality Intrinsics Usage - * You need only define one preprocessor symbol and include the header file - * xmmintrin.h in your application to use the following functionality - * intrinsics: - * #define _MM_FUNCTIONALITY - * #include "xmmintrin.h" - * To encourage the compiler to inline the functionality intrinsic functions for - * better performance, consider using the -Qip and -Qipo compiler switches. - */ - -#if (defined(__ICL)) - -/* #define _MM2_FUNCTIONALITY */ - -/* #define _MM_FUNCTIONALITY */ - -/* #define _MM_NO_ABORT */ - -/* #define _MM_NO_ACCURACY */ - -/* #define _MM_NO_ALIGN_CHECK */ - -/* #define _MM_NO_INLINE */ - -/* - * Undefine "or", since this is valid assembler; e.g. in - * SDK10/include/xmm_func.h - * _asm { - * push eax - * fld f - * fstcw saved_cw - * mov eax, saved_cw - * or eax, 3072 - * mov new_cw, eax - * fldcw new_cw - * fistp ret - * fldcw saved_cw - * pop eax - * } - */ - -#if (!defined(XMMINTRIN_H)) -#include "xmmintrin.h" -#define XMMINTRIN_H -#endif /* (!defined(XMMINTRIN_H)) */ - -typedef __m64 Rt_m64; -typedef __m128 Rt_m128; - -#if (450 <= __ICL) -#if (!defined(EMMINTRIN_H)) -#include "emmintrin.h" -#define EMMINTRIN_H -typedef __m128d Rt_m128d; -typedef __m128i Rt_m128i; -#endif /* (!defined(EMMINTRIN_H)) */ -#else /* (450 <= __ICL) */ -typedef __m128 Rt_m128d; -typedef __m128 Rt_m128i; -#endif /* (450 <= __ICL) */ - -/* - * Report SSE options as compiler messages and object file comments - */ - -#ifdef _MM2_FUNCTIONALITY -#define DEFINED__MM2_FUNCTIONALITY " _MM2_FUNCTIONALITY" -#define UNDEFINED__MM2_FUNCTIONALITY "" -#else /* _MM2_FUNCTIONALITY */ -#define DEFINED__MM2_FUNCTIONALITY "" -#define UNDEFINED__MM2_FUNCTIONALITY " _MM2_FUNCTIONALITY" -#endif /* _MM2_FUNCTIONALITY */ - -#ifdef _MM_FUNCTIONALITY -#define DEFINED__MM_FUNCTIONALITY DEFINED__MM2_FUNCTIONALITY ## " _MM_FUNCTIONALITY" -#define UNDEFINED__MM_FUNCTIONALITY UNDEFINED__MM2_FUNCTIONALITY -#else /* _MM_FUNCTIONALITY */ -#define DEFINED__MM_FUNCTIONALITY DEFINED__MM2_FUNCTIONALITY -#define UNDEFINED__MM_FUNCTIONALITY UNDEFINED__MM2_FUNCTIONALITY ## " _MM_FUNCTIONALITY" -#endif /* _MM_FUNCTIONALITY */ - -#ifdef _MM_NO_ABORT -#define DEFINED__MM_NO_ABORT DEFINED__MM_FUNCTIONALITY ## " _MM_NO_ABORT" -#define UNDEFINED__MM_NO_ABORT UNDEFINED__MM_FUNCTIONALITY -#else /* _MM_NO_ABORT */ -#define DEFINED__MM_NO_ABORT DEFINED__MM_FUNCTIONALITY -#define UNDEFINED__MM_NO_ABORT UNDEFINED__MM_FUNCTIONALITY ## " _MM_NO_ABORT" -#endif /* _MM_NO_ABORT */ - -#ifdef _MM_NO_ACCURACY -#define DEFINED__MM_NO_ACCURACY DEFINED__MM_NO_ABORT ## " _MM_NO_ACCURACY" -#define UNDEFINED__MM_NO_ACCURACY UNDEFINED__MM_NO_ABORT -#else /* _MM_NO_ACCURACY */ -#define DEFINED__MM_NO_ACCURACY DEFINED__MM_NO_ABORT -#define UNDEFINED__MM_NO_ACCURACY UNDEFINED__MM_NO_ABORT ## " _MM_NO_ACCURACY" -#endif /* _MM_NO_ACCURACY */ - -#ifdef _MM_NO_ALIGN_CHECK -#define DEFINED__MM_NO_ALIGN_CHECK DEFINED__MM_NO_ACCURACY ## " _MM_NO_ALIGN_CHECK" -#define UNDEFINED__MM_NO_ALIGN_CHECK UNDEFINED__MM_NO_ACCURACY -#else /* _MM_NO_ALIGN_CHECK */ -#define DEFINED__MM_NO_ALIGN_CHECK DEFINED__MM_NO_ACCURACY -#define UNDEFINED__MM_NO_ALIGN_CHECK UNDEFINED__MM_NO_ACCURACY ## " _MM_NO_ALIGN_CHECK" -#endif /* _MM_NO_ALIGN_CHECK */ - -#ifdef _MM_NO_INLINE -#define DEFINED__MM_NO_INLINE DEFINED__MM_NO_ALIGN_CHECK ## " _MM_NO_INLINE" -#define UNDEFINED__MM_NO_INLINE UNDEFINED__MM_NO_ALIGN_CHECK -#else /* _MM_NO_INLINE */ -#define DEFINED__MM_NO_INLINE DEFINED__MM_NO_ALIGN_CHECK -#define UNDEFINED__MM_NO_INLINE UNDEFINED__MM_NO_ALIGN_CHECK ## " _MM_NO_INLINE" -#endif /* _MM_NO_INLINE */ - -#pragma comment ( user, "comment:" __DATE__" " __TIME__ " - " __FILE__ ":" RW_STRINGIFY_EXPANDED(__LINE__) ) -#pragma comment ( user, "comment:" "DEFINED :" DEFINED__MM_NO_INLINE ) -#pragma comment ( user, "comment:" "UNDEFINED:" UNDEFINED__MM_NO_INLINE ) - -#pragma message (__DATE__" " __TIME__ " - " __FILE__ ":" RW_STRINGIFY_EXPANDED(__LINE__) ) -#pragma message ("DEFINED :" DEFINED__MM_NO_INLINE ) -#pragma message ("UNDEFINED:" UNDEFINED__MM_NO_INLINE ) - -#else /* (defined(__ICL)) */ - -#define _MM_HINT_T0 1 -#define _MM_HINT_T1 2 -#define _MM_HINT_T2 3 -#define _MM_HINT_NTA 0 - -#if (defined(__R5900__)) -typedef RwInt128 Rt_m128; -#else /* (defined(__R5900__)) */ -#if (!defined(_PAIR__M64)) -struct Rt_m128 -{ - Rt_m64 lo; - Rt_m64 hi; -}; -#define _PAIR__M64 -typedef struct Rt_m128 Rt_m128; -#endif /* (!defined(_PAIR__M64)) */ -#endif /* (defined(__R5900__)) */ - -typedef Rt_m128 Rt_m128d; -typedef Rt_m128 Rt_m128i; -#endif /* (defined(__ICL)) */ - -typedef struct RtIntelV4d RtIntelV4d; -struct RtIntelV4d -{ - RwReal w; - RwV3d v3d; -}; - -typedef union _RpSSEOverlayM128 RpSSEOverlayM128; - -union _RpSSEOverlayM128 -{ - float _f[4]; - RwInt32 _d[4]; - RwUInt32 ud[4]; - RwInt16 _w[8]; - RwUInt16 uw[8]; - RwInt8 _b[16]; - RwUInt8 ub[16]; - Rt_m64 m64[2]; - Rt_m128 m128; - RtIntelV4d v4d; - RwSplitBits bits[4]; -}; - -typedef RpSSEOverlayM128 RpWNIOverlayM128; - -typedef union _RpWNIOverlayM128d RpWNIOverlayM128d; - -union _RpWNIOverlayM128d -{ - double df[2]; - float _f[4]; - RwInt32 _d[4]; - RwUInt32 ud[4]; - RwInt16 _w[8]; - RwUInt16 uw[8]; - RwInt8 _b[16]; - RwUInt8 ub[16]; - Rt_m64 m64[2]; - Rt_m128d m128d; - RtIntelV4d v4d; - RwSplitBits bits[4]; -}; - -typedef union _RpWNIOverlayM128i RpWNIOverlayM128i; - -union _RpWNIOverlayM128i -{ - double df[2]; - float _f[4]; - RwInt32 _d[4]; - RwUInt32 ud[4]; - RwInt16 _w[8]; - RwUInt16 uw[8]; - RwInt8 _b[16]; - RwUInt8 ub[16]; - Rt_m64 m64[2]; - Rt_m128i m128i; - RtIntelV4d v4d; - RwSplitBits bits[4]; -}; - -#define RWUNALIGNED16BYTE(ptr) (0x0000000FUL & ((RwUInt32)(ptr))) - -/*--- Plugin API Functions ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* - * MMX - */ - -/* General support intrinsics */ -extern void Rt_m_empty(void); -extern Rt_m64 Rt_m_from_int(int i); -extern int Rt_m_to_int(Rt_m64 m); -extern Rt_m64 Rt_m_packsswb(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_packssdw(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_packuswb(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_punpckhbw(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_punpckhwd(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_punpckhdq(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_punpcklbw(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_punpcklwd(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_punpckldq(Rt_m64 m1, Rt_m64 m2); - -/* Packed arithmetic intrinsics */ -extern Rt_m64 Rt_m_paddb(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_paddw(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_paddd(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_paddsb(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_paddsw(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_paddusb(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_paddusw(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_psubb(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_psubw(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_psubd(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_psubsb(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_psubsw(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_psubusb(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_psubusw(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_pmaddwd(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_pmulhw(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_pmullw(Rt_m64 m1, Rt_m64 m2); - -/* Shift intrinsics */ -extern Rt_m64 Rt_m_psllw(Rt_m64 m, Rt_m64 count); -extern Rt_m64 Rt_m_psllwi(Rt_m64 m, int count); -extern Rt_m64 Rt_m_pslld(Rt_m64 m, Rt_m64 count); -extern Rt_m64 Rt_m_pslldi(Rt_m64 m, int count); -extern Rt_m64 Rt_m_psllq(Rt_m64 m, Rt_m64 count); -extern Rt_m64 Rt_m_psllqi(Rt_m64 m, int count); -extern Rt_m64 Rt_m_psraw(Rt_m64 m, Rt_m64 count); -extern Rt_m64 Rt_m_psrawi(Rt_m64 m, int count); -extern Rt_m64 Rt_m_psrad(Rt_m64 m, Rt_m64 count); -extern Rt_m64 Rt_m_psradi(Rt_m64 m, int count); -extern Rt_m64 Rt_m_psrlw(Rt_m64 m, Rt_m64 count); -extern Rt_m64 Rt_m_psrlwi(Rt_m64 m, int count); -extern Rt_m64 Rt_m_psrld(Rt_m64 m, Rt_m64 count); -extern Rt_m64 Rt_m_psrldi(Rt_m64 m, int count); -extern Rt_m64 Rt_m_psrlq(Rt_m64 m, Rt_m64 count); -extern Rt_m64 Rt_m_psrlqi(Rt_m64 m, int count); - -/* Logical intrinsics */ -extern Rt_m64 Rt_m_pand(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_pandn(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_por(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_pxor(Rt_m64 m1, Rt_m64 m2); - -/* Comparision intrinsics */ -extern Rt_m64 Rt_m_pcmpeqb(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_pcmpeqw(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_pcmpeqd(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_pcmpgtb(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_pcmpgtw(Rt_m64 m1, Rt_m64 m2); -extern Rt_m64 Rt_m_pcmpgtd(Rt_m64 m1, Rt_m64 m2); - -/* - * SSE - */ - -/* - * Arithmetic Operations - */ - -extern Rt_m128 Rt_mm_add_ss(Rt_m128 a, Rt_m128 b) /* ADDSS */ ; -extern Rt_m128 Rt_mm_add_ps(Rt_m128 a, Rt_m128 b) /* ADDPS */ ; -extern Rt_m128 Rt_mm_sub_ss(Rt_m128 a, Rt_m128 b) /* SUBSS */ ; -extern Rt_m128 Rt_mm_sub_ps(Rt_m128 a, Rt_m128 b) /* SUBPS */ ; -extern Rt_m128 Rt_mm_mul_ss(Rt_m128 a, Rt_m128 b) /* MULSS */ ; -extern Rt_m128 Rt_mm_mul_ps(Rt_m128 a, Rt_m128 b) /* MULPS */ ; -extern Rt_m128 Rt_mm_div_ss(Rt_m128 a, Rt_m128 b) /* DIVSS */ ; -extern Rt_m128 Rt_mm_div_ps(Rt_m128 a, Rt_m128 b) /* DIVPS */ ; -extern Rt_m128 Rt_mm_sqrt_ss(Rt_m128 a) /* SQRTSS */ ; -extern Rt_m128 Rt_mm_sqrt_ps(Rt_m128 a) /* SQRTPS */ ; -extern Rt_m128 Rt_mm_rcp_ss(Rt_m128 a) /* RCPSS */ ; -extern Rt_m128 Rt_mm_rcp_ps(Rt_m128 a) /* RCPPS */ ; -extern Rt_m128 Rt_mm_rsqrt_ss(Rt_m128 a) /* RSQRTSS */ ; -extern Rt_m128 Rt_mm_rsqrt_ps(Rt_m128 a) /* RSQRTPS */ ; -extern Rt_m128 Rt_mm_min_ss(Rt_m128 a, Rt_m128 b) /* MINSS */ ; -extern Rt_m128 Rt_mm_min_ps(Rt_m128 a, Rt_m128 b) /* MINPS */ ; -extern Rt_m128 Rt_mm_max_ss(Rt_m128 a, Rt_m128 b) /* MAXSS */ ; -extern Rt_m128 Rt_mm_max_ps(Rt_m128 a, Rt_m128 b) /* MAXPS */ ; - -/* - * Logical Operations - */ - -extern Rt_m128 Rt_mm_and_ps(Rt_m128 a, Rt_m128 b) /* ANDPS */ ; -extern Rt_m128 Rt_mm_andnot_ps(Rt_m128 a, - Rt_m128 b) /* ANDNPS */ ; -extern Rt_m128 Rt_mm_or_ps(Rt_m128 a, Rt_m128 b) /* ORPS */ ; -extern Rt_m128 Rt_mm_xor_ps(Rt_m128 a, Rt_m128 b) /* XORPS */ ; - -/* - * Comparisons - */ - -extern Rt_m128 Rt_mm_cmpeq_ss(Rt_m128 a, - Rt_m128 b) /* CMPEQSS */ ; -extern Rt_m128 Rt_mm_cmpeq_ps(Rt_m128 a, - Rt_m128 b) /* CMPEQPS */ ; -extern Rt_m128 Rt_mm_cmplt_ss(Rt_m128 a, - Rt_m128 b) /* CMPLTSS */ ; -extern Rt_m128 Rt_mm_cmplt_ps(Rt_m128 a, - Rt_m128 b) /* CMPLTPS */ ; -extern Rt_m128 Rt_mm_cmple_ss(Rt_m128 a, - Rt_m128 b) /* CMPLESS */ ; -extern Rt_m128 Rt_mm_cmple_ps(Rt_m128 a, - Rt_m128 b) /* CMPLEPS */ ; -extern Rt_m128 Rt_mm_cmpgt_ss(Rt_m128 a, Rt_m128 b) /* CMPLTSS r */ - ; -extern Rt_m128 Rt_mm_cmpgt_ps(Rt_m128 a, Rt_m128 b) /* CMPLTPS r */ - ; -extern Rt_m128 Rt_mm_cmpge_ss(Rt_m128 a, Rt_m128 b) /* CMPLESS r */ - ; -extern Rt_m128 Rt_mm_cmpge_ps(Rt_m128 a, Rt_m128 b) /* CMPLEPS r */ - ; -extern Rt_m128 Rt_mm_cmpneq_ss(Rt_m128 a, - Rt_m128 b) /* CMPNEQSS */ ; -extern Rt_m128 Rt_mm_cmpneq_ps(Rt_m128 a, - Rt_m128 b) /* CMPNEQPS */ ; -extern Rt_m128 Rt_mm_cmpnlt_ss(Rt_m128 a, - Rt_m128 b) /* CMPNLTSS */ ; -extern Rt_m128 Rt_mm_cmpnlt_ps(Rt_m128 a, - Rt_m128 b) /* CMPNLTPS */ ; -extern Rt_m128 Rt_mm_cmpnle_ss(Rt_m128 a, - Rt_m128 b) /* CMPNLESS */ ; -extern Rt_m128 Rt_mm_cmpnle_ps(Rt_m128 a, - Rt_m128 b) /* CMPNLEPS */ ; -extern Rt_m128 Rt_mm_cmpngt_ss(Rt_m128 a, Rt_m128 b) - /* CMPNLTSS r */ ; -extern Rt_m128 Rt_mm_cmpngt_ps(Rt_m128 a, Rt_m128 b) - /* CMPNLTPS r */ ; -extern Rt_m128 Rt_mm_cmpnge_ss(Rt_m128 a, Rt_m128 b) - /* CMPNLESS r */ ; -extern Rt_m128 Rt_mm_cmpnge_ps(Rt_m128 a, Rt_m128 b) - /* CMPNLEPS r */ ; -extern Rt_m128 Rt_mm_cmpord_ss(Rt_m128 a, - Rt_m128 b) /* CMPORDSS */ ; -extern Rt_m128 Rt_mm_cmpord_ps(Rt_m128 a, - Rt_m128 b) /* CMPORDPS */ ; -extern Rt_m128 Rt_mm_cmpunord_ss(Rt_m128 a, - Rt_m128 b) /* CMPUNORDSS */ ; -extern Rt_m128 Rt_mm_cmpunord_ps(Rt_m128 a, - Rt_m128 b) /* CMPUNORDPS */ ; -extern int Rt_mm_comieq_ss(Rt_m128 a, - Rt_m128 b) /* COMISS */ ; -extern int Rt_mm_comilt_ss(Rt_m128 a, - Rt_m128 b) /* COMISS */ ; -extern int Rt_mm_comile_ss(Rt_m128 a, - Rt_m128 b) /* COMISS */ ; -extern int Rt_mm_comigt_ss(Rt_m128 a, - Rt_m128 b) /* COMISS */ ; -extern int Rt_mm_comige_ss(Rt_m128 a, - Rt_m128 b) /* COMISS */ ; -extern int Rt_mm_comineq_ss(Rt_m128 a, - Rt_m128 b) /* COMISS */ ; -extern int Rt_mm_ucomieq_ss(Rt_m128 a, - Rt_m128 b) /* UCOMISS */ ; -extern int Rt_mm_ucomilt_ss(Rt_m128 a, - Rt_m128 b) /* UCOMISS */ ; -extern int Rt_mm_ucomile_ss(Rt_m128 a, - Rt_m128 b) /* UCOMISS */ ; -extern int Rt_mm_ucomigt_ss(Rt_m128 a, - Rt_m128 b) /* UCOMISS */ ; -extern int Rt_mm_ucomige_ss(Rt_m128 a, - Rt_m128 b) /* UCOMISS */ ; -extern int Rt_mm_ucomineq_ss(Rt_m128 a, - Rt_m128 b) /* UCOMISS */ ; - -/* - * Conversion Operations - */ - -extern int Rt_mm_cvt_ss2si(Rt_m128 a) /* CVTSS2SI */ ; -extern Rt_m64 Rt_mm_cvt_ps2pi(Rt_m128 a) /* CVTPS2PI */ ; -extern int Rt_mm_cvtt_ss2si(Rt_m128 a) /* CVTTSS2SI */ ; -extern Rt_m64 Rt_mm_cvtt_ps2pi(Rt_m128 a) /* CVTTPS2PI */ ; -extern Rt_m128 Rt_mm_cvt_si2ss(Rt_m128 a, - int b) /* CVTSI2SS */ ; -extern Rt_m128 Rt_mm_cvt_pi2ps(Rt_m128 a, - Rt_m64 b) /* CVTPI2PS */ ; - -/* - * Miscellaneous - */ - -extern Rt_m128 Rt_mm_shuffle_ps(Rt_m128 a, Rt_m128 b, - int i) /* SHUFPS */ ; -extern Rt_m128 Rt_mm_unpackhi_ps(Rt_m128 a, - Rt_m128 b) /* UNPCKHPS */ ; -extern Rt_m128 Rt_mm_unpacklo_ps(Rt_m128 a, - Rt_m128 b) /* UNPCKLPS */ ; -extern Rt_m128 Rt_mm_loadh_pi(Rt_m128 a, Rt_m64 * p) /* MOVHPS reg, mem */ - ; -extern void Rt_mm_storeh_pi(Rt_m64 * p, Rt_m128 a) /* MOVHPS mem, reg */ - ; -extern Rt_m128 Rt_mm_movehl_ps(Rt_m128 a, - Rt_m128 b) /* MOVHLPS */ ; -extern Rt_m128 Rt_mm_movelh_ps(Rt_m128 a, - Rt_m128 b) /* MOVLHPS */ ; -extern Rt_m128 Rt_mm_loadl_pi(Rt_m128 a, Rt_m64 * p) - /* MOVLPS reg, mem */ ; -extern void Rt_mm_storel_pi(Rt_m64 * p, Rt_m128 a) /* MOVLPS mem, reg */ - ; -extern int Rt_mm_movemask_ps(Rt_m128 a) /* MOVMSKPS */ ; -extern unsigned int Rt_mm_getcsr(void) /* STMXCSR */ ; -extern void Rt_mm_setcsr(unsigned int i) /* LDMXCSR */ ; - -/* - * Load Operations - */ - -extern Rt_m128 Rt_mm_load_ss(float *p) /* MOVSS */ ; -extern Rt_m128 Rt_mm_load_ps1(float *p) /* MOVSS + shuffling */ - ; -extern Rt_m128 Rt_mm_load_ps(float *p) /* MOVAPS */ ; -extern Rt_m128 Rt_mm_loadu_ps(float *p) /* MOVUPS */ ; -extern Rt_m128 Rt_mm_loadr_ps(float *p) - /* MOVAPS + shuffling */ ; - -/* - * Set Operations - */ - -extern Rt_m128 Rt_mm_set_ss(float w) /* (composite) */ ; -extern Rt_m128 Rt_mm_set_ps1(float w) /* (composite) */ ; -extern Rt_m128 Rt_mm_set_ps(float z, float y, float x, - float w) /* (composite) */ ; -extern Rt_m128 Rt_mm_setr_ps(float z, float y, float x, - float w) /* (composite) */ ; -extern Rt_m128 Rt_mm_setzero_ps(void) /* (composite) */ ; - -/* - * Store Operations - */ - -extern void Rt_mm_store_ss(float *p, - Rt_m128 a) /* MOVSS */ ; -extern void Rt_mm_store_ps1(float *p, Rt_m128 a) - /* MOVSS + shuffling */ ; -extern void Rt_mm_store_ps(float *p, - Rt_m128 a) /* MOVAPS */ ; -extern void Rt_mm_storeu_ps(float *p, - Rt_m128 a) /* MOVUPS */ ; -extern void Rt_mm_storer_ps(float *p, Rt_m128 a) - /* MOVAPS + shuffling */ ; -extern Rt_m128 Rt_mm_move_ss(Rt_m128 a, - Rt_m128 b) /* MOVSS */ ; - -/* - * Integer Intrinsics - */ - -extern int Rt_m_pextrw(Rt_m64 a, int n) /* PEXTRW */ ; -extern Rt_m64 Rt_m_pinsrw(Rt_m64 a, int d, - int n) /* PINSRW */ ; -extern Rt_m64 Rt_m_pmaxsw(Rt_m64 a, Rt_m64 b) /* PMAXSW */ ; -extern Rt_m64 Rt_m_pmaxub(Rt_m64 a, Rt_m64 b) /* PMAXUB */ ; -extern Rt_m64 Rt_m_pminsw(Rt_m64 a, Rt_m64 b) /* PMINSW */ ; -extern Rt_m64 Rt_m_pminub(Rt_m64 a, Rt_m64 b) /* PMINUB */ ; -extern int Rt_m_pmovmskb(Rt_m64 a) /* PMOVMSKB */ ; -extern Rt_m64 Rt_m_pmulhuw(Rt_m64 a, Rt_m64 b) /* PMULHUW */ ; -extern Rt_m64 Rt_m_pshufw(Rt_m64 a, int n) /* PSHUFW */ ; -extern void Rt_m_lwmaskmovq(Rt_m64 d, Rt_m64 n, - char *p) /* MASKMOVQ */ ; - -/* - * Cacheability Support - */ - -extern void Rt_mm_prefetch(char *p, int i) /* PREFETCH */ ; -extern void Rt_mm_stream_pi(Rt_m64 * p, - Rt_m64 a) /* MOVNTQ */ ; -extern void Rt_mm_stream_ps(float *p, - Rt_m128 a) /* MOVNTPS */ ; -extern void Rt_mm_sfence(void) /* SFENCE */ ; - -/* - * WNI - */ - -/* Arithmetic Operations */ - -extern Rt_m128d Rt_mm_add_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_add_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_div_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_div_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_max_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_max_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_min_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_min_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_mul_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_mul_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_sqrt_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_sqrt_pd(Rt_m128d a); -extern Rt_m128d Rt_mm_sub_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_sub_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_andnot_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_and_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_or_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_xor_pd(Rt_m128d a, Rt_m128d b); - -/* Comparisons */ - -extern Rt_m128d Rt_mm_cmpeq_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmplt_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmple_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpgt_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpge_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpord_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpunord_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpneq_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpnlt_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpnle_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpngt_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpnge_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpeq_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmplt_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmple_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpgt_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpge_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpord_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpunord_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpneq_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpnlt_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpnle_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpngt_sd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_cmpnge_sd(Rt_m128d a, Rt_m128d b); -extern int Rt_mm_comieq_sd(Rt_m128d a, Rt_m128d b); -extern int Rt_mm_comilt_sd(Rt_m128d a, Rt_m128d b); -extern int Rt_mm_comile_sd(Rt_m128d a, Rt_m128d b); -extern int Rt_mm_comigt_sd(Rt_m128d a, Rt_m128d b); -extern int Rt_mm_comige_sd(Rt_m128d a, Rt_m128d b); -extern int Rt_mm_comineq_sd(Rt_m128d a, Rt_m128d b); -extern int Rt_mm_ucomieq_sd(Rt_m128d a, Rt_m128d b); -extern int Rt_mm_ucomilt_sd(Rt_m128d a, Rt_m128d b); -extern int Rt_mm_ucomile_sd(Rt_m128d a, Rt_m128d b); -extern int Rt_mm_ucomigt_sd(Rt_m128d a, Rt_m128d b); -extern int Rt_mm_ucomige_sd(Rt_m128d a, Rt_m128d b); -extern int Rt_mm_ucomineq_sd(Rt_m128d a, Rt_m128d b); - -/* Conversion Operations */ - -extern Rt_m128 Rt_mm_cvtpd_ps(Rt_m128d a); -extern Rt_m128d Rt_mm_cvtps_pd(Rt_m128 a); -extern Rt_m128d Rt_mm_cvtepi32_pd(Rt_m128i a); -extern Rt_m128i Rt_mm_cvtpd_epi32(Rt_m128d a); -extern int Rt_mm_cvtsd_si32(Rt_m128d a); -extern Rt_m128 Rt_mm_cvtsd_ss(Rt_m128 a, Rt_m128d b); -extern Rt_m128d Rt_mm_cvtsi32_sd(Rt_m128d a, int b); -extern Rt_m128d Rt_mm_cvtss_sd(Rt_m128d a, Rt_m128 b); -extern Rt_m128i Rt_mm_cvttpd_epi32(Rt_m128d a); -extern int Rt_mm_cvttsd_si32(Rt_m128d a); -extern Rt_m128 Rt_mm_cvtepi32_ps(Rt_m128i a); -extern Rt_m128i Rt_mm_cvtps_epi32(Rt_m128 a); -extern Rt_m128i Rt_mm_cvttps_epi32(Rt_m128 a); -extern Rt_m64 Rt_mm_cvtpd_pi32(Rt_m128d a); -extern Rt_m64 Rt_mm_cvttpd_pi32(Rt_m128d a); -extern Rt_m128d Rt_mm_cvtpi32_pd(Rt_m64 a); - -/* Miscellaneous Operations */ - -extern Rt_m128d Rt_mm_unpackhi_pd(Rt_m128d a, Rt_m128d b); -extern Rt_m128d Rt_mm_unpacklo_pd(Rt_m128d a, Rt_m128d b); -extern int Rt_mm_movemask_pd(Rt_m128d a); -extern Rt_m128d Rt_mm_shuffle_pd(Rt_m128d a, Rt_m128d b, int i); -extern Rt_m128d Rt_mm_load_pd(const double *p); -extern Rt_m128d Rt_mm_load1_pd(const double *p); -extern Rt_m128d Rt_mm_loadr_pd(const double *p); -extern Rt_m128d Rt_mm_loadu_pd(const double *p); -extern Rt_m128d Rt_mm_load_sd(const double *p); -extern Rt_m128d Rt_mm_loadh_pd(Rt_m128d a, const double *p); -extern Rt_m128d Rt_mm_loadl_pd(Rt_m128d a, const double *p); -extern Rt_m128d Rt_mm_set_sd(double w); -extern Rt_m128d Rt_mm_set1_pd(double w); -extern Rt_m128d Rt_mm_set_pd(double w, double x); -extern Rt_m128d Rt_mm_setr_pd(double w, double x); -extern Rt_m128d Rt_mm_setzero_pd(void); -extern Rt_m128d Rt_mm_move_sd(Rt_m128d a, Rt_m128d b); -extern void Rt_mm_stream_pd(double *p, Rt_m128d a); -extern void Rt_mm_store_sd(double *p, Rt_m128d a); -extern void Rt_mm_store1_pd(double *p, Rt_m128d a); -extern void Rt_mm_store_pd(double *p, Rt_m128d a); -extern void Rt_mm_storeu_pd(double *p, Rt_m128d a); -extern void Rt_mm_storer_pd(double *p, Rt_m128d a); -extern void Rt_mm_storeh_pd(double *p, Rt_m128d a); -extern void Rt_mm_storel_pd(double *p, Rt_m128d a); -extern Rt_m128i Rt_mm_add_epi8(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_add_epi16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_add_epi32(Rt_m128i a, Rt_m128i b); -extern Rt_m64 Rt_mm_add_si64(Rt_m64 a, Rt_m64 b); -extern Rt_m128i Rt_mm_add_epi64(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_adds_epi8(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_adds_epi16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_adds_epu8(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_adds_epu16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_avg_epu8(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_avg_epu16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_madd_epi16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_max_epi16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_max_epu8(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_min_epi16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_min_epu8(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_mulhi_epi16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_mulhi_epu16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_mullo_epi16(Rt_m128i a, Rt_m128i b); -extern Rt_m64 Rt_mm_mul_su32(Rt_m64 a, Rt_m64 b); -extern Rt_m128i Rt_mm_mul_epu32(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_sad_epu8(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_sub_epi8(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_sub_epi16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_sub_epi32(Rt_m128i a, Rt_m128i b); -extern Rt_m64 Rt_mm_sub_si64(Rt_m64 a, Rt_m64 b); -extern Rt_m128i Rt_mm_sub_epi64(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_subs_epi8(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_subs_epi16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_subs_epu8(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_subs_epu16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_and_si128(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_andnot_si128(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_or_si128(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_xor_si128(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_slli_si128(Rt_m128i a, int imm); -extern Rt_m128i Rt_mm_slli_epi16(Rt_m128i a, int count); -extern Rt_m128i Rt_mm_sll_epi16(Rt_m128i a, Rt_m128i count); -extern Rt_m128i Rt_mm_slli_epi32(Rt_m128i a, int count); -extern Rt_m128i Rt_mm_sll_epi32(Rt_m128i a, Rt_m128i count); -extern Rt_m128i Rt_mm_slli_epi64(Rt_m128i a, int count); -extern Rt_m128i Rt_mm_sll_epi64(Rt_m128i a, Rt_m128i count); -extern Rt_m128i Rt_mm_srai_epi16(Rt_m128i a, int count); -extern Rt_m128i Rt_mm_sra_epi16(Rt_m128i a, Rt_m128i count); -extern Rt_m128i Rt_mm_srai_epi32(Rt_m128i a, int count); -extern Rt_m128i Rt_mm_sra_epi32(Rt_m128i a, Rt_m128i count); -extern Rt_m128i Rt_mm_srli_si128(Rt_m128i a, int imm); -extern Rt_m128i Rt_mm_srli_epi16(Rt_m128i a, int count); -extern Rt_m128i Rt_mm_srl_epi16(Rt_m128i a, Rt_m128i count); -extern Rt_m128i Rt_mm_srli_epi32(Rt_m128i a, int count); -extern Rt_m128i Rt_mm_srl_epi32(Rt_m128i a, Rt_m128i count); -extern Rt_m128i Rt_mm_srli_epi64(Rt_m128i a, int count); -extern Rt_m128i Rt_mm_srl_epi64(Rt_m128i a, Rt_m128i count); -extern Rt_m128i Rt_mm_cmpeq_epi8(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_cmpeq_epi16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_cmpeq_epi32(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_cmpgt_epi8(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_cmpgt_epi16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_cmpgt_epi32(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_cmplt_epi8(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_cmplt_epi16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_cmplt_epi32(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_cvtsi32_si128(int a); -extern int Rt_mm_cvtsi128_si32(Rt_m128i a); - -/* Miscellaneous Operations */ - -extern Rt_m64 Rt_mm_movepi64_pi64(Rt_m128i a); -extern Rt_m128i Rt_mm_movpi64_epi64(Rt_m64 a); -extern Rt_m128i Rt_mm_move_epi64(Rt_m128i a); -extern Rt_m128i Rt_mm_packs_epi16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_packs_epi32(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_packus_epi16(Rt_m128i a, Rt_m128i b); -extern int Rt_mm_extract_epi16(Rt_m128i a, int imm); -extern Rt_m128i Rt_mm_insert_epi16(Rt_m128i a, int b, int imm); -extern int Rt_mm_movemask_epi8(Rt_m128i a); -extern Rt_m128i Rt_mm_shuffle_epi32(Rt_m128i a, int imm); -extern Rt_m128i Rt_mm_shufflehi_epi16(Rt_m128i a, int imm); -extern Rt_m128i Rt_mm_shufflelo_epi16(Rt_m128i a, int imm); -extern Rt_m128i Rt_mm_unpackhi_epi8(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_unpackhi_epi16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_unpackhi_epi32(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_unpackhi_epi64(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_unpacklo_epi8(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_unpacklo_epi16(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_unpacklo_epi32(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_unpacklo_epi64(Rt_m128i a, Rt_m128i b); -extern Rt_m128i Rt_mm_loadl_epi64(Rt_m128i const *p); -extern Rt_m128i Rt_mm_load_si128(const Rt_m128i * p); -extern Rt_m128i Rt_mm_loadu_si128(const Rt_m128i * p); -extern Rt_m128i Rt_mm_set_epi64(Rt_m64 q1, Rt_m64 q0); -extern Rt_m128i Rt_mm_set_epi32(int i3, int i2, int i1, int i0); -extern Rt_m128i - Rt_mm_set_epi16(short w7, short w6, - short w5, short w4, short w3, short w2, - short w1, short w0); -extern Rt_m128i Rt_mm_set_epi8(char b15, char b14, - char b13, char b12, - char b11, char b10, - char b9, char b8, - char b7, char b6, - char b5, char b4, - char b3, char b2, - char b1, char b0); -extern Rt_m128i Rt_mm_set1_epi64(Rt_m64 q); -extern Rt_m128i Rt_mm_set1_epi32(int i); -extern Rt_m128i Rt_mm_set1_epi16(short w); -extern Rt_m128i Rt_mm_set1_epi8(char b); -extern Rt_m128i Rt_mm_setr_epi64(Rt_m64 q0, Rt_m64 q1); -extern Rt_m128i Rt_mm_setr_epi32(int i0, int i1, int i2, - int i3); -extern Rt_m128i Rt_mm_setr_epi16(short w0, short w1, - short w2, short w3, - short w4, short w5, - short w6, short w7); -extern Rt_m128i Rt_mm_setr_epi8(char b0, char b1, - char b2, char b3, - char b4, char b5, - char b6, char b7, - char b8, char b9, - char b10, char b11, - char b12, char b13, - char b14, char b15); -extern Rt_m128i Rt_mm_setzero_si128(void); - -/* Store Operations */ - -extern void Rt_mm_store_si128(Rt_m128i * p, Rt_m128i a); -extern void Rt_mm_storeu_si128(Rt_m128i * p, Rt_m128i a); -extern void Rt_mm_maskmoveu_si128(Rt_m128i s, Rt_m128i n, - char *p); -extern void Rt_mm_storel_epi64(Rt_m128i * p, Rt_m128i a); -extern void Rt_mm_stream_si128(Rt_m128i * p, Rt_m128i a); -extern void Rt_mm_stream_si32(int *p, int a); -extern void Rt_mm_clflush(void const *p); -extern void Rt_mm_lfence(void); -extern void Rt_mm_mfence(void); - -/* - * API - */ -extern RwUInt32 RtIntelRDTSC(void); -extern RwUInt32 RtIntelToggleEFLAGS(int mask); -extern RwUInt32 RtIntelCPUID(RwUInt32 level, - void *pb, void *pc, void *pd); -extern RwUInt32 RtIntelHaveCPUID(void); -extern RwUInt32 RtIntelHaveRDTSC(void); -extern RwUInt32 RtIntelHaveMMX(void); -extern RwUInt32 RtIntelHaveSSE(void); -extern RwUInt32 RtIntelHaveWNI(void); -extern RwUInt32 RtIntelCpuType(void); - -extern RwBool RtIntelStartTiming(void * data); -extern RwBool RtIntelStopTiming(void *data); -extern RwBool RtIntelTime(RwFixed64 * result, - RtIntelTimeFunction func, - void *data); - -extern RwBool RtIntelPluginAttach(void); - -extern RtIntelOverload *_rtIntelOverloadGetHandle(void); - -extern RxNodeDefinition *RxNodeDefinitionGetSSETransformCSL(void); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* - * LEGACY-SUPPORT -- e.g. - * rwsdk/driver/d3d/baintd3d.c - * is locked at time of writing - */ - -#define RpIntelRDTSC() RtIntelRDTSC() -#define RpIntelToggleEFLAGS(_mask) RtIntelToggleEFLAGS(_mask) -#define RpIntelCPUID(_level, _pb, _pc, _pd) \ - RtIntelCPUID(_level, _pb, _pc, _pd) -#define RpIntelHaveCPUID() RtIntelHaveCPUID() -#define RpIntelHaveRDTSC() RtIntelHaveRDTSC() -#define RpIntelHaveMMX() RtIntelHaveMMX() -#define RpIntelHaveSSE() RtIntelHaveSSE() -#define RpIntelHaveWNI() RtIntelHaveWNI() -#define RpIntelCpuType() RtIntelCpuType() -#define RpIntelStartTiming(_data) RtIntelStartTiming(_data) -#define RpIntelStopTiming(_data) RtIntelStopTiming(_data) -#define RpIntelTime(_result, _func, _data) \ - RtIntelTime(_result, _func, _data) -#define RpIntelPluginAttach() RtIntelPluginAttach() -#define RpNodeDefinitionGetSSETransformCSL() \ - RxNodeDefinitionGetSSETransformCSL() - -typedef RtIntelOverload RwIntelOverload; -typedef RtIntelOverload RpIntelOverload; - -#define _rwIntelOverloadGetHandle() _rtIntelOverloadGetHandle() -#define _rpIntelOverloadGetHandle() _rtIntelOverloadGetHandle() -#define RwIntelHaveSSE() RtIntelHaveSSE() -#define RpIntelHaveSSE() RtIntelHaveSSE() - -#if (defined(RWEMULATEINTELSIMD) || !defined(__ICL)) - -/* - * MMX - */ - -/* General support intrinsics */ -#define _m_empty() Rt_m_empty() -#define _m_from_int(i) Rt_m_from_int(i) -#define _m_to_int(m) Rt_m_to_int(m) -#define _m_packsswb(m1, m2) Rt_m_packsswb(m1, m2) -#define _m_packssdw(m1, m2) Rt_m_packssdw(m1, m2) -#define _m_packuswb(m1, m2) Rt_m_packuswb(m1, m2) -#define _m_punpckhbw(m1, m2) Rt_m_punpckhbw(m1, m2) -#define _m_punpckhwd(m1, m2) Rt_m_punpckhwd(m1, m2) -#define _m_punpckhdq(m1, m2) Rt_m_punpckhdq(m1, m2) -#define _m_punpcklbw(m1, m2) Rt_m_punpcklbw(m1, m2) -#define _m_punpcklwd(m1, m2) Rt_m_punpcklwd(m1, m2) -#define _m_punpckldq(m1, m2) Rt_m_punpckldq(m1, m2) - -/* Packed arithmetic intrinsics */ -#define _m_paddb(m1, m2) Rt_m_paddb(m1, m2) -#define _m_paddw(m1, m2) Rt_m_paddw(m1, m2) -#define _m_paddd(m1, m2) Rt_m_paddd(m1, m2) -#define _m_paddsb(m1, m2) Rt_m_paddsb(m1, m2) -#define _m_paddsw(m1, m2) Rt_m_paddsw(m1, m2) -#define _m_paddusb(m1, m2) Rt_m_paddusb(m1, m2) -#define _m_paddusw(m1, m2) Rt_m_paddusw(m1, m2) -#define _m_psubb(m1, m2) Rt_m_psubb(m1, m2) -#define _m_psubw(m1, m2) Rt_m_psubw(m1, m2) -#define _m_psubd(m1, m2) Rt_m_psubd(m1, m2) -#define _m_psubsb(m1, m2) Rt_m_psubsb(m1, m2) -#define _m_psubsw(m1, m2) Rt_m_psubsw(m1, m2) -#define _m_psubusb(m1, m2) Rt_m_psubusb(m1, m2) -#define _m_psubusw(m1, m2) Rt_m_psubusw(m1, m2) -#define _m_pmaddwd(m1, m2) Rt_m_pmaddwd(m1, m2) -#define _m_pmulhw(m1, m2) Rt_m_pmulhw(m1, m2) -#define _m_pmullw(m1, m2) Rt_m_pmullw(m1, m2) - -/* Shift intrinsics */ -#define _m_psllw(m, count) Rt_m_psllw(m, count) -#define _m_psllwi(m, count) Rt_m_psllwi(m, count) -#define _m_pslld(m, count) Rt_m_pslld(m, count) -#define _m_pslldi(m, count) Rt_m_pslldi(m, count) -#define _m_psllq(m, count) Rt_m_psllq(m, count) -#define _m_psllqi(m, count) Rt_m_psllqi(m, count) -#define _m_psraw(m, count) Rt_m_psraw(m, count) -#define _m_psrawi(m, count) Rt_m_psrawi(m, count) -#define _m_psrad(m, count) Rt_m_psrad(m, count) -#define _m_psradi(m, count) Rt_m_psradi(m, count) -#define _m_psrlw(m, count) Rt_m_psrlw(m, count) -#define _m_psrlwi(m, count) Rt_m_psrlwi(m, count) -#define _m_psrld(m, count) Rt_m_psrld(m, count) -#define _m_psrldi(m, count) Rt_m_psrldi(m, count) -#define _m_psrlq(m, count) Rt_m_psrlq(m, count) -#define _m_psrlqi(m, count) Rt_m_psrlqi(m, count) - -/* Logical intrinsics */ -#define _m_pand(m1, m2) Rt_m_pand(m1, m2) -#define _m_pandn(m1, m2) Rt_m_pandn(m1, m2) -#define _m_por(m1, m2) Rt_m_por(m1, m2) -#define _m_pxor(m1, m2) Rt_m_pxor(m1, m2) - -/* Comparison intrinsics */ -#define _m_pcmpeqb(m1, m2) Rt_m_pcmpeqb(m1, m2) -#define _m_pcmpeqw(m1, m2) Rt_m_pcmpeqw(m1, m2) -#define _m_pcmpeqd(m1, m2) Rt_m_pcmpeqd(m1, m2) -#define _m_pcmpgtb(m1, m2) Rt_m_pcmpgtb(m1, m2) -#define _m_pcmpgtw(m1, m2) Rt_m_pcmpgtw(m1, m2) -#define _m_pcmpgtd(m1, m2) Rt_m_pcmpgtd(m1, m2) - -/* - * SSE - */ - -/* - * Arithmetic Operations - */ - -#define _mm_add_ss(a, b) Rt_mm_add_ss(a, b) -#define _mm_add_ps(a, b) Rt_mm_add_ps(a, b) -#define _mm_sub_ss(a, b) Rt_mm_sub_ss(a, b) -#define _mm_sub_ps(a, b) Rt_mm_sub_ps(a, b) -#define _mm_mul_ss(a, b) Rt_mm_mul_ss(a, b) -#define _mm_mul_ps(a, b) Rt_mm_mul_ps(a, b) -#define _mm_div_ss(a, b) Rt_mm_div_ss(a, b) -#define _mm_div_ps(a, b) Rt_mm_div_ps(a, b) -#define _mm_sqrt_ss(a) Rt_mm_sqrt_ss(a) -#define _mm_sqrt_ps(a) Rt_mm_sqrt_ps(a) -#define _mm_rcp_ss(a) Rt_mm_rcp_ss(a) -#define _mm_rcp_ps(a) Rt_mm_rcp_ps(a) -#define _mm_rsqrt_ss(a) Rt_mm_rsqrt_ss(a) -#define _mm_rsqrt_ps(a) Rt_mm_rsqrt_ps(a) -#define _mm_min_ss(a, b) Rt_mm_min_ss(a, b) -#define _mm_min_ps(a, b) Rt_mm_min_ps(a, b) -#define _mm_max_ss(a, b) Rt_mm_max_ss(a, b) -#define _mm_max_ps(a, b) Rt_mm_max_ps(a, b) - -/* - * Logical Operations - */ - -#define _mm_and_ps(a, b) Rt_mm_and_ps(a, b) -#define _mm_andnot_ps(a, b) Rt_mm_andnot_ps(a, b) -#define _mm_or_ps(a, b) Rt_mm_or_ps(a, b) -#define _mm_xor_ps(a, b) Rt_mm_xor_ps(a, b) - -/* - * Comparisons - */ - -#define _mm_cmpeq_ss(a, b) Rt_mm_cmpeq_ss(a, b) -#define _mm_cmpeq_ps(a, b) Rt_mm_cmpeq_ps(a, b) -#define _mm_cmplt_ss(a, b) Rt_mm_cmplt_ss(a, b) -#define _mm_cmplt_ps(a, b) Rt_mm_cmplt_ps(a, b) -#define _mm_cmple_ss(a, b) Rt_mm_cmple_ss(a, b) -#define _mm_cmple_ps(a, b) Rt_mm_cmple_ps(a, b) -#define _mm_cmpgt_ss(a, b) Rt_mm_cmpgt_ss(a, b) -#define _mm_cmpgt_ps(a, b) Rt_mm_cmpgt_ps(a, b) -#define _mm_cmpge_ss(a, b) Rt_mm_cmpge_ss(a, b) -#define _mm_cmpge_ps(a, b) Rt_mm_cmpge_ps(a, b) -#define _mm_cmpneq_ss(a, b) Rt_mm_cmpneq_ss(a, b) -#define _mm_cmpneq_ps(a, b) Rt_mm_cmpneq_ps(a, b) -#define _mm_cmpnlt_ss(a, b) Rt_mm_cmpnlt_ss(a, b) -#define _mm_cmpnlt_ps(a, b) Rt_mm_cmpnlt_ps(a, b) -#define _mm_cmpnle_ss(a, b) Rt_mm_cmpnle_ss(a, b) -#define _mm_cmpnle_ps(a, b) Rt_mm_cmpnle_ps(a, b) -#define _mm_cmpngt_ss(a, b) Rt_mm_cmpngt_ss(a, b) -#define _mm_cmpngt_ps(a, b) Rt_mm_cmpngt_ps(a, b) -#define _mm_cmpnge_ss(a, b) Rt_mm_cmpnge_ss(a, b) -#define _mm_cmpnge_ps(a, b) Rt_mm_cmpnge_ps(a, b) -#define _mm_cmpord_ss(a, b) Rt_mm_cmpord_ss(a, b) -#define _mm_cmpord_ps(a, b) Rt_mm_cmpord_ps(a, b) -#define _mm_cmpunord_ss(a, b) Rt_mm_cmpunord_ss(a, b) -#define _mm_cmpunord_ps(a, b) Rt_mm_cmpunord_ps(a, b) -#define _mm_comieq_ss(a, b) Rt_mm_comieq_ss(a, b) -#define _mm_comilt_ss(a, b) Rt_mm_comilt_ss(a, b) -#define _mm_comile_ss(a, b) Rt_mm_comile_ss(a, b) -#define _mm_comigt_ss(a, b) Rt_mm_comigt_ss(a, b) -#define _mm_comige_ss(a, b) Rt_mm_comige_ss(a, b) -#define _mm_comineq_ss(a, b) Rt_mm_comineq_ss(a, b) -#define _mm_ucomieq_ss(a, b) Rt_mm_ucomieq_ss(a, b) -#define _mm_ucomilt_ss(a, b) Rt_mm_ucomilt_ss(a, b) -#define _mm_ucomile_ss(a, b) Rt_mm_ucomile_ss(a, b) -#define _mm_ucomigt_ss(a, b) Rt_mm_ucomigt_ss(a, b) -#define _mm_ucomige_ss(a, b) Rt_mm_ucomige_ss(a, b) -#define _mm_ucomineq_ss(a, b) Rt_mm_ucomineq_ss(a, b) - -/* - * Conversion Operations - */ - -#define _mm_cvt_ss2si(a) Rt_mm_cvt_ss2si(a) -#define _mm_cvt_ps2pi(a) Rt_mm_cvt_ps2pi(a) -#define _mm_cvtt_ss2si(a) Rt_mm_cvtt_ss2si(a) -#define _mm_cvtt_ps2pi(a) Rt_mm_cvtt_ps2pi(a) -#define _mm_cvt_si2ss(a, b) Rt_mm_cvt_si2ss(a, b) -#define _mm_cvt_pi2ps(a, b) Rt_mm_cvt_pi2ps(a, b) - -/* - * Miscellaneous - */ - -#define _mm_shuffle_ps(a, b, i) Rt_mm_shuffle_ps(a, b, i) -#define _mm_unpackhi_ps(a, b) Rt_mm_unpackhi_ps(a, b) -#define _mm_unpacklo_ps(a, b) Rt_mm_unpacklo_ps(a, b) -#define _mm_loadh_pi(a, p) Rt_mm_loadh_pi(a, p) -#define _mm_storeh_pi(p, a) Rt_mm_storeh_pi(p, a) -#define _mm_movehl_ps(a, b) Rt_mm_movehl_ps(a, b) -#define _mm_movelh_ps(a, b) Rt_mm_movelh_ps(a, b) -#define _mm_loadl_pi(a, p) Rt_mm_loadl_pi(a, p) -#define _mm_storel_pi(p, a) Rt_mm_storel_pi(p, a) -#define _mm_movemask_ps(a) Rt_mm_movemask_ps(a) -#define _mm_getcsr() Rt_mm_getcsr() -#define _mm_setcsr(i) Rt_mm_setcsr(i) - -/* - *Load Operations - */ - -#define _mm_load_ss(p) Rt_mm_load_ss(p) -#define _mm_load_ps1(p) Rt_mm_load_ps1(p) -#define _mm_load_ps(p) Rt_mm_load_ps(p) -#define _mm_loadu_ps(p) Rt_mm_loadu_ps(p) -#define _mm_loadr_ps(p) Rt_mm_loadr_ps(p) - -/* - * Set Operations - */ - -#define _mm_set_ss(w) Rt_mm_set_ss(w) -#define _mm_set_ps1(w) Rt_mm_set_ps1(w) -#define _mm_set_ps(z, y, x, w) Rt_mm_set_ps(z, y, x, w) -#define _mm_setr_ps(z, y, x, w) Rt_mm_setr_ps(z, y, x, w) -#define _mm_setzero_ps() Rt_mm_setzero_ps() - -/* - * Store Operations - */ - -#define _mm_store_ss(p, a) Rt_mm_store_ss(p, a) -#define _mm_store_ps1(p, a) Rt_mm_store_ps1(p, a) -#define _mm_store_ps(p, a) Rt_mm_store_ps(p, a) -#define _mm_storeu_ps(p, a) Rt_mm_storeu_ps(p, a) -#define _mm_storer_ps(p, a) Rt_mm_storer_ps(p, a) -#define _mm_move_ss(a, b) Rt_mm_move_ss(a, b) - -/* - * Integer Intrinsics - */ - -#define _m_pextrw(a, n) Rt_m_pextrw(a, n) -#define _m_pinsrw(a, d, n) Rt_m_pinsrw(a, d, n) -#define _m_pmaxsw(a, b) Rt_m_pmaxsw(a, b) -#define _m_pmaxub(a, b) Rt_m_pmaxub(a, b) -#define _m_pminsw(a, b) Rt_m_pminsw(a, b) -#define _m_pminub(a, b) Rt_m_pminub(a, b) -#define _m_pmovmskb(a) Rt_m_pmovmskb(a) -#define _m_pmulhuw(a, b) Rt_m_pmulhuw(a, b) -#define _m_pshufw(a, n) Rt_m_pshufw(a, n) -#define _m_lwmaskmovq(d, n, p) Rt_m_lwmaskmovq(d, n, p) - -/* - * Cacheability Support - */ - -#define _mm_prefetch(p, i) Rt_mm_prefetch(p, i) -#define _mm_stream_pi(p, a) Rt_mm_stream_pi(p, a) -#define _mm_stream_ps(p, a) Rt_mm_stream_ps(p, a) -#define _mm_sfence() Rt_mm_sfence() - -#endif /* (defined(RWEMULATEINTELSIMD) || !defined(__ICL)) */ - -#endif /* RTINTEL_H */ diff --git a/rwsdk/include/d3d8/rtintel.rpe b/rwsdk/include/d3d8/rtintel.rpe deleted file mode 100644 index bf297ca0..00000000 --- a/rwsdk/include/d3d8/rtintel.rpe +++ /dev/null @@ -1,645 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionIntel -{ - - - - e_rwdb_CriterionIntelLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionIntel e_rwdb_CriterionIntel; - - diff --git a/rwsdk/include/d3d8/rtintsec.h b/rwsdk/include/d3d8/rtintsec.h index cb482b17..a2e4c3d6 100644 --- a/rwsdk/include/d3d8/rtintsec.h +++ b/rwsdk/include/d3d8/rtintsec.h @@ -10,8 +10,8 @@ #define RTINTSEC_H /** - * \defgroup rtintersect RtIntersection - * \ingroup rttool + * \defgroup rtintersection RtIntersection + * \ingroup mathtools * * Object Intersection Toolkit for RenderWare. */ diff --git a/rwsdk/include/d3d8/rtintsec.rpe b/rwsdk/include/d3d8/rtintsec.rpe index 7b2ce6e1..3c7f7bf3 100644 --- a/rwsdk/include/d3d8/rtintsec.rpe +++ b/rwsdk/include/d3d8/rtintsec.rpe @@ -149,472 +149,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionIntsec { diff --git a/rwsdk/include/d3d8/rtltmap.h b/rwsdk/include/d3d8/rtltmap.h index 1a53b185..8ee15a43 100644 --- a/rwsdk/include/d3d8/rtltmap.h +++ b/rwsdk/include/d3d8/rtltmap.h @@ -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 @@ -44,7 +43,7 @@ * The barycentric coordinates may be used, for example, to allow a callback * to easily import existing lighting data (e.g from previously generated * lightmaps in a different format, or from an art package with lighting - * functionality). + * functionality). * * NOTE: The alpha channel of the RwRGBA results array must NOT be modified. * These values are used internally and their modification may result in @@ -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. @@ -94,7 +92,7 @@ typedef RwRGBA *(*RtLtMapIlluminateSampleCallBack)(RwRGBA *results, * Each sample may represent 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 (see \ref RtLtMapObjectFlags). - * + * * The callback will receive a pointer to the world of the current * \ref RtLtMapLightingSession (this may be used to perform intersection * tests), the world-space position of the sample, the world-space @@ -111,15 +109,15 @@ 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. - * + * * \param world The world of the current RtLtMapLightingSession * \param result An RwRGBAReal value to attentuate this light's * contribution to the current sample @@ -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)) */ diff --git a/rwsdk/include/d3d8/rtltmap.rpe b/rwsdk/include/d3d8/rtltmap.rpe index e510d78b..fb171c51 100644 --- a/rwsdk/include/d3d8/rtltmap.rpe +++ b/rwsdk/include/d3d8/rtltmap.rpe @@ -159,472 +159,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionLTMAPTOOL { diff --git a/rwsdk/include/d3d8/rtmipk.h b/rwsdk/include/d3d8/rtmipk.h index c06a3879..6c777b41 100644 --- a/rwsdk/include/d3d8/rtmipk.h +++ b/rwsdk/include/d3d8/rtmipk.h @@ -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. */ /**************************************************************************** diff --git a/rwsdk/include/d3d8/rtmipk.rpe b/rwsdk/include/d3d8/rtmipk.rpe index 24e1fd33..04500e1d 100644 --- a/rwsdk/include/d3d8/rtmipk.rpe +++ b/rwsdk/include/d3d8/rtmipk.rpe @@ -149,472 +149,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionMipmapK { diff --git a/rwsdk/include/d3d8/rtpick.h b/rwsdk/include/d3d8/rtpick.h index 5ea78058..62f564a3 100644 --- a/rwsdk/include/d3d8/rtpick.h +++ b/rwsdk/include/d3d8/rtpick.h @@ -11,7 +11,7 @@ /** * \defgroup rtpick RtPick - * \ingroup rttool + * \ingroup collisiondetection * * Picking Toolkit for RenderWare. */ diff --git a/rwsdk/include/d3d8/rtpick.rpe b/rwsdk/include/d3d8/rtpick.rpe index 055ea9ff..779e2f9a 100644 --- a/rwsdk/include/d3d8/rtpick.rpe +++ b/rwsdk/include/d3d8/rtpick.rpe @@ -149,472 +149,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionPick { diff --git a/rwsdk/include/d3d8/rtpitexd.h b/rwsdk/include/d3d8/rtpitexd.h index 39287bcd..602c608a 100644 --- a/rwsdk/include/d3d8/rtpitexd.h +++ b/rwsdk/include/d3d8/rtpitexd.h @@ -11,7 +11,7 @@ /** * \defgroup rtpitexd RtPITexD - * \ingroup rttool + * \ingroup texturedictionaries * * Platform Independent Texture Dictionaries * diff --git a/rwsdk/include/d3d8/rtpitexd.rpe b/rwsdk/include/d3d8/rtpitexd.rpe index 0650ea5c..290ac864 100644 --- a/rwsdk/include/d3d8/rtpitexd.rpe +++ b/rwsdk/include/d3d8/rtpitexd.rpe @@ -203,472 +203,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionPITexDict { diff --git a/rwsdk/include/d3d8/rtpng.h b/rwsdk/include/d3d8/rtpng.h index 694c8400..4ba8cf0f 100644 --- a/rwsdk/include/d3d8/rtpng.h +++ b/rwsdk/include/d3d8/rtpng.h @@ -12,7 +12,7 @@ /** * \defgroup rtpng RtPNG - * \ingroup rttool + * \ingroup imageconversiontools * * PNG/Portable Network Graphics Image Format Toolkit for RenderWare. * diff --git a/rwsdk/include/d3d8/rtpng.rpe b/rwsdk/include/d3d8/rtpng.rpe index 7a6b6cc2..e3f6f0d7 100644 --- a/rwsdk/include/d3d8/rtpng.rpe +++ b/rwsdk/include/d3d8/rtpng.rpe @@ -150,472 +150,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionPNG { diff --git a/rwsdk/include/d3d8/rtquat.h b/rwsdk/include/d3d8/rtquat.h index 05e971d0..a0a6e89d 100644 --- a/rwsdk/include/d3d8/rtquat.h +++ b/rwsdk/include/d3d8/rtquat.h @@ -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) ); \ \ } \ diff --git a/rwsdk/include/d3d8/rtquat.rpe b/rwsdk/include/d3d8/rtquat.rpe index e43bb50c..b239aba0 100644 --- a/rwsdk/include/d3d8/rtquat.rpe +++ b/rwsdk/include/d3d8/rtquat.rpe @@ -166,472 +166,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionQuat { diff --git a/rwsdk/include/d3d8/rtras.h b/rwsdk/include/d3d8/rtras.h index 0a9064a8..957e21e6 100644 --- a/rwsdk/include/d3d8/rtras.h +++ b/rwsdk/include/d3d8/rtras.h @@ -11,7 +11,7 @@ /** * \defgroup rtras RtRAS - * \ingroup rttool + * \ingroup imageconversiontools * * RAS/Sun Raster Fule Format Image Format Toolkit for RenderWare. * diff --git a/rwsdk/include/d3d8/rtras.rpe b/rwsdk/include/d3d8/rtras.rpe index 3398c3cc..a242ef49 100644 --- a/rwsdk/include/d3d8/rtras.rpe +++ b/rwsdk/include/d3d8/rtras.rpe @@ -150,472 +150,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionRAS { diff --git a/rwsdk/include/d3d8/rtray.h b/rwsdk/include/d3d8/rtray.h index 4bf0a343..b2f3d4bc 100644 --- a/rwsdk/include/d3d8/rtray.h +++ b/rwsdk/include/d3d8/rtray.h @@ -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); diff --git a/rwsdk/include/d3d8/rtray.rpe b/rwsdk/include/d3d8/rtray.rpe index 27788d94..c1ff4458 100644 --- a/rwsdk/include/d3d8/rtray.rpe +++ b/rwsdk/include/d3d8/rtray.rpe @@ -149,472 +149,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionRay { diff --git a/rwsdk/include/d3d8/rtslerp.h b/rwsdk/include/d3d8/rtslerp.h index ec41752c..4262b894 100644 --- a/rwsdk/include/d3d8/rtslerp.h +++ b/rwsdk/include/d3d8/rtslerp.h @@ -18,7 +18,7 @@ /** * \defgroup rtslerp RtSlerp - * \ingroup rttool + * \ingroup mathtools * * Slerp/Spherical Linear Interpolations Toolkit for RenderWare. * diff --git a/rwsdk/include/d3d8/rtslerp.rpe b/rwsdk/include/d3d8/rtslerp.rpe index 847ccb00..64bd7571 100644 --- a/rwsdk/include/d3d8/rtslerp.rpe +++ b/rwsdk/include/d3d8/rtslerp.rpe @@ -167,472 +167,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionSlerp { diff --git a/rwsdk/include/d3d8/rtsplpvs.h b/rwsdk/include/d3d8/rtsplpvs.h index 38ae118f..419717a1 100644 --- a/rwsdk/include/d3d8/rtsplpvs.h +++ b/rwsdk/include/d3d8/rtsplpvs.h @@ -12,7 +12,7 @@ /** * \defgroup rtsplinepvs RtSplinePVS - * \ingroup rttool + * \ingroup pvs * * Spline PVS Toolkit for RenderWare. */ diff --git a/rwsdk/include/d3d8/rtsplpvs.rpe b/rwsdk/include/d3d8/rtsplpvs.rpe index d436b610..9736cbbc 100644 --- a/rwsdk/include/d3d8/rtsplpvs.rpe +++ b/rwsdk/include/d3d8/rtsplpvs.rpe @@ -149,472 +149,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionSplinePVS { diff --git a/rwsdk/include/d3d8/rttiff.h b/rwsdk/include/d3d8/rttiff.h index 9dbf22c8..b5d0ec00 100644 --- a/rwsdk/include/d3d8/rttiff.h +++ b/rwsdk/include/d3d8/rttiff.h @@ -11,7 +11,7 @@ /** * \defgroup rttiff RtTIFF - * \ingroup rttool + * \ingroup imageconversiontools * * TIFF/Tag Image File Format Image Format Toolkit for RenderWare. * diff --git a/rwsdk/include/d3d8/rttiff.rpe b/rwsdk/include/d3d8/rttiff.rpe index f82c7d82..260b2329 100644 --- a/rwsdk/include/d3d8/rttiff.rpe +++ b/rwsdk/include/d3d8/rttiff.rpe @@ -150,472 +150,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionTIFF { diff --git a/rwsdk/include/d3d8/rttilerd.h b/rwsdk/include/d3d8/rttilerd.h index f11b703b..7cb8f887 100644 --- a/rwsdk/include/d3d8/rttilerd.h +++ b/rwsdk/include/d3d8/rttilerd.h @@ -11,7 +11,7 @@ /** * \defgroup rttilerender RtTileRender - * \ingroup rttool + * \ingroup cameras * * Tile renderer - e.g. grabbing screen shots - Toolkit for RenderWare. */ diff --git a/rwsdk/include/d3d8/rttilerd.rpe b/rwsdk/include/d3d8/rttilerd.rpe index 78222d06..15c929f9 100644 --- a/rwsdk/include/d3d8/rttilerd.rpe +++ b/rwsdk/include/d3d8/rttilerd.rpe @@ -150,472 +150,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionTileRend { diff --git a/rwsdk/include/d3d8/rttoc.h b/rwsdk/include/d3d8/rttoc.h index 02893aa8..88926062 100644 --- a/rwsdk/include/d3d8/rttoc.h +++ b/rwsdk/include/d3d8/rttoc.h @@ -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; @@ -60,16 +63,16 @@ 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 */ diff --git a/rwsdk/include/d3d8/rttoc.rpe b/rwsdk/include/d3d8/rttoc.rpe index 796f8de5..706372f2 100644 --- a/rwsdk/include/d3d8/rttoc.rpe +++ b/rwsdk/include/d3d8/rttoc.rpe @@ -150,472 +150,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionTOC { diff --git a/rwsdk/include/d3d8/rtvcat.rpe b/rwsdk/include/d3d8/rtvcat.rpe index 464ca886..ef5e286e 100644 --- a/rwsdk/include/d3d8/rtvcat.rpe +++ b/rwsdk/include/d3d8/rtvcat.rpe @@ -150,472 +150,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionVextexCacheStrip { diff --git a/rwsdk/include/d3d8/rtworld.h b/rwsdk/include/d3d8/rtworld.h index fef3e17c..727d8122 100644 --- a/rwsdk/include/d3d8/rtworld.h +++ b/rwsdk/include/d3d8/rtworld.h @@ -14,7 +14,7 @@ /** * \defgroup rtworld RtWorld - * \ingroup rttool + * \ingroup basicgeometry * * World Import Toolkit for RenderWare. */ diff --git a/rwsdk/include/d3d8/rtworld.rpe b/rwsdk/include/d3d8/rtworld.rpe index bc20947e..83449720 100644 --- a/rwsdk/include/d3d8/rtworld.rpe +++ b/rwsdk/include/d3d8/rtworld.rpe @@ -149,472 +149,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum e_rwdb_CriterionTlWorld { diff --git a/rwsdk/include/d3d8/rwcore.h b/rwsdk/include/d3d8/rwcore.h index b9214c63..583de35f 100644 --- a/rwsdk/include/d3d8/rwcore.h +++ b/rwsdk/include/d3d8/rwcore.h @@ -22,7 +22,7 @@ /************************************************************************* * * Filename: <C:/daily/rwsdk/include/d3d8/rwcore.h> - * Automatically Generated on: Wed Jul 10 10:45:00 2002 + * Automatically Generated on: Thu Jan 23 11:06:24 2003 * ************************************************************************/ @@ -94,6 +94,7 @@ typedef struct rxHeapSuperBlockDescriptor rxHeapSuperBlockDescriptor; typedef struct RxHeap RxHeap; typedef struct rxHeapBlockHeader rxHeapBlockHeader; +#if (!defined(DOXYGEN)) struct rxHeapFreeBlock { RwUInt32 size; @@ -106,6 +107,7 @@ struct rxHeapSuperBlockDescriptor RwUInt32 size; rxHeapSuperBlockDescriptor *next; }; +#endif /* (!defined(DOXYGEN)) */ /** * \ingroup rwcoregeneric @@ -124,6 +126,7 @@ struct RxHeap * the heap needs resetting or not. */ }; +#if (!defined(DOXYGEN)) struct rxHeapBlockHeader { /* present in all blocks (used & unused) */ @@ -132,6 +135,7 @@ struct rxHeapBlockHeader rxHeapFreeBlock *freeEntry; /* (or null) */ RwUInt32 pad[4]; /* alignment padding to 32 bytes */ }; +#endif /* (!defined(DOXYGEN)) */ /* This wrapper cheaply early-outs when a heap doesn't *need* resetting */ #define RxHeapReset(heap) \ @@ -356,8 +360,7 @@ struct RxIoSpec /** * \ingroup rwcoregeneric - * \typedef RxNodeBodyFn - * is the callback to be + * \ref RxNodeBodyFn is the callback to be * called during pipeline execution -- and, typically, process * \ref RxPacket's -- for the owning pipeline node. * @@ -373,7 +376,7 @@ typedef RwBool (*RxNodeBodyFn) (RxPipelineNode * self, /** * \ingroup rwcoregeneric - * \typedef RxNodeInitFn + * \ref RxNodeInitFn * is the callback to be called, * for the owning node definition, the first time an \ref RxPipeline * referencing that node definition is unlocked. @@ -388,7 +391,7 @@ typedef RwBool (*RxNodeInitFn) (RxNodeDefinition * self); /** * \ingroup rwcoregeneric - * \typedef RxNodeTermFn + * \ref RxNodeTermFn * is the callback to be called, * for the owning node definition, the last time an \ref RxPipeline * referencing that node definition is destroyed or locked. @@ -403,7 +406,7 @@ typedef void (*RxNodeTermFn) (RxNodeDefinition * self); /** * \ingroup rwcoregeneric - * \typedef RxPipelineNodeInitFn + * \ref RxPipelineNodeInitFn * is the callback to be called, for the owning pipeline node, whenever a * \ref RxPipeline containing that that pipeline node is unlocked. * @@ -417,7 +420,7 @@ typedef RwBool (*RxPipelineNodeInitFn) (RxPipelineNode * self); /** * \ingroup rwcoregeneric - * \typedef RxPipelineNodeTermFn + * \ref RxPipelineNodeTermFn * is the callback to be called, for the owning pipeline node, whenever a * \ref RxPipeline containing that that pipeline node is locked or * destroyed. @@ -432,14 +435,14 @@ typedef void (*RxPipelineNodeTermFn) (RxPipelineNode * self); /** * \ingroup rwcoregeneric - * \typedef RxPipelineNodeConfigFn + * \ref RxPipelineNodeConfigFn * is the callback to be called, for the owning pipeline node, whenever a * \ref RxPipeline containing that that pipeline node is unlocked, * *after* all \ref RxPipelineNodeInitFn's have been called for the * pipeline in question. This func is to be used as described in * RxPipelineNodeSendConfigMsg. * - * \param self A pointer to the pipeline node + * \param self A pointer to the pipeline node * \param pipeline A pointer to the containing pipeline * * \return TRUE on success, FALSE otherwise. @@ -449,21 +452,22 @@ typedef void (*RxPipelineNodeTermFn) (RxPipelineNode * self); typedef RwBool (*RxPipelineNodeConfigFn) (RxPipelineNode * self, RxPipeline * pipeline); -/* - removed from the API Reference January 2002 - - typedef RxConfigMsgHandlerFn - is the callback to be called, for the owning pipeline node, whenever - a message is sent to it by the ref RxPipelineNodeConfigFn of another - pipeline node in the same pipeline. See ref RxPipelineNodeSendConfigMsg. - - param self A pointer to the pipeline node - param msg Message ID - param intparam Meaning is message-specific - param ptrparam Meaning is message-specific - - return A RwInt32 value, 0: unserviced; -ve: error; +ve: informative success - - see RxNodeMethods - */ +/** + * \ingroup rwcoregeneric + * \ref RxConfigMsgHandlerFn + * is the callback to be called, for the owning pipeline node, whenever + * a message is sent to it by the \ref RxPipelineNodeConfigFn of another + * pipeline node in the same pipeline. See \ref RxPipelineNodeSendConfigMsg. + * + * \param self A pointer to the pipeline node + * \param msg Message ID + * \param intparam Meaning is message-specific + * \param ptrparam Meaning is message-specific + * + * \return A RwInt32 value, 0: unserviced; -ve: error; +ve: informative success + * + * \see RxNodeMethods + */ typedef RwUInt32 (*RxConfigMsgHandlerFn) (RxPipelineNode * self, RwUInt32 msg, RwUInt32 intparam, @@ -706,7 +710,7 @@ struct RxPipeline /** * \ingroup rwcoregeneric - * \typedef RxPipelineNodeOutputCallBack + * \ref RxPipelineNodeOutputCallBack * is the callback function supplied * to \ref RxPipelineNodeForAllConnectedOutputs. * @@ -716,11 +720,11 @@ struct RxPipeline * data structure (callbackdata). If no such structure was specified, this * will be NULL. * - * \param node A pointer to the pipeline node whose outputs - * are being traversed + * \param node A pointer to the pipeline node whose outputs + * are being traversed * \param outputnode A pointer to the current output - * pipeline node - * \param callbackdata A pointer to optional user-supplied data + * pipeline node + * \param callbackdata A pointer to optional user-supplied data * * \return Returns a pointer to the \ref RxPipelineNode whose outputs are being * traversed, or NULL to terminate traversal @@ -744,6 +748,9 @@ extern "C" { #endif /* __cplusplus */ +extern void +RxPipelineSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + extern RwBool _rxPipelineOpen(void); @@ -988,19 +995,19 @@ MACRO_STOP /** * \ingroup rwcoregeneric - * \typedef RxNodeOutput + * \ref RxNodeOutput * typedef for a reference to an output of a pipeline node */ typedef RwUInt32 *RxNodeOutput; /** * \ingroup rwcoregeneric - * \typedef RxNodeInput + * \ref RxNodeInput * typedef for a reference to the input of a pipeline node */ typedef RxPipelineNode *RxNodeInput; /** * \ingroup rwcoregeneric - * \typedef RxLockedPipe + * \ref RxLockedPipe * typedef for a reference to a locked pipeline */ typedef RxPipeline RxLockedPipe; @@ -1119,275 +1126,6 @@ RxPipelineInsertDebugNode(RxPipeline *pipeline, /*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/p2altmdl.h ---*/ -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeTransform.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetTransform(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeSubmitTriangle.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition * RxNodeDefinitionGetSubmitTriangle(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeSubmitLine.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition * RxNodeDefinitionGetSubmitLine(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeScatter.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition * RxNodeDefinitionGetScatter(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeClone.h ---*/ - -typedef struct RxPacketCacheCluster RxPacketCacheCluster; - -/** - * \ingroup rwcoregeneric - * \struct RxPacketCacheCluster - * structure containing a cache of an \ref RxCluster's - * within an \ref RxPacketCache - */ -struct RxPacketCacheCluster -{ - RwUInt32 slot; /**< A \ref RwUInt32 index into the \ref RxPacketCache's - * array of RxPacketCacheCluster's */ - RwUInt16 flags; /**< A cache of the original cluster's flags */ - RwUInt16 stride; /**< A cache of the original cluster's stride */ - void *data; /**< A cache of the original cluster's data */ - RwUInt32 numAlloced; /**< A cache of the original cluster's numAlloced */ - RwUInt32 numUsed; /**< A cache of the original cluster's numUsed */ - RxPipelineCluster *clusterRef; /**< A cache of the original cluster's \ref RxPipelineCluster */ -}; -typedef struct RxPacketCache RxPacketCache; - -/** - * \ingroup rwcoregeneric - * \struct RxPacketCache - * structure containing a cache of a \ref RxPacket */ -struct RxPacketCache -{ - RwUInt16 packetFlags; /**< A cache of the original packet's flags */ - RwUInt16 pad[1]; /**< Alignment padding */ - RwUInt32 numClusters; /**< The number of present clusters in the - * original packet when it was cloned */ - RwBool lastCloneDone;/**< Once the cache has been cloned by \ref RxPacketCacheClone - * with (lastClone == TRUE), it should not be used again! */ - RwUInt32 pad2[1]; /**< Alignment padding */ - RxPacketCacheCluster clusters[1]; /**< An array of \ref RxPacketCacheCluster's, - * extending beyond 1 element */ -}; - - -typedef struct RxNodeCloneInitData RxNodeCloneInitData; -/** - * \ingroup rwcoregeneric - * \struct RxNodeCloneInitData - * structure with which to initialize - * clone a \ref RxNodeDefinition, - * through \ref RxNodeDefinitionCloneCreate and - * set up cloned \ref RxPipelineNode modes, through - * \ref RxPipelineNodeCloneDefineModes */ -struct RxNodeCloneInitData -{ - RwUInt32 numModes; /**< Specifies the number of modes in - which the node should operate */ - RwUInt32 numOutputs; /**< Specifies the number of outputs of this - Clone node, which is also the maximum - number of outputs to which any one mode - may dispatch packets */ - RwUInt32 *modeSizes; /**< Specifies the number of outputs to which - each mode dispatches packets */ - RwUInt32 **modes; /**< An array of numModes pointers to arrays - (of length numOutputs) specifying the - outputs, in order, to which each mode - should dispatch packets (output zero is - the first output) */ -}; - -/** - * \ingroup rwcoregeneric - * \struct RxNodeCloneData - * structure which is the private - * data of Clone nodes \ref RxPipelineNode */ -typedef struct RxNodeCloneData RxNodeCloneData; -struct RxNodeCloneData -{ - RwBool optimized; /**< \ref RwBool specifying whether \ref RxPipelineNodeCloneOptimize - * has been run on this \ref RxPipelineNode yet */ - RwUInt32 currentMode; /**< \ref RwUInt32 The current mode of operation */ - RxNodeCloneInitData *data;/**< A pointer to \ref RxNodeCloneInitData data - * specifying the modes of operation */ -}; - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionCloneCreate(RxNodeCloneInitData *data); -extern RwBool RxPipelineNodeCloneDefineModes( - RxPipeline *pipeline, - RxPipelineNode *node, - RxNodeCloneInitData *data); -extern RwBool RxNodeDefinitionCloneDestroy(RxNodeDefinition *def); -extern RwBool RxPipelineNodeCloneOptimize(RxPipeline *pipeline, - RxPipelineNode *node); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeImmStash.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetImmStash(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeImmRenderSetup.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition * RxNodeDefinitionGetImmRenderSetup(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeImmMangleTriangleIndices.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetImmMangleTriangleIndices(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeImmMangleLineIndices.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition * RxNodeDefinitionGetImmMangleLineIndices(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeImmInstance.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition * RxNodeDefinitionGetImmInstance(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeCullTriangle.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition * RxNodeDefinitionGetCullTriangle(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeClipTriangle.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetClipTriangle(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeClipLine.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetClipLine(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - /*--- Automatically derived from: C:/daily/rwsdk/driver/d3d8/d3d8texdic.h ---*/ /*--- Automatically derived from: C:/daily/rwsdk/driver/d3d8/d3d8rendst.h ---*/ @@ -1415,7 +1153,7 @@ extern RxNodeDefinition *RxNodeDefinitionGetClipLine(void); */ /** - * \ingroup datatypes + * \ingroup rwraster * \ref RwRasterLockMode represents the options available for locking * a raster so that it may be modified (see API function \ref RwRasterLock). An * application may wish to write to the raster, read from the raster or @@ -1445,7 +1183,7 @@ enum RwRasterLockMode typedef enum RwRasterLockMode RwRasterLockMode; /** - * \ingroup datatypes + * \ingroup rwraster * \ref RwRasterFlipMode represents * raster flip modes */ enum RwRasterFlipMode @@ -1457,7 +1195,7 @@ enum RwRasterFlipMode typedef enum RwRasterFlipMode RwRasterFlipMode; /** - * \ingroup datatypes + * \ingroup rwraster * RwRasterType * This type represents the options available for creating a new * raster (se API function \ref RwRasterCreate)*/ @@ -1476,7 +1214,7 @@ enum RwRasterType typedef enum RwRasterType RwRasterType; /** - * \ingroup datatypes + * \ingroup rwraster * \ref RwRasterFormat is a set of values and flags which may be combined to * specify a raster format. The format chosen for a particular raster depends * on the hardware device and the raster type specified at creation time @@ -1569,8 +1307,8 @@ typedef enum RwRasterPrivateFlag RwRasterPrivateFlag; */ /** - * \ingroup datatypes - * \typedef RwRaster + * \ingroup rwraster + * \struct RwRaster * Raster containing device-dependent pixels. * This should be considered an opaque type. * Use the RwRaster API functions to access. @@ -1661,6 +1399,8 @@ extern "C" #endif /* __cplusplus */ /* Creating destroying rasters */ +extern void RwRasterSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + extern RwRaster *RwRasterCreate(RwInt32 width, RwInt32 height, RwInt32 depth, RwInt32 flags); extern RwBool RwRasterDestroy(RwRaster * raster); @@ -1743,8 +1483,6 @@ extern RwBool RwRasterValidatePlugins(const RwRaster * raster); #endif /* (defined(__ICL)) */ -#include <windows.h> - #if (defined(RWDEBUG)) #if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) #define _CRTDBG_MAP_ALLOC @@ -1837,48 +1575,16 @@ MACRO_START \ } \ MACRO_STOP -/* LEGACY-SUPPORT macros */ -#define RWIM2DVERTEXSetCameraX(vert, camx) RwIm2DVertexSetCameraX(vert, camx) -#define RWIM2DVERTEXSetCameraY(vert, camy) RwIm2DVertexSetCameraY(vert, camy) -#define RWIM2DVERTEXSetCameraZ(vert, camz) RwIm2DVertexSetCameraZ(vert, camz) -#define RWIM2DVERTEXSetRecipCameraZ(vert, recipz) \ - RwIm2DVertexSetRecipCameraZ(vert, recipz) -#define RWIM2DVERTEXGetCameraX(vert) RwIm2DVertexGetCameraX(vert) -#define RWIM2DVERTEXGetCameraY(vert) RwIm2DVertexGetCameraY(vert) -#define RWIM2DVERTEXGetCameraZ(vert) RwIm2DVertexGetCameraZ(vert) -#define RWIM2DVERTEXGetRecipCameraZ(vert) RwIm2DVertexGetRecipCameraZ(vert) -#define RWIM2DVERTEXSetScreenX(vert, scrnx) RwIm2DVertexSetScreenX(vert, scrnx) -#define RWIM2DVERTEXSetScreenY(vert, scrny) RwIm2DVertexSetScreenY(vert, scrny) -#define RWIM2DVERTEXSetScreenZ(vert, scrnz) RwIm2DVertexSetScreenZ(vert, scrnz) -#define RWIM2DVERTEXGetScreenX(vert) RwIm2DVertexGetScreenX(vert) -#define RWIM2DVERTEXGetScreenY(vert) RwIm2DVertexGetScreenY(vert) -#define RWIM2DVERTEXGetScreenZ(vert) RwIm2DVertexGetScreenZ(vert) -#define RWIM2DVERTEXSetU(vert, u, recipz) RwIm2DVertexSetU(vert, u, recipz) -#define RWIM2DVERTEXSetV(vert, v, recipz) RwIm2DVertexSetV(vert, v, recipz) -#define RWIM2DVERTEXGetU(vert) RwIm2DVertexGetU(vert) -#define RWIM2DVERTEXGetV(vert) RwIm2DVertexGetV(vert) -#define RWIM2DVERTEXSetRealRGBA(vert, red, green, blue, alpha) \ - RwIm2DVertexSetRealRGBA(vert, red, green, blue, alpha) -#define RWIM2DVERTEXSetIntRGBA(vert, red, green, blue, alpha) \ - RwIm2DVertexSetIntRGBA(vert, red, green, blue, alpha) -#define RWIM2DVERTEXGetRed(vert) RwIm2DVertexGetRed(vert) -#define RWIM2DVERTEXGetGreen(vert) RwIm2DVertexGetGreen(vert) -#define RWIM2DVERTEXGetBlue(vert) RwIm2DVertexGetBlue(vert) -#define RWIM2DVERTEXGetAlpha(vert) RwIm2DVertexGetAlpha(vert) -#define RWIM2DVERTEXCopyRGBA(dst, src) RwIm2DVertexCopyRGBA(dst, src) -#define RWIM2DVERTEXClipRGBA(o, i, n, f) RwIm2DVertexClipRGBA(o, i, n, f) - /**************************************************************************** Global Types */ /* We use RwD3D8Vertex to drive the hardware in 2D mode */ -/** - * \ingroup rwcoredriverd3d8 - * \typedef RwD3D8Vertex +/* * D3D8 vertex structure definition for 2D geometry */ +#if !defined(RWADOXYGENEXTERNAL) typedef struct RwD3D8Vertex RwD3D8Vertex; /** * \ingroup rwcoredriverd3d8 @@ -1897,47 +1603,41 @@ struct RwD3D8Vertex RwReal u; /**< Texture coordinate U */ RwReal v; /**< Texture coordinate V */ }; +#endif /* !defined(RWADOXYGENEXTERNAL) */ /* Define types used */ +#if !defined(RWADOXYGENEXTERNAL) /** * \ingroup rwcoredriverd3d8 - * \typedef RwIm2DVertex + * \ref RwIm2DVertex * Typedef for a RenderWare Graphics Immediate Mode 2D Vertex */ typedef RwD3D8Vertex RwIm2DVertex; +#endif /* !defined(RWADOXYGENEXTERNAL) */ -/* LEGACY-SUPPORT macro */ +#if !defined(RWADOXYGENEXTERNAL) /** * \ingroup rwcoredriverd3d8 - * \def RWIM2DVERTEX - * RWIM2DVERTEX is a legacy macro for RwIm2DVertex - */ -#define RWIM2DVERTEX RwIm2DVertex - -/** - * \ingroup rwcoredriverd3d8 - * \typedef RxVertexIndex + * \ref RxVertexIndex * * Typedef for a RenderWare Graphics PowerPipe Immediate * Mode Vertex */ typedef RwUInt16 RxVertexIndex; +#endif /* !defined(RWADOXYGENEXTERNAL) */ + +#if !defined(RWADOXYGENEXTERNAL) /** * \ingroup rwcoredriverd3d8 - * \typedef RwImVertexIndex + * \ref RwImVertexIndex * Typedef for a RenderWare Graphics Immediate Mode Vertex. */ typedef RxVertexIndex RwImVertexIndex; +#endif /* !defined(RWADOXYGENEXTERNAL) */ -/* LEGACY-SUPPORT macro */ -/** - * \ingroup rwcoredriverd3d8 - * \def RWIMVERTEXINDEX - * RWIMVERTEXINDEX is a legacy macro for RwImVertexIndex - */ -#define RWIMVERTEXINDEX RwImVertexIndex +#if !defined(RWADOXYGENEXTERNAL) /** * \ingroup rwcoredriverd3d8 @@ -1950,8 +1650,10 @@ typedef struct RwUInt32 numTextureStageStateChanges; /**< Number of Texture Stage States changed */ RwUInt32 numMaterialChanges; /**< Number of Material changes */ RwUInt32 numLightsChanged; /**< Number of Lights changed */ + RwUInt32 numVBSwitches; /**< Number of Vertex Buffer switches */ } RwD3D8Metrics; +#endif /* !defined(RWADOXYGENEXTERNAL) */ #endif /* D3D8_DRVMODEL_H */ @@ -1973,15 +1675,13 @@ RwD3D8Metrics; /* We use D3D8 formats for the instanced versions, to allow hardware T&L */ -/** - * \ingroup corep2d3d8 - * \typedef RxObjSpace3DVertex +/* * Typedef for an RxObjSpace3DVertex. */ typedef struct RxObjSpace3DVertex RxObjSpace3DVertex; /** - * \ingroup corep2d3d8 + * \ingroup cored3d8 * \struct RxObjSpace3DVertex * Structure representing object space vertex. */ @@ -2000,21 +1700,25 @@ struct RxObjSpace3DVertex #define RxObjSpace3DVertexFullSize (sizeof(RxObjSpace3DVertex)) /** - * \ingroup corep2d3d8 - * \typedef RxObjSpace3DLitVertex + * \ingroup cored3d8 + * \ref RxObjSpace3DLitVertex * Typedef for an RxObjSpace3DLitVertex. */ typedef RxObjSpace3DVertex RxObjSpace3DLitVertex; /** - * \ingroup corep2d3d8 - * \typedef RwIm3DVertex + * \ingroup cored3d8 + * \ref RwIm3DVertex * Typedef for an RwIm3DVertex. */ typedef RxObjSpace3DLitVertex RwIm3DVertex; /* LEGACY-SUPPORT macro */ -#define RWIM3DVERTEX RwIm3DVertex +/** + * \ingroup cored3d8 + * \ref RxScrSpace2DVertex + * Typedef for an RxScrSpace2DVertex structure + */ typedef RwIm2DVertex RxScrSpace2DVertex; /**************************************************************************** @@ -2161,55 +1865,6 @@ MACRO_STOP #define RwIm3DVertexCopyRGBA(_dst, _src) (((_dst)->color) = ((_src)->color)) -/* LEGACY-SUPPORT macros */ -#define RWIM2DCAMERAVERTEXSetU(_devvert, _camvert, _u, _recipz) \ - RwIm2DCameraVertexSetU(_devvert, _camvert, _u, _recipz) -#define RWIM2DCAMERAVERTEXSetV(_devvert, _camvert, _v, _recipz) \ - RwIm2DCameraVertexSetV(_devvert, _camvert, _v, _recipz) -#define RWIM3DVERTEXGetNext(vert) RwIm3DVertexGetNext(vert) -#define RWIM3DVERTEXSetPos(vert, imx, imy, imz) RwIm3DVertexSetPos(vert, imx, imy, imz) -#define RWIM3DVERTEXGetPos(vert) RwIm3DVertexGetPos(vert) -#define RWIM3DVERTEXSetU(vert, imu) RwIm3DVertexSetU(vert, imu) -#define RWIM3DVERTEXSetV(vert, imv) RwIm3DVertexSetV(vert, imv) -#define RWIM3DVERTEXSetRGBA(vert, r, g, b, a) RwIm3DVertexSetRGBA(vert, r, g, b, a) -#define RWIM3DVERTEXSetNormal(vert, imx, imy, imz) RwIm3DVertexSetNormal(vert, imx, imy, imz) -#define RWIM3DVERTEXCopyRGBA(dst,src) RwIm3DVertexCopyRGBA(dst,src) -#define RXOBJSPACE3DVERTEXGetPos(_vert, _pos) \ - RxObjSpace3DVertexGetPos(_vert, _pos) -#define RXOBJSPACE3DVERTEXSetPos(_vert, _pos) \ - RxObjSpace3DVertexSetPos(_vert, _pos) -#define RXOBJSPACE3DVERTEXGetPreLitColor(_vert, _col) \ - RxObjSpace3DVertexGetPreLitColor(_vert, _col) -#define RXOBJSPACE3DVERTEXSetPreLitColor(_vert, _col) \ - RxObjSpace3DVertexSetPreLitColor(_vert, _col) -#define RXOBJSPACE3DVERTEXGetColor RxObjSpace3DVertexGetColor -#define RXOBJSPACE3DVERTEXGetNormal(_vert, _normal) \ - RxObjSpace3DVertexGetNormal(_vert, _normal) -#define RXOBJSPACE3DVERTEXSetNormal(_vert, _normal) \ - RxObjSpace3DVertexSetNormal(_vert, _normal) -#define RXOBJSPACE3DVERTEXGetU(_vert) RxObjSpace3DVertexGetU(_vert) -#define RXOBJSPACE3DVERTEXGetV(_vert) RxObjSpace3DVertexGetV(_vert) -#define RXOBJSPACE3DVERTEXSetU(_vert, _imu) \ - RxObjSpace3DVertexSetU(_vert, _imu) -#define RXOBJSPACE3DVERTEXSetV(_vert, _imv) \ - RxObjSpace3DVertexSetV(_vert, _imv) -#define RXOBJSPACE3DLITVERTEXGetPos(vert, pos) \ - RxObjSpace3DLitVertexGetPos(vert, pos) -#define RXOBJSPACE3DLITVERTEXSetPos(vert, pos) \ - RxObjSpace3DLitVertexSetPos(vert, pos) -#define RXOBJSPACE3DLITVERTEXGetColor(vert, col) \ - RxObjSpace3DLitVertexGetColor(vert, col) -#define RXOBJSPACE3DLITVERTEXSetColor(vert, col) \ - RxObjSpace3DLitVertexSetColor(vert, col) -#define RXOBJSPACE3DLITVERTEXGetU(vert) \ - RxObjSpace3DLitVertexGetU(vert) -#define RXOBJSPACE3DLITVERTEXGetV(vert) \ - RxObjSpace3DLitVertexGetV(vert) -#define RXOBJSPACE3DLITVERTEXSetU(vert, imu) \ - RxObjSpace3DLitVertexSetU(vert, imu) -#define RXOBJSPACE3DLITVERTEXSetV(vert, imv) \ - RxObjSpace3DLitVertexSetV(vert, imv) - /*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/p2renderstate.h ---*/ @@ -2224,7 +1879,6 @@ enum RxRenderStateFlag rxRENDERSTATEFLAG_ZWRITEENABLE = 0x00000004, /**<Z-Buffer writing is to be enabled */ rxRENDERSTATEFLAG_VERTEXALPHAENABLE = 0x00000008, /**<Vertex alpha is to be enabled */ rxRENDERSTATEFLAG_FOGENABLE = 0x00000010, /**<Fog is to be enabled */ - rxRENDERSTATEFLAG_ALPHAPRIMITIVEBUFFER = 0x00000020, /**<Alpha primitive buffering is to be enabled */ rxRENDERSTATEFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }; typedef enum RxRenderStateFlag RxRenderStateFlag; @@ -2248,7 +1902,6 @@ struct RxRenderStateVector RwRGBA BorderColor; /**< Border color for texturing address mode border */ RwFogType FogType; /**< Select the type of fogging to use */ RwRGBA FogColor; /**< Color used for fogging */ - RwUInt8 *FogTable; /**< A 256 entry fog table */ }; #if (!defined(RxRenderStateVectorAssign)) @@ -2274,52 +1927,6 @@ extern RxRenderStateVector *RxRenderStateVectorLoadDriverState(RxRenderSta #endif /* __cplusplus */ -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/p2clpcom.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeRGBAInterp.h ---*/ - -struct NodeRGBAInterpData -{ - RwBool rgbaInterpOn; - RxRenderStateVector state; -}; -typedef struct NodeRGBAInterpData NodeRGBAInterpData; - - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetRGBAInterp(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeUVInterp.h ---*/ - -typedef struct RxNodeUVInterpSettings RxNodeUVInterpSettings; -struct RxNodeUVInterpSettings -{ - RwBool uvInterpOn; - RxRenderStateVector state; -}; - - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition * RxNodeDefinitionGetUVInterp(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - /*--- Automatically derived from: C:/daily/rwsdk/src/baimage.h ---*/ /**************************************************************************** @@ -2342,8 +1949,8 @@ typedef enum RwImageFlag RwImageFlag; */ /** - * \ingroup datatypes - * \typedef RwImage + * \ingroup rwimage + * \struct RwImage * Image containing device-independent pixels. * This should be considered an opaque type. * Use the RwImage API functions to access. @@ -2367,7 +1974,7 @@ struct RwImage #endif /* (!defined(DOXYGEN)) */ /** - * \ingroup datatypes + * \ingroup rwimage * \ref RwImageCallBackRead * is the function registered with \ref RwImageRegisterImageFormat that is used, * for example by \ref RwImageRead and \ref RwImageReadMaskedImage, @@ -2375,13 +1982,15 @@ struct RwImage * * \param imageName Pointer to a string containing the file name of the image. * + * \return Returns a pointer to the image read. + * * \see RwImageRegisterImageFormat * */ typedef RwImage *(*RwImageCallBackRead)(const RwChar * imageName); /** - * \ingroup datatypes + * \ingroup rwimage * \ref RwImageCallBackWrite * is the function registered with \ref RwImageRegisterImageFormat that is used, * for example by \ref RwImageWrite, @@ -2474,6 +2083,11 @@ extern "C" #endif /* __cplusplus */ /* Creating and destroying */ + +extern void RwImageSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + +extern void RwImageFormatSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + extern RwImage *RwImageCreate(RwInt32 width, RwInt32 height, RwInt32 depth); extern RwBool RwImageDestroy(RwImage * image); @@ -2505,6 +2119,8 @@ extern RwImage *RwImageWrite(RwImage * image, /* Setting and getting the default path for images */ extern RwChar *RwImageGetPath(void); extern const RwChar *RwImageSetPath(const RwChar * path); + /* Fast image path change */ +extern void _rwImageSwapPath(RwChar **path, RwInt32 *size); /* Setting */ #if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) @@ -2593,8 +2209,8 @@ extern const RwImage *RwImageStreamWrite(const RwImage * image, */ /** - * \ingroup datatypes - * \typedef RwTexDictionary + * \ingroup rwtexdict + * \struct RwTexDictionary * is a texture dictionary containing textures. * This should be considered an opaque type. * Use the RwTexDictionary API functions to access. @@ -2615,8 +2231,8 @@ struct RwTexDictionary /* Parent is the dictionary */ /** - * \ingroup datatypes - * \typedef RwTexture + * \ingroup rwtexture + * \struct RwTexture * is a texture object. * This should be considered an opaque type. * Use the RwTexture API functions to access. @@ -2641,7 +2257,7 @@ struct RwTexture #endif /* (!defined(DOXYGEN)) */ /** - * \ingroup datatypes + * \ingroup rwtexture * \ref RwTextureCallBackRead * represents the function used by \ref RwTextureRead to read the specified * texture from a disk file. This function should return a pointer to the @@ -2662,7 +2278,7 @@ typedef RwTexture *(*RwTextureCallBackRead)(const RwChar *name, const RwChar *maskName); /** - * \ingroup datatypes + * \ingroup rwtexture * \ref RwTextureCallBack * represents the function called from \ref RwTexDictionaryForAllTextures * for all textures in a given texture dictionary. This function should @@ -2681,7 +2297,7 @@ typedef RwTexture *(*RwTextureCallBack)(RwTexture *texture, void *pData); /** - * \ingroup datatypes + * \ingroup rwtexdict * \ref RwTexDictionaryCallBack * represents the function called from \ref RwTexDictionaryForAllTexDictionaries * for all texture dictionaries that currently exist. This function should @@ -2702,7 +2318,7 @@ typedef RwTexDictionary *(*RwTexDictionaryCallBack)(RwTexDictionary *dict, void /** - * \ingroup datatypes + * \ingroup rwtexture * \ref RwTextureCallBackMipmapGeneration * is the callback function supplied to \ref RwTextureSetMipmapGenerationCallBack * and returned from \ref RwTextureGetMipmapGenerationCallBack. @@ -2726,7 +2342,7 @@ typedef RwRaster *(*RwTextureCallBackMipmapGeneration)(RwRaster * raster, RwImage * image); /** - * \ingroup datatypes + * \ingroup rwtexture * \ref RwTextureCallBackMipmapName * is the callback function supplied to \ref RwTextureSetMipmapNameCallBack and * returned from \ref RwTextureGetMipmapNameCallBack. @@ -2926,10 +2542,14 @@ extern RwTexture *RwTextureSetMaskName(RwTexture * texture, const RwChar * maskName); /* Creating/destroying dictionaries */ +extern void RwTexDictionarySetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + extern RwTexDictionary *RwTexDictionaryCreate(void); extern RwBool RwTexDictionaryDestroy(RwTexDictionary * dict); /* Textures */ +void RwTextureSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + extern RwTexture *RwTextureCreate(RwRaster * raster); extern RwBool RwTextureDestroy(RwTexture * texture); @@ -3071,13 +2691,11 @@ enum RwClipFlag rwCLIPFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }; -typedef enum RwClipFlag RwClipFlag; - -/** - * \ingroup rwcoregeneric - * \typedef RwClipFlag +/* * Typedef for RwClipFlag enumeration specifying the clipping status of a vertex */ +typedef enum RwClipFlag RwClipFlag; + typedef struct RxCamSpace3DVertex RxCamSpace3DVertex; @@ -3094,8 +2712,8 @@ struct RxCamSpace3DVertex /* Clip flags on this vertex */ RwUInt8 clipFlags; /**< Clip flags for the vertex generated during transformation into camera-space, see \ref RwClipFlag */ RwUInt8 pad[3]; /**< Alignment padding */ - /* Lit colour */ - RwRGBAReal col; /**< Accumulated \ref RwReal light values (initialized to zero or prelight colours) */ + /* Lit color */ + RwRGBAReal col; /**< Accumulated \ref RwReal light values (initialized to zero or prelight colors) */ /* Only used by the clipper */ RwReal u; /**< Texture U coordinate */ RwReal v; /**< Texture V coordinate */ @@ -3103,8 +2721,8 @@ struct RxCamSpace3DVertex /* Supports pipeline1 apps: */ /** - * \ingroup datatypes - * \typedef RwCameraVertex + * \ingroup rwcoregeneric + * \ref RwCameraVertex * typedef for a structure describing a camera-space 3D vertex. */ typedef RxCamSpace3DVertex RwCameraVertex; @@ -3159,9 +2777,7 @@ enum RxGeometryFlag rxGEOMETRYFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }; -/** - * \ingroup rwcoregeneric - * \typedef RxGeometryFlag +/* * Typedef for RxGeometryFlag enumeration describing geometry properties */ typedef enum RxGeometryFlag RxGeometryFlag; @@ -3186,7 +2802,7 @@ struct RxMeshStateVector /* We can't necessarily reference an RpMaterial in here (i.e with Im3D), * because RpMaterials are defined in RpWorld not RwCore */ RwTexture *Texture; /**< A pointer to a \ref RwTexture */ - RwRGBA MatCol; /**< \ref RwRGBA material colour */ + RwRGBA MatCol; /**< \ref RwRGBA material color */ RxPipeline *Pipeline; /**< A pointer to the material pipeline where appropriate */ /* rwPRIMTYPETRILIST/TRIFAN/TRISTRIP/LINELIST/POLYLINE */ RwPrimitiveType PrimType; /**< \ref RwPrimitiveType primitive type */ @@ -3295,7 +2911,7 @@ struct RxVStep /* CamNorms.csl */ /** * \ingroup rwcoregeneric - * \typedef RxCamNorm + * \ref RxCamNorm * typedef for \ref RwV3d used by the RxClVStep cluster */ typedef RwV3d RxCamNorm; @@ -3342,7 +2958,7 @@ extern RxClusterDefinition RxClTriPlanes; /*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/baim3d.h ---*/ /** - * \ingroup datatypes + * \ingroup rwim3d * RwIm3DTransformFlags * The bit-field type RwIm3DTransformFlags * specifies options available for controlling execution of the 3D immediate @@ -3373,6 +2989,8 @@ typedef struct rwIm3DVertexCache RwIm3DVertexCache; #endif /* (0&& defined(SKY2)) */ /* complete information to reconstruct post-transform Im3D "mesh" packet */ + +#if (!defined(DOXYGEN)) struct _rwIm3DPoolStash { RwUInt32 flags; /* rwIM3D_VERTEXUV, rwIM3D_ALLOPAQUE, rwIM3D_NOCLIP etc */ @@ -3413,14 +3031,11 @@ struct rwIm3DRenderPipelines struct rwImmediGlobals { - RxPipeline *genericIm3DTransformPipeline; - rwIm3DRenderPipelines genericIm3DRenderPipelines; - RxPipeline *im3DTransformPipeline; rwIm3DRenderPipelines im3DRenderPipelines; /* Platforms that have their own non-generic pipelines - * (OPENGL, D3D7, SKY2, KAMUI2, DOLPHIN) put them here: */ + * (OPENGL, D3D8, SKY2, KAMUI2, DOLPHIN) put them here: */ RxPipeline *platformIm3DTransformPipeline; rwIm3DRenderPipelines platformIm3DRenderPipelines; @@ -3431,12 +3046,11 @@ struct rwImmediGlobals /* The line PS2All render pipe automatically * calls this PS2AllMat pipeline: */ RxPipeline *ps2AllMatIm3DLinePipeline; - /* PS2Manager pipelines */ - RxPipeline *ps2ManagerIm3DRenderPipeline; #endif /* (defined(SKY2_DRVMODEL_H)) */ rwIm3DPool curPool; /* The current cache of transformed vertices */ }; +#endif /* (!defined(DOXYGEN)) */ #ifdef __cplusplus @@ -3458,9 +3072,6 @@ extern RwBool RwIm3DRenderIndexedPrimitive(RwPrimitiveType primType, RwInt32 numIndices); extern RwBool RwIm3DRenderPrimitive(RwPrimitiveType primType); -extern RxPipeline *RwIm3DGetGenericTransformPipeline(void); -extern RxPipeline *RwIm3DGetGenericRenderPipeline(RwPrimitiveType primType); - extern RxPipeline *RwIm3DGetTransformPipeline(void); extern RxPipeline *RwIm3DGetRenderPipeline( RwPrimitiveType primType); extern RxPipeline *RwIm3DSetTransformPipeline(RxPipeline *pipeline); @@ -3670,8 +3281,23 @@ extern RwBool RwD3D8CameraIsBBoxFullyInsideFrustum(const void *camera, const voi * Cheking the CPU capabilities */ -extern RwBool _rwIntelSSEsupported(void); +#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) extern RwBool _rwIntelMMXsupported(void); +extern RwBool _rwIntelSSEsupported(void); +extern RwBool _rwIntelSSE2supported(void); +extern RwBool _rwAMD3DNowSupported(void); + +#else +extern RwBool _rwD3D8CPUSupportsMMX; +extern RwBool _rwD3D8CPUSupportsSSE; +extern RwBool _rwD3D8CPUSupportsSSE2; +extern RwBool _rwD3D8CPUSupports3DNow; + +#define _rwIntelMMXsupported() _rwD3D8CPUSupportsMMX +#define _rwIntelSSEsupported() _rwD3D8CPUSupportsSSE +#define _rwIntelSSE2supported() _rwD3D8CPUSupportsSSE2 +#define _rwAMD3DNowSupported() _rwD3D8CPUSupports3DNow +#endif /* * Enabling texture format conversions when loading textures from a texture @@ -3680,6 +3306,8 @@ extern RwBool _rwIntelMMXsupported(void); extern void _rwD3D8TexDictionaryEnableRasterFormatConversion(RwBool enable); +/* Called from RwEngineInit to give the driver a chance to register plugins */ +extern RwBool _rwDeviceRegisterPlugin(void); #ifdef __cplusplus } @@ -3689,7 +3317,7 @@ _rwD3D8TexDictionaryEnableRasterFormatConversion(RwBool enable); /* LEGACY-MACRO */ /** * \ingroup rwcoredriverd3d8 - * \ref RwD3DLoadNativeTexture is a legacy macro for compatability with + * \ref RwD3DLoadNativeTexture is a legacy macro for compatibility with * RWD3D7 applications that can be used to read a compressed texture from * the specified DDS file on disk. * @@ -3820,17 +3448,16 @@ struct RwFrame #endif /* (!defined(DOXYGEN)) */ /** - * \ingroup datatypes - * \typedef RwFrame - Frame for defining object position and orientation. + * \ingroup rwframe + * \struct RwFrame + * Frame for defining object position and orientation. * This should be considered an opaque type. * Use the RwFrame API functions to access. */ typedef struct RwFrame RWALIGN(RwFrame, rwFRAMEALIGNMENT); /** - * \ingroup datatypes - * \typedef RwFrameCallBack + * \ingroup rwframe * \ref RwFrameCallBack type represents the function * called from \ref RwFrameForAllChildren for all child frames linked to a given frame. * This function should return a pointer to the current frame to indicate success. @@ -3840,6 +3467,8 @@ typedef struct RwFrame RWALIGN(RwFrame, rwFRAMEALIGNMENT); * iterator. * \param data Pointer to developer-defined data structure. * + * \return + * * \see RwFrameForAllChildren * */ @@ -3867,6 +3496,9 @@ extern "C" { #endif /* __cplusplus */ +extern void RwFrameSetFreeListCreateParams(RwInt32 blockSize, + RwInt32 numBlocksToPrealloc ); + /* Finding what is attached to a frame */ extern RwFrame * RwFrameForAllObjects(RwFrame * frame, @@ -3945,6 +3577,9 @@ extern RwFrame * RwFrameUpdateObjects(RwFrame * frame); /* Creating destroying frames */ +extern void +RwFrameSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + extern RwFrame * RwFrameCreate(void); @@ -4030,12 +3665,15 @@ _rwFramePurgeClone(RwFrame *root); typedef struct RwObjectHasFrame RwObjectHasFrame; typedef RwObjectHasFrame * (*RwObjectHasFrameSyncFunction)(RwObjectHasFrame *object); + +#if (!defined(DOXYGEN)) struct RwObjectHasFrame { RwObject object; RwLLLink lFrame; RwObjectHasFrameSyncFunction sync; }; +#endif /* (!defined(DOXYGEN)) */ /**************************************************************************** Function prototypes @@ -4082,12 +3720,15 @@ MACRO_STOP Global types */ typedef struct rpTextureChunkInfo RwTextureChunkInfo; + +#if (!defined(DOXYGEN)) struct rpTextureChunkInfo { RwTextureFilterMode filtering; RwTextureAddressMode addressingU; RwTextureAddressMode addressingV; }; +#endif /* (!defined(DOXYGEN)) */ /* Bit flags defining properties of textures when stream */ enum RwTextureStreamFlags @@ -4169,11 +3810,14 @@ _rwTextureChunkInfoRead(RwStream *stream, */ typedef struct rwFrameList rwFrameList; + +#if (!defined(DOXYGEN)) struct rwFrameList { RwFrame **frames; RwInt32 numFrames; }; +#endif /* (!defined(DOXYGEN)) */ /**************************************************************************** Global Variables @@ -4257,7 +3901,7 @@ _rwFrameListStreamWrite(const rwFrameList *frameList, typedef struct RwBBox RwBBox; /** - * \ingroup datatypes + * \ingroup rwbbox * \struct RwBBox * This type represents a 3D axis-aligned bounding-box * specified by the positions of two corners which lie on a diagonal. @@ -4442,7 +4086,7 @@ MACRO_STOP */ /** - * \ingroup datatypes + * \ingroup rwcamera * RwCameraClearMode * Camera clear flags */ enum RwCameraClearMode @@ -4458,7 +4102,7 @@ enum RwCameraClearMode typedef enum RwCameraClearMode RwCameraClearMode; /** - * \ingroup datatypes + * \ingroup rwcamera * RwCameraProjection * This type represents the options available for * setting the camera projection model, either perspective projection or @@ -4473,7 +4117,7 @@ enum RwCameraProjection typedef enum RwCameraProjection RwCameraProjection; /** - * \ingroup datatypes + * \ingroup rwcamera * RwFrustumTestResult * This type represents the results from a * camera frustum test on a given sphere (see API function @@ -4489,8 +4133,8 @@ typedef enum RwFrustumTestResult RwFrustumTestResult; /** - * \ingroup datatypes - * \typedef RwCamera + * \ingroup rwcamera + * \struct RwCamera * Camera object for rendering a view. * This should be considered an opaque type. * Use the RwCamera API functions to access. @@ -4502,6 +4146,8 @@ typedef RwCamera *(*RwCameraBeginUpdateFunc) (RwCamera * camera); typedef RwCamera *(*RwCameraEndUpdateFunc) (RwCamera * camera); typedef struct RwFrustumPlane RwFrustumPlane; + +#if (!defined(DOXYGEN)) /* * Structure describing a frustrum plane. */ @@ -4514,7 +4160,7 @@ struct RwFrustumPlane RwUInt8 pad; }; -#if (!defined(DOXYGEN)) + struct RwCamera { RwObjectHasFrame object; @@ -4560,8 +4206,7 @@ struct RwCamera #endif /* (!defined(DOXYGEN)) */ /** - * \ingroup datatypes - * \typedef RwCameraCallBack + * \ingroup rwcamera * \ref RwCameraCallBack type represents a function called from any camera * iterator that may be implemented in plugins. This function should return a * pointer to the current camera to indicate success. The callback may return @@ -4569,6 +4214,8 @@ struct RwCamera * * \param camera Pointer to the current camera, supplied by iterator. * \param data Pointer to developer-defined data structure. + * + * \return */ typedef RwCamera *(*RwCameraCallBack)(RwCamera *camera, void *data); @@ -4594,6 +4241,8 @@ extern RwCamera *RwCameraShowRaster(RwCamera * camera, void *pDev, RwUInt32 flags); /* Creation and destruction */ +extern void RwCameraSetFreeListCreateParams( RwInt32 blockSize, + RwInt32 numBlocksToPrealloc ); extern RwBool RwCameraDestroy(RwCamera * camera); extern RwCamera *RwCameraCreate(void); extern RwCamera *RwCameraClone(RwCamera * camera); @@ -4669,10 +4318,9 @@ extern RwFrame *RwCameraGetFrame(const RwCamera *camera); /*--- Automatically derived from: C:/daily/rwsdk/driver/common/barwtyp.h ---*/ -/*--- Automatically derived from: C:/daily/rwsdk/src/bacamval.h ---*/ - /*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/bapipe.h ---*/ +#if (!defined(DOXYGEN)) struct rwPipeGlobals { RwFreeList *pipesFreeList; /* Save mallocs, use a freelist */ @@ -4695,24 +4343,12 @@ struct rwPipeGlobals RxPipeline *genericWorldSectorPipeline; RxPipeline *genericMaterialPipeline; /* Platforms that have their own non-generic pipelines - * (OPENGL, D3D7, SKY2, KAMUI2, DOLPHIN) put them here: */ + * (OPENGL, D3D8, SKY2, KAMUI2, DOLPHIN) put them here: */ RxPipeline *platformAtomicPipeline; RxPipeline *platformWorldSectorPipeline; RxPipeline *platformMaterialPipeline; -#if (defined(SKY2_DRVMODEL_H)) - /* We have extra flavours of pipe under SKY2. - * PS2All and PS2AllMat are the defaults. - * - see RpWorldSectorSkyGetPS2AllPipeline, etc */ - RxPipeline *ps2ManagerAtomicPipeline; - RxPipeline *allInOneAtomicPipeline; - RxPipeline *vanillaAtomicPipeline; - RxPipeline *ps2ManagerWorldSectorPipeline; - RxPipeline *allInOneWorldSectorPipeline; - RxPipeline *vanillaWorldSectorPipeline; - RxPipeline *vanillaMaterialPipeline; -#endif /* (SKY2_DRVMODEL_H) */ - }; +#endif /* (!defined(DOXYGEN)) */ typedef struct rwPipeGlobals rwPipeGlobals; @@ -4740,9 +4376,7 @@ extern RwInt32 _rxPipelineGlobalsOffset; /* Camera stream format */ /** - * \ingroup datatypes - * \typedef RwCameraChunkInfo - * + * \ingroup rwcamera * \ref RwCameraChunkInfo is typedef'd to a structure that holds camera * data. This should be considered an opaque type. Use the RwCamera * API functions to access it. @@ -4750,6 +4384,8 @@ extern RwInt32 _rxPipelineGlobalsOffset; typedef struct rwStreamCamera RwCameraChunkInfo; typedef struct rwStreamCamera rwStreamCamera; + +#if (!defined(DOXYGEN)) struct rwStreamCamera { RwV2d viewWindow; @@ -4758,6 +4394,7 @@ struct rwStreamCamera RwReal fogPlane; RwUInt32 projection; }; +#endif /* (!defined(DOXYGEN)) */ /**************************************************************************** Function prototypes diff --git a/rwsdk/include/d3d8/rwplcore.h b/rwsdk/include/d3d8/rwplcore.h index b0ff7dfa..3740ae60 100644 --- a/rwsdk/include/d3d8/rwplcore.h +++ b/rwsdk/include/d3d8/rwplcore.h @@ -22,7 +22,7 @@ /************************************************************************* * * Filename: <C:/daily/rwsdk/include/d3d8/rwplcore.h> - * Automatically Generated on: Wed Jul 10 10:45:00 2002 + * Automatically Generated on: Thu Jan 23 11:06:23 2003 * ************************************************************************/ @@ -68,6 +68,7 @@ typedef struct _RwUInt64 RwUInt64; typedef struct _RwInt64 RwInt64; /* We'll do it with structures (can't do maths on these, but OK for allocation): */ +#if (!defined(DOXYGEN)) #ifdef rwBIGENDIAN struct _RwUInt64 { @@ -99,6 +100,7 @@ struct _RwInt64 #error "ENDIAN-ness undefined!" #endif /* rwLITTLEENDIAN */ #endif /* rwBIGENDIAN */ +#endif /* (!defined(DOXYGEN)) */ #define RWZERO64 { (RwUInt32)0, (RwUInt32)0 } #endif /* _MSC_VER */ @@ -108,7 +110,8 @@ typedef struct _RwInt128 RwInt128; /* We'll do it with structures * (can't do maths on these, but OK for allocation): */ -#ifdef rwBIGENDIAN +#if (!defined(DOXYGEN)) +#ifdef rwBIGENDIAN struct _RwUInt128 { RwUInt64 top; @@ -139,6 +142,7 @@ struct _RwInt128 #error "ENDIAN-ness undefined!" #endif /* rwLITTLEENDIAN */ #endif /* rwBIGENDIAN */ +#endif /* (!defined(DOXYGEN)) */ #define RWZERO128 { RWZERO64, RWZERO64 } @@ -160,6 +164,10 @@ struct _RwInt128 #define rwFRAMEALIGNMENT sizeof(RwUInt32) #define rwV4DALIGNMENT sizeof(RwUInt32) +#if (!defined(rwMALLOCALIGNMENT)) +#define rwMALLOCALIGNMENT sizeof(RwUInt32) +#endif /* (!defined(rwMALLOCALIGNMENT) */ + #if (defined(_MSC_VER)) #if (defined(RWVERBOSE)) @@ -501,7 +509,7 @@ int32fromreal(RwReal x) #if (!defined(NOASM)) static __inline RwUInt32 -RwFastRealToUInt32(RwReal x) +RwFastRealToUInt32Inline(RwReal x) { RwUInt32 res; @@ -510,6 +518,9 @@ RwFastRealToUInt32(RwReal x) return(res); } + +#define RwFastRealToUInt32 RwFastRealToUInt32Inline + #endif /* (defined(NOASM)) */ #endif /* (defined(_MSC_VER)) */ @@ -627,11 +638,14 @@ do \ while(0) typedef union _rwIEEEFloatShapeType _rwIEEEFloatShapeType; + +#if (!defined(DOXYGEN)) union _rwIEEEFloatShapeType { float value; unsigned int word; }; +#endif /* (!defined(DOXYGEN)) */ #define _RW_GET_FLOAT_WORD(i,d) \ do { \ @@ -949,13 +963,13 @@ while(0) #if (!defined(rwSqrt)) /* NOTE: this is overloaded in drvmodel.h for some targets (SKY2 and XBOX atm) * [we do in fact do overload w/ sqrtf there, if RW_USE_SPF, - * for D3D7, D3D8, OpenGL and SoftRas] */ + * for D3D8, OpenGL and SoftRas] */ #define rwSqrt(_result, _x) rwSqrtMacro(_result, _x) #endif /* (!defined(rwSqrt)) */ #if (!defined(rwInvSqrt)) /* NOTE: this is overloaded in drvmodel.h for some targets (SKY2 and XBOX atm) * [we do in fact do overload w/ (1 / sqrtf) there, if RW_USE_SPF, - * for D3D7, D3D8, OpenGL and SoftRas] */ + * for D3D8, OpenGL and SoftRas] */ #define rwInvSqrt(_recip, _x) rwInvSqrtMacro(_recip, _x) #endif /* (!defined(rwInvSqrt)) */ #if (!defined(RwTan)) @@ -977,7 +991,22 @@ while(0) /*--- Automatically derived from: C:/daily/rwsdk/src/plcore/batypes.h ---*/ #define rwLIBRARYBASEVERSION 0x31000 -#define rwLIBRARYCURRENTVERSION 0x33002 +#define rwLIBRARYCURRENTVERSION 0x34005 + +#define rwLIBRARYVERSION31000 0x31000 +#if (rwLIBRARYVERSION31000 < rwLIBRARYBASEVERSION) +#error "Time to remove all rwLIBRARYVERSION31000 code" +#endif + +#define rwLIBRARYVERSION34001 0x34001 +#if (rwLIBRARYVERSION34001 < rwLIBRARYBASEVERSION) +#error "Time to remove all rwLIBRARYVERSION34001 code" +#endif + +#define rwLIBRARYVERSION34002 0x34002 +#if (rwLIBRARYVERSION34002 < rwLIBRARYBASEVERSION) +#error "Time to remove all rwLIBRARYVERSION34002 code" +#endif /* * RWBUILDNUMBER @@ -993,14 +1022,16 @@ while(0) * The following Doxygen comment MUST be copied into RwCore.h, * so don't move it from here. */ +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup rwcore - * \page rwcoreoverview Core Library Overview + * \ingroup fundamentaltypes + * \page fundtypesoverview Fundamental Types Overview * - * LIBRARY: rwcore.lib - * HEADER: rwcore.h + * \par Requirements + * \li \b Headers: rwcore.h + * \li \b Libraries: rwcore.lib * - * This library provides the fundamental RenderWare features. + * The rwcore.lib library provides the fundamental RenderWare features. * * When creating a RenderWare application, this library must always be * linked. @@ -1024,7 +1055,7 @@ while(0) * supplied User Guide. The RenderWare Engine \ref rwengine API is * usually the starting point for new developers. */ - +#endif /* RWADOXYGENEXTERNAL */ #if (!defined(RWFORCEENUMSIZEINT)) #define RWFORCEENUMSIZEINT ((RwInt32)((~((RwUInt32)0))>>1)) @@ -1157,7 +1188,6 @@ while(0) #if (defined(RWDEBUG) && defined(RWVERBOSE)) -/* #include <windows.h> */ #if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) #define _CRTDBG_MAP_ALLOC #endif /* defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) */ @@ -1189,6 +1219,8 @@ while(0) /* NB volatile keyword required for VC5.0 to ensure a reload - AMB */ typedef union RwSplitBits RwSplitBits; + +#if (!defined(DOXYGEN)) union RwSplitBits { RwReal nReal; @@ -1219,6 +1251,7 @@ struct RwSplitFixed #endif /* rwBIGENDIAN */ typedef union RwUnionReal RwUnionReal; + union RwUnionReal /* MSB is sign bit in any circumstance */ { RwReal real; /* 4 bytes interpreted as RwReal */ @@ -1226,6 +1259,7 @@ union RwUnionReal /* MSB is sign bit in any circumstance */ RwFixed fixed; /* 4 bytes interpreted as 16:16 fixed */ RwSplitFixed splitfixed; /* 4 bytes interpreted as 16:16 fixed */ }; +#endif /* (!defined(DOXYGEN)) */ /*****************/ @@ -1233,14 +1267,9 @@ union RwUnionReal /* MSB is sign bit in any circumstance */ /*****************/ -/** - * \ingroup datatypes - * \typedef RwV2d - * typedef for struct RwV2d - */ typedef struct RwV2d RwV2d; /** - * \ingroup datatypes + * \ingroup rwv2d * \struct RwV2d * This type represents points in a 2D space, such as device * space, specified by the (x, y) coordinates of the point. @@ -1251,14 +1280,9 @@ struct RwV2d RwReal y; /**< Y vlaue */ }; -/** - * \ingroup datatypes - * \typedef RwV3d - * typedef for struct RwV3d - */ typedef struct RwV3d RwV3d; /** - * \ingroup datatypes + * \ingroup rwv3d * \struct RwV3d * This type represents 3D points and vectors specified by * the (x, y, z) coordinates of a 3D point or the (x, y, z) components of a @@ -1274,13 +1298,16 @@ struct RwV3d #define RWV4DALIGNMENT(_v4d) \ (! (((rwV4DALIGNMENT)-1) & ((RwUInt32)(_v4d)))) +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwv4d * \struct RwV4d * This type represents 4D points and vectors specified by * the (x, y, z, w) coordinates of a 4D point or the (x, y, z, w) components of a * 4D vector. */ +#endif /* RWADOXYGENEXTERNAL */ + struct RwV4d { RwReal x; /**< X value */ @@ -1289,27 +1316,21 @@ struct RwV4d RwReal w; /**< W value */ }; -/** - * \ingroup datatypes - * \typedef RwV4d - * typedef for struct RwV4d - */ typedef struct RwV4d RWALIGN(RwV4d, rwV4DALIGNMENT); -/** - * \ingroup datatypes - * \typedef RwRect - * typedef for struct RwRect - */ typedef struct RwRect RwRect; + +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup geometricaltypes * \struct RwRect * This type represents a 2D device space rectangle specified * by the position of the top-left corner (the offset x, y) and its width (w) * and height (h). */ +#endif /* RWADOXYGENEXTERNAL */ + struct RwRect { RwInt32 x; /**< X value of the top-left corner */ @@ -1318,18 +1339,15 @@ struct RwRect RwInt32 h; /**< Height of the rectangle */ }; -/** - * \ingroup datatypes - * \typedef RwSphere - * typedef for struct RwSphere - */ typedef struct RwSphere RwSphere; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup geometricaltypes * \struct RwSphere * This type represents a sphere specified by the position * of its center and its radius */ +#endif /* RWADOXYGENEXTERNAL */ struct RwSphere { RwV3d center; /**< Sphere center */ @@ -1341,18 +1359,16 @@ struct RwSphere ( *(_target) = *(_source) ) #endif /* (!defined(RwSphereAssign)) */ -/** - * \ingroup datatypes - * \typedef RwLine - * typedef for struct RwLine - */ typedef struct RwLine RwLine; + +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup geometricaltypes * \struct RwLine * This type represents a 3D line specified by the position * of its start and end points. */ +#endif /* RWADOXYGENEXTERNAL */ struct RwLine { RwV3d start; /**< Line start */ @@ -1367,11 +1383,13 @@ struct RwLine /* The maximum number of texture coordinates */ #define rwMAXTEXTURECOORDS 8 +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup fundtypesdatatypes * RwTextureCoordinateIndex * This type represents the index for texture coordinates. */ +#endif /* RWADOXYGENEXTERNAL */ enum RwTextureCoordinateIndex { rwNARWTEXTURECOORDINATEINDEX = 0, @@ -1387,18 +1405,16 @@ enum RwTextureCoordinateIndex }; typedef enum RwTextureCoordinateIndex RwTextureCoordinateIndex; -/** - * \ingroup datatypes - * \typedef RwTexCoords - * typedef for struct RwTexCoords - */ typedef struct RwTexCoords RwTexCoords; + +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup fundtypesdatatypes * \struct RwTexCoords * This type represents the the u and v texture * coordinates of a particular vertex. */ +#endif /* RWADOXYGENEXTERNAL */ struct RwTexCoords { RwReal u; /**< U value */ @@ -1409,10 +1425,13 @@ struct RwTexCoords /* Singley linked list macros. End marked as NULL */ typedef struct RwSLLink RwSLLink; /*** RwSLLink ***/ + +#if (!defined(DOXYGEN)) struct RwSLLink { RwSLLink *next; }; +#endif /* (!defined(DOXYGEN)) */ #define rwSLLinkGetData(link,type,entry) \ ((type *)(((RwUInt8 *)(link))-offsetof(type,entry))) @@ -1427,10 +1446,13 @@ struct RwSLLink ((linkvar)->next) typedef struct RwSingleList RwSingleList; + +#if (!defined(DOXYGEN)) struct RwSingleList { RwSLLink link; }; +#endif /* (!defined(DOXYGEN)) */ #define rwSingleListInitialize(list) \ (list)->link.next= NULL; @@ -1446,11 +1468,14 @@ struct RwSingleList /* Doubly linked list. End marked as start (its a ring) */ typedef struct RwLLLink RwLLLink; /*** RwLLLink ***/ + +#if (!defined(DOXYGEN)) struct RwLLLink { RwLLLink *next; RwLLLink *prev; }; +#endif /* (!defined(DOXYGEN)) */ #define rwLLLinkGetData(linkvar,type,entry) \ ((type *)(((RwUInt8 *)(linkvar))-offsetof(type,entry))) @@ -1472,10 +1497,13 @@ struct RwLLLink ((linkvar)->next) typedef struct RwLinkList RwLinkList; + +#if (!defined(DOXYGEN)) struct RwLinkList { RwLLLink link; }; +#endif /* (!defined(DOXYGEN)) */ #define rwLinkListInitialize(list) \ ( (list)->link.next = ((RwLLLink *)(list)), \ @@ -1497,19 +1525,17 @@ struct RwLinkList #define rwLinkListGetTerminator(list) \ (&((list)->link)) -/** - * \ingroup datatypes - * \typedef RwSurfaceProperties - * typedef for struct RwSurfaceProperties - */ typedef struct RwSurfaceProperties RwSurfaceProperties; + +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup fundtypesdatatypes * \struct RwSurfaceProperties * This type represents the ambient, diffuse and * specular reflection coefficients of a particular geometry. Each coefficient * is specified in the range 0.0 (no reflection) to 1.0 (maximum reflection). */ +#endif /* RWADOXYGENEXTERNAL */ struct RwSurfaceProperties { RwReal ambient; /**< ambient reflection coefficient */ @@ -1541,10 +1567,10 @@ struct RwSurfaceProperties */ #define RWFIX_MIN (1) #define RWFIX_MAX (0x7fffffff) -#define RwFixedCast(A) (RwInt32FromRealMacro((A) * 65536.0f)) -#define RwFixedToInt(A) ((A) >> 16) -#define RwFixedToFloat(A) ((float)(((float)(A)) * (1.0f / 65536.0f))) +#define RwFixedToInt(a) ((a) >> 16) +#define RwFixedToFloat(a) ((float)(((float)(a)) * (1.0f / 65536.0f))) #define RwFixedToReal(a) ((RwReal)(((RwReal)(a)) * (1.0f / 65536.0f))) +#define RwIntToFixed(a) ((a) << 16) #define RwRealToFixed(a) (RwInt32FromRealMacro((a) * 65536.0f)) #define RwRealAbs(a) ((RwReal)((a) >= (RwReal)(0.0) ? (a) : (-(a)))) #define RwRealMin2(a,b) ((RwReal)( ((a) <= (b)) ? (a) : (b))) @@ -1555,7 +1581,6 @@ struct RwSurfaceProperties #ifndef NORWREALSHORTCUT #define RToFixed RwRealToFixed #define RAbs RwRealAbs -#define FxCast RwFixedCast #define FxToInt RwFixedToInt #define FxToFloat RwFixedToFloat #define FxToReal RwFixedToFloat @@ -1580,6 +1605,8 @@ struct RwSurfaceProperties * typedef for struct RwPlane */ typedef struct RwPlane RwPlane; + +#if (!defined(DOXYGEN)) /* * This type represents a plane */ @@ -1588,7 +1615,7 @@ struct RwPlane RwV3d normal; /**< Normal to the plane */ RwReal distance; /**< Distance to plane from origin in normal direction*/ }; - +#endif /* (!defined(DOXYGEN)) */ /**************************************************************************** Defines @@ -1613,7 +1640,7 @@ typedef enum RwPlaneType RwPlaneType; (*(const RwReal *)(((const RwUInt8 *)(&((vect).x)))+(RwInt32)(y))) #define SETCOORD(vect,y,value) \ (((*(RwReal *)(((RwUInt8 *)(&((vect).x)))+(RwInt32)(y))))=(value)) -#define SETCONTCOORD(vect,y,value) \ +#define SETCONSTCOORD(vect,y,value) \ (((*(const RwReal *) \ (((const RwUInt8 *) \ (&((vect).x)))+(RwInt32)(y))))=(value)) @@ -1624,7 +1651,7 @@ typedef enum RwPlaneType RwPlaneType; /** - * \ingroup rwcore + * \ingroup integertypes * \page inttypes Integer Types * * RenderWare supports a number of integer types: @@ -1661,7 +1688,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup realtypes * \typedef RwReal * * RenderWare supports a single RwReal floating-point type to aid portability @@ -1683,7 +1710,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup realtypes * \typedef RwFixed * * RenderWare supports a single RwFixed fixed-point type. @@ -1696,15 +1723,15 @@ typedef enum RwPlaneType RwPlaneType; * RWFIX_MAX and RWFIX_MIN respectively. * * The following macros are provided to help you work with RwFixed datatypes: - * \li RwFixedCast(x) Cast the integer portion of an RwFixed to another type. * \li RwFixedToInt(x) Convert an RwFixed to an integer. (The fractional portion is lost.) * \li RwFixedToFloat(x) Convert an RwFixed to a float. * \li RwFixedToReal(x) Convert an RwFixed to an RwReal. * \li RwRealToFixed(x) Convert an RwReal to an RwFixed. (Some precision may be lost.) + * \li RwIntToFixed(x) Convert an RwInt32 to an RwFixed. (Some precision may be lost.) */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwInt8 * * Signed 8 bit integer type. @@ -1712,7 +1739,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwUInt8 * * Unsigned 8bit integer type. @@ -1720,7 +1747,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwChar * * Character type. @@ -1728,7 +1755,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwInt16 * * Signed 16 bit integer type. @@ -1736,7 +1763,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwUInt16 * * Unsigned 16 bit integer type. @@ -1744,7 +1771,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwInt32 * * Signed 32 bit integer type. @@ -1752,7 +1779,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwUInt32 * * Unsigned 32 bit integer type. @@ -1760,7 +1787,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwInt64 * * Signed 64 bit integer type. @@ -1768,7 +1795,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwUInt64 * * Unsigned 64 bit integer type. @@ -1776,7 +1803,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwInt128 * * Signed 128 bit integer type. @@ -1784,7 +1811,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwUInt128 * * Unsigned 128 bit integer type. @@ -1792,7 +1819,7 @@ typedef enum RwPlaneType RwPlaneType; */ /** - * \ingroup datatypes + * \ingroup integertypes * \typedef RwBool * * Boolean type. @@ -1894,8 +1921,10 @@ enum RwCorePluginID rwID_PITEXDICTIONARY = 0x23, rwID_TOC = 0x24, rwID_PRTSTDGLOBALDATA = 0x25, + rwID_ALTPIPE = 0x26, + rwID_PIPEDS = 0x27, /* Insert before MAX and increment MAX */ - rwID_COREPLUGINIDMAX = 0x26, + rwID_COREPLUGINIDMAX = 0x28, rwCOREPLUGINIDFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }; typedef enum RwCorePluginID RwCorePluginID ; @@ -1944,12 +1973,15 @@ typedef enum RwPlatformID RwPlatformID; */ typedef struct RwObject RwObject; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwobject * \struct RwObject * This should be considered an opaque type. Use * the RwObject API functions to access. */ +#endif /* RWADOXYGENEXTERNAL */ + struct RwObject { RwUInt8 type; /**< Internal Use */ @@ -1960,20 +1992,23 @@ struct RwObject /* Often a Frame */ }; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * \typedef RwObjectCallBack + * \ingroup rwobject + * \ref RwObjectCallBack * callback function supplied for object callback functions. * - * \return Pointer to the current object - * * \param object Pointer to the current object, supplied by - * iterator. - * \param data Pointer to developer-defined data structure. + * iterator. + * \param data Pointer to developer-defined data structure. + * + * \return Pointer to the current object * * \see RwFrameForAllObjects * */ +#endif /* RWADOXYGENEXTERNAL */ + typedef RwObject *(*RwObjectCallBack)(RwObject *object, void *data); /**************************************************************************** @@ -2128,6 +2163,8 @@ typedef int (*vecSscanfFunc)(const RwChar *buffer, ...) /* __RWFORMAT__(scanf, 2, 3) */; typedef struct RwStringFunctions RwStringFunctions; + +#if (!defined(DOXYGEN)) struct RwStringFunctions { vecSprintfFunc vecSprintf ; @@ -2147,6 +2184,7 @@ struct RwStringFunctions vecStrtokFunc vecStrtok; vecSscanfFunc vecSscanf; }; +#endif /* (!defined(DOXYGEN)) */ /*--- Automatically derived from: C:/daily/rwsdk/src/plcore/rwdbgerr.h ---*/ @@ -2203,32 +2241,32 @@ typedef enum RwErrorCodePlugin_errcore RwErrorCodePlugin_errcore; #endif /* (!defined(rwFREELISTCLEANLANDFILL)) */ #define RWFREELISTALIGNED(_pData, _freelist) \ - (! (((RwUInt32)(_pData)) & ((_freelist)->alignmentMinusOne)) ) + (! (((RwUInt32)(_pData)) & ((_freelist)->alignment - 1)) ) /***************************** * REGULAR MEMORY ALLOCATION * *****************************/ /** - * \ingroup rwmem + * \ingroup memoryfileinterface * \def RwMalloc * RwMalloc(_s) is a macro for malloc(_s). */ /** - * \ingroup rwmem + * \ingroup memoryfileinterface * \def RwFree * RwFree(_p) is a macro for free(_p). */ /** - * \ingroup rwmem + * \ingroup memoryfileinterface * \def RwCalloc * RwCalloc(_n, _s) is a macro for calloc(_n, _s). */ /** - * \ingroup rwmem + * \ingroup memoryfileinterface * \def RwRealloc * RwRealloc(_p, _s) is a macro for realloc(_p, _s). */ @@ -2252,8 +2290,6 @@ typedef enum RwErrorCodePlugin_errcore RwErrorCodePlugin_errcore; # if (defined(_MSC_VER)) # if ((_MSC_VER>=1000) && defined(_DEBUG)) -/* Pick up _ASSERTE() macro */ -/* #include <windows.h> */ #if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) #define _CRTDBG_MAP_ALLOC #endif /* defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) */ @@ -2556,12 +2592,12 @@ typedef enum RwErrorCodePlugin_errcore RwErrorCodePlugin_errcore; typedef struct RwMemoryFunctions RwMemoryFunctions; /** - * \ingroup datatypes + * \ingroup memoryfileinterface * \struct RwMemoryFunctions * This type represents the memory functions used * by RenderWare. By default, the standard ANSI functions are used. The * application may install an alternative interface providing that it is ANSI - * compliant (see API function \ref RwEngineInit): + * compliant (in RenderWare Graphics see API function RwEngineInit): */ struct RwMemoryFunctions { @@ -2574,60 +2610,44 @@ struct RwMemoryFunctions void *(*rwcalloc)(size_t numObj, size_t sizeObj); /**< calloc calloc */ }; -typedef struct RwFreeBlock RwFreeBlock; -/* - * Freelists -- from Page 131 - * Advanced Animation and Rendering Techniques - * Alan Watt and Mark Watt - * Addison-Wesley 1993, - * ISBN 0-201-54412-1: + /** + * \ingroup rwfreelist + * The free list was statically allocated * - * "Lastly, on a more general note concerning speedups for renderers, the - * implementor should be aware that a lot of suggestions for improving - * efficiency fall into the category of ingenious, but complex, - * algorithms for very specific contexts that may save a few microseconds - * but which make your code unreadable. A more general computer science - * perspective that takes a `global view' of the renderer can be more - * fruitful. For example, the renderer devotes a lot of time to - * allocating and deallocating chunks of memory for storing data. A lot - * of these chunks are always the same size - such as those that are - * continually required to store the data structure for fragment lists. - * Using memory management techniques that recognize this fact can yield - * considerable dividends. One such scheme would be to hold a series of - * empty lists in memory for all the commonly used data structures. An - * empty list for fragments, say, would contain a list of previously - * allocated, but no longer needed, fragment structures. When the - * renderer needs memory for a new fragment, it looks first at this empty - * list. If there is nothing there it allocates space directly, - * otherwise it takes a fragments off the end of the list and uses that. - * Conversely, when the renderer no longer needs a fragment, instead of - * freeing it, it goes onto the end of the empty list. In the authors' - * experience, replacing the naive allocate/deallocate scheme with this - * way of managing memory can result in 100% speedup. " - */ -struct RwFreeBlock -{ - RwFreeBlock *nextBlock; -}; - -typedef struct RwFreeList RwFreeList; -struct RwFreeList -{ - void **freeListStack; /* Stack of unused entries */ - void **freeListStackTop; /* Pointer to the top of the stack */ + * \see RwFreeListSetFlags + */ +#define rwFREELISTFLAG_STATIC 0x00000001 - RwFreeBlock *firstBlock; /* Data start */ +/** + * \ingroup rwfreelist + * \hideinitializer + * Free blocks as soon as they are empty + * + * \see RwFreeListSetFlags + */ +#define rwFREELISTFLAG_FREEBLOCKS 0x00000002 - RwInt32 blockSize; /* Size of block in bytes */ - RwInt32 entrySize; /* Entry size */ - RwInt32 alignmentMinusOne; /* Entry alignment minus 1 */ - RwInt32 entriesPerBlock; /* Amount of space in a block */ - RwInt32 entriesAllocated; /* Total slots allocated - * (but not necessarily being used */ +typedef struct RwFreeList RwFreeList; - /* All freelists */ - RwLLLink lFreeList; +/** + * \ingroup rwfreelist + * Holds free list info, should be considered opaque. Use API functions to access. + */ +struct RwFreeList +{ + RwUInt32 entrySize; /**<size of an entry in the free list */ +#if (defined(RWDEBUG) && !defined(DOXYGEN)) + RwUInt32 nonAlignedEntrySize; +#endif /* (defined(RWDEBUG) && !defined(DOXYGEN)) */ + RwUInt32 entriesPerBlock; /**<number of entries per free list block */ + RwUInt32 heapSize; /**<size of the heap */ + RwUInt32 alignment; /**<alignment of a free list entry */ + RwLinkList blockList; /**<list of data blocks */ + RwUInt32 flags; /**<flags which affect the behavior of the + free list <BR> + rwFREELISTFLAG_FREEBLOCKS */ + RwLLLink link; /**<link to the free list linked list */ #if (defined(RWDEBUG) && !defined(DOXYGEN)) const RwChar *fileCreate; @@ -2635,8 +2655,9 @@ struct RwFreeList #endif /* (defined(RWDEBUG) && !defined(DOXYGEN)) */ }; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwfreelist * \ref RwFreeListCallBack represents * the function called from \ref RwFreeListForAllUsed for all used entries in a * given free list. @@ -2648,6 +2669,8 @@ struct RwFreeList * \see RwFreeListForAllUsed * */ +#endif /* RWADOXYGENEXTERNAL */ + typedef void (*RwFreeListCallBack) (void *pMem, void *pData); typedef void *(*RwMemoryAllocFn) (RwFreeList * fl); typedef RwFreeList *(*RwMemoryFreeFn) (RwFreeList * fl, void *pData); @@ -2684,12 +2707,25 @@ extern RwFreeList *_rwFreeListCreate(RwInt32 entrySize, __LINE__) #else /* (defined(RWDEBUG) && !defined(DOXYGEN)) */ +/* legacy freelist create */ + extern RwFreeList *RwFreeListCreate(RwInt32 entrySize, RwInt32 entriesPerBlock, RwInt32 alignment); #endif /* (defined(RWDEBUG) && !defined(DOXYGEN)) */ +extern RwFreeList* +RwFreeListCreateAndPreallocateSpace(RwInt32 entrySize, + RwInt32 entriesPerBlock, + RwInt32 alignment, + RwInt32 numBlocksToPreallocate, + RwFreeList *inPlaceSpaceForFreeListStruct ); + extern RwBool RwFreeListDestroy(RwFreeList * freelist); + +extern void RwFreeListSetFlags( RwFreeList *freeList, RwUInt32 flags ); +extern RwUInt32 RwFreeListGetFlags( RwFreeList *freeList ); + /* Garbage collection/enumeration */ extern RwInt32 RwFreeListPurge(RwFreeList * freelist); extern RwFreeList *RwFreeListForAllUsed(RwFreeList * freelist, @@ -2712,7 +2748,7 @@ extern RwInt32 RwFreeListPurgeAllFreeLists(void); #include <rtdbmalloc.h> #define RwFreeListAlloc(_f) \ - memalign((1 + (_f)->alignmentMinusOne), (_f)->entrySize) + memalign(((_f)->alignment), (_f)->entrySize) #else /* ((defined(__MWERKS__) || defined(__GNUC__)) && defined(__R5900__)) */ @@ -2750,7 +2786,7 @@ extern RwInt32 RwFreeListPurgeAllFreeLists(void); */ /** - * \ingroup datatypes + * \ingroup rwstream * \ref RwStreamType * This type represents the different types of stream that * can be used. @@ -2768,7 +2804,7 @@ enum RwStreamType typedef enum RwStreamType RwStreamType; /** - * \ingroup datatypes + * \ingroup rwstream * \ref RwStreamAccessType * This type represents the options available for * accessing a stream when it is opened. @@ -2785,8 +2821,8 @@ typedef enum RwStreamAccessType RwStreamAccessType; /* Memory stream */ /** - * \ingroup datatypes - * \typedef RwStreamMemory + * \ingroup rwstream + * \struct RwStreamMemory * This should be considered an opaque type. * Use the RwStream API functions to access. */ @@ -2803,7 +2839,7 @@ struct RwStreamMemory typedef union RwStreamFile RwStreamFile; /** - * \ingroup datatypes + * \ingroup rwstream * \union RwStreamFile * This type is used to represent a file pointer for * accessing data on disk through the stream mechanism. @@ -2829,8 +2865,8 @@ typedef RwBool(*rwCustomStreamFnSkip) (void *data, /* Custom stream */ /** - * \ingroup datatypes - * \typedef RwStreamCustom + * \ingroup rwstream + * \struct RwStreamCustom * This should be considered an opaque type. * Use the RwStream API functions to access. */ @@ -2850,7 +2886,7 @@ struct RwStreamCustom typedef union RwStreamUnion RwStreamUnion; /** - * \ingroup datatypes + * \ingroup rwstream * \union RwStreamUnion * The union of all supported stream types */ @@ -2862,8 +2898,8 @@ union RwStreamUnion }; /** - * \ingroup datatypes - * \typedef RwStream + * \ingroup rwstream + * \struct RwStream * Binary stream for reading or writing object data. * This should be considered an opaque type. * Use the RwStream API functions to access. @@ -2883,7 +2919,7 @@ struct RwStream typedef struct RwMemory RwMemory; /** - * \ingroup datatypes + * \ingroup rwstream * \struct RwMemory * This type represents a block of allocated memory. * It is used to specify an area of memory connected to a stream of type @@ -2905,6 +2941,9 @@ extern "C" { #endif /* __cplusplus */ +extern void +RwStreamSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + /* Open/Close streams */ extern RwStream * @@ -2953,8 +2992,9 @@ RwStreamSkip(RwStream * stream, Global Types */ +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginDataChunkWriteCallBack represents the function * registered by \ref RwCameraRegisterPluginStream, etc. as the function that * writes extension data to a binary stream. @@ -2979,7 +3019,7 @@ RwStreamSkip(RwStream * stream, typedef RwStream *(*RwPluginDataChunkWriteCallBack)(RwStream *stream, RwInt32 binaryLength, const void *object, RwInt32 offsetInObject, RwInt32 sizeInObject); /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginDataChunkReadCallBack represents the function * registered by \ref RwCameraRegisterPluginStream, etc. as the function that * reads extension data from a binary stream. @@ -3004,7 +3044,7 @@ typedef RwStream *(*RwPluginDataChunkWriteCallBack)(RwStream *stream, RwInt32 bi typedef RwStream *(*RwPluginDataChunkReadCallBack)(RwStream *stream, RwInt32 binaryLength, void *object, RwInt32 offsetInObject, RwInt32 sizeInObject); /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginDataChunkGetSizeCallBack represents the callback * registered by \ref RwCameraRegisterPluginStream, etc. as the function that * determines the binary size of the extension data. @@ -3022,7 +3062,7 @@ typedef RwStream *(*RwPluginDataChunkReadCallBack)(RwStream *stream, RwInt32 bin typedef RwInt32(*RwPluginDataChunkGetSizeCallBack)(const void *object, RwInt32 offsetInObject, RwInt32 sizeInObject); /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginDataChunkAlwaysCallBack represents the callback * registered by \ref RwCameraSetStreamAlwaysCallBack, etc. as the * function that is called after the reading of plugin stream data is @@ -3037,11 +3077,13 @@ typedef RwInt32(*RwPluginDataChunkGetSizeCallBack)(const void *object, RwInt32 o * * \param sizeInObject A RwInt32 value equal to the size * (in bytes) of the extension data. + * + * \return Returns TRUE if successful, FALSE otherwise. */ typedef RwBool(*RwPluginDataChunkAlwaysCallBack)(void *object, RwInt32 offsetInObject, RwInt32 sizeInObject); /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginDataChunkRightsCallBack represents the callback * registered by RwCameraSetStreamRightsCallBack, etc. as the * function that is called after the reading of plugin stream data is @@ -3058,11 +3100,13 @@ typedef RwBool(*RwPluginDataChunkAlwaysCallBack)(void *object, RwInt32 offsetInO * (in bytes) of the extension data. * * \param extraData An RwUInt32 writen with the plugin id. + * + * \return Returns TRUE if successful, FALSE otherwise. */ typedef RwBool(*RwPluginDataChunkRightsCallBack)(void *object, RwInt32 offsetInObject, RwInt32 sizeInObject, RwUInt32 extraData); /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginObjectConstructor represents the callback * registered by \ref RwEngineRegisterPlugin, \ref RwCameraRegisterPlugin, etc. * as the function that initializes either the global extension data (in the @@ -3083,7 +3127,7 @@ typedef RwBool(*RwPluginDataChunkRightsCallBack)(void *object, RwInt32 offsetInO typedef void *(*RwPluginObjectConstructor)(void *object, RwInt32 offsetInObject, RwInt32 sizeInObject); /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginObjectCopy represents the callback registered by * \ref RwCameraRegisterPlugin, etc. as the function that copies the object * extension data when an object is duplicated. @@ -3105,7 +3149,7 @@ typedef void *(*RwPluginObjectConstructor)(void *object, RwInt32 offsetInObject, typedef void *(*RwPluginObjectCopy)(void *dstObject, const void *srcObject, RwInt32 offsetInObject, RwInt32 sizeInObject); /** - * \ingroup datatypes + * \ingroup rwplugin * \ref RwPluginObjectDestructor represents the callback registered * by \ref RwEngineRegisterPlugin, \ref RwCameraRegisterPlugin, etc. as the * function that destroys either the global extension data (in the case of @@ -3123,6 +3167,8 @@ typedef void *(*RwPluginObjectCopy)(void *dstObject, const void *srcObject, RwIn * * \return Pointer to the object. */ +#endif /* RWADOXYGENEXTERNAL */ + typedef void *(*RwPluginObjectDestructor)(void *object, RwInt32 offsetInObject, RwInt32 sizeInObject); typedef void *(*RwPluginErrorStrCallBack)(void *); @@ -3130,6 +3176,7 @@ typedef void *(*RwPluginErrorStrCallBack)(void *); typedef struct RwPluginRegistry RwPluginRegistry; typedef struct RwPluginRegEntry RwPluginRegEntry; +#if (!defined(DOXYGEN)) struct RwPluginRegistry { RwInt32 sizeOfStruct; @@ -3158,6 +3205,7 @@ struct RwPluginRegEntry RwPluginRegEntry *prevRegEntry; RwPluginRegistry *parentRegistry; }; +#endif /* (!defined(DOXYGEN)) */ @@ -3172,6 +3220,9 @@ extern "C" /* Registering toolkits and allocating memory */ +extern void +RwPluginRegistrySetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + extern RwBool _rwPluginRegistrySetStaticPluginsSize(RwPluginRegistry * reg, RwInt32 size); @@ -3355,14 +3406,17 @@ MACRO_STOP #define RWMATRIXPRINT(_matrix) /* No op */ #endif /* (!(defined(RWMATRIXPRINT))) */ +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwmatrix * enum RwOpCombineType * This type represents a combination operator which * can be applied to frames and matrices. * The operator determines the order * in which one object is combined with another */ +#endif /* RWADOXYGENEXTERNAL */ + enum RwOpCombineType { rwCOMBINEREPLACE = 0, /**<Replace - @@ -3376,9 +3430,8 @@ enum RwOpCombineType rwOPCOMBINETYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }; -/** - * \ingroup datatypes - * \typedef RwOpCombineType typedef for enum RwOpCombineType +/* + * RwOpCombineType typedef for enum RwOpCombineType */ typedef enum RwOpCombineType RwOpCombineType; @@ -3388,7 +3441,7 @@ typedef enum RwOpCombineType RwOpCombineType; enum RwMatrixType { rwMATRIXTYPENORMAL = 0x00000001, - rwMATRIXTYPEORTHOGANAL = 0x00000002, + rwMATRIXTYPEORTHOGONAL = 0x00000002, rwMATRIXTYPEORTHONORMAL = 0x00000003, rwMATRIXTYPEMASK = 0x00000003, rwMATRIXTYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT @@ -3442,8 +3495,8 @@ typedef struct RwMatrixTag RWALIGN(RwMatrix, rwMATRIXALIGNMENT); */ /** - * \ingroup datatypes - * \typedef RwMatrix + * \ingroup rwmatrix + * \struct RwMatrix * Matrix to define transformations. * This should be considered an opaque type. * Use the RwMatrix API functions to access. @@ -3476,18 +3529,15 @@ typedef void (RWASMCALL * rwMatrixMultFn) (RwMatrix * dstMat, const RwMatrix * matA, const RwMatrix * matB); -/* - * \ingroup datatypes - * \typedef RwMatrixTolerance - * Typedef for RwMatrixTolerance structure - */ typedef struct RwMatrixTolerance RwMatrixTolerance; -/* - * \ingroup datatypes +#ifndef RWADOXYGENEXTERNAL +/** + * \ingroup rwmatrix * \struct RwMatrixTolerance * Holds tolerances for matrix optimizations with \ref RwMatrixOptimize */ +#endif /* RWADOXYGENEXTERNAL */ struct RwMatrixTolerance { RwReal Normal; @@ -3522,6 +3572,9 @@ RwEngineSetMatrixTolerances(const RwMatrixTolerance * const tolerance); #define rwMatrixTestFlags(m, flagsbit) ((m)->flags & (RwInt32)(flagsbit)) /* Creation/destruction */ +extern void +RwMatrixSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); + extern RwBool RwMatrixDestroy(RwMatrix * mpMat); @@ -3693,7 +3746,7 @@ MACRO_STOP rwMATRIXTYPENORMAL) ) || /* ... or actually is */ \ rwMatrixIsNormal(_matrix, _epsilon)) && \ ( ( !( rwMatrixGetFlags(_matrix) & /* not flagged as orthogonal */ \ - rwMATRIXTYPEORTHOGANAL) ) || /* ... or actually is */ \ + rwMATRIXTYPEORTHOGONAL) ) || /* ... or actually is */ \ rwMatrixIsOrthogonal(_matrix, _epsilon)) ) #define rwMat01Det(_mAA) \ @@ -3906,8 +3959,6 @@ MACRO_STOP #pragma warning( disable : 344 ) #endif /* (defined(__ICL)) */ -//nobody needed that - AAP -//#include <windows.h> #if (defined(RWDEBUG)) #if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) @@ -4001,48 +4052,16 @@ MACRO_START \ } \ MACRO_STOP -/* LEGACY-SUPPORT macros */ -#define RWIM2DVERTEXSetCameraX(vert, camx) RwIm2DVertexSetCameraX(vert, camx) -#define RWIM2DVERTEXSetCameraY(vert, camy) RwIm2DVertexSetCameraY(vert, camy) -#define RWIM2DVERTEXSetCameraZ(vert, camz) RwIm2DVertexSetCameraZ(vert, camz) -#define RWIM2DVERTEXSetRecipCameraZ(vert, recipz) \ - RwIm2DVertexSetRecipCameraZ(vert, recipz) -#define RWIM2DVERTEXGetCameraX(vert) RwIm2DVertexGetCameraX(vert) -#define RWIM2DVERTEXGetCameraY(vert) RwIm2DVertexGetCameraY(vert) -#define RWIM2DVERTEXGetCameraZ(vert) RwIm2DVertexGetCameraZ(vert) -#define RWIM2DVERTEXGetRecipCameraZ(vert) RwIm2DVertexGetRecipCameraZ(vert) -#define RWIM2DVERTEXSetScreenX(vert, scrnx) RwIm2DVertexSetScreenX(vert, scrnx) -#define RWIM2DVERTEXSetScreenY(vert, scrny) RwIm2DVertexSetScreenY(vert, scrny) -#define RWIM2DVERTEXSetScreenZ(vert, scrnz) RwIm2DVertexSetScreenZ(vert, scrnz) -#define RWIM2DVERTEXGetScreenX(vert) RwIm2DVertexGetScreenX(vert) -#define RWIM2DVERTEXGetScreenY(vert) RwIm2DVertexGetScreenY(vert) -#define RWIM2DVERTEXGetScreenZ(vert) RwIm2DVertexGetScreenZ(vert) -#define RWIM2DVERTEXSetU(vert, u, recipz) RwIm2DVertexSetU(vert, u, recipz) -#define RWIM2DVERTEXSetV(vert, v, recipz) RwIm2DVertexSetV(vert, v, recipz) -#define RWIM2DVERTEXGetU(vert) RwIm2DVertexGetU(vert) -#define RWIM2DVERTEXGetV(vert) RwIm2DVertexGetV(vert) -#define RWIM2DVERTEXSetRealRGBA(vert, red, green, blue, alpha) \ - RwIm2DVertexSetRealRGBA(vert, red, green, blue, alpha) -#define RWIM2DVERTEXSetIntRGBA(vert, red, green, blue, alpha) \ - RwIm2DVertexSetIntRGBA(vert, red, green, blue, alpha) -#define RWIM2DVERTEXGetRed(vert) RwIm2DVertexGetRed(vert) -#define RWIM2DVERTEXGetGreen(vert) RwIm2DVertexGetGreen(vert) -#define RWIM2DVERTEXGetBlue(vert) RwIm2DVertexGetBlue(vert) -#define RWIM2DVERTEXGetAlpha(vert) RwIm2DVertexGetAlpha(vert) -#define RWIM2DVERTEXCopyRGBA(dst, src) RwIm2DVertexCopyRGBA(dst, src) -#define RWIM2DVERTEXClipRGBA(o, i, n, f) RwIm2DVertexClipRGBA(o, i, n, f) - /**************************************************************************** Global Types */ /* We use RwD3D8Vertex to drive the hardware in 2D mode */ -/** - * \ingroup rwcoredriverd3d8 - * \typedef RwD3D8Vertex +/* * D3D8 vertex structure definition for 2D geometry */ +#if !defined(RWADOXYGENEXTERNAL) typedef struct RwD3D8Vertex RwD3D8Vertex; /** * \ingroup rwcoredriverd3d8 @@ -4061,47 +4080,41 @@ struct RwD3D8Vertex RwReal u; /**< Texture coordinate U */ RwReal v; /**< Texture coordinate V */ }; +#endif /* !defined(RWADOXYGENEXTERNAL) */ /* Define types used */ +#if !defined(RWADOXYGENEXTERNAL) /** * \ingroup rwcoredriverd3d8 - * \typedef RwIm2DVertex + * \ref RwIm2DVertex * Typedef for a RenderWare Graphics Immediate Mode 2D Vertex */ typedef RwD3D8Vertex RwIm2DVertex; +#endif /* !defined(RWADOXYGENEXTERNAL) */ -/* LEGACY-SUPPORT macro */ +#if !defined(RWADOXYGENEXTERNAL) /** * \ingroup rwcoredriverd3d8 - * \def RWIM2DVERTEX - * RWIM2DVERTEX is a legacy macro for RwIm2DVertex - */ -#define RWIM2DVERTEX RwIm2DVertex - -/** - * \ingroup rwcoredriverd3d8 - * \typedef RxVertexIndex + * \ref RxVertexIndex * * Typedef for a RenderWare Graphics PowerPipe Immediate * Mode Vertex */ typedef RwUInt16 RxVertexIndex; +#endif /* !defined(RWADOXYGENEXTERNAL) */ + +#if !defined(RWADOXYGENEXTERNAL) /** * \ingroup rwcoredriverd3d8 - * \typedef RwImVertexIndex + * \ref RwImVertexIndex * Typedef for a RenderWare Graphics Immediate Mode Vertex. */ typedef RxVertexIndex RwImVertexIndex; +#endif /* !defined(RWADOXYGENEXTERNAL) */ -/* LEGACY-SUPPORT macro */ -/** - * \ingroup rwcoredriverd3d8 - * \def RWIMVERTEXINDEX - * RWIMVERTEXINDEX is a legacy macro for RwImVertexIndex - */ -#define RWIMVERTEXINDEX RwImVertexIndex +#if !defined(RWADOXYGENEXTERNAL) /** * \ingroup rwcoredriverd3d8 @@ -4114,8 +4127,10 @@ typedef struct RwUInt32 numTextureStageStateChanges; /**< Number of Texture Stage States changed */ RwUInt32 numMaterialChanges; /**< Number of Material changes */ RwUInt32 numLightsChanged; /**< Number of Lights changed */ + RwUInt32 numVBSwitches; /**< Number of Vertex Buffer switches */ } RwD3D8Metrics; +#endif /* !defined(RWADOXYGENEXTERNAL) */ #endif /* D3D8_DRVMODEL_H */ @@ -4125,7 +4140,7 @@ RwD3D8Metrics; * Typedef for pointer to Vector multiplication by Matrix function */ -typedef RwV3d *(*rwVectorMultFn) (RwV3d * pointsOut, +typedef RwV3d *(*rwVectorMultFn) (RwV3d * pointsOut, const RwV3d * pointsIn, RwInt32 numPoints, const RwMatrix * matrix); @@ -4136,7 +4151,7 @@ typedef RwV3d *(*rwVectorMultFn) (RwV3d * pointsOut, * currently applies to SKY2 and XBOX - IDBS [2/11/2001] * [and, if using the intel compiler version 400 or above, * we will use the single-precision float "sqrtf" under - * D3D7, D3D8, OpenGL or SoftRas] */ + * D3D8, OpenGL or SoftRas] */ #if (defined(rwSqrtMacro)) #define RWNOSQRTTABLE #endif /* (defined(rwSqrtMacro)) */ @@ -4198,7 +4213,7 @@ MACRO_STOP #define RwV2dDotProductMacro(a,b) \ (( ((((a)->x) * ( (b)->x))) + \ - ( (((a)->y) * ( (b)->y))))) \ + ( (((a)->y) * ( (b)->y))))) #define _rwV2dNormalizeMacro(_result, _out, _in) \ MACRO_START \ @@ -4303,7 +4318,7 @@ MACRO_STOP #define RwV3dDotProductMacro(a, b) \ ((((( (((a)->x) * ((b)->x))) + \ ( (((a)->y) * ((b)->y))))) + \ - ( (((a)->z) * ((b)->z))))) \ + ( (((a)->z) * ((b)->z))))) #define RwV3dCrossProductMacro(o, a, b) \ MACRO_START \ @@ -4375,7 +4390,7 @@ MACRO_STOP #endif /* (!defined(rw4OVERPISQ)) */ #if (!defined(rwPI3)) -#define rwPI3 (rwPI * (RwReal)3) +#define rwPI3 (rwPI * (RwReal)3) #endif /* (!defined(rwPI3)) */ #if (!defined(rwPI3OVER2)) @@ -4463,7 +4478,7 @@ extern void RwV3dSub(RwV3d * out, const RwV3d * ina, const RwV3d * inb); extern void RwV3dScale(RwV3d * out, const RwV3d * in, RwReal scalar); -extern void RwV3dIncrementScaled(RwV3d * out, +extern void RwV3dIncrementScaled(RwV3d * out, const RwV3d * in, RwReal scalar); extern void RwV3dNegate(RwV3d * out, const RwV3d * in); extern RwReal RwV3dDotProduct(const RwV3d * ina, const RwV3d * inb); @@ -4513,6 +4528,8 @@ extern RwReal _rwV3dNormalize(RwV3d * out, const RwV3d * in); */ typedef struct RwSList RwSList; + +#if (!defined(DOXYGEN)) struct RwSList { RwUInt8 *listElements; @@ -4520,7 +4537,7 @@ struct RwSList RwInt32 numElementsAlloced; RwInt32 entrySize; }; - +#endif /* (!defined(DOXYGEN) */ /**************************************************************************** @@ -4595,99 +4612,169 @@ extern void *_rwSListToArray(RwSList *sList); !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * RwRenderState - * This type represents the various render states that - * can be set using the API function \ref RwRenderStateSet. This function also - * takes a render state value or pointer to an object depending on the type. - * For render states that are toggles, the value should be TRUE to switch the - * state on and FALSE to turn it off. + * \ingroup rwrenderstate + * RwRenderState represents the global state variables that control + * rendering. These may be set and queried using the + * \ref RwRenderStateSet and \ref RwRenderStateGet functions respectively. + * + * Refer to the \ref rwrenderstateoverview for an overview of this system. * - * Note that many of these render states may not be supported on certain - * platforms. The \ref RwRenderStateSet functions will return FALSE in such cases. + * \note The texture render states (raster, address & filter modes) would + * normally just be used when rendering in immediate mode and should be + * specificied completely every time a texture is used. Retained mode + * pipelines will frequently set theses states internally, usually based on + * \ref RwTexture objects. */ +#endif /* RWADOXYGENEXTERNAL */ enum RwRenderState { rwRENDERSTATENARENDERSTATE = 0, - rwRENDERSTATETEXTURERASTER, /**<Raster to texture with. \ref RwRenderStateSet - * takes a pointer to an \ref RwRaster */ - rwRENDERSTATETEXTUREADDRESS, /**<\ref RwTextureAddressMode: wrap, clamp, mirror or border */ - rwRENDERSTATETEXTUREADDRESSU, /**<\ref RwTextureAddressMode in u only */ - rwRENDERSTATETEXTUREADDRESSV, /**<\ref RwTextureAddressMode in v only */ - rwRENDERSTATETEXTUREPERSPECTIVE, /**<Perspective correction on/off */ - rwRENDERSTATEZTESTENABLE, /**<Z-buffer test on/off */ - rwRENDERSTATESHADEMODE, /**<\ref RwShadeMode: flat or gouraud shading */ - rwRENDERSTATEZWRITEENABLE, /**<Z-buffer write on/off */ - rwRENDERSTATETEXTUREFILTER, /**<\ref RwTextureFilterMode: point sample, bilinear, trilinear, etc */ - rwRENDERSTATESRCBLEND, /**<Source alpha \ref RwBlendFunction: src alpha, 1-src alpha, etc */ - rwRENDERSTATEDESTBLEND, /**<Destination alpha \ref RwBlendFunction */ - rwRENDERSTATEVERTEXALPHAENABLE, /**<Vertex alpha transparency on/off */ - rwRENDERSTATEBORDERCOLOR, /**<Border color for \ref RwTextureAddressMode rwTEXTUREADDRESSBORDER. - * The value should be a packed RwUInt32 in ARGB form. The macro - * RWRGBALONG(r, g, b, a) may be used to construct this using 8-bit - * color components. */ - rwRENDERSTATEFOGENABLE, /**<Fogging on/off (all polygons will be fogged) */ - rwRENDERSTATEFOGCOLOR, /**<Color used for fogging. The value should be a packed RwUInt32 - * in ARGB form. The macro RWRGBALONG(r, g, b, a) may be used to - * construct this using 8-bit color components */ - rwRENDERSTATEFOGTYPE, /**<Sets \ref RwFogType, the type of fogging to use */ - rwRENDERSTATEFOGDENSITY, /**<Select the fog density for \ref RwFogType of rwFOGTYPEEXPONENTIAL - * or rwFOGTYPEEXPONENTIAL2. The value should be a pointer to - * an RwReal in the range 0 to 1. */ - rwRENDERSTATEFOGTABLE, /**<Install a 256 entry fog table placed between fog distance and far - * clip-plane */ - rwRENDERSTATEALPHAPRIMITIVEBUFFER, /**<Render transparent alpha polygons last - on/off. \e Not \e supported - * \e on \e any \e platform.*/ - rwRENDERSTATECULLMODE, /**<Sets \ref RwCullMode, for selecting face culling. */ - rwRENDERSTATESTENCILENABLE, /**< TRUE to enable stenciling, or FALSE to disable stenciling. - * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only. */ - rwRENDERSTATESTENCILFAIL, /**< Stencil test operator for the fail case. - * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only */ - rwRENDERSTATESTENCILZFAIL, /**< Stencil operation to perform if the stencil test passes - * and the depth test (z-test) fails. - * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only */ - rwRENDERSTATESTENCILPASS, /**< Stencil operation to perform if both the stencil and the - * depth (z) tests pass. - * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only */ - rwRENDERSTATESTENCILFUNCTION, /**< Comparison function for the stencil test. - * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only */ - rwRENDERSTATESTENCILFUNCTIONREF, /**< Integer reference value for the stencil test. - * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only */ - rwRENDERSTATESTENCILFUNCTIONMASK, /**< Mask applied to the reference value and each stencil buffer - * entry to determine the significant bits for the stencil test. - * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only */ - rwRENDERSTATESTENCILFUNCTIONWRITEMASK, /**< Write mask applied to values written into the stencil buffer. - * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only */ + + rwRENDERSTATETEXTURERASTER, + /**<Raster used for texturing (normally used in immediate mode). + * The value is a pointer to an \ref RwRaster. + */ + rwRENDERSTATETEXTUREADDRESS, + /**<\ref RwTextureAddressMode: wrap, clamp, mirror or border. + */ + rwRENDERSTATETEXTUREADDRESSU, + /**<\ref RwTextureAddressMode in u only. + */ + rwRENDERSTATETEXTUREADDRESSV, + /**<\ref RwTextureAddressMode in v only. + */ + rwRENDERSTATETEXTUREPERSPECTIVE, + /**<Perspective correction on/off (always enabled on many platforms). + */ + rwRENDERSTATEZTESTENABLE, + /**<Z-buffer test on/off. + */ + rwRENDERSTATESHADEMODE, + /**<\ref RwShadeMode: flat or gouraud shading. + */ + rwRENDERSTATEZWRITEENABLE, + /**<Z-buffer write on/off. + */ + rwRENDERSTATETEXTUREFILTER, + /**<\ref RwTextureFilterMode: point sample, bilinear, trilinear, etc. + */ + rwRENDERSTATESRCBLEND, + /**<\ref RwBlendFunction used to modulate the source pixel color + * when blending to the frame buffer. + */ + rwRENDERSTATEDESTBLEND, + /**<\ref RwBlendFunction used to modulate the destination pixel + * color in the frame buffer when blending. The resulting pixel + * color is given by the formula + * (SRCBLEND * srcColor + DESTBLEND * destColor) for each RGB + * component. For a particular platform, not all combinations + * of blend function are allowed (see platform specific + * restrictions). + */ + rwRENDERSTATEVERTEXALPHAENABLE, + /**<Alpha blending on/off (always enabled on some platforms). + * This is normally used in immediate mode to enable alpha blending + * when vertex colors or texture rasters have transparency. Retained + * mode pipelines will usually set this state based on material colors + * and textures. + */ + rwRENDERSTATEBORDERCOLOR, + /**<Border color for \ref RwTextureAddressMode + * \ref rwTEXTUREADDRESSBORDER. The value should be a packed + * RwUInt32 in a platform specific format. The macro + * RWRGBALONG(r, g, b, a) may be used to construct this using + * 8-bit color components. + */ + rwRENDERSTATEFOGENABLE, + /**<Fogging on/off (all polygons will be fogged). + */ + rwRENDERSTATEFOGCOLOR, + /**<Color used for fogging. The value should be a packed RwUInt32 + * in a platform specific format. The macro RWRGBALONG(r, g, b, a) + * may be used to construct this using 8-bit color components. + */ + rwRENDERSTATEFOGTYPE, + /**<\ref RwFogType, the type of fogging to use. + */ + rwRENDERSTATEFOGDENSITY, + /**<Fog density for \ref RwFogType of + * \ref rwFOGTYPEEXPONENTIAL or \ref rwFOGTYPEEXPONENTIAL2. + * The value should be a pointer to an RwReal in the + * range 0 to 1. + */ + rwRENDERSTATECULLMODE = 20, + /**<\ref RwCullMode, for selecting front/back face culling, or + * no culling. + */ + rwRENDERSTATESTENCILENABLE, + /**<Stenciling on/off. + * <i> Supported on Xbox, D3D8, and OpenGL only. </i> + */ + rwRENDERSTATESTENCILFAIL, + /**<\ref RwStencilOperation used when the stencil test passes. + * <i> Supported on Xbox, D3D8, and OpenGL only. </i> + */ + rwRENDERSTATESTENCILZFAIL, + /**<\ref RwStencilOperation used when the stencil test passes and + * the depth test (z-test) fails. + * <i> Supported on Xbox, D3D8, and OpenGL only. </i> + */ + rwRENDERSTATESTENCILPASS, + /**<Stencil operation used when both the stencil and the depth + * (z) tests pass. + * <i> Supported on Xbox, D3D8, and OpenGL only. </i> + */ + rwRENDERSTATESTENCILFUNCTION, + /**<\ref RwStencilFunction for the stencil test. + * <i> Supported on Xbox, D3D8, and OpenGL only. </i> + */ + rwRENDERSTATESTENCILFUNCTIONREF, + /**<Integer reference value for the stencil test. + * <i> Supported on Xbox, D3D8, and OpenGL only. </i> + */ + rwRENDERSTATESTENCILFUNCTIONMASK, + /**<Mask applied to the reference value and each stencil buffer + * entry to determine the significant bits for the stencil test. + * <i> Supported on Xbox, D3D8, and OpenGL only. </i> + */ + rwRENDERSTATESTENCILFUNCTIONWRITEMASK, + /**<Write mask applied to values written into the stencil buffer. + * <i> Supported on Xbox, D3D8, and OpenGL only. </i> + */ rwRENDERSTATEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }; typedef enum RwRenderState RwRenderState; - +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * RwShadeMode - * This type represents the options available for setting the - * rwRENDERSTATESHADEMODE render state */ + * \ingroup rwrenderstate + * RwShadeMode represents the available shading modes that may be + * set using the \ref RwRenderState \ref rwRENDERSTATESHADEMODE. + */ +#endif /* RWADOXYGENEXTERNAL */ enum RwShadeMode { - rwSHADEMODENASHADEMODE = 0, /**<Invalid shading mode */ + rwSHADEMODENASHADEMODE = 0, rwSHADEMODEFLAT, /**<Flat shading */ rwSHADEMODEGOURAUD, /**<Gouraud shading */ rwSHADEMODEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }; typedef enum RwShadeMode RwShadeMode; - +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * RwTextureFilterMode - * This type represents the options available for texture - * filtering (see API functions \ref RwTextureSetFilterMode and \ref RwRenderStateSet)*/ + * \ingroup rwrenderstate + * RwTextureFilterMode represents the texture filtering modes that may + * be set using the \ref RwRenderState \ref rwRENDERSTATETEXTUREFILTER in + * immediate mode, or \ref RwTextureSetFilterMode in retained mode. + */ +#endif /* RWADOXYGENEXTERNAL */ enum RwTextureFilterMode { - rwFILTERNAFILTERMODE = 0, /**<Invalid filter mode */ + rwFILTERNAFILTERMODE = 0, rwFILTERNEAREST, /**<Point sampled */ rwFILTERLINEAR, /**<Bilinear */ rwFILTERMIPNEAREST, /**<Point sampled per pixel mip map */ @@ -4698,15 +4785,18 @@ enum RwTextureFilterMode }; typedef enum RwTextureFilterMode RwTextureFilterMode; - +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * RwFogType - * This type represents the options available to the - * rwRENDERSTATEFOGTYPE render state (see \ref RwRenderState);*/ + * \ingroup rwrenderstate + * RwFogType represents the fog modes available when setting the + * \ref RwRenderState \ref rwRENDERSTATEFOGTYPE. Note that a particular + * platform may not support all of these modes (see platform specific + * restrictions). + */ +#endif /* RWADOXYGENEXTERNAL */ enum RwFogType { - rwFOGTYPENAFOGTYPE = 0, /**<Invalid fog type */ + rwFOGTYPENAFOGTYPE = 0, rwFOGTYPELINEAR, /**<Linear fog */ rwFOGTYPEEXPONENTIAL, /**<Exponential fog */ rwFOGTYPEEXPONENTIAL2, /**<Exponential^2 fog */ @@ -4714,18 +4804,28 @@ enum RwFogType }; typedef enum RwFogType RwFogType; - +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * RwBlendFunction - * This type represents the options available - * to the rwRENDERSTATESRCBLEND and rwRENDERSTATEDESTBLEND render states - * (see \ref RwRenderState). In the following description, - * a subscript s refers to a source value while subscript d refers to a - * destination value.*/ + * \ingroup rwrenderstate + * RwBlendFunction represents the options available when changing the + * \ref RwRenderState setting for \ref rwRENDERSTATESRCBLEND and + * \ref rwRENDERSTATEDESTBLEND. The values are factors used to modulate + * either the source or destination pixel color when blending to + * the frame buffer. Note the some combinations are not allowed on + * certain platforms (see platform specific restrictions). + * + * In the following list, the factors applied to each color component are + * listed explicitly. A subscript s refers to a source value while a subscript + * d refers to a destination value. Note that blending in the alpha channel is + * only applicable when the frame buffer actually contains alpha, and that + * the precise operation is platform specific. For instance, the + * source alpha value might simply be written to the alpha channel with + * no blending. + */ +#endif /* RWADOXYGENEXTERNAL */ enum RwBlendFunction { - rwBLENDNABLEND = 0, /**<Invalid blend mode */ + rwBLENDNABLEND = 0, rwBLENDZERO, /**<(0, 0, 0, 0 ) */ rwBLENDONE, /**<(1, 1, 1, 1 ) */ rwBLENDSRCCOLOR, /**<(Rs, Gs, Bs, As ) */ @@ -4741,93 +4841,139 @@ enum RwBlendFunction }; typedef enum RwBlendFunction RwBlendFunction; - +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * RwTextureAddressMode - * This type represents the options available for - * applying textures to polygons (see API functions \ref RwTextureSetAddressing - * and \ref RwRenderStateSet, and the \ref RwRenderState type) */ + * \ingroup rwrenderstate + * RwTextureAddressMode represents the addressing modes available + * when mapping textures to polygons using UV texture coordinates. + * This may be set in immediate mode via the \ref RwRenderState + * \ref rwRENDERSTATETEXTUREADDRESS, or via \ref RwTextureSetAddressing + * for an \ref RwTexture object. + */ +#endif /* RWADOXYGENEXTERNAL */ enum RwTextureAddressMode { - rwTEXTUREADDRESSNATEXTUREADDRESS = 0, /**<Invalid addressing mode */ - rwTEXTUREADDRESSWRAP, /**<UV wraps (tiles) */ - rwTEXTUREADDRESSMIRROR, /**<Alternate UV is flipped */ - rwTEXTUREADDRESSCLAMP, /**<UV is clamped to 0-1 */ - rwTEXTUREADDRESSBORDER, /**<Border colour takes effect outside of 0-1 */ + rwTEXTUREADDRESSNATEXTUREADDRESS = 0, + rwTEXTUREADDRESSWRAP, /**<UV wraps (tiles) */ + rwTEXTUREADDRESSMIRROR, /**<Alternate UV is flipped */ + rwTEXTUREADDRESSCLAMP, /**<UV is clamped to 0-1 */ + rwTEXTUREADDRESSBORDER, /**<Border color takes effect outside of 0-1 */ rwTEXTUREADDRESSMODEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }; typedef enum RwTextureAddressMode RwTextureAddressMode; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * RwStencilOperation - * This type represents the stencil operations to perform - * based on the results of the - * \ref rwRENDERSTATESTENCILFAIL, \ref rwRENDERSTATESTENCILZFAIL - * and \ref rwRENDERSTATESTENCILPASS tests. + * \ingroup rwrenderstate + * RwStencilOperation represents the stencil operations that may be + * performed depending on the results of stencil/z-buffer tests. + * The operation may be set for the various tests + * via the \ref RwRenderState settings \ref rwRENDERSTATESTENCILFAIL, + * \ref rwRENDERSTATESTENCILZFAIL and \ref rwRENDERSTATESTENCILPASS. */ +#endif /* RWADOXYGENEXTERNAL */ enum RwStencilOperation { rwSTENCILOPERATIONNASTENCILOPERATION = 0, - rwSTENCILOPERATIONKEEP, /* Do not update the entry in the stencil buffer */ - rwSTENCILOPERATIONZERO, /* Set the stencil-buffer entry to 0 */ - rwSTENCILOPERATIONREPLACE, /* Replace the stencil-buffer entry with reference value */ - rwSTENCILOPERATIONINCRSAT, /* Increment the stencil-buffer entry, clamping to the maximum value */ - rwSTENCILOPERATIONDECRSAT, /* Decrement the stencil-buffer entry, clamping to zero */ - rwSTENCILOPERATIONINVERT, /* Invert the bits in the stencil-buffer entry */ - rwSTENCILOPERATIONINCR, /* Increment the stencil-buffer entry, wrapping to zero if the new value exceeds the maximum value */ - rwSTENCILOPERATIONDECR, /* Decrement the stencil-buffer entry, wrapping to the maximum value if the new value is less than zero */ + + rwSTENCILOPERATIONKEEP, + /**<Do not update the entry in the stencil buffer */ + rwSTENCILOPERATIONZERO, + /**<Set the stencil-buffer entry to 0 */ + rwSTENCILOPERATIONREPLACE, + /**<Replace the stencil-buffer entry with reference value */ + rwSTENCILOPERATIONINCRSAT, + /**<Increment the stencil-buffer entry, clamping to the + * maximum value */ + rwSTENCILOPERATIONDECRSAT, + /**<Decrement the stencil-buffer entry, clamping to zero */ + rwSTENCILOPERATIONINVERT, + /**<Invert the bits in the stencil-buffer entry */ + rwSTENCILOPERATIONINCR, + /**<Increment the stencil-buffer entry, wrapping to zero if + * the new value exceeds the maximum value */ + rwSTENCILOPERATIONDECR, + /**<Decrement the stencil-buffer entry, wrapping to the maximum + * value if the new value is less than zero */ + rwSTENCILOPERATIONFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }; typedef enum RwStencilOperation RwStencilOperation; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * RwStencilFunction - * This type represents the options available for - * the comparison function for the stencil test \ref rwRENDERSTATESTENCILFUNCTION. + * \ingroup rwrenderstate + * RwStencilFunction represents the comparison functions available for + * a stencil test. The function may be selected via the + * \ref RwRenderState setting \ref rwRENDERSTATESTENCILFUNCTION. */ +#endif /* RWADOXYGENEXTERNAL */ enum RwStencilFunction { rwSTENCILFUNCTIONNASTENCILFUNCTION = 0, - rwSTENCILFUNCTIONNEVER, /* Always fail the test */ - rwSTENCILFUNCTIONLESS, /* Accept the new pixel if its value is less than the value of the current pixel */ - rwSTENCILFUNCTIONEQUAL, /* Accept the new pixel if its value equals the value of the current pixel */ - rwSTENCILFUNCTIONLESSEQUAL, /* Accept the new pixel if its value is less than or equal to the value of the current pixel */ - rwSTENCILFUNCTIONGREATER, /* Accept the new pixel if its value is greater than the value of the current pixel */ - rwSTENCILFUNCTIONNOTEQUAL, /* Accept the new pixel if its value does not equal the value of the current pixel */ - rwSTENCILFUNCTIONGREATEREQUAL, /* Accept the new pixel if its value is greater than or equal to the value of the current pixel */ - rwSTENCILFUNCTIONALWAYS, /* Always pass the test */ + + rwSTENCILFUNCTIONNEVER, + /**<Always fail the test */ + rwSTENCILFUNCTIONLESS, + /**<Accept the new pixel if its value is less than the value of + * the current pixel */ + rwSTENCILFUNCTIONEQUAL, + /**<Accept the new pixel if its value equals the value of the + * current pixel */ + rwSTENCILFUNCTIONLESSEQUAL, + /**<Accept the new pixel if its value is less than or equal to + * the value of the current pixel */ + rwSTENCILFUNCTIONGREATER, + /**<Accept the new pixel if its value is greater than the value + * of the current pixel */ + rwSTENCILFUNCTIONNOTEQUAL, + /**<Accept the new pixel if its value does not equal the value of + * the current pixel */ + rwSTENCILFUNCTIONGREATEREQUAL, + /**<Accept the new pixel if its value is greater than or equal + * to the value of the current pixel */ + rwSTENCILFUNCTIONALWAYS, + /**<Always pass the test */ + rwSTENCILFUNCTIONFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }; typedef enum RwStencilFunction RwStencilFunction; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * RwCullMode - * This type represents the options available for culling polygons during rendering. - * and \ref RwRenderStateSet, and the \ref RwRenderState type) */ + * \ingroup rwrenderstate + * RwCullMode represents the options available for culling polygons + * during rendering. The cull mode may be set via the \ref RwRenderState + * setting \ref rwRENDERSTATECULLMODE. + */ +#endif /* RWADOXYGENEXTERNAL */ enum RwCullMode { rwCULLMODENACULLMODE = 0, - rwCULLMODECULLNONE, /**< Both front and back-facing triangles are drawn. */ - rwCULLMODECULLBACK, /**< Just front-facing triangles are drawn */ - rwCULLMODECULLFRONT, /**< Just rear-facing triangles are drawn */ + + rwCULLMODECULLNONE, + /**<Both front and back-facing triangles are drawn. */ + rwCULLMODECULLBACK, + /**<Only front-facing triangles are drawn */ + rwCULLMODECULLFRONT, + /**<Only back-facing triangles are drawn */ rwCULLMODEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }; typedef enum RwCullMode RwCullMode; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup immediatemodedatatypes * RwPrimitiveType * This type represents the different types of indexed * line and indexed triangle primitives that are available when rendering 2D * and 3D immediate mode objects (see API functions \ref RwIm2DRenderIndexedPrimitive, * \ref RwIm2DRenderPrimitive, \ref RwIm3DRenderIndexedPrimitive and \ref RwIm3DRenderPrimitive). * Indices are into a vertex list and must be defined in a counter-clockwise order - * (as seen from the camera) to be visible.*/ + * (as seen from the camera) to be visible. + */ +#endif /* RWADOXYGENEXTERNAL */ enum RwPrimitiveType { rwPRIMTYPENAPRIMTYPE = 0, /**<Invalid primative type */ @@ -4994,8 +5140,9 @@ typedef RwBool (*RwStandardFunc)(void *pOut,void *pInOut,RwInt32 nI); typedef struct RwEngineOpenParams RwEngineOpenParams; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwengine * \struct RwEngineOpenParams * This type is used to specify device dependent parameters * for use by the API function \ref RwEngineOpen. @@ -5003,6 +5150,7 @@ typedef struct RwEngineOpenParams RwEngineOpenParams; * should be set to the window's handle (of type HWND). * For NULL and sky libraries displayID=0: */ +#endif /* RWADOXYGENEXTERNAL */ struct RwEngineOpenParams { void *displayID; /**< Display Identifier */ @@ -5066,37 +5214,41 @@ typedef RwBool typedef struct RwDevice RwDevice; -/** - * \ingroup datatypes - * \struct RwDevice + +#if (!defined(DOXYGEN)) +/* + * struct RwDevice * Structure describing a display device */ struct RwDevice { - RwReal gammaCorrection; /**<Gamma correction */ - RwSystemFunc fpSystem; /**< System handler */ - RwReal zBufferNear; /**< Near Z buffer value */ - RwReal zBufferFar; /**< Far Z buffer value */ + RwReal gammaCorrection; /* Gamma correction */ + RwSystemFunc fpSystem; /* System handler */ + RwReal zBufferNear; /* Near Z buffer value */ + RwReal zBufferFar; /* Far Z buffer value */ /* Immediate mode functions */ - RwRenderStateSetFunction fpRenderStateSet; /**< Internal Use */ - RwRenderStateGetFunction fpRenderStateGet; /**< Internal Use */ + RwRenderStateSetFunction fpRenderStateSet; /* Internal Use */ + RwRenderStateGetFunction fpRenderStateGet; /* Internal Use */ /* Render functions */ - RwIm2DRenderLineFunction fpIm2DRenderLine; /**< Internal Use */ - RwIm2DRenderTriangleFunction fpIm2DRenderTriangle; /**< Internal Use */ - RwIm2DRenderPrimitiveFunction fpIm2DRenderPrimitive; /**< Internal Use */ - RwIm2DRenderIndexedPrimitiveFunction fpIm2DRenderIndexedPrimitive; /**< Internal Use */ - - RwIm3DRenderLineFunction fpIm3DRenderLine; /**< Internal Use */ - RwIm3DRenderTriangleFunction fpIm3DRenderTriangle; /**< Internal Use */ - RwIm3DRenderPrimitiveFunction fpIm3DRenderPrimitive; /**< Internal Use */ - RwIm3DRenderIndexedPrimitiveFunction fpIm3DRenderIndexedPrimitive; /**< Internal Use */ + RwIm2DRenderLineFunction fpIm2DRenderLine; /* Internal Use */ + RwIm2DRenderTriangleFunction fpIm2DRenderTriangle; /* Internal Use */ + RwIm2DRenderPrimitiveFunction fpIm2DRenderPrimitive; /* Internal Use */ + RwIm2DRenderIndexedPrimitiveFunction fpIm2DRenderIndexedPrimitive; /* Internal Use */ + + RwIm3DRenderLineFunction fpIm3DRenderLine; /* Internal Use */ + RwIm3DRenderTriangleFunction fpIm3DRenderTriangle; /* Internal Use */ + RwIm3DRenderPrimitiveFunction fpIm3DRenderPrimitive; /* Internal Use */ + RwIm3DRenderIndexedPrimitiveFunction fpIm3DRenderIndexedPrimitive; /* Internal Use */ }; +#endif /* (!defined(DOXYGEN)) */ + typedef struct RwMetrics RwMetrics; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwengine * \struct RwMetrics * This structure provides information about the performance * of the application. The metrics are recorded only in the metrics @@ -5109,6 +5261,7 @@ typedef struct RwMetrics RwMetrics; * be considered as bad news and will indicate a significantly * reduced rendering performance. */ +#endif /* RWADOXYGENEXTERNAL */ struct RwMetrics { RwUInt32 numTriangles; /**< Number of triangles processed */ @@ -5123,13 +5276,15 @@ struct RwMetrics #define SUBSYSTEMNAME_MAXLEN 80 typedef struct RwSubSystemInfo RwSubSystemInfo; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwengine * \struct RwSubSystemInfo * This type is used to represent information about a device. * The only available field specifies a character string * which identifies the subsystem * (see API function \ref RwEngineGetSubSystemInfo). */ +#endif /* RWADOXYGENEXTERNAL */ struct RwSubSystemInfo { RwChar name[SUBSYSTEMNAME_MAXLEN]; /**< Sub system string */ @@ -5139,13 +5294,15 @@ struct RwSubSystemInfo /* Video modes */ /* These are flag bits which may be ORd */ +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwengine * RwVideoModeFlag * These flags specify the type of display that RenderWare * will use. The flags may be OR'd together to build composite modes. * Note that not all modes are supported on all platforms. */ +#endif /* RWADOXYGENEXTERNAL */ enum RwVideoModeFlag { rwVIDEOMODEEXCLUSIVE = 0x1, /**<Exclusive (i.e. full-screen) */ @@ -5162,13 +5319,16 @@ enum RwVideoModeFlag typedef enum RwVideoModeFlag RwVideoModeFlag; typedef struct RwVideoMode RwVideoMode; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwengine * \struct RwVideoMode * This type represents a video mode available on a device specified * by the frame buffer resolution (width and height) and depth, * and a flag indicating whether the device has exclusive use of - * the mode (see API function \ref RwEngineGetVideoModeInfo): */ + * the mode (see API function \ref RwEngineGetVideoModeInfo): + */ +#endif /* RWADOXYGENEXTERNAL */ struct RwVideoMode { RwInt32 width; /**< Width */ @@ -5177,8 +5337,9 @@ struct RwVideoMode RwVideoModeFlag flags; /**< Flags */ }; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwengine * RwEngineInitFlag * Engine initialization flags. An application can use * these to control the memory manager that RenderWare uses for dynamic @@ -5190,6 +5351,7 @@ struct RwVideoMode * RwMalloc and RwFree. This will result in more memory management * related calls. */ +#endif /* RWADOXYGENEXTERNAL */ enum RwEngineInitFlag { rwENGINEINITFREELISTS = 0, /**<Use Freelists */ @@ -5211,7 +5373,9 @@ extern "C" extern RwInt32 RwEngineGetVersion(void); /* Sequence of events to get RenderWare up and running */ -extern RwBool RwEngineInit(RwMemoryFunctions *memFuncs, RwUInt32 initFlags, RwUInt32 resArenaSize); +extern RwBool RwEngineInit(const RwMemoryFunctions *memFuncs, + RwUInt32 initFlags, + RwUInt32 resArenaSize); extern RwInt32 RwEngineRegisterPlugin(RwInt32 size, RwUInt32 pluginID, RwPluginObjectConstructor initCB, RwPluginObjectDestructor termCB); @@ -5256,80 +5420,75 @@ extern RwMetrics *RwEngineGetMetrics(void); */ /* - * \typedef rwFnFexist + * rwFnFexist * Returns TRUE if file with given name exists, FALSE if it doesn't. */ typedef RwBool (*rwFnFexist)(const RwChar *name); /* - * \typedef rwFnFopen + * rwFnFopen * Mimics ANSI C Standard Library fopen. */ typedef void *(*rwFnFopen)(const RwChar *name, const RwChar *mode); /* - * \typedef rwFnFclose + * rwFnFclose * Mimics ANSI C Standard Library fclose. */ typedef int (*rwFnFclose)(void *fptr); /* - * \typedef rwFnFread + * rwFnFread * Mimics ANSI C Standard Library fread. */ typedef size_t (*rwFnFread)(void *addr, size_t size, size_t count, void *fptr); /* - * \typedef rwFnFwrite + * rwFnFwrite * Mimics ANSI C Standard Library fwrite. */ typedef size_t (*rwFnFwrite)(const void *addr, size_t size, size_t count, void *fptr); /* - * \typedef rwFnFgets + * rwFnFgets * Mimics ANSI C Standard Library fgets. */ typedef RwChar *(*rwFnFgets)(RwChar *buffer, int maxLen, void *fptr); /* - * \typedef rwFnFputs + * rwFnFputs * Mimics ANSI C Standard Library fputs. */ typedef int (*rwFnFputs)(const RwChar *buffer, void *fptr); /* - * \typedef rwFnFeof + * rwFnFeof * Mimics ANSI C Standard Library feof. */ typedef int (*rwFnFeof)(void *fptr); /* - * \typedef rwFnFseek + * rwFnFseek * Mimics ANSI C Standard Library fseek. */ typedef int (*rwFnFseek)(void *fptr, long offset, int origin); /* - * \typedef rwFnFflush + * rwFnFflush * Mimics ANSI C Standard Library fflush. */ typedef int (*rwFnFflush)(void *fptr); /* - * \typedef rwFnFtell + * rwFnFtell * Mimics ANSI C Standard Library ftell. */ typedef int (*rwFnFtell)(void *fptr); -/** - * \ingroup datatypes - * \typedef RwFileFunctions - * typedef for struct RwFileFunctions - */ typedef struct RwFileFunctions RwFileFunctions; /** - * \ingroup datatypes + * \ingroup memoryfileinterface * \struct RwFileFunctions * This type is used to specify the file access * functions used by RenderWare. The default file system uses the standard @@ -5390,8 +5549,9 @@ extern RwFileFunctions *RwOsGetFileInterface(void); */ typedef struct RwError RwError; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwerror * \struct RwError * This type represents a RenderWare error specified by the * ID of the plugin that the error was issued from (pluginID) and the error @@ -5399,6 +5559,7 @@ typedef struct RwError RwError; * \param pluginID The ID of the plugin that issued the error. * \param errorCode A value representing the error code. */ +#endif /* RWADOXYGENEXTERNAL */ struct RwError { RwInt32 pluginID; /**< Internal Use */ @@ -5444,7 +5605,7 @@ extern RwInt32 _rwerror(RwInt32 code, ...); */ /** - * \ingroup datatypes + * \ingroup rwdebug * RwDebugType * This type represents the different types of debug and * trace messages that can be sent to the currently installed debug handler @@ -5461,7 +5622,7 @@ enum RwDebugType typedef enum RwDebugType RwDebugType; /** - * \ingroup datatypes + * \ingroup rwdebug * \ref RwDebugHandler * This type represents the * function called from \ref RwDebugSendMessage for sending a message to the @@ -5508,9 +5669,12 @@ extern void _rwDebugSendMessage(RwDebugType type, /* Sending a message */ extern RwChar *_rwdberrcommon(RwInt32 code, ...); + +#if (!defined(DOXYGEN)) +/* Doxy doesn't appear to like the __RWFORMAT__ attribute */ extern RwChar *_rwdbsprintf(const RwChar * format, ...) __RWFORMAT__(printf, 1, 2); - +#endif /* (!defined(DOXYGEN)) */ #ifdef __cplusplus } @@ -5574,6 +5738,8 @@ enum RwEngineStatus typedef enum RwEngineStatus RwEngineStatus; typedef struct RwGlobals RwGlobals; + +#if (!defined(DOXYGEN)) struct RwGlobals { #ifdef RWDEBUG @@ -5632,6 +5798,7 @@ struct RwModuleInfo RwInt32 globalsOffset; RwInt32 numInstances; }; +#endif /* (!defined(DOXYGEN)) */ @@ -5648,7 +5815,13 @@ extern "C" extern RwUInt32 ourGlobals[RWGLOBALSIZE / sizeof(RwUInt32)]; #define RwEngineInstance ourGlobals #else /* RWGLOBALSIZE */ + +#ifdef _RWDLL +__declspec(dllimport) extern void *RwEngineInstance; +#else extern void *RwEngineInstance; +#endif + #endif /* RWGLOBALSIZE */ extern RwInt8 _rwMsbBit[]; @@ -5663,39 +5836,45 @@ extern RwInt8 _rwMsbBit[]; #define RWRESOURCESGLOBAL(var) (RWPLUGINOFFSET(rwResourcesGlobals, \ RwEngineInstance, resourcesModule.globalsOffset)->var) +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * \typedef RwResEntry + * \ingroup rwresources + * \struct RwResEntry * RwResEntry object. Instanced data block in resources arena. * This should be considered an opaque * type. Use the RwResEntry API functions to access. */ +#endif /* RWADOXYGENEXTERNAL */ + typedef struct RwResEntry RwResEntry; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes - * \typedef RwResEntryDestroyNotify - * This type represents the function + * \ingroup rwresources + * \ref RwResEntryDestroyNotify type represents the function * called from \ref RwResourcesFreeResEntry (and indirectly from * \ref RwResourcesEmptyArena) immediately before the memory used by the * specified resources entry is released. * * \param resEntry Pointer to the instanced data. */ +#endif /* RWADOXYGENEXTERNAL */ typedef void (*RwResEntryDestroyNotify) (RwResEntry * resEntry); #if (!defined(DOXYGEN)) struct RwResEntry { - RwLLLink link; /**< Node in the list of resource elements */ - RwInt32 size; /**< Size of this node */ - void *owner; /**< Owner of this node */ - RwResEntry **ownerRef; /**< Pointer to pointer to this (enables de-alloc) */ - RwResEntryDestroyNotify destroyNotify; /**< This is called right before destruction */ + RwLLLink link; /* Node in the list of resource elements */ + RwInt32 size; /* Size of this node */ + void *owner; /* Owner of this node */ + RwResEntry **ownerRef; /* Pointer to pointer to this (enables de-alloc) */ + RwResEntryDestroyNotify destroyNotify; /* This is called right before destruction */ }; #endif /* (!defined(DOXYGEN)) */ typedef struct rwResources rwResources; + +#if (!defined(DOXYGEN)) struct rwResources { RwInt32 maxSize; @@ -5711,11 +5890,13 @@ struct rwResources RwLinkList *usedEntries; }; + typedef struct rwResourcesGlobals rwResourcesGlobals; struct rwResourcesGlobals { rwResources res; }; +#endif /* (!defined(DOXYGEN)) */ #ifdef __cplusplus @@ -5768,8 +5949,9 @@ extern RwModuleInfo resourcesModule; */ typedef struct RwRGBAReal RwRGBAReal; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwrgba * \struct RwRGBAReal * This structure represents a RGBA color which has * components specified as real values. @@ -5785,6 +5967,7 @@ typedef struct RwRGBAReal RwRGBAReal; * value 0 generally corresponds to the associcated component in an * RwRGBAReal with the value 0.0. */ +#endif /* RWADOXYGENEXTERNAL */ struct RwRGBAReal { RwReal red; /**< red component */ @@ -5799,11 +5982,14 @@ struct RwRGBAReal #endif /* (!defined(RwRGBARealAssign)) */ typedef struct RwRGBA RwRGBA; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwrgba * \struct RwRGBA * This structure represents a RGBA color - * which has integer components specified in the range 0 to 255. */ + * which has integer components specified in the range 0 to 255. + */ +#endif /* RWADOXYGENEXTERNAL */ struct RwRGBA { RwUInt8 red; /**< red component */ @@ -5947,6 +6133,7 @@ extern void RwRGBARealFromRwRGBA(RwRGBAReal *result, /* Matrix stream format */ typedef struct rwStreamMatrix RwMatrixChunkInfo; typedef struct rwStreamMatrix rwStreamMatrix; +#if (!defined(DOXYGEN)) struct rwStreamMatrix { RwV3d right; @@ -5955,6 +6142,7 @@ struct rwStreamMatrix RwV3d pos; RwInt32 type; }; +#endif /* (!defined(DOXYGEN)) */ /**************************************************************************** @@ -6009,11 +6197,14 @@ extern RwMatrixChunkInfo *RwMatrixChunkInfoRead(RwStream * stream, */ typedef struct RwChunkHeaderInfo RwChunkHeaderInfo; +#ifndef RWADOXYGENEXTERNAL /** - * \ingroup datatypes + * \ingroup rwstream * \struct RwChunkHeaderInfo * Holds data for a chunk header read from a - * stream with \ref RwStreamReadChunkHeaderInfo. */ + * stream with \ref RwStreamReadChunkHeaderInfo. + */ +#endif /* RWADOXYGENEXTERNAL */ struct RwChunkHeaderInfo { RwUInt32 type; /**< chunk ID - see \ref RwStreamFindChunk */ |