From a73f5340a2d12537437479317bdf351715991c12 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Tue, 29 Dec 2020 18:59:40 +0100 Subject: Remove sdk --- sdk/rwsdk/include/d3d8/errcom.def | 60 - sdk/rwsdk/include/d3d8/errcore.def | 117 - sdk/rwsdk/include/d3d8/rpanisot.h | 54 - sdk/rwsdk/include/d3d8/rpanisot.rpe | 173 - sdk/rwsdk/include/d3d8/rpcollis.h | 372 --- sdk/rwsdk/include/d3d8/rpcollis.rpe | 171 - sdk/rwsdk/include/d3d8/rpcriter.h | 106 - sdk/rwsdk/include/d3d8/rpdbgerr.c | 90 - sdk/rwsdk/include/d3d8/rpdbgerr.h | 293 -- sdk/rwsdk/include/d3d8/rpdmorph.h | 311 -- sdk/rwsdk/include/d3d8/rpdmorph.rpe | 173 - sdk/rwsdk/include/d3d8/rperror.h | 32 - sdk/rwsdk/include/d3d8/rphanim.h | 641 ---- sdk/rwsdk/include/d3d8/rphanim.rpe | 173 - sdk/rwsdk/include/d3d8/rplodatm.h | 134 - sdk/rwsdk/include/d3d8/rplodatm.rpe | 176 - sdk/rwsdk/include/d3d8/rplogo.h | 83 - sdk/rwsdk/include/d3d8/rplogo.rpe | 173 - sdk/rwsdk/include/d3d8/rpltmap.h | 99 - sdk/rwsdk/include/d3d8/rpltmap.rpe | 172 - sdk/rwsdk/include/d3d8/rpmatfx.h | 241 -- sdk/rwsdk/include/d3d8/rpmatfx.rpe | 172 - sdk/rwsdk/include/d3d8/rpmipkl.h | 62 - sdk/rwsdk/include/d3d8/rpmipkl.rpe | 173 - sdk/rwsdk/include/d3d8/rpmorph.h | 137 - sdk/rwsdk/include/d3d8/rpmorph.rpe | 175 - sdk/rwsdk/include/d3d8/rppatch.h | 695 ---- sdk/rwsdk/include/d3d8/rppatch.rpe | 172 - sdk/rwsdk/include/d3d8/rpprtstd.h | 1073 ------ sdk/rwsdk/include/d3d8/rpprtstd.rpe | 173 - sdk/rwsdk/include/d3d8/rpptank.h | 828 ----- sdk/rwsdk/include/d3d8/rpptank.rpe | 177 - sdk/rwsdk/include/d3d8/rppvs.h | 398 --- sdk/rwsdk/include/d3d8/rppvs.rpe | 174 - sdk/rwsdk/include/d3d8/rprandom.h | 65 - sdk/rwsdk/include/d3d8/rprandom.rpe | 172 - sdk/rwsdk/include/d3d8/rpskin.h | 276 -- sdk/rwsdk/include/d3d8/rpskin.rpe | 172 - sdk/rwsdk/include/d3d8/rpspline.h | 141 - sdk/rwsdk/include/d3d8/rpspline.rpe | 176 - sdk/rwsdk/include/d3d8/rpusrdat.h | 124 - sdk/rwsdk/include/d3d8/rpusrdat.rpe | 173 - sdk/rwsdk/include/d3d8/rpworld.h | 3758 --------------------- sdk/rwsdk/include/d3d8/rpworld.rpe | 63 - sdk/rwsdk/include/d3d8/rt2d.h | 1028 ------ sdk/rwsdk/include/d3d8/rt2d.rpe | 164 - sdk/rwsdk/include/d3d8/rt2danim.h | 1107 ------- sdk/rwsdk/include/d3d8/rt2danim.rpe | 163 - sdk/rwsdk/include/d3d8/rtanim.h | 638 ---- sdk/rwsdk/include/d3d8/rtanim.rpe | 168 - sdk/rwsdk/include/d3d8/rtbary.h | 141 - sdk/rwsdk/include/d3d8/rtbary.rpe | 179 - sdk/rwsdk/include/d3d8/rtbezpat.h | 396 --- sdk/rwsdk/include/d3d8/rtbezpat.rpe | 163 - sdk/rwsdk/include/d3d8/rtbmp.h | 51 - sdk/rwsdk/include/d3d8/rtbmp.rpe | 163 - sdk/rwsdk/include/d3d8/rtcharse.h | 111 - sdk/rwsdk/include/d3d8/rtcharse.rpe | 163 - sdk/rwsdk/include/d3d8/rtgncpip.h | 256 -- sdk/rwsdk/include/d3d8/rtgncpip.rpe | 172 - sdk/rwsdk/include/d3d8/rtimport.h | 1338 -------- sdk/rwsdk/include/d3d8/rtimport.rpe | 174 - sdk/rwsdk/include/d3d8/rtintsec.h | 138 - sdk/rwsdk/include/d3d8/rtintsec.rpe | 162 - sdk/rwsdk/include/d3d8/rtltmap.h | 644 ---- sdk/rwsdk/include/d3d8/rtltmap.rpe | 172 - sdk/rwsdk/include/d3d8/rtmipk.h | 58 - sdk/rwsdk/include/d3d8/rtmipk.rpe | 162 - sdk/rwsdk/include/d3d8/rtpick.h | 59 - sdk/rwsdk/include/d3d8/rtpick.rpe | 162 - sdk/rwsdk/include/d3d8/rtpitexd.h | 74 - sdk/rwsdk/include/d3d8/rtpitexd.rpe | 216 -- sdk/rwsdk/include/d3d8/rtpng.h | 49 - sdk/rwsdk/include/d3d8/rtpng.rpe | 163 - sdk/rwsdk/include/d3d8/rtquat.h | 646 ---- sdk/rwsdk/include/d3d8/rtquat.rpe | 179 - sdk/rwsdk/include/d3d8/rtras.h | 54 - sdk/rwsdk/include/d3d8/rtras.rpe | 163 - sdk/rwsdk/include/d3d8/rtray.h | 63 - sdk/rwsdk/include/d3d8/rtray.rpe | 162 - sdk/rwsdk/include/d3d8/rtskinsp.h | 57 - sdk/rwsdk/include/d3d8/rtskinsp.rpe | 163 - sdk/rwsdk/include/d3d8/rtslerp.h | 262 -- sdk/rwsdk/include/d3d8/rtslerp.rpe | 180 - sdk/rwsdk/include/d3d8/rtsplpvs.h | 65 - sdk/rwsdk/include/d3d8/rtsplpvs.rpe | 162 - sdk/rwsdk/include/d3d8/rttiff.h | 47 - sdk/rwsdk/include/d3d8/rttiff.rpe | 163 - sdk/rwsdk/include/d3d8/rttilerd.h | 70 - sdk/rwsdk/include/d3d8/rttilerd.rpe | 163 - sdk/rwsdk/include/d3d8/rttoc.h | 102 - sdk/rwsdk/include/d3d8/rttoc.rpe | 163 - sdk/rwsdk/include/d3d8/rtvcat.h | 38 - sdk/rwsdk/include/d3d8/rtvcat.rpe | 163 - sdk/rwsdk/include/d3d8/rtworld.h | 85 - sdk/rwsdk/include/d3d8/rtworld.rpe | 162 - sdk/rwsdk/include/d3d8/rwcore.h | 4428 ------------------------- sdk/rwsdk/include/d3d8/rwplcore.h | 6271 ----------------------------------- 98 files changed, 36018 deletions(-) delete mode 100644 sdk/rwsdk/include/d3d8/errcom.def delete mode 100644 sdk/rwsdk/include/d3d8/errcore.def delete mode 100644 sdk/rwsdk/include/d3d8/rpanisot.h delete mode 100644 sdk/rwsdk/include/d3d8/rpanisot.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rpcollis.h delete mode 100644 sdk/rwsdk/include/d3d8/rpcollis.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rpcriter.h delete mode 100644 sdk/rwsdk/include/d3d8/rpdbgerr.c delete mode 100644 sdk/rwsdk/include/d3d8/rpdbgerr.h delete mode 100644 sdk/rwsdk/include/d3d8/rpdmorph.h delete mode 100644 sdk/rwsdk/include/d3d8/rpdmorph.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rperror.h delete mode 100644 sdk/rwsdk/include/d3d8/rphanim.h delete mode 100644 sdk/rwsdk/include/d3d8/rphanim.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rplodatm.h delete mode 100644 sdk/rwsdk/include/d3d8/rplodatm.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rplogo.h delete mode 100644 sdk/rwsdk/include/d3d8/rplogo.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rpltmap.h delete mode 100644 sdk/rwsdk/include/d3d8/rpltmap.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rpmatfx.h delete mode 100644 sdk/rwsdk/include/d3d8/rpmatfx.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rpmipkl.h delete mode 100644 sdk/rwsdk/include/d3d8/rpmipkl.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rpmorph.h delete mode 100644 sdk/rwsdk/include/d3d8/rpmorph.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rppatch.h delete mode 100644 sdk/rwsdk/include/d3d8/rppatch.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rpprtstd.h delete mode 100644 sdk/rwsdk/include/d3d8/rpprtstd.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rpptank.h delete mode 100644 sdk/rwsdk/include/d3d8/rpptank.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rppvs.h delete mode 100644 sdk/rwsdk/include/d3d8/rppvs.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rprandom.h delete mode 100644 sdk/rwsdk/include/d3d8/rprandom.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rpskin.h delete mode 100644 sdk/rwsdk/include/d3d8/rpskin.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rpspline.h delete mode 100644 sdk/rwsdk/include/d3d8/rpspline.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rpusrdat.h delete mode 100644 sdk/rwsdk/include/d3d8/rpusrdat.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rpworld.h delete mode 100644 sdk/rwsdk/include/d3d8/rpworld.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rt2d.h delete mode 100644 sdk/rwsdk/include/d3d8/rt2d.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rt2danim.h delete mode 100644 sdk/rwsdk/include/d3d8/rt2danim.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtanim.h delete mode 100644 sdk/rwsdk/include/d3d8/rtanim.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtbary.h delete mode 100644 sdk/rwsdk/include/d3d8/rtbary.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtbezpat.h delete mode 100644 sdk/rwsdk/include/d3d8/rtbezpat.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtbmp.h delete mode 100644 sdk/rwsdk/include/d3d8/rtbmp.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtcharse.h delete mode 100644 sdk/rwsdk/include/d3d8/rtcharse.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtgncpip.h delete mode 100644 sdk/rwsdk/include/d3d8/rtgncpip.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtimport.h delete mode 100644 sdk/rwsdk/include/d3d8/rtimport.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtintsec.h delete mode 100644 sdk/rwsdk/include/d3d8/rtintsec.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtltmap.h delete mode 100644 sdk/rwsdk/include/d3d8/rtltmap.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtmipk.h delete mode 100644 sdk/rwsdk/include/d3d8/rtmipk.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtpick.h delete mode 100644 sdk/rwsdk/include/d3d8/rtpick.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtpitexd.h delete mode 100644 sdk/rwsdk/include/d3d8/rtpitexd.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtpng.h delete mode 100644 sdk/rwsdk/include/d3d8/rtpng.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtquat.h delete mode 100644 sdk/rwsdk/include/d3d8/rtquat.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtras.h delete mode 100644 sdk/rwsdk/include/d3d8/rtras.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtray.h delete mode 100644 sdk/rwsdk/include/d3d8/rtray.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtskinsp.h delete mode 100644 sdk/rwsdk/include/d3d8/rtskinsp.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtslerp.h delete mode 100644 sdk/rwsdk/include/d3d8/rtslerp.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtsplpvs.h delete mode 100644 sdk/rwsdk/include/d3d8/rtsplpvs.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rttiff.h delete mode 100644 sdk/rwsdk/include/d3d8/rttiff.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rttilerd.h delete mode 100644 sdk/rwsdk/include/d3d8/rttilerd.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rttoc.h delete mode 100644 sdk/rwsdk/include/d3d8/rttoc.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtvcat.h delete mode 100644 sdk/rwsdk/include/d3d8/rtvcat.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rtworld.h delete mode 100644 sdk/rwsdk/include/d3d8/rtworld.rpe delete mode 100644 sdk/rwsdk/include/d3d8/rwcore.h delete mode 100644 sdk/rwsdk/include/d3d8/rwplcore.h (limited to 'sdk/rwsdk/include/d3d8') diff --git a/sdk/rwsdk/include/d3d8/errcom.def b/sdk/rwsdk/include/d3d8/errcom.def deleted file mode 100644 index 25f44e1e..00000000 --- a/sdk/rwsdk/include/d3d8/errcom.def +++ /dev/null @@ -1,60 +0,0 @@ -RWECODE(E_RW_BADENGINESTATE, - "Engine in incorrect state for this operation") -RWECODE(E_RW_BADOPEN, - "Error opening the file %s") -RWECODE(E_RW_BADPARAM, - "Invalid Parameter passed. %s") -RWECODE(E_RW_BADVERSION, - "The binary file format version is incompatible with this library") -RWECODE(E_RW_DEBUGSTACK, - "Debug Library has Stack Depth mismatch") -RWECODE(E_RW_DEFAULTPIPELINECREATION, - "Creation of a default pipeline (%s) failed") -RWECODE(E_RW_FRAMENOMATRIX, - "The frame does not have an associated matrix") -RWECODE(E_RW_INVIMAGEDEPTH, - "Invalid Image Depth") -RWECODE(E_RW_INVIMAGEFORMAT, - "Image has no pixel memory allocated") -RWECODE(E_RW_INVIMAGEMASK, - "The mask and image are not the same size") -RWECODE(E_RW_INVIMAGESIZE, - "Destination and source images are of differing sizes") -RWECODE(E_RW_INVRASTERDEPTH, - "Invalid Raster depth") -RWECODE(E_RW_INVRASTERFORMAT, - "Unrecognized raster format") -RWECODE(E_RW_INVRASTERLOCKREQ, - "Invalid Raster lock request") -RWECODE(E_RW_INVRASTERMIPLEVEL, - "Invalid Raster mipmap level") -RWECODE(E_RW_INVRASTERSIZE, - "Invalid Raster size") -RWECODE(E_RW_INVRASTERUNLOCKREQ, - "Invalid Raster unlock request") -RWECODE(E_RW_NOFRAME, - "Unable to find Frame") -RWECODE(E_RW_NOMEM, - "Unable to allocate %d bytes of memory") -RWECODE(E_RW_NOMIPMAPGENERATIONCALLBACK, - "No Mipmap generation callback set - use RtMipmapUseDefaultMipmapGenerationCallback") -RWECODE(E_RW_NOTSSEENABLEDCPU, - "Not SSE enabled CPU") -RWECODE(E_RW_NULLP, - "NULL pointer passed to library routine") -RWECODE(E_RW_PLUGININIT, - "Plugin has already been initialized") -RWECODE(E_RW_PLUGINNOTINIT, - "Plugin not initialized") -RWECODE(E_RW_RANGE, - "A supplied parameter was outside the expected range") -RWECODE(E_RW_READ, - "Read error on stream") -RWECODE(E_RW_REDUNDANT_FUNCTION, - "Call to redundant function - scheduled to be dropped from future releases") -RWECODE(E_RW_WRITE, - "Write error on stream") -RWECODE(E_RX_MESHES_RANGES_OVERLAP, - "\n Geometry is in an invalid format for RxPipeline rendering.\n There may be visible artifacts and/or decreased performance.\n Use RpGeometrySortByMaterial.\n [stream %p type %s]") -RWECODE(E_RW_STRING_TRUNCATION, - "strlen(%s) >= %d; truncating at character #%d == %c") diff --git a/sdk/rwsdk/include/d3d8/errcore.def b/sdk/rwsdk/include/d3d8/errcore.def deleted file mode 100644 index c71eed5a..00000000 --- a/sdk/rwsdk/include/d3d8/errcore.def +++ /dev/null @@ -1,117 +0,0 @@ -RWECODE(E_RW_BADWINDOW, - "Invalid view window dimensions supplied") -RWECODE(E_RW_CHUNKTYPEGET, - "Unable to get a chunk of the given type") -RWECODE(E_RW_DEVICEERROR, - "Device specific error: %s") -RWECODE(E_RW_DEVICEOPEN, - "Request to open device system refused") -RWECODE(E_RW_DEVICESTART, - "Attempt to start Device failed") -RWECODE(E_RW_ENDOFSTREAM, - "At the end of the stream.") -RWECODE(E_RW_FRAMEDESTROYSTATIC, - "RwFrameDestroy called on static frame.") -RWECODE(E_RW_FRAMEBUFFERMISMATCH, - "Resolutions of parent rasters of frame buffer and Z buffer are different") -RWECODE(E_RW_FREELISTFREED, - "Free List value already on the free list") -RWECODE(E_RW_FREELISTINVADDRESS, - "Invalid Free List memory address") -RWECODE(E_RW_FREELISTINVMEMBOUND, - "Invalid Free List memory boundary") -RWECODE(E_RW_FREELISTTRASH, - "An unused Free List entry has been overwritten") -RWECODE(E_RW_INSUFFICIENTRESOURCES, - "Insufficient resources to satisfy the allocation of %d bytes.") -RWECODE(E_RW_INVSTREAMACCESSTYPE, - "Invalid stream access type.") -RWECODE(E_RW_INVSTREAMTYPE, - "Invalid stream type.") -RWECODE(E_RW_NEGCLIPPLANE, - "Negative positioned clip planes are invalid") -RWECODE(E_RW_NOCAMERA, - "Cannot render until a Camera has been created") -RWECODE(E_RW_NOFRAMEBUFFER, - "Camera has no frame buffer raster") -RWECODE(E_RW_NOPARENT, - "The given object has no parent") -RWECODE(E_RW_RASTERRECT, - "Rectangle is not totally within Raster") -RWECODE(E_RW_RASTERSTACK, - "Insufficient Raster stack space available") -RWECODE(E_RW_RASTERSTACKEMPTY, - "No Raster Currently on Stack") -RWECODE(E_RW_READTEXMASK, - "Unable to read Texture %s / Mask %s") -RWECODE(E_RW_STREAMOPEN, - "Unable to open stream : %s") -RWECODE(E_RW_SYSTEMREQUEST, - "A system request call has failed, request code : 0x%x") -RWECODE(E_RW_ZEROLENGTH, - "A Vector of Zero Length was passed for normalizing") -RWECODE(E_RX_CANNOT_TRANSFER_BETWEEN_NODES, - "Node %s cannot output to node %s") -RWECODE(E_RX_CANNOT_TRANSFER_FROM_NODE_TO_PIPELINE, - "Node %s cannot output to specified pipeline") -RWECODE(E_RX_CYCLICPIPELINE, - "Pipeline contains cycles; illegal") -RWECODE(E_RX_DEP_DEPENDENCIESMISMATCH, - "\n" - "*** dependencies cannot be satisfied.\n" - "*** rxCLREQ_REQUIRED on cluster %s, originating\n" - "*** with node %s, not serviced by a rxCLVALID_VALID -\n" - "*** blocked at node %s, output #%ld (\"%s\").") -RWECODE(E_RX_DEP_DUPLICATECLUSTERDEFS, - "\n" - "*** Node %s specifies RxClusterDefinition for cluster %s more than once in\n" - "*** clusters of interest array. Distinct clusters within a pipeline must reference\n" - "*** distinct RxClusterDefinitions, even if the clusters contain the same data type\n") -RWECODE(E_RX_DEP_NULLCLUSTERDEF, - "Node %s specified with RxClusterDefinition pointer NULL for cluster of interest %d\n") -RWECODE(E_RX_DEP_OUTOFMEMORY, - "Dependency chasing; memory alloc failed") -RWECODE(E_RX_EMPTYPIPELINE, - "RwPipeline2Execute cannot execute a pipeline with no nodes :)") -RWECODE(E_RX_FRAGMENTEDPIPELINE, - "Pipeline forms two or more unconnected graphs; illegal") -RWECODE(E_RX_IM3DNOTACTIVE, - "Cannot render Im3D primitives outside of a RwIm3dTransform()/RwIm3dEnd() pair") -RWECODE(E_RX_INVALIDENTRYPOINT, - "Pipeline has an invalid entry point") -RWECODE(E_RX_INVALIDPRIMTYPE, - "Unknown primitive type %d") -RWECODE(E_RX_INVALIDRESUMEPIPELINE, - "RwPipeline2Execute cannot resume a different pipeline to the one previously interrupted") -RWECODE(E_RX_LOCKEDPIPE, - "Illegal operation on a locked pipeline") -RWECODE(E_RX_NODETOOMANYCLUSTERSOFINTEREST, - "Node contains more than RXNODEMAXCLUSTERSOFINTEREST clusters of interest; illegal") -RWECODE(E_RX_NODETOOMANYOUTPUTS, - "Node contains more than RXNODEMAXOUTPUTS outputs; illegal") -RWECODE(E_RX_PIPELINETOOMANYNODES, - "Maximum nodes per pipeline exceeded! You may increase the limit by changing the value of _rxPipelineMaxNodes BEFORE starting RenderWare") -RWECODE(E_RX_NODE_EXECUTION_FAILED, - "Node execution failed - %s") -RWECODE(E_RX_NOVERTS, - "Cannot render Im3D primitive - not enough vertices transformed") -RWECODE(E_RX_PACKETPTRINVALID, - "Value of input/output interruption packets pointer not as expected") -RWECODE(E_RX_PACKETSCOPYFAILED, - "Failed to make copies of packets input to RxPipelineExecute()") -RWECODE(E_RX_RUNFROMNOTVALID, - "RunFrom node not a member of the specified pipeline") -RWECODE(E_RX_RUNTOANDRUNFROM, - "RwPipeline2Execute cannot accept both RunTo *and* RunFrom") -RWECODE(E_RX_RUNTONOTVALID, - "RunTo node not a member of the specified pipeline") -RWECODE(E_RX_TOOMANYVERTS, - "More than 65536 vertices passed to RwIm3DTransform; illegal") -RWECODE(E_RX_UNFINISHEDPIPELINE, - "RwPipeline2Execute must resume and finish an interrupted pipeline") -RWECODE(E_RX_UNLOCKEDPIPE, - "Illegal operation on an unlocked pipeline") -RWECODE(E_RX_UNPROCESSED_PACKETS, - "Unprocessed packets found in finished execution context") -RWECODE(E_RX_UNSATISFIED_REQUIREMENTS, - "Cannot send packet between pipelines, requirements not satisfied. Cluster '%s' is missing") diff --git a/sdk/rwsdk/include/d3d8/rpanisot.h b/sdk/rwsdk/include/d3d8/rpanisot.h deleted file mode 100644 index 323786f4..00000000 --- a/sdk/rwsdk/include/d3d8/rpanisot.h +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Anisotropic Texture Sampling Plugin for RenderWare. - */ - -#ifndef RPANISOTPLUGIN_H -#define RPANISOTPLUGIN_H - -/** - * \defgroup rpanisot RpAnisot - * \ingroup mipmapping - * - * Anisotropic Texture Sampling Plugin for RenderWare Graphics. - */ - -/** - * \ingroup rpanisot - * \page rpanisotoverview RpAnisot Plugin Overview - * - * \par Requirements - * \li \b Headers: rwcore.h, rpworld.h, rpanisot.h - * \li \b Libraries: rwcore, rpworld, rpanisot - * \li \b Plugin \b attachments: \ref RpWorldPluginAttach, \ref RpAnisotPluginAttach - * - * \subsection anisotoverview Overview - * 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 - * by trilinear mipmapping and the texture looks smeary. - * Anisotropic sampling takes additional samples, resulting in sharper looking - * textures. Higher numbers of samples will produce better quality results but - * run slower, so should be used in moderation. - * - */ - -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -extern RwInt8 RpAnisotGetMaxSupportedMaxAnisotropy(void); - -extern RwTexture *RpAnisotTextureSetMaxAnisotropy(RwTexture *tex, RwInt8 val); -extern RwInt8 RpAnisotTextureGetMaxAnisotropy(RwTexture *tex); - -extern RwBool RpAnisotPluginAttach(void); - -#ifdef __cplusplus -} -#endif - -#endif /* RPANISOTPLUGIN_H */ diff --git a/sdk/rwsdk/include/d3d8/rpanisot.rpe b/sdk/rwsdk/include/d3d8/rpanisot.rpe deleted file mode 100644 index 0464081f..00000000 --- a/sdk/rwsdk/include/d3d8/rpanisot.rpe +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionLabel -{ - - - - e_rwdb_CriterionLabelLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionLabel e_rwdb_CriterionLabel; - - diff --git a/sdk/rwsdk/include/d3d8/rpcollis.h b/sdk/rwsdk/include/d3d8/rpcollis.h deleted file mode 100644 index 23e67f35..00000000 --- a/sdk/rwsdk/include/d3d8/rpcollis.h +++ /dev/null @@ -1,372 +0,0 @@ - -/***************************************************************************** - * - * File : rpcollis.h - * - * Abstract : World collision plugin for 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) 2000 Criterion Software Ltd. - * All Rights Reserved. - * - * RenderWare is a trademark of Canon Inc. - * - *****************************************************************************/ - -#ifndef RPCOLLIS_H -#define RPCOLLIS_H - -/* Doxygen plugin groups. */ - -/** - * \defgroup rpcollis RpCollision - * \ingroup collisiondetection - * - * Collision Plugin for RenderWare Graphics. - */ - -/****************************************************************************** - * Include files - */ - -#include -#include - -#include "rpcollis.rpe" /* automatically generated header file */ - -/****************************************************************************** - * Global Types - */ - -/** - * \ingroup rpcollis - * RpIntersectType, this type represents the different types of - * primitives that can be used to intersect with an object (for example, see - * \ref RpCollisionWorldForAllIntersections): - */ -enum RpIntersectType -{ - rpINTERSECTNONE = 0, - rpINTERSECTLINE, /** -#include - -#include -#include - -static const char rcsid[] __RWUNUSED__ = "@@(#)$Id: rpdbgerr.c,v 1.2 2004/08/31 17:40:34 gtristram Exp $"; - -#ifdef RWDEBUG - -/**************************************************************************** - Defines - */ - - /**************************************************************************** - Local (static) Globals - */ - -/* The strings used in the debug error reporting are derived from the - * .def files - */ - -#define RWECODE(a,b) RWSTRING(b), - -static const RwChar *rw_err_str[] = -{ -#include "rperror.def" - RWSTRING("Last Error") -}; - -#undef RWECODE -#define RWECODE(a,b) RWSTRING(#a), - -static const RwChar *rw_err_cstr[] = -{ -#include "rperror.def" - RWSTRING("E_RW_LAST") -}; - -#undef RWECODE - -static RwChar dberr[512]; - -RwChar * -rwPLUGIN_ERRFUNC(RwInt32 code,...) -{ - va_list ap; - -#if (0) - RWFUNCTION(RWSTRING("rwPLUGIN_ERRFUNC")); -#endif /* (0) */ - - va_start(ap, code); - - rwstrcpy(dberr, rw_err_cstr[code]); - rwstrcat(dberr, RWSTRING(" : ")); - rwvsprintf(&dberr[rwstrlen(dberr)], rw_err_str[code], ap); - va_end(ap); - return dberr; -} - -#endif /* RWDEBUG */ - diff --git a/sdk/rwsdk/include/d3d8/rpdbgerr.h b/sdk/rwsdk/include/d3d8/rpdbgerr.h deleted file mode 100644 index e0500057..00000000 --- a/sdk/rwsdk/include/d3d8/rpdbgerr.h +++ /dev/null @@ -1,293 +0,0 @@ -/*************************************************************************** - * * - * Module : badebug.h * - * * - * Purpose : Debug handling * - * * - **************************************************************************/ - -#ifndef RWDEBUG_H -#define RWDEBUG_H - -#if (defined(RWDEBUG) && defined(RWVERBOSE)) -#if (defined(_MSC_VER)) -#if (_MSC_VER>=1000) - -/* Pick up _ASSERTE macro */ -#ifdef _XBOX -#include -#endif /* _XBOX */ -#if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) -#define _CRTDBG_MAP_ALLOC -#endif /* defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) */ -#include -#undef RWASSERTE -#define RWASSERTE(_condition) _ASSERTE(_condition) -#endif /* (_MSC_VER>=1000) */ -#endif /* (defined(_MSC_VER)) */ -#endif /* (defined(RWDEBUG) && defined(RWVERBOSE)) */ - -#if (!defined(RWASSERTE)) -#define RWASSERTE(_condition) /* No-Op */ -#endif /* (!defined(RWASSERTE)) */ - -#if (!defined(RWPENTER)) -#define RWPENTER(_func) /* No-Op */ -#endif /* (!defined(RWPENTER)) */ - -#if (!defined(RWPEXIT)) -#define RWPEXIT(_func) /* No-Op */ -#endif /* (!defined(RWPEXIT)) */ - -/**************************************************************************** - Includes - */ - -#include - -#include "rpplugin.h" - -/**************************************************************************** - Defines - */ - -#ifdef RWDEBUG - -#if (!(defined(RWDEBUGSTACKDEPTH))) -#define RWDEBUGSTACKDEPTH (RWSRCGLOBAL(debugStackDepth)) -#endif /* (!(defined(RWDEBUGSTACKDEPTH))) */ - -/* Message macros */ - -#ifdef RWTRACE - -/* Note RWTRACE should only be defined for internal builds. It should - * also only be used rarely. It will cause the generation of Trace - * messages for all functions. Not just those directly called from - * the application - */ - -#define RWAPIFUNCTION(function) \ -static const RwChar __dbFunctionName[] = function; \ -const RwInt32 startstackdepth = RWDEBUGSTACKDEPTH++; \ -RWPENTER(__dbFunctionName); \ -if (RWSRCGLOBAL(debugTrace)) \ -{ \ - RwDebugSendMessage(rwDEBUGTRACE, \ - __dbFunctionName, \ - _rwdbsprintf("Enter %s [Depth %d]", \ - (startstackdepth)?"SPI":"API", \ - (int)startstackdepth)); \ -} - -#define RWFUNCTION(function) RWAPIFUNCTION(function) - -#define RWRETURN(result) \ -do \ -{ \ - RwInt32 _validateStackDepth = --RWDEBUGSTACKDEPTH; \ - if (_validateStackDepth != startstackdepth) \ - { \ - RwDebugSendMessage(rwDEBUGERROR, \ - __dbFunctionName, \ - _rwdberrcommon(E_RW_DEBUGSTACK)); \ - RWDEBUGSTACKDEPTH = startstackdepth; \ - } \ - if (RWSRCGLOBAL(debugTrace)) \ - { \ - RwDebugSendMessage(rwDEBUGTRACE, \ - __dbFunctionName, RWSTRING("Exit")); \ - } \ - RWASSERTE(_validateStackDepth == startstackdepth); \ - RWPEXIT(__dbFunctionName); \ - return (result); \ -} \ -while (0) - -#define RWRETURNVOID() \ -do \ -{ \ - RwInt32 _validateStackDepth = --RWDEBUGSTACKDEPTH; \ - if (_validateStackDepth != startstackdepth) \ - { \ - RwDebugSendMessage(rwDEBUGERROR, \ - __dbFunctionName, \ - _rwdberrcommon (E_RW_DEBUGSTACK)); \ - RWDEBUGSTACKDEPTH = startstackdepth; \ - } \ - if (RWSRCGLOBAL(debugTrace)) \ - { \ - RwDebugSendMessage(rwDEBUGTRACE, \ - __dbFunctionName, RWSTRING("Exit")); \ - } \ - RWASSERTE(_validateStackDepth == startstackdepth); \ - RWPEXIT(__dbFunctionName); \ - return; \ -} \ -while(0) - -#else /* RWTRACE */ - -#define RWAPIFUNCTION(function) \ -static const RwChar __dbFunctionName[] = function; \ -const RwInt32 startstackdepth = RWDEBUGSTACKDEPTH++; \ -RWPENTER(__dbFunctionName); \ -if (RWSRCGLOBAL(debugTrace) && !startstackdepth) \ -{ \ - RwDebugSendMessage(rwDEBUGTRACE, \ - __dbFunctionName, RWSTRING("Enter")); \ -} - -#define RWFUNCTION(function) RWAPIFUNCTION(function) - -#define RWRETURN(result) \ -do \ -{ \ - RwInt32 _validateStackDepth = --RWDEBUGSTACKDEPTH; \ - if (_validateStackDepth != startstackdepth) \ - { \ - RwDebugSendMessage(rwDEBUGERROR, \ - __dbFunctionName, \ - _rwdberrcommon(E_RW_DEBUGSTACK)); \ - RWDEBUGSTACKDEPTH = startstackdepth; \ - } \ - if (RWSRCGLOBAL(debugTrace) && (!startstackdepth)) \ - { \ - RwDebugSendMessage(rwDEBUGTRACE, \ - __dbFunctionName, RWSTRING("Exit")); \ - } \ - RWASSERTE(_validateStackDepth == startstackdepth); \ - RWPEXIT(__dbFunctionName); \ - return (result); \ -} \ -while (0) - -#define RWRETURNVOID() \ -do \ -{ \ - RwInt32 _validateStackDepth = --RWDEBUGSTACKDEPTH; \ - if (_validateStackDepth != startstackdepth) \ - { \ - RwDebugSendMessage(rwDEBUGERROR, \ - __dbFunctionName, \ - _rwdberrcommon (E_RW_DEBUGSTACK)); \ - RWDEBUGSTACKDEPTH = startstackdepth; \ - } \ - if (RWSRCGLOBAL(debugTrace) && (!startstackdepth)) \ - { \ - RwDebugSendMessage(rwDEBUGTRACE, \ - __dbFunctionName, RWSTRING("Exit")); \ - } \ - RWASSERTE(_validateStackDepth == startstackdepth); \ - RWPEXIT(__dbFunctionName); \ - return; \ -} \ -while(0) - -#endif /* RWTRACE */ - -#define RWERROR(ecode) \ -do \ -{ \ - RwError _rwErrorCode; \ - \ - _rwErrorCode.pluginID = rwPLUGIN_ID; \ - _rwErrorCode.errorCode = _rwerror ecode; \ - \ - RwErrorSet(&_rwErrorCode); \ - \ - if (_rwErrorCode.errorCode & 0x80000000) \ - { \ - RwDebugSendMessage(rwDEBUGERROR, \ - __dbFunctionName, \ - _rwdberrcommon ecode); \ - } \ - else \ - { \ - RwDebugSendMessage(rwDEBUGERROR, \ - __dbFunctionName, \ - rwPLUGIN_ERRFUNC ecode); \ - } \ -} \ -while(0); - -#define RWMESSAGE(args) \ -do \ -{ \ - RwDebugSendMessage(rwDEBUGMESSAGE, \ - __dbFunctionName, \ - _rwdbsprintf args); \ -} \ -while (0) - -#define RWASSERT(condition) \ -do \ -{ \ - if (!(condition)) \ - { \ - RwDebugSendMessage(rwDEBUGASSERT, \ - __dbFunctionName, \ - RWSTRING(#condition)); \ - } \ - RWASSERTE(condition); \ -} \ -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) -#define RWRETURNVOID() return -#define RWERROR(errorcode) \ -do \ -{ \ - RwError _rwErrorCode; \ - \ - _rwErrorCode.pluginID = rwPLUGIN_ID; \ - _rwErrorCode.errorCode = _rwerror errorcode; \ - \ - RwErrorSet(&_rwErrorCode); \ -} \ -while (0) -#define RWFUNCTION(name) -#define RWAPIFUNCTION(name) -#define RWASSERT(condition) -#define RWASSERTM(condition, messageArgs) -#define RWMESSAGE(args) - -#endif - -#define RWVALIDATEDEBUGSTACKDEPTH() \ - RWASSERT(1 == (RWDEBUGSTACKDEPTH - startstackdepth)) - -/**************************************************************************** - Functions - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -RwChar *rwPLUGIN_ERRFUNC(RwInt32 code, ...); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* RWDEBUG_H */ diff --git a/sdk/rwsdk/include/d3d8/rpdmorph.h b/sdk/rwsdk/include/d3d8/rpdmorph.h deleted file mode 100644 index 89c51b31..00000000 --- a/sdk/rwsdk/include/d3d8/rpdmorph.h +++ /dev/null @@ -1,311 +0,0 @@ -/***************************************************************************** - * - * File : rpdmorph.h - * - * Abstract : DeltaMorph plugin for 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) 2000 Criterion Software Ltd. - * All Rights Reserved. - * - * RenderWare is a trademark of Canon Inc. - * - *****************************************************************************/ - -#ifndef RPDMORPH_H -#define RPDMORPH_H - -/** - * \defgroup rpdmorph RpDMorph - * \ingroup deltamorphing - * \file rpdmorph.h - * - * Delta Morphing Plugin for RenderWare Graphics. - */ - -/*===========================================================================* - *--- Include files ---------------------------------------------------------* - *===========================================================================*/ -#include -#include - -#include "rpdmorph.rpe" /* automatically generated header file */ - - -/*===========================================================================* - *--- Global Types ----------------------------------------------------------* - *===========================================================================*/ - -/** - * \ingroup rpdmorph - * \struct RpDMorphTarget - * Delta morph target object for defining a target for - * a base geometry. - * This should be considered an opaque type. - * Use the RpDMorphGeometry and RpDMorphTarget API - * functions to access. - */ -typedef struct RpDMorphTarget RpDMorphTarget; - -/** - * \ingroup rpdmorph - * \struct RpDMorphAnimation - * Contains frame sequences for animating delta - * morph target objects. - * This should be considered an opaque type. - * Use the RpDMorphAnimation API - * functions to access. - */ -typedef struct RpDMorphAnimation RpDMorphAnimation; - -#define rpDMORPHNULLFRAME ((RwUInt32)~0) - -/*===========================================================================* - *--- Global variables ------------------------------------------------------* - *===========================================================================*/ - -extern RwModuleInfo rpDMorphModule; - -/*===========================================================================* - *--- Plugin API Functions --------------------------------------------------* - *===========================================================================*/ -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/*--- DMorphPlugin functions ------------------------------------------------*/ -extern RwBool -RpDMorphPluginAttach( void ); - -/*--- DMorphGeometry functions ---------------------------------------------- - * - * These functios work on the DMorphGeometry level. - * Each DMorphGeometry has a list of DMorphTargets. - */ -extern RpGeometry * -RpDMorphGeometryCreateDMorphTargets( RpGeometry *geometry, - RwUInt32 number ); - -extern RpGeometry * -RpDMorphGeometryDestroyDMorphTargets( RpGeometry *geometry ); - -extern RpGeometry * -RpDMorphGeometryAddDMorphTarget( RpGeometry *geometry, - RwUInt32 index, - RwV3d *vertices, - RwV3d *normals, - RwRGBA *preLightColors, - RwTexCoords *texCoords, - RwUInt32 flags ); - -extern RpGeometry * -RpDMorphGeometryRemoveDMorphTarget( RpGeometry *geometry, - RwUInt32 index ); - -extern RpDMorphTarget * -RpDMorphGeometryGetDMorphTarget( const RpGeometry *geometry, - RwUInt32 index ); - -extern RwUInt32 -RpDMorphGeometryGetNumDMorphTargets( const RpGeometry *geometry ); - -extern RpGeometry * -RpDMorphGeometryTransformDMorphTargets( RpGeometry *geometry, - const RwMatrix *matrix ); - -/*--- DMorphTarget functions ------------------------------------------------ - * - * These functios work on the DMorphGeometry level. - * Each DMorphGeometry has a list of DMorphTargets. - */ - -extern const RwSphere * -RpDMorphTargetGetBoundingSphere( const RpDMorphTarget *dMorphTarget ); - -extern RpDMorphTarget * -RpDMorphTargetSetName( RpDMorphTarget *dMorphTarget, - RwChar *name ); - -extern RwChar * -RpDMorphTargetGetName( RpDMorphTarget *dMorphTarget ); - -extern RpGeometryFlag -RpDMorphTargetGetFlags( RpDMorphTarget *dMorphTarget ); - - -/*--- ANIMATION SYSTEM ------------------------------------------------------ - */ - -/*--- DMorphAtomic functions ------------------------------------------------ - * - * These functions work at the DMorphAtomic level. - */ -extern RpAtomic * -RpDMorphAtomicInitialize( RpAtomic *atomic ); - -extern RwReal * -RpDMorphAtomicGetDMorphValues( RpAtomic *atomic ); - -extern RpAtomic * -RpDMorphAtomicSetAnimation( RpAtomic *atomic, - RpDMorphAnimation *animation ); - -extern RpDMorphAnimation * -RpDMorphAtomicGetAnimation( const RpAtomic *atomic ); - -extern RpAtomic * -RpDMorphAtomicAddTime( RpAtomic *atomic, - RwReal time ); - -extern RwReal -RpDMorphAtomicGetAnimTime( const RpAtomic *atomic ); - -extern RpAtomic * -RpDMorphAtomicSetAnimLoopCallBack( RpAtomic *atomic, - RpAtomicCallBack callBack, - void *data ); - -extern RpAtomicCallBack -RpDMorphAtomicGetAnimLoopCallBack( const RpAtomic *atomic, - void **callBackData ); - -extern RpAtomic * -RpDMorphAtomicSetAnimFrame( RpAtomic *atomic, - RwUInt32 dMorphTargetIndex, - RwUInt32 index ); - -extern RwUInt32 -RpDMorphAtomicGetAnimFrame( const RpAtomic *atomic, - RwUInt32 dMorphTargetIndex ); - - -extern RpAtomic * -RpDMorphAtomicSetAnimFrameTime( RpAtomic *atomic, - RwUInt32 dMorphTargetIndex, - RwReal time ); - -extern RwReal -RpDMorphAtomicGetAnimFrameTime( const RpAtomic *atomic, - RwUInt32 dMorphTargetIndex ); - -/*--- Animation Functions -------------------------------------------------- - */ -extern RpDMorphAnimation * -RpDMorphAnimationCreate(RwUInt32 numDMorphTargets); - -extern RpDMorphAnimation * -RpDMorphAnimationDestroy(RpDMorphAnimation *anim); - -extern RwUInt32 -RpDMorphAnimationGetNumDMorphTargets(RpDMorphAnimation *animation); - -/* Animation Frames */ -extern RpDMorphAnimation * -RpDMorphAnimationCreateFrames(RpDMorphAnimation *anim, - RwUInt32 dMorphTargetIndex, - RwUInt32 numFrames); - -extern RpDMorphAnimation * -RpDMorphAnimationDestroyFrames(RpDMorphAnimation *anim, - RwUInt32 dMorphTargetIndex); - -extern RwUInt32 -RpDMorphAnimationGetNumFrames(RpDMorphAnimation *animation, - RwUInt32 dMorphTargetIndex); - -/* Stream I/O */ -extern RpDMorphAnimation * -RpDMorphAnimationStreamRead(RwStream *stream); - -extern RpDMorphAnimation * -RpDMorphAnimationStreamWrite(RpDMorphAnimation *animation, - RwStream *stream); - -extern RwUInt32 -RpDMorphAnimationStreamGetSize(RpDMorphAnimation *animation); - -extern RpDMorphAnimation * -RpDMorphAnimationRead(const RwChar *filename); - -extern RpDMorphAnimation * -RpDMorphAnimationWrite(RpDMorphAnimation *animation, const RwChar *filename); - -/*--- Animation Frame Functions -------------------------------------------- - * - * These functions work on the DMorphAnimationFrame level. - * Each Frame can have a reference to the next Frame for the - * DMorphTarget. - */ -extern RpDMorphAnimation * -RpDMorphAnimationFrameSetNext(RpDMorphAnimation *anim, - RwUInt32 dMorphTargetIndex, - RwUInt32 frameIndex, - RwUInt32 nextFrame ); - -extern RwUInt32 -RpDMorphAnimationFrameGetNext(RpDMorphAnimation *anim, - RwUInt32 dMorphTargetIndex, - RwUInt32 frameIndex ); - -extern RpDMorphAnimation * -RpDMorphAnimationFrameSet(RpDMorphAnimation *anim, - RwUInt32 dMorphTargetIndex, - RwUInt32 frameIndex, - RwReal startValue, - RwReal endValue, - RwReal duration, - RwUInt32 nextFrame ); - -extern RpDMorphAnimation * -RpDMorphAnimationFrameSetStartValue(RpDMorphAnimation *anim, - RwUInt32 dMorphTargetIndex, - RwUInt32 frameIndex, - RwReal startValue ); - -extern RwReal -RpDMorphAnimationFrameGetStartValue(RpDMorphAnimation *anim, - RwUInt32 dMorphTargetIndex, - RwUInt32 frameIndex ); - -extern RpDMorphAnimation * -RpDMorphAnimationFrameSetEndValue(RpDMorphAnimation *anim, - RwUInt32 dMorphTargetIndex, - RwUInt32 frameIndex, - RwReal endValue ); - -extern RwReal -RpDMorphAnimationFrameGetEndValue(RpDMorphAnimation *anim, - RwUInt32 dMorphTargetIndex, - RwUInt32 frameIndex ); - -extern RpDMorphAnimation * -RpDMorphAnimationFrameSetDuration(RpDMorphAnimation *anim, - RwUInt32 dMorphTargetIndex, - RwUInt32 frameIndex, - RwReal duration ); - -extern RwReal -RpDMorphAnimationFrameGetDuration(RpDMorphAnimation *anim, - RwUInt32 dMorphTargetIndex, - RwUInt32 frameIndex ); - -/*--------------------------------------------------------------------------*/ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* RPDMORPH_H */ - diff --git a/sdk/rwsdk/include/d3d8/rpdmorph.rpe b/sdk/rwsdk/include/d3d8/rpdmorph.rpe deleted file mode 100644 index b35acc4e..00000000 --- a/sdk/rwsdk/include/d3d8/rpdmorph.rpe +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionDMorph -{ - - - - e_rwdb_CriterionDMorphLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionDMorph e_rwdb_CriterionDMorph; - - diff --git a/sdk/rwsdk/include/d3d8/rperror.h b/sdk/rwsdk/include/d3d8/rperror.h deleted file mode 100644 index 2a8c5630..00000000 --- a/sdk/rwsdk/include/d3d8/rperror.h +++ /dev/null @@ -1,32 +0,0 @@ -/*************************************************************************** - * * - * Module : rperror.h * - * * - * Purpose : Used to generate error codes * - * * - **************************************************************************/ - -#ifndef RPERROR_H -#define RPERROR_H - -/**************************************************************************** - Includes - */ - -#include "rpplugin.h" - -/**************************************************************************** - Defines - */ - -#define RWECODE(a,b) a, - -enum rwPLUGIN_ERRENUM -{ -#include "rperror.def" - rwPLUGIN_ERRENUMLAST = RWFORCEENUMSIZEINT -}; - -typedef enum rwPLUGIN_ERRENUM rwPLUGIN_ERRENUM; - -#endif /* RPERROR_H */ diff --git a/sdk/rwsdk/include/d3d8/rphanim.h b/sdk/rwsdk/include/d3d8/rphanim.h deleted file mode 100644 index 0d1bba7a..00000000 --- a/sdk/rwsdk/include/d3d8/rphanim.h +++ /dev/null @@ -1,641 +0,0 @@ -/****************************************** - * * - * RenderWare(TM) Graphics Library * - * * - ******************************************/ - -/* - * 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. and Canon Inc. 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. - */ - -/*************************************************************************** - * * - * Module : rpanim.h * - * * - * Purpose : Hierarchical animation * - * * - **************************************************************************/ -#ifndef RPHANIM_H -#define RPHANIM_H - -/** - * Hierarchal animation plugin - */ - -/* Doxygen plugin groups. */ - -/** - * \defgroup rphanim RpHAnim - * \ingroup objectframehanim - * - * Hierarchical Animation Plugin for RenderWare Graphics. - */ - -/** - * \defgroup rphanimchanges RpHAnim Changes - * \ingroup rphanim - * - */ - -/**************************************************************************** - Includes - */ - -#include -#include -#include - -#include -#include - -#include /* Note: each vendor can choose their own method for - * allocation of unique ID's. This file defines - * the ID's used by Criterion. - */ -#include /* automatically generated header file */ -#include -#include - -#define rpHANIMSTREAMCURRENTVERSION 0x100 - -#if (!defined(DOXYGEN)) - -typedef struct RpHAnimAtomicGlobalVars RpHAnimAtomicGlobalVars; - -struct RpHAnimAtomicGlobalVars -{ - RwInt32 engineOffset; - RwFreeList *HAnimFreeList; -}; - -#endif /* (!defined(DOXYGEN)) */ - -#define rpHANIMSTDKEYFRAMESIZE sizeof(RpHAnimKeyFrame) -#define rpHANIMSTDKEYFRAMETYPEID 0x1 - -#define RpV3dInterpolate(o,a,s,b) \ -MACRO_START \ -{ \ - (o)->x = (((a)->x) + ((s)) * (((b)->x) - ((a)->x))); \ - (o)->y = (((a)->y) + ((s)) * (((b)->y) - ((a)->y))); \ - (o)->z = (((a)->z) + ((s)) * (((b)->z) - ((a)->z))); \ -} \ -MACRO_STOP - - -/** - * \ingroup rphanim - * \ref RpHAnimKeyFrame - * typedef for struct RpHAnimKeyFrame. Based on \ref RtAnimKeyFrameHeader. - */ -typedef struct RpHAnimKeyFrame RpHAnimKeyFrame; - -/** - * \ingroup rphanim - * \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 RpHAnimKeyFrame -{ - 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 RpHAnimInterpFrame - * typedef for struct RpHAnimInterpFrame. Based on \ref RtAnimInterpFrameHeader. - */ -typedef struct RpHAnimInterpFrame RpHAnimInterpFrame; - -/** - * \ingroup rphanim - * \struct RpHAnimInterpFrame - * A structure representing an interpolated keyframe. The initial part of the - * structure matches \ref RtAnimInterpFrameHeader. - */ -struct RpHAnimInterpFrame -{ - 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 RpHAnimHierarchy typedef for struct RpHAnimHierarchy - */ -typedef struct RpHAnimHierarchy RpHAnimHierarchy; - -/* Flags for FrameInfos */ - -#define rpHANIMPOPPARENTMATRIX 0x01 -#define rpHANIMPUSHPARENTMATRIX 0x02 - -/** - * \ingroup rphanim - * \ref RpHAnimNodeInfo - * typedef for struct RpHAnimNodeInfo - */ -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 flags; /**< Matrix push/pop flags */ - RwFrame * pFrame; /**< Pointer to an attached RwFrame (see \ref RpHAnimHierarchyAttach) */ -}; - -/** - * \ingroup rphanim - * \ref RpHAnimHierarchyFlag defines type and update modes in HAnimHierarchies - */ -enum RpHAnimHierarchyFlag -{ - /* creation flags */ - rpHANIMHIERARCHYSUBHIERARCHY = 0x01, /**< This hierarchy is a sub-hierarchy */ - rpHANIMHIERARCHYNOMATRICES = 0x02, /**< This hierarchy has no local matrices */ - - /* update flags */ - rpHANIMHIERARCHYUPDATEMODELLINGMATRICES = 0x1000, /**< This hierarchy updates modeling matrices */ - rpHANIMHIERARCHYUPDATELTMS = 0x2000, /**< This hierarchy updates LTMs */ - rpHANIMHIERARCHYLOCALSPACEMATRICES = 0x4000, /**< This hierarchy calculates matrices in a space - relative to its root */ - - rpHANIMHIERARCHYFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; - -/* - * These flags are used to control the creation and - * update status of the hierarchy - */ -typedef enum RpHAnimHierarchyFlag RpHAnimHierarchyFlag; - -/** - * \ingroup rphanim - * \struct RpHAnimHierarchy - * An RpHAnimHierarchy is used to "play back" an animation. - * - * The structure of a hierarchy is defined by an array - * of \ref RpHAnimNodeInfo structures. - * - * The hierarchy is defined by running through the node array in order, - * pushing the parent-node's matrix whenever a child is reached that has - * more than one sibling, and popping the parent matrix when a "leaf" - * node is encountered. - * - */ -struct RpHAnimHierarchy -{ - RwInt32 flags; /**< Flags for the hierarchy */ - RwInt32 numNodes; /**< Number of nodes in the hierarchy */ - - 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 */ - RpHAnimHierarchy *parentHierarchy; /**< Internal use */ - RwInt32 rootParentOffset; /**< Internal use */ - - RtAnimInterpolator *currentAnim; /**< Internal use */ -}; - -/** - * \ingroup rphanim - * \ref RpHAnimFrameExtension typedef for struct RpHAnimFrameExtension - */ - -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) */ - RpHAnimHierarchy *hierarchy; /**< Pointer to Animation hierarchy attached to this RwFrame */ -}; - -/*--- Plugin API Functions ---*/ - -#define RpHAnimHierarchySetFlagsMacro(hierarchy,_flags) \ -MACRO_START \ -{ \ - (hierarchy)->flags = _flags; \ -} \ -MACRO_STOP - -#define RpHAnimHierarchyGetFlagsMacro(hierarchy) \ - ((hierarchy)->flags) - -#define RpHAnimKeyFrameToMatrixMacro(_matrix,_voidIFrame) \ -MACRO_START \ -{ \ - RpHAnimInterpFrame * iFrame = (RpHAnimInterpFrame *)(_voidIFrame); \ - \ - /* \ - * RpHAnim uses the same types of quaternion as RtQuat \ - * hence no conjugate call as in RpSkin \ - */ \ - \ - RtQuatUnitConvertToMatrix(&iFrame->q,(_matrix)); \ - \ - (_matrix)->pos.x = iFrame->t.x; \ - (_matrix)->pos.y = iFrame->t.y; \ - (_matrix)->pos.z = iFrame->t.z; \ -} \ -MACRO_STOP - - - -#if (! defined(RWDEBUG)) - -#define RpHAnimHierarchySetFlags(hierarchy,_flags) \ - RpHAnimHierarchySetFlagsMacro(hierarchy,_flags) - -#define RpHAnimHierarchyGetFlags(hierarchy) \ - (RpHAnimHierarchyFlag)RpHAnimHierarchyGetFlagsMacro(hierarchy) -#endif /* (! defined(RWDEBUG)) */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RpHAnimAtomicGlobalVars RpHAnimAtomicGlobals; - -#if (defined(RWDEBUG)) - -extern RpHAnimHierarchy * -RpHAnimHierarchySetFlags(RpHAnimHierarchy *hierarchy, - RpHAnimHierarchyFlag flags); - -extern RpHAnimHierarchyFlag -RpHAnimHierarchyGetFlags(RpHAnimHierarchy *hierarchy); - -#endif /* (defined(RWDEBUG)) */ - -/* Animation hierarchy creation */ -extern void -RpHAnimHierarchySetFreeListCreateParams(RwInt32 blockSize,RwInt32 numBlocksToPrealloc); - -extern RpHAnimHierarchy * -RpHAnimHierarchyCreate(RwInt32 numNodes, - RwUInt32 *nodeFlags, - RwInt32 *nodeIDs, - RpHAnimHierarchyFlag flags, - RwInt32 maxKeyFrameSize); - -extern RpHAnimHierarchy * -RpHAnimHierarchyCreateFromHierarchy(RpHAnimHierarchy *hierarchy, - RpHAnimHierarchyFlag flags, - RwInt32 maxKeyFrameSize); - -extern RpHAnimHierarchy * -RpHAnimHierarchyDestroy(RpHAnimHierarchy *hierarchy); - -extern RpHAnimHierarchy * -RpHAnimHierarchyCreateSubHierarchy(RpHAnimHierarchy *parentHierarchy, - RwInt32 startNode, - RpHAnimHierarchyFlag flags, - RwInt32 maxKeyFrameSize); - -extern RpHAnimHierarchy * -RpHAnimHierarchyAttach(RpHAnimHierarchy *hierarchy); - -extern RpHAnimHierarchy * -RpHAnimHierarchyDetach(RpHAnimHierarchy *hierarchy); - -extern RpHAnimHierarchy * -RpHAnimHierarchyAttachFrameIndex(RpHAnimHierarchy *hierarchy, - RwInt32 nodeIndex); - -extern RpHAnimHierarchy * -RpHAnimHierarchyDetachFrameIndex(RpHAnimHierarchy *hierarchy, - RwInt32 nodeIndex); - -extern RwBool -RpHAnimFrameSetHierarchy(RwFrame *frame, - RpHAnimHierarchy *hierarchy); - -extern RpHAnimHierarchy * -RpHAnimFrameGetHierarchy(RwFrame *frame); - -/* Macros for legacy support of old function names */ -#define RpHAnimSetHierarchy(frame,hierarchy) \ - RpHAnimFrameSetHierarchy(frame,hierarchy) -#define RpHAnimGetHierarchy(frame) RpHAnimFrameGetHierarchy(frame) - -extern RwMatrix * -RpHAnimHierarchyGetMatrixArray(RpHAnimHierarchy *hierarchy); - -extern RwBool -RpHAnimHierarchyUpdateMatrices(RpHAnimHierarchy *hierarchy); - -/* Macro for legacy support of old function name */ -#define RpHAnimUpdateHierarchyMatrices RpHAnimHierarchyUpdateMatrices - -extern RwInt32 -RpHAnimIDGetIndex(RpHAnimHierarchy *hierarchy, - RwInt32 ID); - -/* Plugin support */ - -extern RwBool -RpHAnimPluginAttach(void); - -/* Hanim keyframe functions */ - -extern void -RpHAnimKeyFrameApply(void *matrix, - void *voidIFrame); - -extern void -RpHAnimKeyFrameBlend(void *voidOut, - void *voidIn1, - void *voidIn2, - RwReal alpha); - -extern void -RpHAnimKeyFrameInterpolate(void *voidOut, - void *voidIn1, - void *voidIn2, - RwReal time); - -extern void -RpHAnimKeyFrameAdd(void *voidOut, - void *voidIn1, - void *voidIn2); - -extern void -RpHAnimKeyFrameMulRecip(void *voidFrame, - void *voidStart); - -extern RtAnimAnimation * -RpHAnimKeyFrameStreamRead(RwStream *stream, - RtAnimAnimation *animation); - -extern RwBool -RpHAnimKeyFrameStreamWrite(RtAnimAnimation *animation, - RwStream *stream); - -extern RwInt32 -RpHAnimKeyFrameStreamGetSize(RtAnimAnimation *animation); - -/* Access to RwFrame ID's */ - -extern RwBool -RpHAnimFrameSetID(RwFrame *frame, - RwInt32 id); - -extern RwInt32 -RpHAnimFrameGetID(RwFrame *frame); - -/* - * Utility Functions - */ -#define RpHAnimHierarchySetCurrentAnimMacro(hierarchy,anim)\ - RtAnimInterpolatorSetCurrentAnim((hierarchy)->currentAnim,anim) - -#define RpHAnimHierarchyGetCurrentAnimMacro(hierarchy)\ - RtAnimInterpolatorGetCurrentAnim((hierarchy)->currentAnim) - -#define RpHAnimHierarchySetCurrentAnimTimeMacro(hierarchy,time)\ - RtAnimInterpolatorSetCurrentTime((hierarchy)->currentAnim,time) - -#define RpHAnimHierarchyAddAnimTimeMacro(hierarchy,time)\ - RtAnimInterpolatorAddAnimTime((hierarchy)->currentAnim,time) - -#define RpHAnimHierarchySubAnimTimeMacro(hierarchy,time)\ - RtAnimInterpolatorSubAnimTime((hierarchy)->currentAnim,time) - -#define RpHAnimHierarchySetKeyFrameCallBacksMacro(hierarchy,keyFrameTypeID) \ - RtAnimInterpolatorSetKeyFrameCallBacks((hierarchy)->currentAnim,\ - keyFrameTypeID) - -#define RpHAnimHierarchyBlendMacro(outHierarchy,inHierarchy1,inHierarchy2,alpha)\ - RtAnimInterpolatorBlend((outHierarchy)->currentAnim,\ - (inHierarchy1)->currentAnim,\ - (inHierarchy2)->currentAnim,\ - alpha) - -#define RpHAnimHierarchyAddTogetherMacro(outHierarchy,inHierarchy1,inHierarchy2)\ - RtAnimInterpolatorAddTogether((outHierarchy)->currentAnim,\ - (inHierarchy1)->currentAnim,\ - (inHierarchy2)->currentAnim) - - -#define RpHAnimHierarchySetAnimCallBackMacro(hierarchy,callBack,time,data)\ - RtAnimInterpolatorSetAnimCallBack((hierarchy)->currentAnim,callBack,time,data) - -#define RpHAnimHierarchySetAnimLoopCallBackMacro(hierarchy,callBack,data)\ - RtAnimInterpolatorSetAnimLoopCallBack((hierarchy)->currentAnim,callBack,data) - -#define RpHAnimHierarchyBlendSubHierarchyMacro(outHierarchy,inHierarchy1,inHierarchy2,alpha)\ - RtAnimInterpolatorBlendSubInterpolator((outHierarchy)->currentAnim,(inHierarchy1)->currentAnim,(inHierarchy2)->currentAnim,alpha) - -#define RpHAnimHierarchyAddSubHierarchyMacro(outHierarchy,mainHierarchy,subHierarchy)\ - RtAnimInterpolatorAddSubInterpolator((outHierarchy)->currentAnim,(mainHierarchy)->currentAnim,(subHierarchy)->currentAnim) - -#define RpHAnimHierarchyCopyMacro(outHierarchy,inHierarchy)\ - RtAnimInterpolatorCopy((outHierarchy)->currentAnim,(inHierarchy)->currentAnim) - - - -#ifdef RWDEBUG -extern RwBool -RpHAnimHierarchySetCurrentAnim(RpHAnimHierarchy *hierarchy, - RtAnimAnimation *anim); - -extern RtAnimAnimation * -RpHAnimHierarchyGetCurrentAnim(RpHAnimHierarchy *hierarchy); - -extern RwBool -RpHAnimHierarchySetCurrentAnimTime(RpHAnimHierarchy *hierarchy, - RwReal time); - -extern RwBool -RpHAnimHierarchyAddAnimTime(RpHAnimHierarchy *hierarchy, - RwReal time); - -extern RwBool -RpHAnimHierarchySubAnimTime(RpHAnimHierarchy *hierarchy, - RwReal time); - -extern RwBool -RpHAnimHierarchySetKeyFrameCallBacks(RpHAnimHierarchy *hierarchy, - RwInt32 keyFrameTypeID); - -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); -extern RwBool -RpHAnimHierarchyAddSubHierarchy(RpHAnimHierarchy *outHierarchy, - RpHAnimHierarchy *mainHierarchy1, - RpHAnimHierarchy *subHierarchy2); -extern RwBool -RpHAnimHierarchyCopy(RpHAnimHierarchy *outHierarchy, - RpHAnimHierarchy *inHierarchy); - -#else - -#define RpHAnimHierarchySetCurrentAnim(hierarchy,anim) \ - RpHAnimHierarchySetCurrentAnimMacro((hierarchy),(anim)) - -#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/sdk/rwsdk/include/d3d8/rphanim.rpe b/sdk/rwsdk/include/d3d8/rphanim.rpe deleted file mode 100644 index 1c05d0e9..00000000 --- a/sdk/rwsdk/include/d3d8/rphanim.rpe +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionHANIM -{ - - - - e_rwdb_CriterionHANIMLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionHANIM e_rwdb_CriterionHANIM; - - diff --git a/sdk/rwsdk/include/d3d8/rplodatm.h b/sdk/rwsdk/include/d3d8/rplodatm.h deleted file mode 100644 index 4e9c8648..00000000 --- a/sdk/rwsdk/include/d3d8/rplodatm.h +++ /dev/null @@ -1,134 +0,0 @@ - -/****************************************** - * * - * RenderWare(TM) Graphics Library * - * * - ******************************************/ - -/* - * 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. and Canon Inc. 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. - */ - -/*************************************************************************** - * * - * Module : rplodatm.h * - * * - * Purpose : LODATM Geometry * - * * - **************************************************************************/ - -#ifndef RPLODATM_H -#define RPLODATM_H - - -/** - * \defgroup rplodatm RpLODAtomic - * \ingroup scenemanagement - * - * Level of Detail Management Plugin for RenderWare Graphics. - */ - -/**************************************************************************** - Includes - */ - -#include "rwcore.h" -#include "rpworld.h" - -#include "rpcriter.h" /* Note: each vendor can choose their own method for - * allocation of unique ID's. This file defines - * the ID's used by Criterion. - */ -#include "rplodatm.rpe" /* automatically generated header file */ - -/**************************************************************************** - Defines - */ -#define RPLODATOMICMAXLOD 10 - - -/**************************************************************************** - Type defs - */ -typedef RwInt32 (*RpLODAtomicLODCallBack)( RpAtomic *atomic ); - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - extern void - RpLODAtomicCacheSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); - - extern RwBool - RpLODAtomicPluginAttach( void ); - - extern RpAtomic * - RpLODAtomicSetGeometry( - RpAtomic *atomic, RwInt32 lodIdx, RpGeometry *geometry ); - - extern RpGeometry * - RpLODAtomicGetGeometry( - RpAtomic *atomic, RwInt32 lodIdx ); - - extern RpAtomic * - RpLODAtomicSetCurrentLOD( - RpAtomic *atomic, RwInt32 lodIdx ); - - extern RwInt32 - RpLODAtomicGetCurrentLOD( - RpAtomic *atomic ); - - extern RpAtomic * - RpLODAtomicSetRange( - RpAtomic *atomic, RwReal farRange ); - - extern RwReal - RpLODAtomicGetRange( - RpAtomic *atomic ); - - extern void - RpLODAtomicSetCamera( - RwCamera *camera ); - - extern RpAtomic * - RpLODAtomicSetLODCallBack( - RpAtomic *atomic, RpLODAtomicLODCallBack callback ); - - extern RpAtomic * - RpLODAtomicSelectLOD( - RpAtomic *atomic ); - - extern RpAtomic * - RpLODAtomicForAllLODGeometries( - RpAtomic *atomic, RpGeometryCallBack callback, void *pData ); - - extern RpAtomic * - RpLODAtomicHookRender( - RpAtomic *atomic ); - - extern RpAtomic * - RpLODAtomicUnHookRender( - RpAtomic *atomic ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* RPLODATM_H */ - diff --git a/sdk/rwsdk/include/d3d8/rplodatm.rpe b/sdk/rwsdk/include/d3d8/rplodatm.rpe deleted file mode 100644 index a5764cfc..00000000 --- a/sdk/rwsdk/include/d3d8/rplodatm.rpe +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionLODATM -{ - - - - e_rwdb_CriterionLODATMLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionLODATM e_rwdb_CriterionLODATM; - - diff --git a/sdk/rwsdk/include/d3d8/rplogo.h b/sdk/rwsdk/include/d3d8/rplogo.h deleted file mode 100644 index a46823ac..00000000 --- a/sdk/rwsdk/include/d3d8/rplogo.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Logo plugin - */ - - -/********************************************************************** - * - * File : rplogo.h - * - * Abstract : Add CSL Logo - * - ********************************************************************** - * - * 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 RPLOGO_H -#define RPLOGO_H - -/** - * \defgroup rplogo RpLogo - * \ingroup 2dtools - * - * Logo Plugin for RenderWare Graphics. - */ - -/*--- Include files ---*/ -#include "rwcore.h" - -#include "rplogo.rpe" /* automatically generated header file */ - -/*--- Global Structures ---*/ - -enum RpLogoPosition -{ - rpNALOGOPOSITION = 0, - rpLOGOTOP, - rpLOGOCENTER, - rpLOGOBOTTOM, - rpLOGOLEFT, - rpLOGORIGHT, - rpLOGOTOPLEFT, - rpLOGOTOPRIGHT, - rpLOGOBOTTOMLEFT, - rpLOGOBOTTOMRIGHT, - rpLOGOPOSITIONFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; -typedef enum RpLogoPosition RpLogoPosition; - -/*--- Plugin API Functions ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - RwBool RpLogoPluginAttach(void); - RwBool RpLogoSetPosition(RpLogoPosition pos); - RpLogoPosition RpLogoGetPosition(void); - RwBool RpLogoSetState(RwCamera * cam, RwBool state); - RwBool RpLogoGetState(RwCamera * cam); - RwRect *RpLogoGetRenderingRect(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* RPLOGO_H */ - diff --git a/sdk/rwsdk/include/d3d8/rplogo.rpe b/sdk/rwsdk/include/d3d8/rplogo.rpe deleted file mode 100644 index a7f66565..00000000 --- a/sdk/rwsdk/include/d3d8/rplogo.rpe +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionLogo -{ - - - - e_rwdb_CriterionLogoLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionLogo e_rwdb_CriterionLogo; - - diff --git a/sdk/rwsdk/include/d3d8/rpltmap.h b/sdk/rwsdk/include/d3d8/rpltmap.h deleted file mode 100644 index 18c91955..00000000 --- a/sdk/rwsdk/include/d3d8/rpltmap.h +++ /dev/null @@ -1,99 +0,0 @@ - -/** - * \defgroup rpltmap RpLtMap - * \ingroup lighting - * - * Lightmap Plugin for RenderWare Graphics. - */ - -#ifndef RPLTMAP_H -#define RPLTMAP_H - -/*===========================================================================* - *--- Includes --------------------------------------------------------------* - *===========================================================================*/ - -#include "rwcore.h" -#include "rpworld.h" - - -/* Used during lightmap illumination (sliver triangles are skipped - * (their texels should be filled by dilate()), because their normals - * can't be accurately calculated) */ -#define rpLTMAPDEFAULTSLIVERAREATHRESHOLD (0.001f) - -/* Used during lightmap UV calculation (polySets may be - * joined on the basis of vertices with equal positions) */ -#define rpLTMAPDEFAULTVERTEXWELDTHRESHOLD (0.1f) - -#define rpLTMAPDEFAULTLIGHTMAPSIZE 128 -#define rpLTMAPMINLIGHTMAPSIZE 16 -#define rpLTMAPMAXLIGHTMAPSIZE 512/*?? any better way of determining this ??*/ - -#define rpLTMAPMAXPREFIXSTRINGLENGTH 4 - -#define rpLTMAPDEFAULTMAXAREALIGHTSAMPLESPERMESH 256 -/* The default tolerance for errors induced by area light ROIs is 1 - * (being the smallest difference in lightmap colour values) */ -#define rpLTMAPDEFAULTAREALIGHTROICUTOFF (1.0f) - - -/** - * \ingroup rpltmap - * \ref RpLtMapStyle - * Flags specifying the rendering style of the lightmap plugin. - * - * \see RpLtMapGetRenderStyle - * \see RpLtMapSetRenderStyle - */ -enum RpLtMapStyle -{ - rpLTMAPSTYLENASTYLE = 0x0, - - rpLTMAPSTYLERENDERBASE = 0x1, /**< The base texture should be rendered */ - rpLTMAPSTYLERENDERLIGHTMAP = 0x2, /**< The lightmap should be rendered */ - rpLTMAPSTYLEPOINTSAMPLE = 0x4, /**< The lightmap should be point-sampled */ - - rpLTMAPSTYLEFORCEENUMSIZEINT = 0x7FFFFFFF -}; -typedef enum RpLtMapStyle RpLtMapStyle; - - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -extern RwBool -RpLtMapPluginAttach(void); - -extern RxPipeline * -RpLtMapGetPlatformAtomicPipeline(void); -extern RxPipeline * -RpLtMapGetPlatformWorldSectorPipeline(void); - -extern RwBool -RpLtMapSetRenderStyle(RpLtMapStyle style, RpWorld *world); -extern RpLtMapStyle -RpLtMapGetRenderStyle(void); - -extern RwUInt32 -RpLtMapWorldLightMapsQuery(RpWorld *world); - -extern RwTexture * -RpLtMapWorldSectorGetLightMap(RpWorldSector *sector); -extern RpWorldSector * -RpLtMapWorldSectorSetLightMap(RpWorldSector *sector, RwTexture *lightMap); -extern RwTexture * -RpLtMapAtomicGetLightMap(RpAtomic *atomic); -extern RpAtomic * -RpLtMapAtomicSetLightMap(RpAtomic *atomic, RwTexture *lightMap); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* RPLTMAP_H */ - - diff --git a/sdk/rwsdk/include/d3d8/rpltmap.rpe b/sdk/rwsdk/include/d3d8/rpltmap.rpe deleted file mode 100644 index 6e58b62b..00000000 --- a/sdk/rwsdk/include/d3d8/rpltmap.rpe +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionLTMAP -{ - - - - e_rwdb_CriterionLTMAPLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionLTMAP e_rwdb_CriterionLTMAP; - - diff --git a/sdk/rwsdk/include/d3d8/rpmatfx.h b/sdk/rwsdk/include/d3d8/rpmatfx.h deleted file mode 100644 index fb7ade45..00000000 --- a/sdk/rwsdk/include/d3d8/rpmatfx.h +++ /dev/null @@ -1,241 +0,0 @@ - -#ifndef RPMATFX_H -#define RPMATFX_H - -/*===========================================================================* - *--- Include files ---------------------------------------------------------* - *===========================================================================*/ - -#include "rwcore.h" -#include "rpworld.h" - -/*---- start: ./matfx.h----*/ - -#ifndef RPMATFX_MATFX_H -#define RPMATFX_MATFX_H - - -/** - * \defgroup rpmatfx RpMatFX - * \ingroup materials - * - * Material Effects Plugin for RenderWare Graphics. - */ - -/*===========================================================================* - *--- Global Types ----------------------------------------------------------* - *===========================================================================*/ - -/** - * \ingroup rpmatfx - * RpMatFXMaterialFlags, this type represents the different types of - * material effects that can be used on a material. The effects are - * initialized with \ref RpMatFXMaterialSetEffects: - */ -enum RpMatFXMaterialFlags -{ - rpMATFXEFFECTNULL = 0, - rpMATFXEFFECTBUMPMAP = 1, /** - -#ifdef __cplusplus -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); -extern RwUInt32 RpMipmapKLTextureGetDefaultL(void); - -extern RwTexture *RpMipmapKLTextureSetK(RwTexture *tex, RwReal val); -extern RwTexture *RpMipmapKLTextureSetL(RwTexture *tex, RwUInt32 val); -extern RwReal RpMipmapKLTextureGetK(RwTexture *tex); -extern RwUInt32 RpMipmapKLTextureGetL(RwTexture *tex); - -extern RwBool RpMipmapKLPluginAttach(void); - -#endif /* (defined(SKY2_DRVMODEL_H)) || (defined(NULLSKY_DRVMODEL_H)) */ - -#ifdef __cplusplus -} -#endif - -#endif /* RPMIPMAPKLPLUGIN_H */ diff --git a/sdk/rwsdk/include/d3d8/rpmipkl.rpe b/sdk/rwsdk/include/d3d8/rpmipkl.rpe deleted file mode 100644 index 0464081f..00000000 --- a/sdk/rwsdk/include/d3d8/rpmipkl.rpe +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionLabel -{ - - - - e_rwdb_CriterionLabelLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionLabel e_rwdb_CriterionLabel; - - diff --git a/sdk/rwsdk/include/d3d8/rpmorph.h b/sdk/rwsdk/include/d3d8/rpmorph.h deleted file mode 100644 index 52ea70df..00000000 --- a/sdk/rwsdk/include/d3d8/rpmorph.h +++ /dev/null @@ -1,137 +0,0 @@ - -/******************************************/ -/* */ -/* RenderWare(TM) Graphics Library */ -/* */ -/******************************************/ - -/* - * 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. and Canon Inc. 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. - */ - - -/**************************************************************************** - * - * Morph animation controller - * Copyright (C) 1998 Criterion Technologies - * - * Module : rpmorph.h - * - * Purpose : Functions for controlling morph target animation - * - ****************************************************************************/ - -#ifndef RPMORPH_H -#define RPMORPH_H - - -/** - * \defgroup rpmorph RpMorph - * \ingroup morphing - * - * Morphing Plugin for RenderWare Graphics. - */ - -/**************************************************************************** - Includes - */ - -#include "rwcore.h" -#include "rpworld.h" - -#include "rpmorph.rpe" /* automatically generated header file */ - -/**************************************************************************** - Global Types - */ -typedef struct RpMorphInterpolator RpMorphInterpolator; - -/** - * \ingroup rpmorph - * \struct RpMorphInterpolator - * structure describing morph interpolator - */ -struct RpMorphInterpolator -{ - RwInt32 flags; /**< flags */ - RwInt16 startMorphTarget; /**< startMorphTarget */ - RwInt16 endMorphTarget; /**< endMorphTarget */ - RwReal time; /**< time */ - RwReal recipTime; /**< recipTime */ - RpMorphInterpolator *next; /**< next */ -}; - -/* Morph Animation */ - -/** - * \ingroup rpmorph - * 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, - * and the position of the current interpolator. - * The function will only be called when the position of the geometry's current - * interpolator moves out of the current range. - * - * \param atomic Pointer to the geometry's parent atomic. - * \param position Value of the current interpolator. - * - * \return - * - * \see RpMorphGeometrySetCallBack - * \see RpMorphGeometryGetCallBack - */ -typedef RwReal (*RpMorphGeometryCallBack)(RpAtomic *atomic, RwReal position); - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RwBool RpMorphPluginAttach(void); - -/* Morph Animation */ -extern RpGeometry *RpMorphGeometryCreateInterpolators(RpGeometry *geometry, RwInt32 numInterps); -extern RpGeometry *RpMorphGeometrySetInterpolator(RpGeometry *geometry, - RwInt32 interpNum, - RwInt32 startKey, RwInt32 endKey, RwReal time); -extern RpGeometry *RpMorphGeometrySetNextInterpolator(RpGeometry *geometry, - RwInt32 interpNum, RwInt32 interpNumNext); -extern RpGeometry *RpMorphGeometrySetCallBack(RpGeometry *geometry, RpMorphGeometryCallBack animCB); -extern RpMorphGeometryCallBack RpMorphGeometryGetCallBack(const RpGeometry *geometry); - -extern RpAtomic *RpMorphAtomicSetCurrentInterpolator(RpAtomic *atomic, RwInt32 interpNum); -extern RwInt32 RpMorphAtomicGetCurrentInterpolator(RpAtomic *atomic); - -extern RpMorphInterpolator *RpMorphGeometryGetInterpolator(RpGeometry *geometry, RwInt32 interpNum); - -extern RpAtomic *RpMorphAtomicSetTime(RpAtomic *atomic, RwReal time); -extern RpAtomic *RpMorphAtomicAddTime(RpAtomic *atomic, RwReal time); - - -/* LEGACY-SUPPORT version: */ -extern RpMorphInterpolator *_rpMorphAtomicGetInterpolator(RpAtomic *atomic, RwInt32 interpNum); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#define RpMorphAtomicGetInterpolator(_atomic, _interpNum) \ - _rpMorphAtomicGetInterpolator(_atomic, _interpNum) - -#endif /* RPMORPH_H */ - diff --git a/sdk/rwsdk/include/d3d8/rpmorph.rpe b/sdk/rwsdk/include/d3d8/rpmorph.rpe deleted file mode 100644 index 47834a81..00000000 --- a/sdk/rwsdk/include/d3d8/rpmorph.rpe +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionMorph -{ - - -E_RP_MORPH_INVALIDINTERP, - -E_RP_MORPH_NOGEOMETRY, - - e_rwdb_CriterionMorphLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionMorph e_rwdb_CriterionMorph; - - diff --git a/sdk/rwsdk/include/d3d8/rppatch.h b/sdk/rwsdk/include/d3d8/rppatch.h deleted file mode 100644 index 0b54fb1b..00000000 --- a/sdk/rwsdk/include/d3d8/rppatch.h +++ /dev/null @@ -1,695 +0,0 @@ - -#ifndef RPPATCH_H -#define RPPATCH_H - -/** - * \defgroup rppatch RpPatch - * \ingroup bezierpatches - * - * Bezier patch library - * - * This library provides efficient evaluation of patches. - */ - -/*===========================================================================* - *--- Include files ---------------------------------------------------------* - *===========================================================================*/ -#include "rwcore.h" -#include "rpworld.h" - -#include "rpcriter.h" -#include "rppatch.rpe" - -/*===========================================================================* - *--- Defines ---------------------------------------------------------------* - *===========================================================================*/ - -/** - * \ingroup rppatch - * \def rpQUADPATCHNUMCONTROLPOINTS defines the number of control points in - * a quadrilateral patch. - * - * \see RpQuadPatch - * \see rpQUADPATCHNUMCONTROLINDICES - * \see RpPatchMeshSetQuadPatch - */ -#define rpQUADPATCHNUMCONTROLPOINTS (16) - -/** - * \ingroup rppatch - * \def rpTRIPATCHNUMCONTROLPOINTS defines the number of control points in - * a triangular patch. - * - * \see RpTriPatch - * \see rpTRIPATCHNUMCONTROLINDICES - * \see RpPatchMeshSetTriPatch - */ -#define rpTRIPATCHNUMCONTROLPOINTS (10) - -/** - * \ingroup rppatch - * \def rpQUADPATCHNUMCONTROLINDICES defines the number of control point - * indices in a \ref RpQuadPatch quadrilateral patch. - * - * \see rpQUADPATCHNUMCONTROLPOINTS - * \see RpPatchMeshSetQuadPatch - */ -#define rpQUADPATCHNUMCONTROLINDICES rpQUADPATCHNUMCONTROLPOINTS - -/** - * \ingroup rppatch - * \def rpTRIPATCHNUMCONTROLINDICES defines the number of control points - * indices in a \ref RpTriPatch triangular patch. - * - * \see rpTRIPATCHNUMCONTROLPOINTS - * \see RpPatchMeshSetTriPatch - */ -#define rpTRIPATCHNUMCONTROLINDICES rpTRIPATCHNUMCONTROLPOINTS - -/** - * \ingroup rppatch - * \def rpPATCHLODMAXVALUE defines the maximum value that can be returned for - * the patch evaluation LOD. - * - * \see rpPATCHSKINLODMAXVALUE - * \see rpPATCHLODMINVALUE - * \see RpPatchLODCallBack - */ -#define rpPATCHLODMAXVALUE (20) - -/** - * \ingroup rppatch - * \def rpPATCHSKINLODMAXVALUE defines the maximum value that can be returned - * for the skinned patch evaluation LOD. - * - * \see rpPATCHLODMAXVALUE - * \see rpPATCHLODMINVALUE - * \see RpPatchLODCallBack - */ -#define rpPATCHSKINLODMAXVALUE (18) - -/** - * \ingroup rppatch - * \def rpPATCHLODMINVALUE defines the minimum value that can be returned for - * the patch evaluation LOD. - * - * \see rpPATCHSKINLODMAXVALUE - * \see rpPATCHLODMAXVALUE - * \see RpPatchLODCallBack - */ -#define rpPATCHLODMINVALUE (4) - -/** - * \ingroup rppatch - * \def rpPATCHMESHTEXCOORDSETS Multi texture coordinate format specifier - * for \ref RpPatchMeshCreate(). This should be OR'd into the - * \ref RpPatchMeshFlag . - */ -#define rpPATCHMESHTEXCOORDSETS(_num) \ - ((_num & 0xff) << 16) - -/** - * \ingroup rppatch - * \def rpPATCHMESHLOCKTEXCOORDSIDX - * Convenience macro for generating a texture coordinate lock flag. - */ -#define rpPATCHMESHLOCKTEXCOORDSIDX(_idx) \ - (rpPATCHMESHLOCKTEXCOORDS1 << (_idx)) - -/*===========================================================================* - *--- Global Types ----------------------------------------------------------* - *===========================================================================*/ - -/** - * \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(num) macro - * to specify the number of texture coordinate sets required. - * - * \see RpPatchMeshCreate - */ -enum RpPatchMeshFlag -{ - rpNAPATCHMESHFLAG = 0, - rpPATCHMESHPOSITIONS = 0x01, /**definition.flag) - -#define RpPatchMeshSetFlagsMacro(patchMesh, flags) \ - (patchMesh->definition.flag = flags) - -#define RpPatchMeshGetNumControlPointsMacro(patchMesh) \ - (patchMesh->definition.numControlPoints) - -#define RpPatchMeshGetNumTriPatchesMacro(patchMesh) \ - (patchMesh->definition.numTriPatches) - -#define RpPatchMeshGetNumQuadPatchesMacro(patchMesh) \ - (patchMesh->definition.numQuadPatches) - -#define RpPatchMeshGetNumTexCoordSetsMacro(patchMesh) \ - (patchMesh->definition.numTexCoordSets) - -#define RpPatchMeshGetPositionsMacro(patchMesh) \ - (patchMesh->positions) - -#define RpPatchMeshGetNormalsMacro(patchMesh) \ - (patchMesh->normals) - -#define RpPatchMeshGetPreLightColorsMacro(patchMesh) \ - (patchMesh->preLightColors) - -#define RpPatchMeshGetTexCoordsMacro(patchMesh, index) \ - (patchMesh->texCoords[index - 1]) -/*---------------------------------------------------------------------------*/ - -#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -/*---------------------------------------------------------------------------*/ -extern RwUInt32 -RpPatchMeshGetFlags( const RpPatchMesh *patchMesh ); - -extern RpPatchMesh * -RpPatchMeshSetFlags( RpPatchMesh *patchMesh, - RwUInt32 flags ); - -extern RwUInt32 -RpPatchMeshGetNumControlPoints( const RpPatchMesh *patchMesh ); - -extern RwUInt32 -RpPatchMeshGetNumTriPatches( const RpPatchMesh *patchMesh ); - -extern RwUInt32 -RpPatchMeshGetNumQuadPatches( const RpPatchMesh *patchMesh ); - -extern RwUInt32 -RpPatchMeshGetNumTexCoordSets( const RpPatchMesh *patchMesh ); - -extern RwV3d * -RpPatchMeshGetPositions( const RpPatchMesh *patchMesh ); - -extern RwV3d * -RpPatchMeshGetNormals( const RpPatchMesh *patchMesh ); - -extern RwRGBA * -RpPatchMeshGetPreLightColors( const RpPatchMesh *patchMesh ); - -extern RwTexCoords * -RpPatchMeshGetTexCoords( const RpPatchMesh *patchMesh, - RwTextureCoordinateIndex index ); -/*---------------------------------------------------------------------------*/ - -#else /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -/*---------------------------------------------------------------------------*/ -#define RpPatchMeshGetFlags(patchMesh) \ - RpPatchMeshGetFlagsMacro(patchMesh) - -#define RpPatchMeshSetFlags(patchMesh, flags) \ - RpPatchMeshSetFlagsMacro(patchMesh, flags) - -#define RpPatchMeshGetNumControlPoints(patchMesh) \ - RpPatchMeshGetNumControlPointsMacro(patchMesh) - -#define RpPatchMeshGetNumTriPatches(patchMesh) \ - RpPatchMeshGetNumTriPatchesMacro(patchMesh) - -#define RpPatchMeshGetNumQuadPatches(patchMesh) \ - RpPatchMeshGetNumQuadPatchesMacro(patchMesh) - -#define RpPatchMeshGetNumTexCoordSets(patchMesh) \ - RpPatchMeshGetNumTexCoordSetsMacro(patchMesh) - -#define RpPatchMeshGetPositions(patchMesh) \ - RpPatchMeshGetPositionsMacro(patchMesh) - -#define RpPatchMeshGetNormals(patchMesh) \ - RpPatchMeshGetNormalsMacro(patchMesh) - -#define RpPatchMeshGetPreLightColors(patchMesh) \ - RpPatchMeshGetPreLightColorsMacro(patchMesh) - -#define RpPatchMeshGetTexCoords(patchMesh, index) \ - RpPatchMeshGetTexCoordsMacro(patchMesh, index) -/*---------------------------------------------------------------------------*/ - -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -/*---------------------------------------------------------------------------* - *- Patch streaming functions -* - *---------------------------------------------------------------------------*/ -extern RwUInt32 -RpPatchMeshStreamGetSize( const RpPatchMesh *patchMesh ); - -extern RpPatchMesh * -RpPatchMeshStreamRead( RwStream *stream ); - -extern const RpPatchMesh * -RpPatchMeshStreamWrite( const RpPatchMesh *patchMesh, - RwStream *stream ); - -/*---------------------------------------------------------------------------* - *- Patch Mesh patch functions -* - *---------------------------------------------------------------------------*/ -extern RpPatchMesh * -RpPatchMeshSetQuadPatch( RpPatchMesh *patchMesh, - RwUInt32 quadIndex, - RpQuadPatch *quadPatch ); - -extern RpPatchMesh * -RpPatchMeshSetTriPatch( RpPatchMesh *patchMesh, - RwUInt32 triIndex, - RpTriPatch *triPatch ); - -extern const RpQuadPatch * -RpPatchMeshGetQuadPatch( const RpPatchMesh *patchMesh, - RwUInt32 quadIndex ); - -extern const RpTriPatch * -RpPatchMeshGetTriPatch( const RpPatchMesh *patchMesh, - RwUInt32 triIndex ); - -/*---------------------------------------------------------------------------* - *- Patch Mesh material functions -* - *---------------------------------------------------------------------------*/ -extern RpPatchMesh * -RpPatchMeshSetQuadPatchMaterial( RpPatchMesh *patchMesh, - RwUInt32 quadIndex, - RpMaterial *material ); - -extern RpPatchMesh * -RpPatchMeshSetTriPatchMaterial( RpPatchMesh *patchMesh, - RwUInt32 triIndex, - RpMaterial *material ); - -extern RpMaterial * -RpPatchMeshGetQuadPatchMaterial( const RpPatchMesh *patchMesh, - RwUInt32 quadIndex ); - -extern RpMaterial * -RpPatchMeshGetTriPatchMaterial( const RpPatchMesh *patchMesh, - RwUInt32 triIndex ); - -extern const RpPatchMesh * -RpPatchMeshForAllMaterials( const RpPatchMesh *patchMesh, - RpMaterialCallBack callBack, - void *userData ); - -extern RwUInt32 -RpPatchMeshGetNumMaterials( const RpPatchMesh *patchMesh ); - -extern RpMaterial * -RpPatchMeshGetMaterial( const RpPatchMesh *patchMesh, - RwUInt32 materialIndex ); - -/*---------------------------------------------------------------------------* - *- Patch Skin functions -* - *---------------------------------------------------------------------------*/ -#if (defined(RPSKIN_H)) - -extern RpSkin * -RpPatchMeshGetSkin( RpPatchMesh *patchMesh ); - -extern RpPatchMesh * -RpPatchMeshSetSkin( RpPatchMesh *patchMesh, - RpSkin *skin ); - -#endif /* (defined(RPSKIN_H)) */ - -/*---------------------------------------------------------------------------* - *- Patch Atomic functions -* - *---------------------------------------------------------------------------*/ -extern RpAtomic * -RpPatchAtomicSetPatchMesh( RpAtomic *atomic, - RpPatchMesh *patchMesh ); - -extern RpPatchMesh * -RpPatchAtomicGetPatchMesh( const RpAtomic *atomic ); - -/*---------------------------------------------------------------------------* - *- Patch Atomic LOD functions -* - *---------------------------------------------------------------------------*/ -extern RwBool -RpPatchAtomicSetPatchLODCallBack( RpAtomic *atomic, - RpPatchLODCallBack callback, - RpPatchLODUserData userData ); - -extern RwBool -RpPatchAtomicGetPatchLODCallBack( const RpAtomic *atomic, - RpPatchLODCallBack *callback, - RpPatchLODUserData *userData ); - -/*---------------------------------------------------------------------------* - *- Patch default LOD range -* - *---------------------------------------------------------------------------*/ -extern RwBool -RpPatchSetDefaultLODCallBackRange( RpPatchLODRange *lodRange ); - -extern RwBool -RpPatchGetDefaultLODCallBackRange( RpPatchLODRange *lodRange ); - -/*---------------------------------------------------------------------------* - *- Patch pipeline -* - *---------------------------------------------------------------------------*/ - -/** - * \ingroup rppatch - * \ref RpPatchType defines the different ways a patch atomic can be rendered. - * Once a \ref RpPatchMesh has been attached to an \ref RpAtomic with - * \ref RpPatchAtomicSetPatchMesh the atomic must be setup with the correct - * rendering pipeline with \ref RpPatchAtomicSetType . - * - * The patch plugin makes no assumptions about how to render the - * patch atomics. Once an \ref RpPatchMesh has been attached to an - * \ref RpAtomic it is necessary to attach a suitable patch - * rendering pipeline. The patch plugin supports four different - * rendering types, these are defined in the \ref RpPatchType - * enumeration:- - * \li \ref rpPATCHTYPEGENERIC - * The patch \ref RpAtomic will be rendered with the - * default generic patch rendering pipeline. - * \li \ref rpPATCHTYPESKIN - * The patch \ref RpAtomic will be rendered with a - * custom pipeline for rendering skinning patches. Make sure - * an \ref RpSkin has been attached to the \ref RpPatchMesh - * and an \ref RpHAnimHierarchy has been attached to the - * \ref RpAtomic. - * \li \ref rpPATCHTYPEMATFX - * The patch \ref RpAtomic will be rendered with a - * custom pipeline for rendering the material effects - * of patches. The - * patch matfx pipeline supports all the material effects - * defined in the \ref rpmatfx plugin. The patches - * materials should be setup as usual. - * \li \ref rpPATCHTYPESKINMATFX - * The patch \ref RpAtomic will be rendered with a - * custom skinned material effects patch rendering pipeline. - * The \ref RpPatchMesh, \ref RpAtomic and the patches' - * \ref RpMaterial's must be setup correctly. - */ -enum RpPatchType -{ - rpNAPATCHTYPE = 0, /** - -#include "rwcore.h" - -#include "rpptank.rpe" /* automatically generated header file */ - -/****************************************************************************** - * Global Types - */ - -/** - * \ingroup rpptank - * Passed to \ref RpPTankAtomicCreate, these flags specify - * the type and properties held by the particles. - * Some flags are mutually exclusive and should not be mixed. - * The debug version of the library will assert and signal these problems. - */ -enum RpPTankDataFlags -{ - rpPTANKDFLAGNONE = ((int)0x00000000), - rpPTANKDFLAGPOSITION = ((int)0x00000001), /**actPCount) - -#define RpPTankAtomicGetMaximumParticlesCountMacro(_atm)\ - (RPATOMICPTANKPLUGINDATA(_atm)->maxPCount) - -#define RpPTankAtomicSetActiveParticlesCountMacro(atm_,cnt_)\ -MACRO_START\ -{\ - RPATOMICPTANKPLUGINDATA(atm_)->instFlags |= rpPTANKIFLAGACTNUMCHG;\ - RPATOMICPTANKPLUGINDATA(atm_)->actPCount = cnt_;\ -}\ -MACRO_STOP - -#define RpPTankAtomicSetTextureMacro(atm_, tex_)\ -MACRO_START\ -{\ -RpMaterialSetTexture(RpGeometryGetMaterial(RpAtomicGetGeometry(atm_),0), tex_);\ -}\ -MACRO_STOP - -#define RpPTankAtomicGetTextureMacro(atm_)\ - (RpMaterialGetTexture(RpGeometryGetMaterial(RpAtomicGetGeometry(atm_),0))) - -#define RpPTankAtomicGetMaterialMacro(atm_)\ - (RpGeometryGetMaterial(RpAtomicGetGeometry(atm_),0)) - -#define RpPTankAtomicSetBlendModesMacro(atm_,src_,dst_)\ -MACRO_START\ -{\ - RPATOMICPTANKPLUGINDATA(atm_)->publicData.srcBlend = src_;\ - RPATOMICPTANKPLUGINDATA(atm_)->publicData.dstBlend = dst_;\ -}\ -MACRO_STOP - -#define RpPTankAtomicGetBlendModesMacro(atm_,src_,dst_)\ -MACRO_START\ -{\ - *src_ =\ - (RwBlendFunction)(RPATOMICPTANKPLUGINDATA(atm_)->publicData.srcBlend);\ - *dst_ =\ - (RwBlendFunction)(RPATOMICPTANKPLUGINDATA(atm_)->publicData.dstBlend);\ -}\ -MACRO_STOP - -#define RpPTankAtomicSetVertexAlphaMacro(atm_, vas_)\ -MACRO_START\ -{\ - RPATOMICPTANKPLUGINDATA(atm_)->publicData.vertexAlphaBlend = vas_;\ -}\ -MACRO_STOP - -#define RpPTankAtomicGetVertexAlphaMacro(atm_)\ - (RPATOMICPTANKPLUGINDATA(atm_)->publicData.vertexAlphaBlend) - -#define RpPTankAtomicSetConstantCenterMacro(atm_, ctr_)\ -MACRO_START\ -{\ - RPATOMICPTANKPLUGINDATA(atm_)->publicData.cCenter = *ctr_;\ - RPATOMICPTANKPLUGINDATA(atm_)->instFlags |= rpPTANKIFLAGCENTER;\ -}\ -MACRO_STOP - -#define RpPTankAtomicGetConstantCenterMacro(atm_)\ - (&(RPATOMICPTANKPLUGINDATA(atm_)->publicData.cCenter)) - - -#define RpPTankAtomicSetConstantSizeMacro(atm_, size_)\ -MACRO_START\ -{\ - RPATOMICPTANKPLUGINDATA(atm_)->publicData.cSize = *size_;\ - RPATOMICPTANKPLUGINDATA(atm_)->instFlags |= rpPTANKIFLAGCNSSIZE;\ -}\ -MACRO_STOP - -#define RpPTankAtomicGetConstantSizeMacro(atm_)\ - (&RPATOMICPTANKPLUGINDATA(atm_)->publicData.cSize) - -#define RpPTankAtomicSetConstantRotateMacro(atm_, rot_)\ -MACRO_START\ -{\ - RPATOMICPTANKPLUGINDATA(atm_)->publicData.cRotate = rot_;\ - RPATOMICPTANKPLUGINDATA(atm_)->instFlags |= rpPTANKIFLAGCNS2DROTATE;\ -}\ -MACRO_STOP - -#define RpPTankAtomicGetConstantRotateMacro(atm_)\ - (RPATOMICPTANKPLUGINDATA(atm_)->publicData.cRotate) - -#define RpPTankAtomicSetConstantMatrixMacro(atm_, mtx_)\ -MACRO_START\ -{\ - RwMatrixCopy(&(RPATOMICPTANKPLUGINDATA(atm_)->publicData.cMatrix),mtx_);\ - RPATOMICPTANKPLUGINDATA(atm_)->instFlags |= rpPTANKIFLAGCNSMATRIX;\ -}\ -MACRO_STOP - -#define RpPTankAtomicGetConstantMatrixMacro(atm_)\ - (&(RPATOMICPTANKPLUGINDATA(atm_)->publicData.cMatrix)) - -#define RpPTankAtomicSetConstantColorMacro(atm_, col_)\ -MACRO_START\ -{\ - RPATOMICPTANKPLUGINDATA(atm_)->publicData.cColor = *col_;\ - if( RpGeometryGetMaterial(RpAtomicGetGeometry(atm_),0) )\ - {\ - (void)RpMaterialSetColor(\ - RpGeometryGetMaterial(RpAtomicGetGeometry(atm_),0),\ - &RPATOMICPTANKPLUGINDATA(atm_)->publicData.cColor);\ - }\ - RPATOMICPTANKPLUGINDATA(atm_)->instFlags |= rpPTANKIFLAGCNSCOLOR;\ -}\ -MACRO_STOP - -#define RpPTankAtomicGetConstantColorMacro(atm_)\ - (&(RPATOMICPTANKPLUGINDATA(atm_)->publicData.cColor)) - -#define RpPTankAtomicSetConstantVtxColorMacro(atm_, col_)\ -MACRO_START\ -{\ - memcpy(RPATOMICPTANKPLUGINDATA(atm_)->publicData.cVtxColor,\ - col_,\ - sizeof(RwRGBA)*4);\ - RPATOMICPTANKPLUGINDATA(atm_)->instFlags |= rpPTANKIFLAGCNSVTXCOLOR;\ -}\ -MACRO_STOP - -#define RpPTankAtomicGetConstantVtxColorMacro(atm_)\ - (RPATOMICPTANKPLUGINDATA(atm_)->publicData.cVtxColor) - -#define RpPTankAtomicSetConstantVtx2TexCoordsMacro(atm_, uv_)\ -MACRO_START\ -{\ - memcpy(RPATOMICPTANKPLUGINDATA(atm_)->publicData.cUV,\ - uv_,\ - sizeof(RwTexCoords)*2);\ - RPATOMICPTANKPLUGINDATA(atm_)->instFlags |= rpPTANKIFLAGCNSVTX2TEXCOORDS;\ -}\ -MACRO_STOP - -#define RpPTankAtomicGetConstantVtx2TexCoordsMacro(atm_)\ - (RPATOMICPTANKPLUGINDATA(atm_)->publicData.cUV) - -#define RpPTankAtomicSetConstantVtx4TexCoordsMacro(atm_, uv_)\ -MACRO_START\ -{\ - memcpy(RPATOMICPTANKPLUGINDATA(atm_)->publicData.cUV,\ - uv_,\ - sizeof(RwTexCoords)*4);\ - RPATOMICPTANKPLUGINDATA(atm_)->instFlags |= rpPTANKIFLAGCNSVTX4TEXCOORDS;\ -}\ -MACRO_STOP - -#define RpPTankAtomicGetConstantVtx4TexCoordsMacro(atm_)\ - (RPATOMICPTANKPLUGINDATA(atm_)->publicData.cUV) - -#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) -extern RwInt32 -RpPTankAtomicGetActiveParticlesCount(RpAtomic *atomic); - -extern RwInt32 -RpPTankAtomicGetMaximumParticlesCount(RpAtomic *atomic); - -extern void -RpPTankAtomicSetActiveParticlesCount(RpAtomic *atomic, RwInt32 count); - -extern void -RpPTankAtomicSetTexture(RpAtomic *atomic, RwTexture *texture); - -extern RwTexture * -RpPTankAtomicGetTexture(RpAtomic *atomic); - -extern RpAtomic * -RpPTankAtomicSetMaterial(RpAtomic *atomic, RpMaterial *material); - -extern RpMaterial * -RpPTankAtomicGetMaterial(RpAtomic *atomic); - -extern void -RpPTankAtomicSetBlendModes(RpAtomic *atomic, - RwBlendFunction srcBlendMode, - RwBlendFunction dstBlendMode ); - -extern void -RpPTankAtomicGetBlendModes(RpAtomic *atomic, - RwBlendFunction *srcBlendMode, - RwBlendFunction *dstBlendMode ); - -extern void -RpPTankAtomicSetVertexAlpha(RpAtomic *atomic, RwBool vtxAlphaState); - -extern RwBool -RpPTankAtomicGetVertexAlpha(RpAtomic *atomic); - -extern void -RpPTankAtomicSetConstantCenter(RpAtomic *atomic, RwV2d *center); - -const RwV2d * -RpPTankAtomicGetConstantCenter(RpAtomic *atomic); - -extern void -RpPTankAtomicSetConstantSize(RpAtomic *atomic, RwV2d *size); - -extern const RwV2d * -RpPTankAtomicGetConstantSize(RpAtomic *atomic); - -extern void -RpPTankAtomicSetConstantRotate(RpAtomic *atomic, RwReal rotate); - -extern RwReal -RpPTankAtomicGetConstantRotate(RpAtomic *atomic); - -extern void -RpPTankAtomicSetConstantMatrix(RpAtomic *atomic, RwMatrix *matrix); - -extern const RwMatrix * -RpPTankAtomicGetConstantMatrix(RpAtomic *atomic); - -extern void -RpPTankAtomicSetConstantColor(RpAtomic *atomic, RwRGBA *color); - -extern const RwRGBA * -RpPTankAtomicGetConstantColor(RpAtomic *atomic); - -extern void -RpPTankAtomicSetConstantVtxColor(RpAtomic *atomic, RwRGBA *color); - -extern const RwRGBA * -RpPTankAtomicGetConstantVtxColor(RpAtomic *atomic); - -extern void -RpPTankAtomicSetConstantVtx2TexCoords(RpAtomic *atomic, RwTexCoords *UVs); - -extern const RwTexCoords * -RpPTankAtomicGetConstantVtx2TexCoords(RpAtomic *atomic); - -extern void -RpPTankAtomicSetConstantVtx4TexCoords(RpAtomic *atomic, RwTexCoords *UVs); - -extern const RwTexCoords * -RpPTankAtomicGetConstantVtx4TexCoords(RpAtomic *atomic); -#else - -#define RpPTankAtomicGetActiveParticlesCount(atm_)\ - RpPTankAtomicGetActiveParticlesCountMacro(atm_) - -#define RpPTankAtomicGetMaximumParticlesCount(atm_)\ - RpPTankAtomicGetMaximumParticlesCountMacro(atm_) - -#define RpPTankAtomicSetActiveParticlesCount(atm_,cnt_)\ - RpPTankAtomicSetActiveParticlesCountMacro(atm_,cnt_) - - -#define RpPTankAtomicSetTexture(atm_,tex_)\ - RpPTankAtomicSetTextureMacro(atm_,tex_) - -#define RpPTankAtomicGetTexture(atm_)\ - RpPTankAtomicGetTextureMacro(atm_) - -extern RpAtomic * -RpPTankAtomicSetMaterial(RpAtomic *atomic, RpMaterial *material); - -#define RpPTankAtomicGetMaterial(atm_)\ - RpPTankAtomicGetMaterialMacro(atm_) - -#define RpPTankAtomicSetBlendModes(atm_,src_,dst_)\ - RpPTankAtomicSetBlendModesMacro(atm_,src_,dst_) - -#define RpPTankAtomicGetBlendModes(atm_,src_,dst_)\ - RpPTankAtomicGetBlendModesMacro(atm_,src_,dst_) - -#define RpPTankAtomicSetVertexAlpha(atm_, vas_)\ - RpPTankAtomicSetVertexAlphaMacro(atm_, vas_) - -#define RpPTankAtomicGetVertexAlpha(atm_)\ - RpPTankAtomicGetVertexAlphaMacro(atm_) - -#define RpPTankAtomicSetConstantCenter(atm_, ctr_)\ - RpPTankAtomicSetConstantCenterMacro(atm_, ctr_) - -#define RpPTankAtomicGetConstantCenter(atm_)\ - RpPTankAtomicGetConstantCenterMacro(atm_) - -#define RpPTankAtomicSetConstantSize(atm_, size_)\ - RpPTankAtomicSetConstantSizeMacro(atm_, size_) - -#define RpPTankAtomicGetConstantSize(atm_)\ - RpPTankAtomicGetConstantSizeMacro(atm_) - -#define RpPTankAtomicSetConstantRotate(atm_, rot_)\ - RpPTankAtomicSetConstantRotateMacro(atm_, rot_) - -#define RpPTankAtomicGetConstantRotate(atm_)\ - RpPTankAtomicGetConstantRotateMacro(atm_) - -#define RpPTankAtomicSetConstantMatrix(atm_, mtx_)\ - RpPTankAtomicSetConstantMatrixMacro(atm_, mtx_) - -#define RpPTankAtomicGetConstantMatrix(atm_)\ - RpPTankAtomicGetConstantMatrixMacro(atm_) - -#define RpPTankAtomicSetConstantColor(atm_, col_)\ - RpPTankAtomicSetConstantColorMacro(atm_, col_) - -#define RpPTankAtomicGetConstantColor(atm_)\ - RpPTankAtomicGetConstantColorMacro(atm_) - -#define RpPTankAtomicSetConstantVtxColor(atm_, _col)\ - RpPTankAtomicSetConstantVtxColorMacro(atm_, _col) - -#define RpPTankAtomicGetConstantVtxColor(atm_)\ - RpPTankAtomicGetConstantVtxColorMacro(atm_) - -#define RpPTankAtomicSetConstantVtx2TexCoords(atm_, uv_)\ - RpPTankAtomicSetConstantVtx2TexCoordsMacro(atm_, uv_) - -#define RpPTankAtomicGetConstantVtx2TexCoords(atm_)\ - RpPTankAtomicGetConstantVtx2TexCoordsMacro(atm_)\ - -#define RpPTankAtomicSetConstantVtx4TexCoords(atm_, uv_)\ - RpPTankAtomicSetConstantVtx4TexCoordsMacro(atm_, uv_) - -#define RpPTankAtomicGetConstantVtx4TexCoords(atm_)\ - RpPTankAtomicGetConstantVtx4TexCoordsMacro(atm_) - -#endif - -/* - * Data access API *********************************************************** - */ - -extern RwBool -RpPTankAtomicLock(RpAtomic *atomic, RpPTankLockStruct *dst, - RwUInt32 dataFlags, RpPTankLockFlags lockFlag); - -extern void * -RpPTankAtomicLockByIndex(RpAtomic *atomic, RwInt32 idx, RwUInt32 dataFlags, RpPTankLockFlags lockFlag); - -extern RpAtomic * -RpPTankAtomicUnlock(RpAtomic *atomic); - - -/* - * Stealth functions ********************************************************* - */ -RpAtomic* -_rpPTankAtomicCreateCustom(RwInt32 maxParticleNum, - RwUInt32 dataFlags, RwUInt32 platFlags, - RpPTankCallBacks *callbacks); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/*---- end: ./ptank.h----*/ - -/*---- start: c:/daily/rwsdk/plugin/ptank/d3d8/ptankplatform.h----*/ - -/** - * \defgroup rpptankd3d8 D3D8 - * \ingroup rpptank - * - * D3D8 specific documentation. - */ - -/** - * \ingroup rpptankd3d8 - * \par D3D8 specific data flags - * - *
    - *
  • 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: - * - *
      - *
    • rpPTANKDFLAGPOSITION - *
    • rpPTANKDFLAGNORMAL - *
    • rpPTANKDFLAGSIZE (if the hardware supports the D3DFVF_PSIZE vertex format flag) - *
    • rpPTANKDFLAGCOLOR - *
    • rpPTANKDFLAGUSECENTER - *
    • rpPTANKDFLAGARRAY - *
    • rpPTANKDFLAGSTRUCTURE - *
    - * - * The texture coordinates are generated by the hardware and can't be specified. - *
- * - * If the hardware does not support point sprites, the default pipeline is used - * instead. - * - */ - -enum RpPTankD3D8Flags -{ - rpPTANKD3D8FLAGSUSEPOINTSPRITES = 0x00000001, - - rpPTANKD3D8FLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; - -typedef enum RpPTankD3D8Flags RpPTankD3D8Flags; - -/*---- end: c:/daily/rwsdk/plugin/ptank/d3d8/ptankplatform.h----*/ - -#endif /* RPPTANK_H */ - - diff --git a/sdk/rwsdk/include/d3d8/rpptank.rpe b/sdk/rwsdk/include/d3d8/rpptank.rpe deleted file mode 100644 index 2a9b45d3..00000000 --- a/sdk/rwsdk/include/d3d8/rpptank.rpe +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionPTank -{ - - - - e_rwdb_CriterionPTankLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionPTank e_rwdb_CriterionPTank; - - diff --git a/sdk/rwsdk/include/d3d8/rppvs.h b/sdk/rwsdk/include/d3d8/rppvs.h deleted file mode 100644 index 08738933..00000000 --- a/sdk/rwsdk/include/d3d8/rppvs.h +++ /dev/null @@ -1,398 +0,0 @@ -/* - * Potentially Visible Set plug-in - */ - -/********************************************************************** - * - * file : rppvs.h - * - * abstract : handle culling of worldsectors in 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) 2001 Criterion Software Ltd. - * All Rights Reserved. - * - * RenderWare is a trademark of Canon Inc. - * - ************************************************************************/ - -#ifndef _RPPVS_H -#define _RPPVS_H - -/** - * \defgroup rppvs RpPVS - * \ingroup pvs - * - * Geometric Potentially Visible Set Plugin for RenderWare Graphics. - */ - -/**************************************************************************** - Defines - */ - -typedef RwUInt8 RpPVSVisMap; - -#define PVSFROMWORLDSECTOR(sector) \ - ((RpPVS *)(((char *)(sector))+rpPVSGlobals.sectorOffset)) - -#define WORLDSECTORFROMPVS(pvs) \ - ((RpWorldSector *)(((char *)(pvs))-rpPVSGlobals.sectorOffset)) - -#define PVSFROMCONSTWORLDSECTOR(sector) \ - ((const RpPVS *)(((const char *)(sector))+rpPVSGlobals.sectorOffset)) - - -#define PVSCACHEFROMWORLD(world) \ - ((RpPVSCache *)(((char *)(world))+rpPVSGlobals.worldOffset)) -#define PVSCACHEFROMCONSTWORLD(world) \ - ((const RpPVSCache *)(((const char *)(world))+rpPVSGlobals.worldOffset)) - -#define PVSVISMAPSETSECTOR(_vismap, _id) \ - (_vismap)[(_id) >> 3] |= (1 << ((_id) & 7)) - -#define PVSVISMAPUNSETSECTOR(_vismap, _id) \ - (_vismap)[(_id) >> 3] ^= (1 << ((_id) & 7)) - -#define PVSVISMAPGETSECTOR(_vismap, _id) \ - ((_vismap)[(_id) >> 3] & (1 << ((_id) & 7))) - -#define PVSVISMAPLENGTH(_vismaplength, _nosectors) \ - (_vismaplength) = ((_nosectors + 7) >> 3) - - -/* Progress callback message types */ -#define rpPVSPROGRESSSTART 20 -#define rpPVSPROGRESSUPDATE 12 -#define rpPVSPROGRESSEND 22 - -/** - * \ingroup rppvs - * \ref RpPVSProgressCallBack - * This typedef sets the callback function for sampling within a world sector. - * - * \param value A value between 0.0 and 100.0 to represent the percentage completion. - * \param msg The message may take one of the following: - * - * \li rpPVSPROGRESSSTART - * The PVS creation process is about to start. The argument value is equal to 0.0. - * - * \li rpPVSPROGRESSUPDATE - * The PVS creation process has finished processing a subsection of the world. - * The argument value is equal to the percentage of the world processed up to this point. - * - * \li rpPVSPROGRESSEND - * The PVS creation process has ended. All world sectors have been processed. - * The argument value is equal to 100.0. - * - * The progress callback may return FALSE to indicate that the generation of PVS data - * should terminate. Otherwise, return TRUE to continue. - * - * The PVS plugin must be attached before using this function. - * - * - */ -typedef RwBool(*RpPVSProgressCallBack) (RwInt32 msg, - RwReal value); - - -/** - * \ingroup rppvs - * \ref RpPVSCallBack - * This typedef sets the callback function for sampling within a world sector. - * - * \param worldSector A pointer to the \ref RpWorldSector being sampled. - * \param box The bounding box of the region being sampled. - * \param pData A pointer to private data for the sampling function. - */ -typedef RpWorldSector *(*RpPVSCallBack) (RpWorldSector * worldSector, - const RwBBox * box, - void *pData); - -#define RpPVSCallback RpPVSCallBack - -typedef struct _RpPVSCallBack _RpPVSCallBack; - -#if (!defined(DOXYGEN)) -struct _RpPVSCallBack -{ - RpPVSCallBack callback; - void *data; -}; -#endif /* (!defined(DOXYGEN)) */ - -enum _rpPVSPartitionId -{ - rpNAPVSPARTITIONID = 0, - rpPVSFRONT, - rpPVSBACK, - rpPVSSPLIT, - rpPVSCOPLANAR, - rpPVSPARTITIONIDFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; -typedef enum _rpPVSPartitionId _rpPVSPartitionId; - -typedef struct _rpPVSPolyList _rpPVSPolyList; -typedef struct _rpPVSPolyList *_rpPVSPolyListPtr; - -typedef struct _rpPVSPoly _rpPVSPoly; -typedef struct _rpPVSPoly *_rpPVSPolyPtr; - -#if (!defined(DOXYGEN)) -typedef struct _rpPVSPlaneEq _rpPVSPlaneEq; -struct _rpPVSPlaneEq -{ - RwReal x; - RwReal y; - RwReal z; - RwReal w; - - RwReal l; /* recip of length of the normal */ - - _rpPVSPartitionId lastresult; /* temp: stores result of last polygon wrt this plane */ -}; - -typedef struct RwV3i RwV3i; -struct RwV3i -{ - RwInt32 x; - RwInt32 y; - RwInt32 z; -}; - -typedef struct _rpPVSPolyRecord _rpPVSPolyRecord; -struct _rpPVSPolyRecord -{ - RwBool original; /* True if not a fragment */ - RwReal priority; /* Used for sorting, lower values higher priority */ - _rpPVSPolyListPtr parent; /* Unique pointer to original parent */ - _rpPVSPolyPtr geom; /* corners of the poly */ - _rpPVSPlaneEq plane; /* plane equation of the poly */ - RwInt32 home; /* world sector id in range 0..numsectors */ - RpWorldSector *homeaddr; /* world sector pointer */ - RwBool translucent; - - RwBool hasbeenclipper; /* Used during WA creation */ - - /* used by proximity culling, calculated once */ - RwV3d centroid; - RwReal radius; - RwV3d extreme; /* the vertex furthest away from the centroid */ - - RwReal coneRadius; /* Used during clipping only */ - -}; - -struct _rpPVSPoly -{ - RwV3d v; - _rpPVSPoly *next; - - RwInt32 pscalar; /* Used during clipping only */ - RwReal scalar; /* Used during clipping only */ - _rpPVSPlaneEq shadowPlane; /* Used during clipping only */ -}; - -struct _rpPVSPolyList -{ - _rpPVSPolyRecord data; - _rpPVSPolyList *next; -}; - -typedef struct RpPVS RpPVS; - -struct RpPVS -{ - RwInt32 sectorID; - RwInt32 vismaplength; - RwInt32 sampleKey; - - RpPVSVisMap *vismap; - - _rpPVSPolyListPtr sectailpoly; - _rpPVSPartitionId potential; - - RwUInt32 numpols; - RwBBox sbox; - RwBBox gbox; - RwReal diagonal; - RwV3d centre; - RwInt32 axessig[3]; -}; - -typedef struct RpPVSCache RpPVSCache; -struct RpPVSCache -{ - RwBool processed; - RwBool formatted; - RwInt32 NumWorldSectors; - - RwInt32 ptotal; - RwInt32 paccept; - - RwBool hooked; - - RwUInt32 nextID; - - RwInt32 viscount; - - RpPVSProgressCallBack progressCallBack; - - _rpPVSPolyListPtr polygons; - - RpWorldSectorCallBackRender renderCallBack; -}; - -typedef struct RpPVSGlobalVars RpPVSGlobalVars; -struct RpPVSGlobalVars -{ - RpWorld *World; - - RwInt32 worldOffset; - RwInt32 sectorOffset; - - RwBool collis; - RwBool bfc; - - - RwInt32 progress_count; - RwReal diagonal; - - RwReal gran; - - RwInt32 InSector; - RwV3d ViewPos; - RpPVS *CurrPVS; -}; -#endif /* (!defined(DOXYGEN)) */ - - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RpPVSGlobalVars rpPVSGlobals; - -extern RpWorld * -RpPVSSetProgressCallBack(RpWorld * wpWorld, - RpPVSProgressCallBack - callback); - -extern RpWorldSector * -RpPVSSetViewPosition(RpWorld * wpWorld, - RwV3d * pos); - -extern RpWorldSector * -RpPVSSetViewSector(RpWorld * wpWorld, RpWorldSector * spSect); - -extern RpWorldSector * -RpPVSSetWorldSectorPairedVisibility(RpWorldSector * spSectA, - RpWorldSector * spSectB, - RwBool visible, - RwBool mutual); - -extern RpWorld * -RpPVSDestroy(RpWorld * wpWorld); - -extern RwBool -RpPVSWorldSectorVisible(RpWorldSector * spSect); - -extern RwBool -RpPVSPluginAttach(void); - -extern RwBool -RpPVSQuery(RpWorld * wpWorld); - -extern RwBool -RpPVSAtomicVisible(RpAtomic * atom); - -extern RpWorld * -RpPVSStatisticsGet(RpWorld * wpWorld, - RwInt32 * ptotal, - RwInt32 * paccept); - -extern RpPVSProgressCallBack -RpPVSGetProgressCallBack(RpWorld * - wpWorld); - -extern RpWorld * -RpPVSConstruct(RpWorld * wpWorld, - RpPVSCallBack callback, - void *pData); - -extern RpWorld* -RpPVSConstructSector(RpWorld * wpWorld, - RpWorldSector * spSector, - RpPVSCallBack callback, - void *pData); - - -extern RpWorldSector * -RpPVSGeneric(RpWorldSector * spSect, - const RwBBox __RWUNUSED__ * box, - void *data); - -extern RwBool -RpPVSSetCollisionDetection(RwBool collis); - -extern RwBool -RpPVSSetBackFaceCulling(RwBool bfc); - -extern RpWorld * -RpPVSUnhook(RpWorld * wpWorld); - -extern RpWorld * -RpPVSHook(RpWorld * wpWorld); - -extern RpWorldSector * -RpPVSSetWorldSectorVisibility(RpWorldSector * spSect, - RwBool visible); - -extern RwBool -RpPVSSamplePOV(RwV3d * pos, - RwBool colltest); - -extern RxNodeDefinition * -RxNodeDefinitionGetPVSWorldSectorCSL(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* These functions are added for backwards compatibility... */ -#define RpPVSCreate(_wpWorld, \ - _raster, _zraster, _mindist, \ - _maxdist, _maxdepth, _callback, _pData) \ - RpPVSConstruct(_wpWorld, _callback, _pData) - -#define RpPVSAddPOV(_pos) \ - RpPVSSamplePOV(_pos, FALSE) - -#define RpPVSAddWorldSector(_sector) \ - RpPVSSetWorldSectorVisibility(_sector, TRUE) - -#define RpPVSAddExtraPOV(_world, _raster, _zraster, _mindist, _mazdist, _matrix) \ -MACRO_START \ -{ \ - rpPVSGlobals.World = (_world); \ - RpPVSSamplePOV(&((_matrix)->pos), TRUE); \ -} \ -MACRO_STOP - - -#endif /* _RPPVS_H */ diff --git a/sdk/rwsdk/include/d3d8/rppvs.rpe b/sdk/rwsdk/include/d3d8/rppvs.rpe deleted file mode 100644 index 62c983b0..00000000 --- a/sdk/rwsdk/include/d3d8/rppvs.rpe +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionGPVS -{ - - - - e_rwdb_CriterionGPVSLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionGPVS e_rwdb_CriterionGPVS; - - diff --git a/sdk/rwsdk/include/d3d8/rprandom.h b/sdk/rwsdk/include/d3d8/rprandom.h deleted file mode 100644 index aebbfed9..00000000 --- a/sdk/rwsdk/include/d3d8/rprandom.h +++ /dev/null @@ -1,65 +0,0 @@ -/********************************************************************** - * - * File : rprandom.h - * - * Abstract : Random Number Generator - * - ********************************************************************** - * - * 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 RPRANDOM_H -#define RPRANDOM_H - -/** - * \defgroup rprandom RpRandom - * \ingroup mathtools - * - * Random Number Generation Plugin for RenderWare Graphics. - */ - -/*--- Include files ---*/ -#include "rwcore.h" - -#include "rprandom.rpe" /* automatically generated header file */ - -/*--- Plugin API Functions ---*/ - -#define RPRANDMAX (~((~0)<<31)) - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -RwBool RpRandomPluginAttach(void); - -/* Getting values */ - -extern RwUInt32 RpRandom(void); -extern void RpRandomSeed(RwUInt32 seed); - -extern RwUInt32 RpRandomMT(void); -extern void RpRandomSeedMT(RwUInt32 seed); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* RPRANDOM_H */ - diff --git a/sdk/rwsdk/include/d3d8/rprandom.rpe b/sdk/rwsdk/include/d3d8/rprandom.rpe deleted file mode 100644 index d3fe964b..00000000 --- a/sdk/rwsdk/include/d3d8/rprandom.rpe +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionRandom -{ - - - - e_rwdb_CriterionRandomLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionRandom e_rwdb_CriterionRandom; - - diff --git a/sdk/rwsdk/include/d3d8/rpskin.h b/sdk/rwsdk/include/d3d8/rpskin.h deleted file mode 100644 index 8a6ea204..00000000 --- a/sdk/rwsdk/include/d3d8/rpskin.h +++ /dev/null @@ -1,276 +0,0 @@ - -#ifndef RPSKIN_H -#define RPSKIN_H - -/** - * \defgroup rpskin RpSkin - * \ingroup skinning - * - * Skin Plugin for RenderWare Graphics. - */ - -/*===========================================================================* - *--- Include files ---------------------------------------------------------* - *===========================================================================*/ -#include "rwcore.h" -#include "rpworld.h" - -#include "rpcriter.h" -#include "rpskin.rpe" - -#include "rphanim.h" - -/*===========================================================================* - *--- Global Types ----------------------------------------------------------* - *===========================================================================*/ -typedef struct RwMatrixWeights RwMatrixWeights; - -/** - * \ingroup rpskin - * \struct RwMatrixWeights - * A structure for defining up to four matrix weights per vertex. - * Not all entries need to be used. - * - * \note - * Values should be sorted, such that any zero 0.0f entries appear - * after the valid weights. Any weights that appear after a zero - * entry will be ignored. - * - * \see RpSkinCreate - */ -struct RwMatrixWeights -{ - RwReal w0; /**< The first matrix weight. */ - RwReal w1; /**< The second matrix weight. */ - RwReal w2; /**< The third matrix weight. */ - RwReal w3; /**< The fourth matrix weight. */ -}; - -/** - * \ingroup rpskin - * \struct RpSkin - * - * Skin object. This should be considered an opaque type. - * Use the RpSkin API functions to access. - * - * \see RpSkinCreate - * \see RpSkinDestroy - */ -typedef struct RpSkin RpSkin; - -/*===========================================================================* - *--- Plugin API Functions --------------------------------------------------* - *===========================================================================*/ -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/*---------------------------------------------------------------------------* - *- Plugin functions -* - *---------------------------------------------------------------------------*/ -extern void RpSkinSetFreeListCreateParams( - RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); - -extern RwBool -RpSkinPluginAttach(void); - -/*---------------------------------------------------------------------------* - *- Skin Atomic functions -* - *---------------------------------------------------------------------------*/ -extern RpAtomic * -RpSkinAtomicSetHAnimHierarchy( RpAtomic *atomic, - RpHAnimHierarchy *hierarchy ); - -extern RpHAnimHierarchy * -RpSkinAtomicGetHAnimHierarchy( const RpAtomic *atomic ); - -/*---------------------------------------------------------------------------* - *- Skin Geometry functions -* - *---------------------------------------------------------------------------*/ -extern RpGeometry * -RpSkinGeometrySetSkin( RpGeometry *geometry, - RpSkin *skin ); - -extern RpSkin * -RpSkinGeometryGetSkin( RpGeometry *geometry ); - -extern RpSkin * -RpSkinCreate( RwUInt32 numVertices, - RwUInt32 numBones, - RwMatrixWeights *vertexWeights, - RwUInt32 *vertexIndices, - RwMatrix *inverseMatrices ); - -extern RpSkin * -RpSkinDestroy( RpSkin *skin ); - -extern RwUInt32 -RpSkinGetNumBones( RpSkin *skin ); - -extern const RwMatrixWeights * -RpSkinGetVertexBoneWeights( RpSkin *skin ); - -extern const RwUInt32 * -RpSkinGetVertexBoneIndices( RpSkin *skin ); - -extern const RwMatrix * -RpSkinGetSkinToBoneMatrices( RpSkin *skin ); - -extern RwBool -RpSkinIsSplit( RpSkin *skin ); - -/*---------------------------------------------------------------------------* - *- Skin pipeline -* - *---------------------------------------------------------------------------*/ - -/** - * \ingroup rpskin - * \ref RpSkinType defines the different ways a skinned atomic can - * be rendered. Once a skinned \ref RpGeometry has been attached to - * an \ref RpAtomic the atomic must be setup with the correct skin - * rendering pipeline with \ref RpSkinAtomicSetType. - */ -enum RpSkinType -{ - rpNASKINTYPE = 0, /** -#include - -/** - * \ingroup rpuserdata - * User data formats - */ -enum RpUserDataFormat -{ - rpNAUSERDATAFORMAT = 0, - rpINTUSERDATA, /**< 32 bit int data */ - rpREALUSERDATA, /**< 32 bit float data */ - rpSTRINGUSERDATA, /**< unsigned byte pointer data */ - rpUSERDATAFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; -typedef enum RpUserDataFormat RpUserDataFormat; - -typedef struct RpUserDataArray RpUserDataArray; - -/** - * \ingroup rpuserdata - * \struct RpUserDataArray - * A structure representing an array of user data values - */ - -struct RpUserDataArray -{ - RwChar *name; /**< Identifier for this data array */ - RpUserDataFormat format; /**< Data format of this array */ - RwInt32 numElements; /**< Number of elements in this array */ - void *data; /**< Pointer to the array data */ -}; - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Plugin API */ -extern RwBool RpUserDataPluginAttach(void); - -/* Geometry API */ -extern RwInt32 RpGeometryAddUserDataArray(RpGeometry *geometry, RwChar *name, - RpUserDataFormat format, RwInt32 numElements); -extern RpGeometry *RpGeometryRemoveUserDataArray(RpGeometry *geometry, RwInt32 index); -extern RpUserDataArray *RpGeometryGetUserDataArray(const RpGeometry *geometry, RwInt32 data); -extern RwInt32 RpGeometryGetUserDataArrayCount(const RpGeometry *geometry); - -/* World Sector API */ -extern RwInt32 RpWorldSectorAddUserDataArray(RpWorldSector *sector, RwChar *name, - RpUserDataFormat format, RwInt32 numElements); -extern RpWorldSector *RpWorldSectorRemoveUserDataArray(RpWorldSector *sector, RwInt32 index); -extern RpUserDataArray *RpWorldSectorGetUserDataArray(const RpWorldSector *sector, RwInt32 data); -extern RwInt32 RpWorldSectorGetUserDataArrayCount(const RpWorldSector *sector); - -/* RwFrame API */ -extern RwInt32 RwFrameAddUserDataArray(RwFrame *frame, RwChar *name, - RpUserDataFormat format, RwInt32 numElements); -extern RwFrame *RwFrameRemoveUserDataArray(RwFrame *frame, RwInt32 index); -extern RpUserDataArray *RwFrameGetUserDataArray(const RwFrame *frame, RwInt32 data); -extern RwInt32 RwFrameGetUserDataArrayCount(const RwFrame *frame); - -/* RwCamera API */ -extern RwInt32 RwCameraAddUserDataArray(RwCamera *camera, RwChar *name, - RpUserDataFormat format, RwInt32 numElements); -extern RwCamera *RwCameraRemoveUserDataArray(RwCamera *camera, RwInt32 index); -extern RpUserDataArray *RwCameraGetUserDataArray(const RwCamera *camera, RwInt32 data); -extern RwInt32 RwCameraGetUserDataArrayCount(const RwCamera *camera); - -/* RpLight API */ -extern RwInt32 RpLightAddUserDataArray(RpLight *light, RwChar *name, - RpUserDataFormat format, RwInt32 numElements); -extern RpLight *RpLightRemoveUserDataArray(RpLight *light, RwInt32 index); -extern RpUserDataArray *RpLightGetUserDataArray(const RpLight *light, RwInt32 data); -extern RwInt32 RpLightGetUserDataArrayCount(const RpLight *light); - -/* RpMaterial API */ -extern RwInt32 RpMaterialAddUserDataArray(RpMaterial *material, RwChar *name, - RpUserDataFormat format, RwInt32 numElements); -extern RpMaterial *RpMaterialRemoveUserDataArray(RpMaterial *material, RwInt32 index); -extern RpUserDataArray *RpMaterialGetUserDataArray(const RpMaterial *material, RwInt32 data); -extern RwInt32 RpMaterialGetUserDataArrayCount(const RpMaterial *material); - -/* RwTexture API */ -extern RwInt32 RwTextureAddUserDataArray(RwTexture *texture, RwChar *name, - RpUserDataFormat format, RwInt32 numElements); -extern RwTexture *RwTextureRemoveUserDataArray(RwTexture *texture, RwInt32 index); -extern RpUserDataArray *RwTextureGetUserDataArray(const RwTexture *texture, RwInt32 data); -extern RwInt32 RwTextureGetUserDataArrayCount(const RwTexture *texture); - -/* User Data Array API */ -extern RwChar *RpUserDataArrayGetName(RpUserDataArray *userData); -extern RpUserDataFormat RpUserDataArrayGetFormat(RpUserDataArray *userData); -extern RwInt32 RpUserDataArrayGetNumElements(RpUserDataArray *userData); - -extern RwInt32 RpUserDataArrayGetInt(RpUserDataArray *userData, RwInt32 index); -extern RwReal RpUserDataArrayGetReal(RpUserDataArray *userData, RwInt32 index); -extern RwChar *RpUserDataArrayGetString(RpUserDataArray *userData, RwInt32 index); - -extern void RpUserDataArraySetInt(RpUserDataArray *userData, RwInt32 index, RwInt32 value); -extern void RpUserDataArraySetReal(RpUserDataArray *userData, RwInt32 index, RwReal value); -extern void RpUserDataArraySetString(RpUserDataArray *userData, RwInt32 index, RwChar *value); - -extern RwInt32 RpUserDataGetFormatSize(RpUserDataFormat format); - -#ifdef __cplusplus -} -#endif - -#endif /* RPUSERDATAPLUGIN_H */ diff --git a/sdk/rwsdk/include/d3d8/rpusrdat.rpe b/sdk/rwsdk/include/d3d8/rpusrdat.rpe deleted file mode 100644 index f5879a00..00000000 --- a/sdk/rwsdk/include/d3d8/rpusrdat.rpe +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionUserData -{ - - - - e_rwdb_CriterionUserDataLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionUserData e_rwdb_CriterionUserData; - - diff --git a/sdk/rwsdk/include/d3d8/rpworld.h b/sdk/rwsdk/include/d3d8/rpworld.h deleted file mode 100644 index 0d0489ce..00000000 --- a/sdk/rwsdk/include/d3d8/rpworld.h +++ /dev/null @@ -1,3758 +0,0 @@ -/******************************************/ -/* */ -/* RenderWare(TM) Graphics Library */ -/* */ -/******************************************/ - -/* - * 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. and Canon Inc. will not, under any - * circumstances, be liable for any lost revenue or other damages - * arising from the use of this file. - * - * Copyright (c) 1999. Criterion Software Ltd. - * All Rights Reserved. - */ - -/************************************************************************* - * - * Filename: - * Automatically Generated on: Thu Jan 23 11:06:24 2003 - * - ************************************************************************/ - -#ifndef RPWORLD_H -#define RPWORLD_H - -/*--- Check For Previous Required Includes ---*/ -#ifndef RWCORE_H -#error "Include RWCORE.H before including this file" -#endif /* RWCORE_H */ - -/*--- System Header Files ---*/ -#include -#include - -/*--- Error enumerations ---*/ -#include "rpworld.rpe" - - -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/d3d8/native.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/d3d8/wrldpipe.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/d3d8/nodeD3D8WorldSectorAllInOne.h ---*/ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetD3D8WorldSectorAllInOne(void); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/d3d8/nodeD3D8AtomicAllInOne.h ---*/ -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxNodeDefinition *RxNodeDefinitionGetD3D8AtomicAllInOne(void); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/d3d8/D3D8VertexBufferManager.h ---*/ -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern void RwD3D8VertexBufferManagerChangeDefaultSize(RwUInt32 defaultSize); - -extern RwBool _rxD3D8VertexBufferManagerCreate(RwUInt32 fvf, - RwUInt32 size, - void **vertexBuffer, - RwUInt32 *baseIndex); - -extern void _rxD3D8VertexBufferManagerDestroy(RwUInt32 fvf, - RwUInt32 size, - void *vertexBuffer, - RwUInt32 baseIndex); - -extern RwBool _rxD3D8VertexBufferManagerCreateNoFVF(RwUInt32 stride, - RwUInt32 size, - void **vertexBuffer, - RwUInt32 *baseIndex); - -extern void _rxD3D8VertexBufferManagerDestroyNoFVF(RwUInt32 stride, - RwUInt32 size, - void *vertexBuffer, - RwUInt32 baseIndex); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/*--- Automatically derived from: c:/daily/rwsdk/world/bamateri.h ---*/ - -/* - * Handling surface materials - * Materials describe how things are to appear when rendered - * - * Copyright (c) 1998 Criterion Software Ltd. - */ - -/**************************************************************************** - Global Types - */ - - -typedef struct RpMaterialChunkInfo RpMaterialChunkInfo; -typedef struct RpMaterialChunkInfo _rpMaterial; - -#if (!defined(DOXYGEN)) -struct RpMaterialChunkInfo -{ - 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) \ - ( *(_target) = *(_source) ) -#endif /* (!defined(RwMaterialAssign)) */ - -/** - * \ingroup rpmaterial - * \struct RpMaterial - * Material object. This should be - * considered an opaque type. Use the RpMaterial API functions to access. - */ -typedef struct RpMaterial RpMaterial; - -#if (!defined(DOXYGEN)) -struct RpMaterial -{ - RwTexture *texture; /**< texture */ - RwRGBA color; /**< color */ - RxPipeline *pipeline; /**< pipeline */ - RwSurfaceProperties surfaceProps; /**< surfaceProps */ - RwInt16 refCount; /* C.f. rwsdk/world/bageomet.h:RpGeometry */ - RwInt16 pad; -}; -#endif /* (!defined(DOXYGEN)) */ - -/** - * \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 - * material to indicate success. The callback may return NULL to terminate - * further callbacks on the materials. - * - * \param material Pointer to the current material - * \param data Pointer to developer-defined data structure. - * - * \return Pointer to the current material. - */ -typedef RpMaterial *(*RpMaterialCallBack)(RpMaterial *material, void *data); - -/**************************************************************************** - refCount++), (_material)) - -#define RpMaterialAddRefVoidMacro(_material) \ -MACRO_START \ -{ \ - (_material)->refCount++; \ -} \ -MACRO_STOP - - -#define RpMaterialSetColorMacro(_material, _color) \ - (RwRGBAAssign(&((_material)->color), (_color)), (_material)) - -#define RpMaterialGetColorMacro(_material) \ - (&((_material)->color)) - -#define RpMaterialSetSurfacePropertiesMacro(_material, _surfProps) \ - (RwSurfacePropertiesAssign(&((_material)->surfaceProps), \ - (_surfProps)), (_material)) - -#define RpMaterialSetSurfacePropertiesVoidMacro(_material, _surfProps) \ -MACRO_START \ -{ \ - RwSurfacePropertiesAssign(&((_material)->surfaceProps), \ - (_surfProps)); \ -} \ -MACRO_STOP - -#define RpMaterialGetSurfacePropertiesMacro(_material) \ - (&((_material)->surfaceProps)) - -#define RpMaterialGetTextureMacro(_material) \ - ((_material)->texture) - - -#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -#define RpMaterialAddRef(_material) \ - RpMaterialAddRefMacro(_material) - -#define RpMaterialSetColor(_material, _color) \ - RpMaterialSetColorMacro(_material, _color) - -#define RpMaterialGetColor(_material) \ - RpMaterialGetColorMacro(_material) - -#define RpMaterialSetSurfaceProperties(_material, _surfProps) \ - RpMaterialSetSurfacePropertiesMacro(_material, _surfProps) - -#define RpMaterialGetSurfaceProperties(_material) \ - RpMaterialGetSurfacePropertiesMacro(_material) - -#define RpMaterialGetTexture(_material) \ - RpMaterialGetTextureMacro(_material) - -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -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); -extern RpMaterial *RpMaterialClone(RpMaterial *material); - -/* Textures */ -extern RpMaterial *RpMaterialSetTexture(RpMaterial *material, RwTexture *texture); - - -#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) -extern RpMaterial *RpMaterialAddRef(RpMaterial *material); - -/* Textures */ -extern RwTexture *RpMaterialGetTexture(const RpMaterial *material); - -/* Setting and getting colors */ -extern RpMaterial *RpMaterialSetColor(RpMaterial *material, const RwRGBA *color); -extern const RwRGBA *RpMaterialGetColor(const RpMaterial *material); - -/* Setting and getting surface properties */ -extern RpMaterial * -RpMaterialSetSurfaceProperties(RpMaterial *material, - const RwSurfaceProperties *surfaceProperties); - -extern const RwSurfaceProperties * -RpMaterialGetSurfaceProperties(const RpMaterial *material); - -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - - -/* Attaching toolkits */ -extern RwInt32 RpMaterialRegisterPlugin(RwInt32 size, RwUInt32 pluginID, - RwPluginObjectConstructor constructCB, - RwPluginObjectDestructor destructCB, - RwPluginObjectCopy copyCB); -extern RwInt32 RpMaterialRegisterPluginStream(RwUInt32 pluginID, - RwPluginDataChunkReadCallBack readCB, - RwPluginDataChunkWriteCallBack writeCB, - RwPluginDataChunkGetSizeCallBack getSizeCB); -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); - -/* Binary format */ -extern RwUInt32 RpMaterialStreamGetSize(const RpMaterial *material); -extern RpMaterial *RpMaterialStreamRead(RwStream *stream); -extern const RpMaterial *RpMaterialStreamWrite(const RpMaterial *material, RwStream *stream); -extern RpMaterialChunkInfo * -_rpMaterialChunkInfoRead(RwStream *stream, - RpMaterialChunkInfo *materialChunkInfo, - RwInt32 *bytesRead); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#define RpMaterialChunkInfoRead(stream, materialChunkInfo, bytesRead) \ - _rpMaterialChunkInfoRead(stream, materialChunkInfo, bytesRead) - - -/*--- Automatically derived from: c:/daily/rwsdk/world/bamatlst.h ---*/ -/**************************************************************************** - Global Types - */ - -typedef struct RpMaterialList RpMaterialList; - -#if (!defined(DOXYGEN)) -struct RpMaterialList -{ - RpMaterial **materials; - RwInt32 numMaterials; - RwInt32 space; -}; -#endif /* (!defined(DOXYGEN)) */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#define rpMaterialListGetNumMaterials(mlist) ((mlist)->numMaterials) - -/* Setting up and destroying material lists */ -extern RpMaterialList *_rpMaterialListInitialize(RpMaterialList *matList); -extern RpMaterialList *_rpMaterialListDeinitialize(RpMaterialList *matList); - -/* Accessing material lists */ -extern RpMaterial ** _rpMaterialListAlloc(RwUInt32 count); -extern RpMaterial *_rpMaterialListGetMaterial(const RpMaterialList *matList, - RwInt32 matIndex); -extern RpMaterialList * _rpMaterialListSetSize(RpMaterialList * matList, - RwInt32 size); -extern RpMaterialList *_rpMaterialListCopy(RpMaterialList *matListOut, - const RpMaterialList *matListIn); -extern RwInt32 _rpMaterialListAppendMaterial(RpMaterialList *matList, - RpMaterial *material); -extern RwInt32 _rpMaterialListFindMaterialIndex(const RpMaterialList *matList, - const RpMaterial *material); - -/* Binary format */ -extern RwUInt32 _rpMaterialListStreamGetSize(const RpMaterialList *matList); -extern RpMaterialList *_rpMaterialListStreamRead(RwStream *stream, - RpMaterialList *matList); -extern const RpMaterialList *_rpMaterialListStreamWrite(const RpMaterialList *matList, - RwStream *stream); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#define rpMaterialListInitialize(_matList) \ - _rpMaterialListInitialize(_matList) - -#define rpMaterialListDeinitialize(_matList) \ - _rpMaterialListDeinitialize(_matList) - -#define rpMaterialListGetMaterial(_matList, _matIndex) \ - _rpMaterialListGetMaterial(_matList, _matIndex) - -#define rpMaterialListCopy(_matListOut, _matListIn) \ - _rpMaterialListCopy(_matListOut, _matListIn) - -#define rpMaterialListAppendMaterial(_matList, _material) \ - _rpMaterialListAppendMaterial(_matList, _material) - -#define rpMaterialListStreamRead(_stream, _matList) \ - _rpMaterialListStreamRead(_stream, _matList) - -#define rpMaterialListStreamWrite(_matList, _stream) \ - _rpMaterialListStreamWrite(_matList, _stream) - - -/*--- Automatically derived from: c:/daily/rwsdk/world/bamesh.h ---*/ - -/* - * - * Purpose: Provide construction and enumeration facilities for meshes. - * - * Copyright (c) 1998 Criterion Software Ltd. - */ - -#define RPMESHGLOBAL(var) \ - (RWPLUGINOFFSET(rpMeshGlobals, \ - RwEngineInstance, \ - meshModule.globalsOffset)->var) - -#define rwPRIMTYPEOR \ - (rwPRIMTYPELINELIST | \ - rwPRIMTYPEPOLYLINE | \ - rwPRIMTYPETRILIST | \ - rwPRIMTYPETRISTRIP | \ - rwPRIMTYPETRIFAN | \ - rwPRIMTYPEPOINTLIST) - -#define rpMESHHEADERPRIMTYPEOR \ - (0 /* rpMESHHEADERTRILIST*/ | \ - rpMESHHEADERTRISTRIP | \ - rpMESHHEADERTRIFAN | \ - rpMESHHEADERLINELIST | \ - rpMESHHEADERPOLYLINE | \ - rpMESHHEADERPOINTLIST) - -/**************************************************************************** - Global variables - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RwModuleInfo meshModule; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/**************************************************************************** - Global types - */ - -/* - * typedef for header structure listing all meshes - * constituting a single RpGeometry or RpWorldSector - */ -typedef struct RpMeshHeader RpMeshHeader; - -/** - * \ingroup rpmesh - * \ref RpMeshHeaderFlags - * represents the different types of mesh. - * \see RpMeshHeader - */ -enum RpMeshHeaderFlags -{ - /* NOTE: trilists are denoted by absence of any other - * primtype flags, so be careful that you test: - * (triListFlag == (flags&triListFlag)) - * or: - * (0 == (flags&rpMESHHEADERPRIMMASK)) - * and not: - * (flags&triListFlag) - */ - rpMESHHEADERTRISTRIP = 0x0001, /**< Render as tristrips */ - rpMESHHEADERTRIFAN = 0x0002, /**< On PlayStation 2 these will be converted to trilists */ - rpMESHHEADERLINELIST = 0x0004, /**< Render as 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 - * way to render pointlists. */ - - rpMESHHEADERPRIMMASK = 0x00FF, /**< All bits reserved for specifying primitive type */ - rpMESHHEADERUNINDEXED = 0x0100, /**< Topology is defined implicitly by vertex - * order, ergo the mesh contains no indices */ - rpMESHHEADERFLAGSFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; - -/* - * Typedef for RpMeshHeaderFlags enumeration - * representing the different types of mesh - */ -typedef enum RpMeshHeaderFlags RpMeshHeaderFlags; - -typedef struct rpMeshGlobals rpMeshGlobals; - -#if (!defined(DOXYGEN)) -struct rpMeshGlobals -{ - RwInt16 nextSerialNum; - RwFreeList *triStripListEntryFreeList; - RwUInt8 meshFlagsToPrimType[rpMESHHEADERPRIMTYPEOR]; - RwUInt8 primTypeToMeshFlags[rwPRIMTYPEOR]; -}; -#endif /* (!defined(DOXYGEN)) */ - -typedef struct RpBuildMeshTriangle RpBuildMeshTriangle; - -/** - * \ingroup rpmesh - * \struct RpBuildMeshTriangle - * This type represents an array of indices into - * the object vertex array. Used during the construction - * of tristrips. - * - * See API functions - * \see RpBuildMeshGeneratePreprocessTriStrip - * \see RpBuildMeshGenerateExhaustiveTriStrip - * \see RpBuildMeshGenerateTrivialTriStrip - * \see RpBuildMeshGenerateDefaultTriStrip - * and - * \see RpMeshSetTriStripMethod - * \see RpMeshGetTriStripMethod - */ -struct RpBuildMeshTriangle -{ - RwUInt16 vertIndex[3]; /**< indices into object vertex - * array. */ - RpMaterial *material; /**< pointer to material used to - * render the mesh. */ -}; - -typedef struct RpBuildMesh RpBuildMesh; - -/** - * \ingroup rpmesh - * \struct RpBuildMesh - * This type represents a mesh ready for tri stripping. - * - * See API functions - * \see RpBuildMeshGeneratePreprocessTriStrip - * \see RpBuildMeshGenerateExhaustiveTriStrip - * \see RpBuildMeshGenerateTrivialTriStrip - * \see RpBuildMeshGenerateDefaultTriStrip - * and - * \see RpMeshSetTriStripMethod - * \see RpMeshGetTriStripMethod - */ -struct RpBuildMesh -{ - RwUInt32 triangleBufferSize; /**< number of triangles - * space has been allocated - * for. */ - RwUInt32 numTriangles; /**< number of triangles to be - * tristripped. */ - RpBuildMeshTriangle *meshTriangles; /**< pointer to build mesh - * triangles. */ -}; - -typedef struct RpMesh RpMesh; - -/** - * \ingroup rpmesh - * \struct RpMesh - * This type represents a single polygon mesh. - * A mesh is defined as a collection of triangles derived from an RpGeometry - * or RpWorldSector which have a common material. - * - * See API functions \see RpGeometryForAllMeshes and - * \see RpWorldSectorForAllMeshes and - * the corresponding function callback types: - */ -struct RpMesh -{ - RxVertexIndex *indices; /**< vertex indices defining the mesh */ - RwUInt32 numIndices; /**< number of vertices in mesh */ - RpMaterial *material; /**< pointer to material used to - * render the mesh. */ -}; - -/** - * \ingroup rpmesh - * \struct RpMeshHeader - * Header for all meshes that constitute a single RpGeometry or RpWorldSector - */ -struct RpMeshHeader -{ - RwUInt32 flags; /**< \see RpMeshHeaderFlags */ - RwUInt16 numMeshes; /**< Number of meshes in object */ - RwUInt16 serialNum; /**< Determine if mesh has changed - * since last instance */ - RwUInt32 totalIndicesInMesh; /**< Total triangle index - * count in all meshes - */ - RwUInt32 firstMeshOffset; /**< Offset in bytes from end this - * structure RpMeshHeader - * to the first mesh - */ -}; - -/** - * \ingroup rpmesh - * \ref RpMeshCallBack is the callback - * function supplied to \ref RpGeometryForAllMeshes and - * \ref RpWorldSectorForAllMeshes for all meshes in a given geometry. - * - * This function should return a pointer to the current mesh to indicate - * 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. - * - * \return Returns a pointer to the current mesh if successful or NULL - * if an error occurred. - */ -typedef RpMesh *(*RpMeshCallBack) (RpMesh * mesh, - RpMeshHeader * meshHeader, - void *pData); - -/**************************************************************************** - Function prototypes - */ - -#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -#define RpMeshHeaderGetPrimType(_mshHdr) \ - ( (RwPrimitiveType)RPMESHGLOBAL(meshFlagsToPrimType)[(_mshHdr)->flags & \ - rpMESHHEADERPRIMMASK] ) - -#define RpMeshHeaderSetPrimType(_mshHdr, _prmTyp) \ - ( (_mshHdr)->flags = \ - ((_mshHdr)->flags & ~rpMESHHEADERPRIMMASK) | \ - (rpMESHHEADERPRIMMASK & \ - RPMESHGLOBAL(primTypeToMeshFlags)[(_prmTyp) & \ - rpMESHHEADERPRIMMASK]), \ - (_mshHdr) ) - -#endif /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Opening and closing module */ -extern void *_rpMeshOpen(void *instance, RwInt32 offset, - RwInt32 size); -extern void *_rpMeshClose(void *instance, RwInt32 offset, - RwInt32 size); - -extern RwInt16 _rpMeshGetNextSerialNumber(void); - -/* Create a build mesh with nothing in */ -extern RpBuildMesh *_rpBuildMeshCreate(RwUInt32 bufferSize); - -/* Destroy a build mesh */ -extern RwBool _rpBuildMeshDestroy(RpBuildMesh * mesh); - -/* Destroy a build mesh */ -extern RwBool _rpMeshDestroy(RpMeshHeader * mesh); - -/* Add a triangle to a mesh */ -extern RpBuildMesh *_rpBuildMeshAddTriangle(RpBuildMesh * mesh, - RpMaterial * material, - RwInt32 vert1, - RwInt32 vert2, - RwInt32 vert3); - -#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -/* Get primtype from a mesh header */ -extern RwPrimitiveType RpMeshHeaderGetPrimType(RpMeshHeader * - meshHeader); - -/* Set primtype for a mesh header */ -extern RpMeshHeader *RpMeshHeaderSetPrimType(RpMeshHeader * - meshHeader, - RwPrimitiveType - primType); - -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -/* Enumerate meshes within a mesh header */ -extern RpMeshHeader *_rpMeshHeaderForAllMeshes(RpMeshHeader * - meshHeader, - RpMeshCallBack - fpCallBack, - void *pData); - -/* Mesh serialisation functions */ -extern RwStream *_rpMeshWrite(const RpMeshHeader * meshHeader, - const void *object, - RwStream * stream, - const RpMaterialList * matList); -extern RpMeshHeader *_rpMeshRead(RwStream * stream, - const void *object, - const RpMaterialList * matList); -extern RwInt32 _rpMeshSize(const RpMeshHeader *meshHeader, - const void *object); -/* Mesh header create/destroy functions */ -extern void _rpMeshHeaderDestroy(RpMeshHeader * meshHeader); -extern RpMeshHeader * _rpMeshHeaderCreate(RwUInt32 size); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: c:/daily/rwsdk/world/basector.h ---*/ - -/* - * Handling atomic sectors - * Atomic sectors are use to divide up the world into manageable portions - * - * Copyright (c) 1998 Criterion Software Ltd. -*/ - -/**************************************************************************** - Defines - */ - -/* Type ID */ -#define rpWorldSector 0xff /* Not a true 'type'! */ - -#define rpMINDISTANCEBETWEENVERTICES (RwReal)(0.0001) - -#define RPV3DFROMVERTEXNORMAL(v, n) \ - (v).x = (((RwReal)((n).x)) * ( (RwReal)(1.0/128))); \ - (v).y = (((RwReal)((n).y)) * ( (RwReal)(1.0/128))); \ - (v).z = (((RwReal)((n).z)) * ( (RwReal)(1.0/128))) - -#define RPVERTEXNORMALFROMRWV3D(n, v) \ - { \ - RwFixed naTmp[3]; \ - \ - naTmp[0] = RwRealToFixed((v).x); \ - naTmp[1] = RwRealToFixed((v).y); \ - naTmp[2] = RwRealToFixed((v).z); \ - \ - if (naTmp[0] >= RwIntToFixed(1)) \ - { \ - naTmp[0] = RwIntToFixed(1)-1; \ - } \ - if (naTmp[0] <= RwIntToFixed(-1)) \ - { \ - naTmp[0] = RwIntToFixed(-1)+1; \ - } \ - if (naTmp[1] >= RwIntToFixed(1)) \ - { \ - naTmp[1] = RwIntToFixed(1)-1; \ - } \ - if (naTmp[1] <= RwIntToFixed(-1)) \ - { \ - naTmp[1] = RwIntToFixed(-1)+1; \ - } \ - if (naTmp[2] >= RwIntToFixed(1)) \ - { \ - naTmp[2] = RwIntToFixed(1)-1; \ - } \ - if (naTmp[2] <= RwIntToFixed(-1)) \ - { \ - naTmp[2] = RwIntToFixed(-1)+1; \ - } \ - \ - (n).x = (RwInt8)(naTmp[0]>>9); \ - (n).y = (RwInt8)(naTmp[1]>>9); \ - (n).z = (RwInt8)(naTmp[2]>>9); \ - } - -/**************************************************************************** - Global types - */ - -typedef struct RpVertexNormal RpVertexNormal; - -#if (!defined(DOXYGEN)) -struct RpVertexNormal -{ - RwInt8 x; - RwInt8 y; - RwInt8 z; - RwUInt8 pad; /* pad character to force alignment */ -}; - -typedef struct RpPolygon RpPolygon; - -struct RpPolygon -{ - RwUInt16 matIndex; - RwUInt16 vertIndex[3]; -}; -#endif /* (!defined(DOXYGEN)) */ - -/** - * \ingroup rpworldsector - * \struct RpWorldSector - * World Sector object. This should be - * considered an opaque type. Use the RpWorldSector API functions to access. - */ -typedef struct RpWorldSector RpWorldSector; - -#if (!defined(DOXYGEN)) -struct RpWorldSector -{ - RwInt32 type; - - RpPolygon *polygons; /* Polygons themselves */ - - RwV3d *vertices; /* Vertex positions */ - RpVertexNormal *normals; /* Vertex normals */ - - RwTexCoords *texCoords[rwMAXTEXTURECOORDS]; /* Texture coordinates */ - - RwRGBA *preLitLum; /* Pre lit luminances */ - - /* Pointer to memory allocated for vertex and poly pointers */ - RwResEntry *repEntry; - - /* Atomics in this sectors */ - /* The pointers are frigged so they look like they are pointing to - Atomics when they are pointing to here */ - RwLinkList collAtomicsInWorldSector; /* Coll priority */ - RwLinkList noCollAtomicsInWorldSector; /* No Coll priority */ - - /* Lights in an atomic sector */ - RwLinkList lightsInWorldSector; - - /* Outer bounding box of sector based on BSP planes */ - RwBBox boundingBox; - - /* Bounding box tightly enclosing geometry */ - RwBBox tightBoundingBox; - - /* The mesh which groups same material polygons together */ - RpMeshHeader *mesh; - - /* The WorldSector object pipeline for this WorldSector */ - RxPipeline *pipeline; - - /* Material list window base - * (triangles in a given sector can "see" - * the 256 materials from - * MatList[matListWindowBase] -> MatList[matListWindowBase + 255]) - */ - RwUInt16 matListWindowBase; - - RwUInt16 numVertices; /* Num vertices */ - RwUInt16 numPolygons; /* Num polygons */ - RwUInt16 pad; -}; -#endif /* (!defined(DOXYGEN)) */ - -/** - * \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 - * in. This function should return a pointer to the current world sector to - * 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. - * - */ -typedef RpWorldSector *(*RpWorldSectorCallBack)(RpWorldSector *worldSector, void *data); - -typedef struct RpSector RpSector; - -#if (!defined(DOXYGEN)) -struct RpSector -{ - RwInt32 type; -}; - -/* NOTE: The left and right pointers can point to an RpPlaneSector or - * an RpWorldSector - * This is determined what the type is via the type value - */ - -typedef struct RpPlaneSector RpPlaneSector; - -struct RpPlaneSector -{ - RwInt32 type; - - RwReal value; - RpSector *leftSubTree; /* Sector 'left' (less) of the plane */ - RpSector *rightSubTree; /* Sector 'right' (more) of the plane */ - RwReal leftValue; - RwReal rightValue; -}; -#endif /* (!defined(DOXYGEN)) */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RwPluginRegistry sectorTKList; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#define RpWorldSectorGetBBoxMacro(_sctr) (&((_sctr)->boundingBox)) -#define RpWorldSectorGetTightBBoxMacro(_sctr) (&((_sctr)->tightBoundingBox)) - -#if ((!defined(RWDEBUG)) && (!defined(RWSUPPRESSINLINE))) - -#define RpWorldSectorGetBBox RpWorldSectorGetBBoxMacro -#define RpWorldSectorGetTightBBox RpWorldSectorGetTightBBoxMacro - -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Get info from atomic sectors */ -extern RwInt32 RpWorldSectorGetNumPolygons(const RpWorldSector *Sector); -extern RwInt32 RpWorldSectorGetNumVertices(const RpWorldSector *Sector); - -/* Instancing and deinstancing sectors */ -extern RpWorldSector * RpWorldSectorRender(RpWorldSector *worldSector); - -extern const RpWorldSector *RpWorldSectorForAllMeshes(const RpWorldSector *sector, - RpMeshCallBack fpCallBack, - void *pData); - - -#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -extern const RwBBox *RpWorldSectorGetBBox(const RpWorldSector *sector); -extern const RwBBox *RpWorldSectorGetTightBBox(const RpWorldSector *sector); - -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -/* Plugins */ -extern RwInt32 RpWorldSectorRegisterPlugin(RwInt32 size, RwUInt32 pluginID, - RwPluginObjectConstructor constructCB, - RwPluginObjectDestructor destructCB, - RwPluginObjectCopy copyCB); -extern RwInt32 RpWorldSectorRegisterPluginStream(RwUInt32 pluginID, - RwPluginDataChunkReadCallBack readCB, - RwPluginDataChunkWriteCallBack writeCB, - RwPluginDataChunkGetSizeCallBack getSizeCB); -extern RwInt32 RpWorldSectorSetStreamAlwaysCallBack( - RwUInt32 pluginID, - RwPluginDataChunkAlwaysCallBack alwaysCB); -extern RwInt32 RpWorldSectorSetStreamRightsCallBack(RwUInt32 pluginID, - RwPluginDataChunkRightsCallBack rightsCB); -extern RwInt32 RpWorldSectorGetPluginOffset(RwUInt32 pluginID); -extern RwBool RpWorldSectorValidatePlugins(const RpWorldSector *sector); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/*--- Automatically derived from: c:/daily/rwsdk/world/bameshop.h ---*/ - -/**************************************************************************** - Defines - */ - -#define RPTRISTRIPPOLYGONMAXEDGES 3 - -/** - * \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 - * function. - * - * \return a pointer to the constructed mesh header. - * - */ -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 - */ - - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -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); - -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); - -extern RpMeshHeader * -RpBuildMeshGenerateDefaultTriStrip(RpBuildMesh *buildmesh, void *data); - -extern RpMeshHeader * -RpBuildMeshGeneratePreprocessTriStrip(RpBuildMesh *buildmesh, void *data); - -extern RpMeshHeader * -RpBuildMeshGenerateExhaustiveTriStrip(RpBuildMesh *buildmesh, void *data); - -extern RpMeshHeader * -RpBuildMeshGenerateDefaultIgnoreWindingTriStrip(RpBuildMesh *buildmesh, - void *data); - -extern RpMeshHeader * -RpBuildMeshGeneratePreprocessIgnoreWindingTriStrip(RpBuildMesh *buildmesh, - void *data); - -extern RpMeshHeader * -RpBuildMeshGenerateExhaustiveIgnoreWindingTriStrip(RpBuildMesh *buildmesh, - void *data); - -/* Functions to set and get the global mesh tri-strip algorithm */ -extern RwBool -RpMeshSetTriStripMethod(RpTriStripMeshCallBack callback, void *data); - -extern RwBool -RpMeshGetTriStripMethod(RpTriStripMeshCallBack *callback, void **data); - - -extern RpMeshHeader * -_rpTriListMeshGenerate(RpBuildMesh *buildMesh, void *data); - -/* - * Optimise the mesh ordering - * (sort on material and place transparent materials last) - */ -extern RpMeshHeader * -_rpMeshOptimise(RpBuildMesh *buildmesh, RwUInt32 flags); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#define _rpTriStripMeshTrivialGenerate(_buildMesh, _data) \ - RpBuildMeshGenerateTrivialTriStrip(_buildMesh, _data) - -#define _rpTriStripMeshDefaultGenerate(_buildmesh, _data) \ - RpBuildMeshGenerateDefaultTriStrip(_buildmesh, _data) - -#define _rpTriStripMeshPreprocessGenerate(_buildmesh, _data) \ - RpBuildMeshGeneratePreprocessTriStrip(_buildmesh, _data) - -#define _rpTriStripMeshExhaustiveGenerate(_buildmesh, _data) \ - RpBuildMeshGenerateExhaustiveTriStrip(_buildmesh, _data) - -#define _rpMeshSetTristripMethod(_callback, _data) \ - RpMeshSetTriStripMethod(_callback, _data) - -#define _rpMeshGetTristripMethod(_callback, _data) \ - RpMeshGetTriStripMethod(_callback, _data) - - - -/*--- Automatically derived from: c:/daily/rwsdk/world/balight.h ---*/ - -/* - * Lighting 3D objects. - * Lights are used to illuminate atomics and worlds - * - * Copyright (c) 1998 Criterion Software Ltd. - */ - - -/**************************************************************************** - Defines - */ - -/* Binary Light */ -typedef struct RpLightChunkInfo RpLightChunkInfo; -typedef struct RpLightChunkInfo _rpLight; - -#if (!defined(DOXYGEN)) -struct RpLightChunkInfo -{ - RwReal radius; /**< radius */ - RwReal red; /**< red */ - RwReal green; /**< green */ - RwReal blue; /**< blue */ - RwReal minusCosAngle; /**< minusCosAngle */ - RwUInt32 typeAndFlags; /**< typeAndFlags */ -}; -#endif /* (!defined(DOXYGEN)) */ - -/* Type ID */ -#define rpLIGHT 3 - -/* Beyond this the lights must be positioned */ -#define rpLIGHTPOSITIONINGSTART 0x80 - -/** - * \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. - * Note that lights of types rpLIGHTPOINT, rpLIGHTSPOT and rpLIGHTSPOTSOFT have linear - * intensity fall-off with distance from the source, reducing to zero at the light's radius:*/ -enum RpLightType -{ - rpNALIGHTTYPE = 0, - - /* These don't take part in the tie mechanism (no position) */ - rpLIGHTDIRECTIONAL, /**radius) - -#define RpLightGetColorMacro(_light) \ - (&((_light)->color)) - -#define RpLightSetFrameMacro(_light, _frame) \ - (rwObjectHasFrameSetFrame((_light), (_frame)), (_light)) - -#define RpLightGetFrameMacro(_light) \ - ((RwFrame *)rwObjectGetParent((_light))) - -#define RpLightGetTypeMacro(_light) \ - ((RpLightType)rwObjectGetSubType((_light))) - -#define RpLightSetFlagsMacro(_light, _flags) \ - ((rwObjectSetFlags((_light), (_flags))), (_light)) - -#define RpLightGetFlagsMacro(_light) \ - (rwObjectGetFlags((_light))) - - -#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -#define RpLightGetRadius(_light) \ - RpLightGetRadiusMacro(_light) - -#define RpLightGetColor(_light) \ - RpLightGetColorMacro(_light) - -#define RpLightSetFrame(_light, _frame) \ - RpLightSetFrameMacro(_light, _frame) - -#define RpLightGetFrame(_light) \ - RpLightGetFrameMacro(_light) - -#define RpLightGetType(_light) \ - RpLightGetTypeMacro(_light) - -#define RpLightSetFlags(_light, _flags) \ - RpLightSetFlagsMacro(_light, _flags) - -#define RpLightGetFlags(_light) \ - RpLightGetFlagsMacro(_light) - -#endif /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) -extern RwReal RpLightGetRadius(const RpLight *light); -extern const RwRGBAReal *RpLightGetColor(const RpLight *light); -extern RpLight *RpLightSetFrame(RpLight *light, RwFrame *frame); -extern RwFrame *RpLightGetFrame(const RpLight *light); -extern RpLightType RpLightGetType(const RpLight *light); -extern RpLight *RpLightSetFlags(RpLight *light, RwUInt32 flags); -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); -extern RpLight *RpLightSetColor(RpLight *light, const RwRGBAReal *color); -extern RwReal RpLightGetConeAngle(const RpLight *light); -extern RpLight *RpLightSetConeAngle(RpLight * ight, RwReal angle); -extern RwUInt32 RpLightStreamGetSize(const RpLight *light); -extern RpLight *RpLightStreamRead(RwStream *stream); -extern const RpLight *RpLightStreamWrite(const RpLight *light, - RwStream *stream); -extern RpLightChunkInfo *_rpLightChunkInfoRead(RwStream *stream, - RpLightChunkInfo *lightChunkInfo, - RwInt32 *bytesRead); - -/* Attaching toolkits */ -extern RwInt32 RpLightRegisterPlugin(RwInt32 size, - RwUInt32 pluginID, - RwPluginObjectConstructor constructCB, - RwPluginObjectDestructor destructCB, - RwPluginObjectCopy copyCB); -extern RwInt32 RpLightRegisterPluginStream(RwUInt32 pluginID, - RwPluginDataChunkReadCallBack readCB, - RwPluginDataChunkWriteCallBack writeCB, - RwPluginDataChunkGetSizeCallBack getSizeCB); -extern RwInt32 RpLightSetStreamAlwaysCallBack(RwUInt32 pluginID, - RwPluginDataChunkAlwaysCallBack alwaysCB); -extern RwInt32 RpLightGetPluginOffset(RwUInt32 pluginID); -extern RwBool RpLightValidatePlugins(const RpLight * light); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#define RpLightChunkInfoRead(stream, lightChunkInfo, bytesRead) \ - _rpLightChunkInfoRead(stream, lightChunkInfo, bytesRead) - - -/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/d3d8/D3D8lights.h ---*/ -/* - * typedef for struct RpD3D8AttenuationParams - */ -typedef struct RpD3D8AttenuationParams RpD3D8AttenuationParams; -/** - * \ingroup rplightd3d8 - * \struct RpD3D8AttenuationParams - * This type represents the attenuation model of a spot or point light. - */ -struct RpD3D8AttenuationParams -{ - RwReal constant; /**< Constant attenuation coefficient */ - RwReal linear; /**< Linear attenuation coefficient */ - RwReal quadratic; /**< Quadratic attenuation coefficient */ -}; - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern void -RpD3D8LightSetAttenuationParams(RpLight *light, - const RpD3D8AttenuationParams *params); - -extern void -RpD3D8LightGetAttenuationParams(const RpLight *light, - RpD3D8AttenuationParams *params); - -extern RwBool -_rwD3D8LightsOpen(void); - -extern RwBool -_rwD3D8LightsGlobalEnable(RpLightFlag flags); - -extern RwBool -_rwD3D8LightDirectionalEnable(RpLight *light); - -extern RwBool -_rwD3D8LightLocalEnable(RpLight *light); - -extern void -_rwD3D8LightsEnable(RwBool enable, RwUInt32 type); - -extern void -_rwD3D8LightsClose(void); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: c:/daily/rwsdk/world/bageomet.h ---*/ - -/* - * Handling atomic's geometry - * Geometry describe objects, and are the building blocks for atomics - * - * Copyright (c) 1998 Criterion Software Ltd. -*/ - - -/**************************************************************************** - Defines - */ - -/* Type ID */ -#define rpGEOMETRY 8 - -/** - * \ingroup rpgeometry - * RpGeometryFlag - * Geometry type flags - * - * When creating a geometry, these flags can be OR'ed together to - * specify the format along with the rpGEOMETRYTEXCOORDSETS(n) macro if more - * than two sets of texture coordinates are required. See \ref RpGeometryCreate - * for more details. - * - * \see RpGeometryCreate(). - */ -enum RpGeometryFlag -{ - rpGEOMETRYTRISTRIP = 0x00000001, /**boundingSphere), (_sphere)), (_mt)) - -#define RpMorphTargetGetBoundingSphereMacro(_mt) \ - (&((_mt)->boundingSphere)) - -#define RpGeometryGetNumMorphTargetsMacro(_geometry) \ - ((_geometry)->numMorphTargets) - -#define RpGeometryGetMorphTargetMacro(_geometry, _index) \ - (&((_geometry)->morphTarget[(_index)])) - -#define RpGeometryGetPreLightColorsMacro(_geometry) \ - ((_geometry)->preLitLum) - -#define RpGeometryGetVertexTexCoordsMacro(_geometry, _uvIndex) \ - ((_geometry)->texCoords[(_uvIndex) - 1]) - -#define RpGeometryGetNumTexCoordSetsMacro(_geometry) \ - ((_geometry)->numTexCoordSets) - -#define RpGeometryGetNumVerticesMacro(_geometry) \ - ((_geometry)->numVertices) - -#define RpMorphTargetGetVerticesMacro(_mt) \ - ((_mt)->verts) - -#define RpMorphTargetGetVertexNormalsMacro(_mt) \ - ((_mt)->normals) - -#define RpGeometryGetTrianglesMacro(_geometry) \ - ((_geometry)->triangles) - -#define RpGeometryGetNumTrianglesMacro(_geometry) \ - ((_geometry)->numTriangles) - -#define RpGeometryGetMaterialMacro(_geometry, _num) \ - (((_geometry)->matList.materials)[(_num)]) - -#define RpGeometryGetNumMaterialsMacro(_geometry) \ - ((_geometry)->matList.numMaterials) - -#define RpGeometryGetFlagsMacro(_geometry) \ - ((_geometry)->flags) - -#define RpGeometrySetFlagsMacro(_geometry, _flags) \ - (((_geometry)->flags = (_flags)), (_geometry)) - - -#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -#define RpMorphTargetSetBoundingSphere(_geometry, _sphere) \ - RpMorphTargetSetBoundingSphereMacro(_geometry, _sphere) - -#define RpMorphTargetGetBoundingSphere(_geometry) \ - RpMorphTargetGetBoundingSphereMacro(_geometry) - -#define RpGeometryGetNumMorphTargets(_geometry) \ - RpGeometryGetNumMorphTargetsMacro(_geometry) - -#define RpGeometryGetMorphTarget(_geometry, _index) \ - RpGeometryGetMorphTargetMacro(_geometry, _index) - -#define RpGeometryGetPreLightColors(_geometry) \ - RpGeometryGetPreLightColorsMacro(_geometry) - -#define RpGeometryGetVertexTexCoords(_geometry, _uvIndex) \ - RpGeometryGetVertexTexCoordsMacro(_geometry, _uvIndex) - -#define RpGeometryGetNumTexCoordSets(_geometry) \ - RpGeometryGetNumTexCoordSetsMacro(_geometry) - -#define RpGeometryGetNumVertices(_geometry) \ - RpGeometryGetNumVerticesMacro(_geometry) - -#define RpMorphTargetGetVertices(_mt) \ - RpMorphTargetGetVerticesMacro(_mt) - -#define RpMorphTargetGetVertexNormals(_mt) \ - RpMorphTargetGetVertexNormalsMacro(_mt) - -#define RpGeometryGetTriangles(_geometry) \ - RpGeometryGetTrianglesMacro(_geometry) - -#define RpGeometryGetNumTriangles(_geometry) \ - RpGeometryGetNumTrianglesMacro(_geometry) - -#define RpGeometryGetMaterial(_geometry, _num) \ - RpGeometryGetMaterialMacro(_geometry, _num) - -#define RpGeometryGetNumMaterials(_geometry) \ - RpGeometryGetNumMaterialsMacro(_geometry) - -#define RpGeometryGetFlags(_geometry) \ - RpGeometryGetFlagsMacro(_geometry) - -#define RpGeometrySetFlags(_geometry, _flags) \ - RpGeometrySetFlagsMacro(_geometry, _flags) - -#endif /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Transforms geometry morph target vertices */ - -extern RpGeometry * -RpGeometryTransform(RpGeometry *geometry, - const RwMatrix *matrix); - -/* Create geometry for a 'space' marker */ - -extern RpGeometry * -RpGeometryCreateSpace(RwReal radius); - -/* Morph targets - Accessing geometry contents */ - -#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -extern RpMorphTarget * -RpMorphTargetSetBoundingSphere(RpMorphTarget *morphTarget, - const RwSphere *boundingSphere); - -extern RwSphere * -RpMorphTargetGetBoundingSphere(RpMorphTarget *morphTarget); - -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -extern const RpMorphTarget * -RpMorphTargetCalcBoundingSphere(const RpMorphTarget *morphTarget, - RwSphere *boundingSphere); - -extern RwInt32 -RpGeometryAddMorphTargets(RpGeometry *geometry, - RwInt32 mtcount); - -extern RwInt32 -RpGeometryAddMorphTarget(RpGeometry *geometry); - -extern RpGeometry * -RpGeometryRemoveMorphTarget(RpGeometry *geometry, - RwInt32 morphTarget); - -#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) -extern RwInt32 -RpGeometryGetNumMorphTargets(const RpGeometry *geometry); - -extern RpMorphTarget * -RpGeometryGetMorphTarget(const RpGeometry *geometry, - RwInt32 morphTarget); - -extern RwRGBA * -RpGeometryGetPreLightColors(const RpGeometry *geometry); - -extern RwTexCoords * -RpGeometryGetVertexTexCoords(const RpGeometry *geometry, - RwTextureCoordinateIndex uvIndex); - -extern RwInt32 -RpGeometryGetNumTexCoordSets(const RpGeometry *geometry); - -extern RwInt32 -RpGeometryGetNumVertices (const RpGeometry *geometry); - -extern RwV3d * -RpMorphTargetGetVertices(const RpMorphTarget *morphTarget); - -extern RwV3d * -RpMorphTargetGetVertexNormals(const RpMorphTarget *morphTarget); - -extern RpTriangle * -RpGeometryGetTriangles(const RpGeometry *geometry); - -extern RwInt32 -RpGeometryGetNumTriangles(const RpGeometry *geometry); - -extern RpMaterial * -RpGeometryGetMaterial(const RpGeometry *geometry, - RwInt32 matNum); - -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -extern const RpGeometry * -RpGeometryTriangleSetVertexIndices(const RpGeometry *geometry, - RpTriangle *triangle, - RwUInt16 vert1, - RwUInt16 vert2, - RwUInt16 vert3); - -extern RpGeometry * -RpGeometryTriangleSetMaterial(RpGeometry *geometry, - RpTriangle *triangle, - RpMaterial *material); - -extern const RpGeometry * -RpGeometryTriangleGetVertexIndices(const RpGeometry *geometry, - const RpTriangle *triangle, - RwUInt16 *vert1, - RwUInt16 *vert2, - RwUInt16 *vert3); - -extern RpMaterial * -RpGeometryTriangleGetMaterial(const RpGeometry *geometry, - const RpTriangle *triangle); - -#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) -extern RwInt32 -RpGeometryGetNumMaterials(const RpGeometry *geometry); - -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -extern RpGeometry * -RpGeometryForAllMaterials(RpGeometry *geometry, - RpMaterialCallBack fpCallBack, - void *pData); - -/* Accessing the inards of geometry */ -extern RpGeometry * -RpGeometryLock(RpGeometry *geometry, - RwInt32 lockMode); - -extern RpGeometry * -RpGeometryUnlock(RpGeometry *geometry); - -extern const RpGeometry * -RpGeometryForAllMeshes(const RpGeometry *geometry, - RpMeshCallBack fpCallBack, - void *pData); - -/* Creation and destruction */ -extern RpGeometry * -RpGeometryCreate(RwInt32 numVert, - RwInt32 numTriangles, - RwUInt32 format); - -extern RwBool -RpGeometryDestroy(RpGeometry *geometry); - -extern RpGeometry * -_rpGeometryAddRef(RpGeometry *geometry); - -/* Attaching toolkits */ -extern RwInt32 -RpGeometryRegisterPlugin(RwInt32 size, - RwUInt32 pluginID, - RwPluginObjectConstructor constructCB, - RwPluginObjectDestructor destructCB, - RwPluginObjectCopy copyCB); - -extern RwInt32 -RpGeometryRegisterPluginStream(RwUInt32 pluginID, - RwPluginDataChunkReadCallBack readCB, - RwPluginDataChunkWriteCallBack writeCB, - RwPluginDataChunkGetSizeCallBack getSizeCB); - -extern RwInt32 -RpGeometrySetStreamAlwaysCallBack(RwUInt32 pluginID, - RwPluginDataChunkAlwaysCallBack alwaysCB); - -extern RwInt32 -RpGeometryGetPluginOffset(RwUInt32 pluginID); - -extern RwBool -RpGeometryValidatePlugins(const RpGeometry *geometry); - -/* Binary format */ -extern RwUInt32 -RpGeometryStreamGetSize(const RpGeometry *geometry); - -extern const RpGeometry * -RpGeometryStreamWrite(const RpGeometry *geometry, - RwStream *stream); - -extern RpGeometry * -RpGeometryStreamRead(RwStream *stream); - -extern RpGeometryChunkInfo * -_rpGeometryChunkInfoRead(RwStream *stream, - RpGeometryChunkInfo *geometryChunkInfo, - RwInt32 *bytesRead); - -#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) -/* Flags */ -extern RwUInt32 -RpGeometryGetFlags(const RpGeometry *geometry); - -extern RpGeometry * -RpGeometrySetFlags(RpGeometry *geometry, - RwUInt32 flags); - -#endif - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#define rpGeometryAddRef(_geometry) \ - _rpGeometryAddRef(_geometry) - -#define RpGeometryChunkInfoRead(stream, geometryChunkInfo, bytesRead) \ - _rpGeometryChunkInfoRead(stream, geometryChunkInfo, bytesRead) - - -/*--- Automatically derived from: c:/daily/rwsdk/world/baclump.h ---*/ - -/* - * Clump and atomic handling. - * Clumps and atomics are the movable rendered objects in the world - * - * Copyright (c) 1998 Criterion Software Ltd. - */ - - -/**************************************************************************** - Defines - */ - -/****************************** Object type ID ******************************/ - -/* Type IDs */ - -#define rpATOMIC 1 -#define rpCLUMP 2 - -/* Interpolator flags */ -enum RpInterpolatorFlag -{ - rpINTERPOLATORDIRTYINSTANCE = 0x01, - rpINTERPOLATORDIRTYSPHERE = 0x02, - rpINTERPOLATORNOFRAMEDIRTY = 0x04, - rpINTERPOLATORFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; -typedef enum RpInterpolatorFlag rpInterpolatorFlag; - -/** - * \ingroup rpatomic - * The bit-field type RpAtomicFlag specifies the options available for - * controlling the behavior of atomics. See API function \ref RpAtomicSetFlags. - * - * \see RpAtomicSetFlags - * \see RpAtomicGetFlags - * \see RpWorldSectorForAllCollisionAtomics - */ - -enum RpAtomicFlag -{ - rpATOMICCOLLISIONTEST = 0x01, /**renderCallBack(_atomic)) - -#define RpAtomicGetGeometryMacro(_atomic) \ - ((_atomic)->geometry) - -#if (!defined(RpAtomicSetRenderCallBackMacro)) - -/* NB "RpAtomicSetRenderCallBack(atom++, callback)" will break it */ -#define RpAtomicSetRenderCallBackMacro(_atomic, _callback) \ -MACRO_START \ -{ \ - (_atomic)->renderCallBack = (_callback); \ - if (!(_atomic)->renderCallBack) \ - { \ - (_atomic)->renderCallBack = AtomicDefaultRenderCallBack; \ - } \ -} \ -MACRO_STOP - -#endif /* (!defined(RpAtomicSetRenderCallBackMacro)) */ - -#define RpAtomicGetRenderCallBackMacro(_atomic) \ - ((_atomic)->renderCallBack) - -#define RpAtomicGetInterpolatorMacro(_atomic) \ - (&((_atomic)->interpolator)) - -#define RpInterpolatorGetStartMorphTargetMacro(_intrp) \ - ((_intrp)->startMorphTarget) - -#define RpInterpolatorGetEndMorphTargetMacro(_intrp) \ - ((_intrp)->endMorphTarget) - -#define RpInterpolatorGetValueMacro(_intrp) \ - ((_intrp)->position) - -#define RpInterpolatorGetScaleMacro(_intrp) \ - ((_intrp)->time) - -/* NB "RpInterpolatorSetStartMorphTarget(interp++, target)" will break it */ -#define RpInterpolatorSetStartMorphTargetMacro(_intrp, _target, _atomic)\ - ((_intrp)->startMorphTarget = (RwInt16) (_target), \ - (_intrp)->flags |= (RwInt32)(rpINTERPOLATORDIRTYINSTANCE | \ - rpINTERPOLATORDIRTYSPHERE ), \ - ((!((_intrp)->flags & rpINTERPOLATORNOFRAMEDIRTY))? \ - ((RpAtomicGetFrame(_atomic))? \ - (RwFrameUpdateObjects(RpAtomicGetFrame(_atomic))): \ - (0)): \ - (0)), \ - (_intrp)) - -/* NB "RpInterpolatorSetEndMorphTarget(interp++, target)" will break it */ -#define RpInterpolatorSetEndMorphTargetMacro(_intrp, _target, _atomic) \ - ((_intrp)->endMorphTarget = (RwInt16) (_target), \ - (_intrp)->flags |= (RwInt32)(rpINTERPOLATORDIRTYINSTANCE | \ - rpINTERPOLATORDIRTYSPHERE ), \ - ((!((_intrp)->flags & rpINTERPOLATORNOFRAMEDIRTY))? \ - ((RpAtomicGetFrame(_atomic))? \ - (RwFrameUpdateObjects(RpAtomicGetFrame(_atomic))): \ - (0)): \ - (0)), \ - (_intrp)) - -/* NB "RpInterpolatorSetValue(interp++, value)" will break it */ -#define RpInterpolatorSetValueMacro(_intrp, _value, _atomic) \ - ((_intrp)->position = (_value), \ - (_intrp)->flags |= (RwInt32)(rpINTERPOLATORDIRTYINSTANCE | \ - rpINTERPOLATORDIRTYSPHERE ), \ - ((!((_intrp)->flags & rpINTERPOLATORNOFRAMEDIRTY))? \ - ((RpAtomicGetFrame(_atomic))? \ - (RwFrameUpdateObjects(RpAtomicGetFrame(_atomic))): \ - (0)): \ - (0)), \ - (_intrp)) - -/* NB "RpInterpolatorSetScale(interp++, *(scale++))" will break it */ -#define RpInterpolatorSetScaleMacro(_intrp, _scale, _atomic) \ - ((_intrp)->time = (_scale), \ - (_intrp)->recipTime = (RwReal) (1.0) / (_scale), \ - (_intrp)->flags |= (RwInt32)(rpINTERPOLATORDIRTYINSTANCE | \ - rpINTERPOLATORDIRTYSPHERE ), \ - ((!((_intrp)->flags & rpINTERPOLATORNOFRAMEDIRTY))? \ - ((RpAtomicGetFrame(_atomic))? \ - (RwFrameUpdateObjects(RpAtomicGetFrame(_atomic))): \ - (0)): \ - (0)), \ - (_intrp)) - -#define RpAtomicGetClumpMacro(_atomic) \ - ((_atomic)->clump) - -/* NB "RpAtomicGetBoundingSphere(atomic++)" will break it */ -#define RpAtomicGetBoundingSphereMacro(_atomic) \ - ((((_atomic)->interpolator.flags & rpINTERPOLATORDIRTYSPHERE)? \ - _rpAtomicResyncInterpolatedSphere(_atomic), 0: 0), \ - &((_atomic)->boundingSphere)) -#define RpAtomicGetFrameMacro(_atomic) \ - ((RwFrame *) rwObjectGetParent(_atomic)) - -/* NB "RpClumpSetFrame(clump++, frame)" will break it */ -#if (!defined(RpClumpSetFrameMacro)) -#define RpClumpSetFrameMacro(_clump, _frame) \ - (rwObjectSetParent(_clump, _frame), \ - (_clump)) -#endif /* (!defined(RpClumpSetFrameMacro)) */ - -#if (!defined(RpClumpSetFrameVoidMacro)) -#define RpClumpSetFrameVoidMacro(_clump, _frame) \ -MACRO_START \ -{ \ - rwObjectSetParent(_clump, _frame); \ -} \ -MACRO_STOP -#endif /* (!defined(RpClumpSetFrameVoidMacro)) */ - -#define RpClumpGetFrameMacro(_clump) \ - ((RwFrame *) rwObjectGetParent(_clump)) - -/* NB "RpAtomicSetFlags(atomic++, flags)" will break it */ -#if (!defined(RpAtomicSetFlagsMacro)) -#define RpAtomicSetFlagsMacro(_atomic, _flags) \ - (rwObjectSetFlags(_atomic, _flags), \ - (_atomic)) -#endif /* (!defined(RpAtomicSetFlagsMacro)) */ - -#define RpAtomicGetFlagsMacro(_atomic) \ - (rwObjectGetFlags(_atomic)) - -#if (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) )) - -#define RpAtomicRender(_atomic) \ - RpAtomicRenderMacro(_atomic) - -#define RpAtomicGetGeometry(_atomic) \ - RpAtomicGetGeometryMacro(_atomic) - -#define RpAtomicSetRenderCallBack(_atomic, _callback) \ - RpAtomicSetRenderCallBackMacro(_atomic, _callback) - -#define RpAtomicGetRenderCallBack(_atomic) \ - RpAtomicGetRenderCallBackMacro(_atomic) - -#define RpAtomicGetInterpolator(_atomic) \ - RpAtomicGetInterpolatorMacro(_atomic) - -#define RpInterpolatorGetStartMorphTarget(_intrp) \ - RpInterpolatorGetStartMorphTargetMacro(_intrp) - -#define RpInterpolatorGetEndMorphTarget(_intrp) \ - RpInterpolatorGetEndMorphTargetMacro(_intrp) - -#define RpInterpolatorGetValue(_intrp) \ - RpInterpolatorGetValueMacro(_intrp) - -#define RpInterpolatorGetScale(_intrp) \ - RpInterpolatorGetScaleMacro(_intrp) - -#define RpInterpolatorSetStartMorphTarget(_intrp, _target, _atomic) \ - RpInterpolatorSetStartMorphTargetMacro(_intrp, _target, _atomic) - -#define RpInterpolatorSetEndMorphTarget(_intrp, _target, _atomic) \ - RpInterpolatorSetEndMorphTargetMacro(_intrp, _target, _atomic) - -#define RpInterpolatorSetValue(_intrp, _value, _atomic) \ - RpInterpolatorSetValueMacro(_intrp, _value, _atomic) - -#define RpInterpolatorSetScale(_intrp, _scale, _atomic) \ - RpInterpolatorSetScaleMacro(_intrp, _scale, _atomic) - -#define RpAtomicGetClump(_atomic) \ - RpAtomicGetClumpMacro(_atomic) - -#define RpAtomicGetBoundingSphere(_atomic) \ - RpAtomicGetBoundingSphereMacro(_atomic) - -#define RpAtomicGetFrame(_atomic) \ - RpAtomicGetFrameMacro(_atomic) - -#define RpClumpSetFrame(_clump, _frame) \ - RpClumpSetFrameMacro(_clump, _frame) - -#define RpClumpGetFrame(_clump) \ - RpClumpGetFrameMacro(_clump) - -#define RpAtomicSetFlags(_atomic, _flags) \ - RpAtomicSetFlagsMacro(_atomic, _flags) - -#define RpAtomicGetFlags(_atomic) \ - RpAtomicGetFlagsMacro(_atomic) - -#endif /* (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) )) */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -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); - -extern void -_rpAtomicResyncInterpolatedSphere(RpAtomic * atomic); - -extern const RwSphere * -RpAtomicGetWorldBoundingSphere(RpAtomic * atomic); - -/* Enumeration */ -extern RpClump * -RpClumpForAllAtomics(RpClump * clump, - RpAtomicCallBack callback, - void *pData); - -extern RpClump * -RpClumpForAllLights(RpClump * clump, - RpLightCallBack callback, - void *pData); - -extern RpClump * -RpClumpForAllCameras(RpClump * clump, - RwCameraCallBack callback, - void *pData); - -/* Frames */ -extern RpAtomic * -RpAtomicSetFrame(RpAtomic * atomic, - RwFrame * frame); - -/* Create a space marking clump */ -extern RpClump * -RpClumpCreateSpace(const RwV3d * position, - RwReal radius); - -/* Instancing and rendering */ -extern RpClump * -RpClumpRender(RpClump * clump); - -extern RpClump * -RpClumpRemoveAtomic(RpClump * clump, - RpAtomic * atomic); - -extern RpClump * -RpClumpAddAtomic(RpClump * clump, - RpAtomic * atomic); - -extern RpClump * -RpClumpRemoveLight(RpClump * clump, - RpLight * light); - -extern RpClump * -RpClumpAddLight(RpClump * clump, - RpLight * light); - -extern RpClump * -RpClumpRemoveCamera(RpClump * clump, - RwCamera * camera); - -extern RpClump * -RpClumpAddCamera(RpClump * clump, - RwCamera * camera); - -/* Creation and destruction of clumps */ -extern RwBool -RpClumpDestroy(RpClump * clump); - -extern RpClump * -RpClumpCreate(void); - -extern RpClump * -RpClumpClone(RpClump * clump); - -/* Creation and destruction of atomics*/ -extern RwBool -RpAtomicDestroy(RpAtomic * atomic); - -extern RpAtomic * -RpAtomicClone(RpAtomic * atomic); - -extern RpAtomic * -RpAtomicCreate(void); - -/* Setting and getting geometry for an atomic */ -extern RpAtomic * -RpAtomicSetGeometry(RpAtomic * atomic, - RpGeometry * geometry, - RwUInt32 flags); - -/* Frustum callbacks */ -extern RpClump * -RpClumpSetCallBack(RpClump * clump, - RpClumpCallBack callback); - -extern RpClumpCallBack -RpClumpGetCallBack(const RpClump * clump); - -/* The number of atomics in a clump */ -extern RwInt32 -RpClumpGetNumAtomics(RpClump * clump); - -extern RwInt32 -RpClumpGetNumLights(RpClump * clump); - -extern RwInt32 -RpClumpGetNumCameras(RpClump * clump); - -/* Light and camera extensions */ -extern RpClump * -RpLightGetClump(const RpLight *light); - -extern RpClump * -RwCameraGetClump(const RwCamera *camera); - -/* Binary format */ -extern RwUInt32 -RpAtomicStreamGetSize(RpAtomic * atomic); - -extern RpAtomic * -RpAtomicStreamRead(RwStream * stream); - -extern RpAtomic * -RpAtomicStreamWrite(RpAtomic * atomic, - RwStream * stream); - -extern RwUInt32 -RpClumpStreamGetSize(RpClump * clump); - -extern RpClump * -RpClumpStreamRead(RwStream * stream); - -extern RpClump * -RpClumpStreamWrite(RpClump * clump, - RwStream * stream); - -extern RpClumpChunkInfo * -_rpClumpChunkInfoRead(RwStream * stream, - RpClumpChunkInfo * clumpChunkInfo, - RwInt32 * bytesRead); - -/* Attaching toolkits */ -extern RwInt32 -RpAtomicRegisterPlugin(RwInt32 size, - RwUInt32 pluginID, - RwPluginObjectConstructor constructCB, - RwPluginObjectDestructor destructCB, - RwPluginObjectCopy copyCB); - -extern RwInt32 -RpClumpRegisterPlugin(RwInt32 size, - RwUInt32 pluginID, - RwPluginObjectConstructor constructCB, - RwPluginObjectDestructor destructCB, - RwPluginObjectCopy copyCB); - -extern RwInt32 -RpAtomicRegisterPluginStream(RwUInt32 pluginID, - RwPluginDataChunkReadCallBack - readCB, - RwPluginDataChunkWriteCallBack - writeCB, - RwPluginDataChunkGetSizeCallBack - getSizeCB); - -extern RwInt32 -RpAtomicSetStreamAlwaysCallBack(RwUInt32 pluginID, - RwPluginDataChunkAlwaysCallBack alwaysCB); - -extern RwInt32 -RpAtomicSetStreamRightsCallBack(RwUInt32 pluginID, - RwPluginDataChunkRightsCallBack rightsCB); - -extern RwInt32 -RpClumpRegisterPluginStream(RwUInt32 pluginID, - RwPluginDataChunkReadCallBack readCB, - RwPluginDataChunkWriteCallBack writeCB, - RwPluginDataChunkGetSizeCallBack getSizeCB); - -extern RwInt32 -RpClumpSetStreamAlwaysCallBack(RwUInt32 pluginID, - RwPluginDataChunkAlwaysCallBack alwaysCB); - -extern RwInt32 -RpAtomicGetPluginOffset(RwUInt32 pluginID); - -extern RwInt32 -RpClumpGetPluginOffset(RwUInt32 pluginID); - -extern RwBool -RpAtomicValidatePlugins(const RpAtomic * atomic); - -extern RwBool -RpClumpValidatePlugins(const RpClump * clump); - -#if ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) -extern RwFrame * -RpAtomicGetFrame(const RpAtomic * atomic); - -extern RwFrame * -RpClumpGetFrame(const RpClump * clump); - -extern RpClump * -RpClumpSetFrame(RpClump * clump, - RwFrame * frame); - -/* Flags */ -extern RpAtomic * -RpAtomicSetFlags(RpAtomic * atomic, - RwUInt32 flags); - -extern RwUInt32 -RpAtomicGetFlags(const RpAtomic * atomic); - -extern RwSphere * -RpAtomicGetBoundingSphere(RpAtomic * atomic); - -extern RwInt32 -RpInterpolatorGetEndMorphTarget(const RpInterpolator * interpolator); - -extern RwInt32 -RpInterpolatorGetStartMorphTarget(const RpInterpolator * interpolator); - -extern RwReal -RpInterpolatorGetValue(const RpInterpolator * interpolator); - -extern RwReal -RpInterpolatorGetScale(const RpInterpolator * interpolator); - -extern RpInterpolator * -RpInterpolatorSetEndMorphTarget(RpInterpolator * interpolator, - RwInt32 morphTarget, - RpAtomic * atomic); - -extern RpInterpolator * -RpInterpolatorSetStartMorphTarget(RpInterpolator * interpolator, - RwInt32 morphTarget, - RpAtomic * atomic); - -extern RpInterpolator * -RpInterpolatorSetValue(RpInterpolator * interpolator, - RwReal value, - RpAtomic *atomic); - -extern RpInterpolator * -RpInterpolatorSetScale(RpInterpolator * interpolator, - RwReal scale, - RpAtomic *atomic); - -extern RpAtomic * -RpAtomicRender(RpAtomic * atomic); - -/* Building clumps */ -extern RpClump * -RpAtomicGetClump(const RpAtomic * atomic); - -extern RpInterpolator * -RpAtomicGetInterpolator(RpAtomic * atomic); - -extern RpGeometry * -RpAtomicGetGeometry(const RpAtomic * atomic); - -extern void -RpAtomicSetRenderCallBack(RpAtomic * atomic, - RpAtomicCallBackRender callback); - -extern RpAtomicCallBackRender -RpAtomicGetRenderCallBack(const RpAtomic * atomic); - -#endif - -/* ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) */ - -extern RwBool RpAtomicInstance(RpAtomic *atomic); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#define RpClumpChunkInfoRead(stream, clumpChunkInfo, bytesRead) \ - _rpClumpChunkInfoRead(stream, clumpChunkInfo, bytesRead) - - -/*--- Automatically derived from: c:/daily/rwsdk/world/baworld.h ---*/ - -/* - * World handling. - * World give objects scope, and provide a mechanism for - * efficiency static object rendering. - * - * Copyright (c) 1998 Criterion Software Ltd. - * - */ - -/**************************************************************************** - Defines - */ - -/* Type ID */ -#define rpWORLD 7 - -/* RpWorld private flags (in RwObject) */ -enum RpWorldPrivateFlag -{ - rpWORLDSINGLEMALLOC = 0x01, - rpWORLDPRIVATEFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; -typedef enum RpWorldPrivateFlag RpWorldPrivateFlag; - -/** - * \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): - */ -enum RpWorldFlag -{ - rpWORLDTRISTRIP = 0x01, /**boundingBox)) - -#define RpWorldGetOriginMacro(_world) \ - (&((_world)->worldOrigin)) - -#define RpWorldGetNumMaterialsMacro(_world) \ - ((_world)->matList.numMaterials) - -#define RpWorldGetMaterialMacro(_world, _num) \ - (((_world)->matList.materials)[(_num)]) - -#define RpWorldGetNumClumpsMacro(_world) \ - ((_world)->numClumpsInWorld) - -#define RpWorldSetRenderOrderMacro(_world, _renderOrder) \ - (((_world)->renderOrder = _renderOrder), (_world)) - -#define RpWorldGetRenderOrderMacro(_world) \ - ((_world)->renderOrder) - -#define RpWorldSetFlagsMacro(_world, _flags) \ - (((_world)->flags = (_flags)), (_world)) - -#define RpWorldGetFlagsMacro(_world) \ - ((_world)->flags) - - -#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -#define RpWorldGetBBox(_world) \ - RpWorldGetBBoxMacro(_world) - -#define RpWorldGetOrigin(_world) \ - RpWorldGetOriginMacro(_world) - -#define RpWorldGetNumMaterials(_world) \ - RpWorldGetNumMaterialsMacro(_world) - -#define RpWorldGetMaterial(_world, _num) \ - RpWorldGetMaterialMacro(_world, _num) - -#define RpWorldGetNumClumps(_world) \ - RpWorldGetNumClumpsMacro(_world) - -#define RpWorldSetRenderOrder(_world, _renderOrder) \ - RpWorldSetRenderOrderMacro(_world, _renderOrder) - -#define RpWorldGetRenderOrder(_world) \ - RpWorldGetRenderOrderMacro(_world) - -#define RpWorldSetFlags(_world, _flags) \ - RpWorldSetFlagsMacro(_world, _flags) - -#define RpWorldGetFlags(_world) \ - RpWorldGetFlagsMacro(_world) - -#endif /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - - -/**************************************************************************** - Global types - */ - - -/** - * \ingroup rpworldsub - * \ref RpWorldRenderOrder - * represents the options available for - * the rendering order of world sectors in the camera's view frustum (see - * API function \ref RpWorldSetRenderOrder). - */ -enum RpWorldRenderOrder -{ - rpWORLDRENDERNARENDERORDER = 0, - rpWORLDRENDERFRONT2BACK, /**pipeline = _pipeline), _world ) - -#define RpWorldGetSectorPipelineMacro(_world, _pipeline) \ - ( (*(_pipeline) = (_world)->pipeline), _world ) - -#define RpWorldSectorSetPipelineMacro(_sector, _pipeline) \ - ( ((_sector)->pipeline = _pipeline), _sector ) - -#define RpWorldSectorGetPipelineMacro(_sector, _pipeline) \ - ( (*(_pipeline) = (_sector)->pipeline), _sector ) - -#define RpAtomicGetDefaultPipelineMacro() \ - (RXPIPELINEGLOBAL(currentAtomicPipeline)) - -#define RpAtomicSetPipelineMacro(_atomic, _pipeline) \ - ( ((_atomic)->pipeline = _pipeline), _atomic ) - -#define RpAtomicGetPipelineMacro(_atomic, _pipeline) \ - ( (*(_pipeline) = (_atomic)->pipeline), _atomic ) - -#define RpMaterialGetDefaultPipelineMacro() \ - (RXPIPELINEGLOBAL(currentMaterialPipeline)) - -#define RpMaterialSetPipelineMacro(_material, _pipeline) \ - ( ((_material)->pipeline = _pipeline), _material ) - -#define RpMaterialGetPipelineMacro(_material, _pipeline) \ - ( (*(_pipeline) = (_material)->pipeline), _material ) - - -#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -#define RpWorldGetDefaultSectorPipeline RpWorldGetDefaultSectorPipelineMacro -#define RpWorldSetSectorPipeline RpWorldSetSectorPipelineMacro -#define RpWorldGetSectorPipeline RpWorldGetSectorPipelineMacro -#define RpWorldSectorSetPipeline RpWorldSectorSetPipelineMacro -#define RpWorldSectorGetPipeline RpWorldSectorGetPipelineMacro - -#define RpAtomicGetDefaultPipeline RpAtomicGetDefaultPipelineMacro -#define RpAtomicSetPipeline RpAtomicSetPipelineMacro -#define RpAtomicGetPipeline RpAtomicGetPipelineMacro - -#define RpMaterialGetDefaultPipeline RpMaterialGetDefaultPipelineMacro -#define RpMaterialSetPipeline RpMaterialSetPipelineMacro -#define RpMaterialGetPipeline RpMaterialGetPipelineMacro - -#endif /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxPipeline *RpWorldSetDefaultSectorPipeline(RxPipeline *pipeline); -extern RxPipeline *RpAtomicSetDefaultPipeline(RxPipeline *pipeline); -extern RxPipeline *RpMaterialSetDefaultPipeline(RxPipeline *pipeline); - -#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -extern RxPipeline *RpWorldGetGenericSectorPipeline(void); -extern RxPipeline *RpWorldGetDefaultSectorPipeline(void); -extern RpWorld *RpWorldSetSectorPipeline(RpWorld *world, - RxPipeline *pipeline); -extern RpWorld *RpWorldGetSectorPipeline(RpWorld *world, - RxPipeline **pipeline); -extern RpWorldSector *RpWorldSectorSetPipeline(RpWorldSector *sector, - RxPipeline *pipeline); -extern RpWorldSector *RpWorldSectorGetPipeline(RpWorldSector *sector, - RxPipeline **pipeline); - -extern RxPipeline *RpAtomicGetGenericPipeline(void); -extern RxPipeline *RpAtomicGetDefaultPipeline(void); -extern RpAtomic *RpAtomicSetPipeline(RpAtomic *atomic, - RxPipeline *pipeline); -extern const RpAtomic *RpAtomicGetPipeline(const RpAtomic *const atomic, - RxPipeline **pipeline); - -extern RxPipeline *RpMaterialGetGenericPipeline(void); -extern RxPipeline *RpMaterialGetDefaultPipeline(void); -extern RpMaterial *RpMaterialSetPipeline(RpMaterial *material, - RxPipeline *pipeline); -extern RpMaterial *RpMaterialGetPipeline(RpMaterial *material, - RxPipeline **pipeline); - -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -extern const RpGeometry *RpGeometryIsCorrectlySorted(const RpGeometry * geometry, - RwBool * result); -extern RpGeometry *RpGeometrySortByMaterial(const RpGeometry * geometry, - RpGeometrySortByMaterialCallBack callback); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* LEGACY-SUPPORT macros */ -#define RpWorldSetDefaultSectorInstancePipeline RpWorldSetDefaultSectorPipeline -#define RpWorldGetDefaultSectorInstancePipeline RpWorldGetDefaultSectorPipeline -#define RpWorldSetSectorInstancePipeline RpWorldSetSectorPipeline -#define RpWorldGetSectorInstancePipeline RpWorldGetSectorPipeline -#define RpWorldSectorSetInstancePipeline RpWorldSectorSetPipeline -#define RpWorldSectorGetInstancePipeline RpWorldSectorGetPipeline - -#define RpAtomicGetDefaultInstancePipeline RpAtomicGetDefaultPipeline -#define RpAtomicSetDefaultInstancePipeline RpAtomicSetDefaultPipeline -#define RpAtomicSetInstancePipeline RpAtomicSetPipeline -#define RpAtomicGetInstancePipeline RpAtomicGetPipeline - -#define RpMaterialSetDefaultRenderPipeline RpMaterialSetDefaultPipeline -#define RpMaterialGetDefaultRenderPipeline RpMaterialGetDefaultPipeline -#define RpMaterialSetRenderPipeline RpMaterialSetPipeline -#define RpMaterialGetRenderPipeline RpMaterialGetPipeline - - -/*--- Automatically derived from: c:/daily/rwsdk/world/baworobj.h ---*/ -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -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); -extern RpWorld *RwCameraGetWorld(const RwCamera *camera); - -/* Adding and removing atomics to/from the world */ -extern RpWorld *RpWorldRemoveAtomic(RpWorld *world, RpAtomic *atomic); -extern RpWorld *RpWorldAddAtomic(RpWorld *world, RpAtomic *atomic); -extern RpWorld *RpAtomicGetWorld(const RpAtomic *atomic); - -/* Adding and removing clumps to/from the world */ -extern RpWorld *RpWorldAddClump(RpWorld *world, RpClump *clump); -extern RpWorld *RpWorldRemoveClump(RpWorld *world, RpClump *clump); -extern RpWorld *RpClumpGetWorld(const RpClump *clump); - -/* Adding and removing lights to/from the world */ -extern RpWorld *RpWorldAddLight(RpWorld *world, RpLight *light); -extern RpWorld *RpWorldRemoveLight(RpWorld *world, RpLight *light); -extern RpWorld *RpLightGetWorld(const RpLight *light); - -/* Finding whats in the view frustum */ -extern RwCamera *RwCameraForAllClumpsInFrustum(RwCamera *camera, void *data); -extern RwCamera *RwCameraForAllClumpsNotInFrustum(RwCamera *camera, - RwInt32 numClumps, void *data); -extern RwCamera *RwCameraForAllSectorsInFrustum(RwCamera *camera, - RpWorldSectorCallBack callBack, - void *pData); - -/* Enumeration involving the world sectors */ -extern RpLight *RpLightForAllWorldSectors(RpLight *light, - RpWorldSectorCallBack callback, - void *data); -extern RpAtomic *RpAtomicForAllWorldSectors(RpAtomic *atomic, - RpWorldSectorCallBack callback, - void *data); -extern RpWorldSector *RpWorldSectorForAllAtomics(RpWorldSector *sector, - RpAtomicCallBack callback, - void *data); -extern RpWorldSector *RpWorldSectorForAllCollisionAtomics(RpWorldSector *sector, - RpAtomicCallBack callback, - void *data); -extern RpWorldSector *RpWorldSectorForAllLights(RpWorldSector *sector, - RpLightCallBack callback, - void *data); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: c:/daily/rwsdk/world/babinwor.h ---*/ -/**************************************************************************** - Global types - */ - -/* Binary Representation - * - */ -typedef struct RpWorldChunkInfoSector RpWorldSectorChunkInfo; -typedef struct RpWorldChunkInfoSector _rpWorldSector; - -#if (!defined(DOXYGEN)) -struct RpWorldChunkInfoSector -{ - RwInt32 matListWindowBase; - RwInt32 numPolygons; - RwInt32 numVertices; - RwV3d inf; - RwV3d sup; - RwBool collSectorPresent; /* unused but retains same struct size */ - RwBool unused; -}; - - -typedef struct RpPlaneSectorChunkInfo RpPlaneSectorChunkInfo; -typedef struct RpPlaneSectorChunkInfo _rpPlaneSector; - -struct RpPlaneSectorChunkInfo -{ - RwInt32 type; - RwReal value; - RwBool leftIsWorldSector; - RwBool rightIsWorldSector; - RwReal leftValue; - RwReal rightValue; -}; - -typedef struct RpWorldChunkInfo RpWorldChunkInfo; -typedef struct RpWorldChunkInfo _rpWorld; - -struct RpWorldChunkInfo -{ - RwBool rootIsWorldSector; - - 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; - RwInt32 numVertices; - RwInt32 numPlaneSectors; - RwInt32 numWorldSectors; - RwInt32 colSectorSize; - - RwInt32 format; /* Flags about the world */ -}; -#endif /* (!defined(DOXYGEN)) */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Binary format */ -extern RwUInt32 RpWorldStreamGetSize(const RpWorld *world); -extern RpWorld *RpWorldStreamRead(RwStream *stream); -extern const RpWorld *RpWorldStreamWrite(const RpWorld *world, - RwStream *stream); -extern RpWorldSectorChunkInfo * -_rpWorldSectorChunkInfoRead(RwStream *stream, - RpWorldSectorChunkInfo *worldSectorChunkInfo, - RwInt32 *bytesRead); -extern RpPlaneSectorChunkInfo * -_rpPlaneSectorChunkInfoRead(RwStream *stream, - RpPlaneSectorChunkInfo *planeSectorChunkInfo, - RwInt32 *bytesRead); -extern RpWorldChunkInfo * -_rpWorldChunkInfoRead(RwStream *stream, - RpWorldChunkInfo *worldChunkInfo, - RwInt32 *bytesRead); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#define RpWorldSectorChunkInfoRead(stream, worldSectorChunkInfo, bytesRead) \ - _rpWorldSectorChunkInfoRead(stream, worldSectorChunkInfo, bytesRead) - -#define RpPlaneSectorChunkInfoRead(stream, planeSectorChunkInfo, bytesRead) \ - _rpPlaneSectorChunkInfoRead(stream, planeSectorChunkInfo, bytesRead) - -#define RpWorldChunkInfoRead(stream, worldChunkInfo, bytesRead) \ - _rpWorldChunkInfoRead(stream, worldChunkInfo, bytesRead) - -#endif /* RPWORLD_H */ diff --git a/sdk/rwsdk/include/d3d8/rpworld.rpe b/sdk/rwsdk/include/d3d8/rpworld.rpe deleted file mode 100644 index 080eefa5..00000000 --- a/sdk/rwsdk/include/d3d8/rpworld.rpe +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionWorld -{ - - -E_RP_WORLD_INVSPHERE, - -E_RP_WORLD_INVINTERSECTION, - -E_RP_WORLD_MATRANGE, - -E_RP_WORLD_CLUMPINWORLD, - -E_RP_WORLD_CLUMPNOTINWORLD, - -E_RP_WORLD_ATOMICNOFRAME, - -E_RP_WORLD_TOOMANYVERTICES, - - e_rwdb_CriterionWorldLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionWorld e_rwdb_CriterionWorld; - - diff --git a/sdk/rwsdk/include/d3d8/rt2d.h b/sdk/rwsdk/include/d3d8/rt2d.h deleted file mode 100644 index 0584d3a5..00000000 --- a/sdk/rwsdk/include/d3d8/rt2d.h +++ /dev/null @@ -1,1028 +0,0 @@ -/* - * Data structures for 2d toolkit - * - * Copyright (c) Criterion Software Limited - */ - -/*************************************************************************** - * * - * Module : rt2d.h * - * * - * Purpose : * - * * - **************************************************************************/ - -#ifndef RT2D_H -#define RT2D_H - -/** - * \defgroup rt2d Rt2d - * \ingroup 2dtools - * - * 2D Rendering Toolkit for RenderWare. - */ - -/** - * \defgroup rt2ddatatypes Data Types - * \ingroup rt2d - * - * Basic Data Types - */ - -/** - * \defgroup rt2dsub Rt2d - * \ingroup rt2d - * - * Rt2d functions - */ - -/** - * \defgroup rt2dbrush Rt2dBrush - * \ingroup rt2d - * - * Brush functions - */ - -/** - * \defgroup rt2dctm Rt2dCTM - * \ingroup rt2d - * - * Current Transformation Matrix (CTM) - */ - -/** - * \defgroup rt2ddevice Rt2dDevice - * \ingroup rt2d - * - * Camera device functions - */ - -/** - * \defgroup rt2dfont Rt2dFont - * \ingroup rt2d - * - * Font functions - */ - -/** - * \defgroup rt2dobject Rt2dObject - * \ingroup rt2d - * - * Objects - */ - -/** - * \defgroup rt2dobjectstring Rt2dObjectString - * \ingroup rt2d - * - * String functions - */ - -/** - * \defgroup rt2dpath Rt2dPath - * \ingroup rt2d - * - * Path functions - */ - -/** - * \defgroup rt2dpickregion Rt2dPickRegion - * \ingroup rt2d - * - * Pick regions - */ - -/** - * \defgroup rt2dscene Rt2dScene - * \ingroup rt2d - * - * Scenes - */ - -/** - * \defgroup rt2dshape Rt2dShape - * \ingroup rt2d - * - * Shapes - */ - -/** - * \defgroup rt2drwv2d RwV2d - * \ingroup rt2d - * - * Rt2d plugin directly extends the Core Library's RwV2d API functions. - */ - -/**************************************************************************** - Includes - */ - -#include "rpworld.h" -#include "rt2d.rpe" /* automatically generated header file */ - -/**************************************************************************** - Defines - */ - -#define Rt2dBrushSetWidthMacro(_brush, _width) \ - ( ( (_brush)->halfwidth = ((_width) * 0.5f) ), (_brush) ) - -#define Rt2dBrushGetWidthMacro(_brush) \ - ( (_brush)->halfwidth * 2.0f ) - -#define Rt2dCTMReadMacro(_result) \ - (RwMatrixCopy((_result), _rt2dCTMGet()), (_result)) - -#if defined (GCN_DRVMODEL_H) - #define VERTEXCACHESIZE 64 -#else - #define VERTEXCACHESIZE 256 -#endif - - -/**************************************************************************** - Global Types - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* - * rt2dShadeParameters - * typedef for a structure describing Shade Parameters - */ -typedef struct rt2dShadeParameters rt2dShadeParameters; - -/* - * - * rt2dShadeParameters - * describes Shade Parameters - */ - -#if (!defined(DOXYGEN)) -struct rt2dShadeParameters -{ - RwRGBAReal col; /* col */ - RwV2d uv; /* uv */ -}; -#endif /* (!defined(DOXYGEN)) */ - -/** - * \ingroup rt2ddatatypes - * \struct Rt2dBrush - * Brush object. - * This should be considered an opaque type. - * Use Rt2dBrush API functions to access. - */ -typedef struct Rt2dBrush Rt2dBrush; - -/* - * Rt2dBrush - * structure describing a Brush - */ -#if (!defined(DOXYGEN)) -struct Rt2dBrush -{ - rt2dShadeParameters top; - rt2dShadeParameters dtop; - rt2dShadeParameters bottom; - rt2dShadeParameters dbottom; - RwRGBA colorCache; - RwInt32 flag; - RwTexture *texture; - RpMaterial *material; - RwReal halfwidth; - RwInt32 refCount; -}; -#endif /* (!defined(DOXYGEN)) */ - -/** - * \ingroup rt2ddatatypes - * \struct Rt2dPath - * Path object. - * This should be considered an opaque type. - * Use Rt2dPath API functions to access. - */ -typedef struct Rt2dPath Rt2dPath; - -/** - * \ingroup rt2ddatatypes - * \struct Rt2dFont - * Font object. - * This should be considered an opaque type. - * Use Rt2dFont API functions to access. - */ -typedef struct Rt2dFont Rt2dFont; - -/* - * typedef used for referencing a spot in a font dictionary - */ -typedef struct _rt2dFontDictionaryNode _rt2dFontDictionaryNode; - - -typedef struct Rt2dBBox Rt2dBBox; -/** -* \ingroup rt2ddatatypes - * \struct Rt2dBBox - * structure describing a Bounding Box - */ -struct Rt2dBBox -{ - RwReal x; /**< x-coordinate of lower-left corner */ - RwReal y; /**< y-coordinate of lower-left corner */ - RwReal w; /**< Width */ - RwReal h; /**< Height */ -}; - -/** - * \ingroup rt2ddatatypes - * \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. - */ -typedef struct Rt2dObject Rt2dObject; - -/* - * typedef for a structure describing a scene of shapes (opaque) - */ -typedef struct _rt2dScene _rt2dScene; - -/* - * typedef for a structure describing the depth of an object - */ -typedef struct _rt2dDepthOfObject _rt2dDepthOfObject; - -#if (!defined(DOXYGEN)) -/* - * typedef for a structure describing the depth of an object - */ -struct _rt2dDepthOfObject -{ - Rt2dObject *object; - RwInt32 depth; -}; - -/* - * structure describing a scene of shapes - */ -struct _rt2dScene -{ - RwSList *objects; /* collection of objects in scene */ - RwInt32 objectCount; /* number of objects */ - 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 -{ - _rt2dShapeRep *rep; - RwRGBA *colorCache; /* Shape's color cache */ - RpAtomic *atomic; /* Atomic repn */ -}; - -/* - * typedef for a structure describing a pick region that can be tested for point inclusion (opaque) - */ -typedef struct _rt2dPickRegion _rt2dPickRegion; - -/* - * structure describing a pick region that can be tested for point inclusion - */ -struct _rt2dPickRegion -{ - Rt2dPath *path; /* path that defines region for testing */ - Rt2dBBox bbox; /* bounding box of path */ - RwMatrix transformation; - /* ivnert transformation used to place the pick region */ -}; - -/* - * structure describing a renderable text string - */ - -struct _rt2dObjectString -{ - RwChar *textString; /* Text string to be rendered */ - Rt2dBrush *brush; /* Brush to be used to draw text */ - RwInt32 maxLength; /* Maximum string length before reallocation, excluding null */ - RwReal height; /* Font rendering Height */ - _rt2dFontDictionaryNode *font; /* Dictionary node identifying font to be used */ -}; -#endif /* (!defined(DOXYGEN)) */ - -/* - * typedef for a renderable string - */ -typedef struct _rt2dObjectString _rt2dObjectString; -/** - * \ingroup rt2ddatatypes - * \ref Rt2dObjectTypeEnum - * enumeration describing types of Rt2dObject - */ -enum Rt2dObjectTypeEnum { - rt2DOBJECTTYPEOBJECT=0, /** -#include "rt2danim.rpe" /* automatically generated header file */ -#include "rt2d.h" -#include "rpcriter.h" -/**************************************************************************** - Defines - */ - -/**************************************************************************** - Global Types - */ - -/* RWPUBLIC */ -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#define RT2D_BUTTON_MAX_STATES 4 -#define RT2D_BUTTON_MAX_STATE_TRANSITIONS 32 - -/* Button state flags. */ - -#define rt2dANIMBUTTONSTATEPICKREGION 0x0001 -#define rt2dANIMBUTTONSTATEUP 0x0002 -#define rt2dANIMBUTTONSTATEDOWN 0x0004 -#define rt2dANIMBUTTONSTATEOVER 0x0008 - -#define rt2dANIMBUTTONSTATEIDLETOOVERUP 0x0010 -#define rt2dANIMBUTTONSTATEOVERUPTOIDLE 0x0020 -#define rt2dANIMBUTTONSTATEOVERUPTOOVERDOWN 0x0040 -#define rt2dANIMBUTTONSTATEOVERDOWNTOOVERUP 0x0080 -#define rt2dANIMBUTTONSTATEOVERDOWNTOOUTDOWN 0x0100 -#define rt2dANIMBUTTONSTATEOUTDOWNTOOVERDOWN 0x0200 -#define rt2dANIMBUTTONSTATEOUTDOWNTOIDLE 0x0400 -#define rt2dANIMBUTTONSTATEIDLETOOVERDOWN 0x0800 -#define rt2dANIMBUTTONSTATEOVERDOWNTOIDLE 0x1000 - - -/* Mask to separate trans state in state flag. */ -#define rt2dANIMBUTTONSTATEMASK \ - (rt2dANIMBUTTONSTATEPICKREGION | \ - rt2dANIMBUTTONSTATEPICKUP | \ - rt2dANIMBUTTONSTATEPICKDOWN | \ - rt2dANIMBUTTONSTATEPICKOVER) - -/* Basic enumerations */ - -/** - * \ingroup rt2dmessage - * \ref Rt2dMessageType, this type represents the different types of - * messages that are available. - */ - -enum Rt2dMessageType -{ - rt2dMESSAGETYPENULL = 0, /**< Empty message. */ - rt2dMESSAGETYPEPLAY, /**< Play animation. */ - rt2dMESSAGETYPESTOP, /**< Stop animation. */ - rt2dMESSAGETYPENEXTFRAME, /**< Advance to next frame. */ - rt2dMESSAGETYPEPREVFRAME, /**< Rewind to previouse frame. */ - rt2dMESSAGETYPEGOTOFRAME, /**< Advance to frame by index. */ - rt2dMESSAGETYPEGOTOLABEL, /**< Advance to frame by label. */ - rt2dMESSAGETYPEGETURL, /**< Get URL */ - rt2dMESSAGETYPEDOACTION, /* Perform action. */ - rt2dMESSAGETYPEFOREIGN, /**< Application specific message. */ - rt2dMESSAGETYPEMOUSEMOVETO, /**< Move mouse. */ - rt2dMESSAGETYPEMOUSEBUTTONSTATE, /**< Mouse button up or down. */ - rt2dMESSAGETYPESPECIALTELLTARGET, /* Change target while queueing */ - rt2dMESSAGETYPEBUTTONBYLABEL, /**< Mouse button transition by label */ - rt2dMESSAGETYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; - -typedef enum Rt2dMessageType Rt2dMessageType; - -/** - * \ingroup rt2dstringlabel - * \ref Rt2dStringLabelType, this type represents the different types of - * object that can be labelled in the maestro's label table. - */ - -enum Rt2dStringLabelType -{ - rt2dANIMLABELTYPENONE = 0, - rt2dANIMLABELTYPEANIM, /**< Animation label. */ - rt2dANIMLABELTYPEFRAME, /**< Frame or cel label. */ - rt2dANIMLABELTYPEBUTTON, /**< Button label. */ - rt2dANIMLABELTYPEFOREIGN, /**< Application specific. */ - rt2dANIMLABELTYPESHAPE, /**< Shape label. */ - rt2dANIMLABELTYPEURL, /**< URL label. */ - rt2dANIMLABELTYPEENUMSIZEINT = RWFORCEENUMSIZEINT -}; - -typedef enum Rt2dStringLabelType Rt2dStringLabelType; - -/* Basic animation structures */ - -/** - * \ingroup rt2danimsub - * \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 - * \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 - * \struct Rt2dKeyFrameSet - * structure describing a set of keyframe actions to be applied to a 2D object. - * This should be considered an opaque type. Use the - * Rt2dAnim API functions to access. - */ -typedef struct Rt2dKeyFrameSet Rt2dKeyFrameSet; - -/** - * \ingroup rt2danimsub - * \struct Rt2dAnimObjectUpdate - * Structure describing an unoptimized update to an object - * This should be considered an opaque type. Use the - * Rt2dAnim API functions to access. - */ -typedef struct Rt2dAnimObjectUpdate Rt2dAnimObjectUpdate; - -/** - * \ingroup rt2danimsub - * \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; - -/* - * Structure describing a displayable or depth change to a 2d object. - */ -typedef struct Rt2dKeyFrameShow Rt2dKeyFrameShow; - -/* - * Structure describing a morph change to a 2d object. - */ -typedef struct Rt2dKeyFrameMorph Rt2dKeyFrameMorph; - -/** - * \ingroup rt2danimsub - * \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 - * \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 - * \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 - * \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 - * \struct Rt2dMaestro - * Structure describing a maestro. - * This should be considered an opaque type. Use the - * Rt2dMaestro API functions to access. - */ -typedef struct Rt2dMaestro Rt2dMaestro; - -/* - * 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 - * \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; - -/** - * \ingroup rt2danimsub - * \struct Rt2dKeyFrame - * structure describing a transforming action - */ -struct Rt2dKeyFrameTransform -{ - RwMatrix matrix; /**< Transform to be applied */ /*64*/ -}; - -/** - * \ingroup rt2danimsub - * \struct Rt2dKeyFrameColor - * Structure describing a color - * change to a 2d object. - */ -struct Rt2dKeyFrameColor -{ - RwRGBAReal color; /**< Color value for a keyframe */ /*16*/ -}; - -/** - * \ingroup rt2danimsub - * \struct Rt2dKeyFrameShow - * Structure describing a show/hide change and a depth change to a 2d object. - */ -struct Rt2dKeyFrameShow -{ - RwBool show; /**< visibility flag */ /*4*/ - RwInt32 depth; /**< Depth order (reverse-z) */ /*4*/ - RwUInt8 pad1[8]; /**< Alignment padding */ /*8*/ -}; - -/** - * \ingroup rt2danimsub - * \struct Rt2dKeyFrameMorph - * Structure describing a morph change to a 2d object. - */ -struct Rt2dKeyFrameMorph -{ - Rt2dObject *source; /**< start object */ /*4*/ - Rt2dObject *destination; /**< end object */ /*4*/ - RwReal alpha; /**< interpolation value (0.0f-1.0f) */ /*4*/ - RwInt32 pad1; /**< Alignment padding */ /*4*/ -}; - -/** - * \ingroup rt2dmessage - * \struct Rt2dMessage - * Structure describing a message. A message must have a valid message type, (\ref Rt2dMessageType) - * and animation index. The animation index identifies which animation the message applies to. - * A -1 indicates the currently active animation. A message can have none, one or two additional - * \ref RwInt32 parameters, depending on the message type. - */ -struct Rt2dMessage -{ - RwUInt32 messageType; /**< message identifier - (\ref Rt2dMessageType) */ - RwInt32 index; /**< animation to apply any - actions to */ - RwInt32 intParam1; /**< first param (message dependant) */ - RwInt32 intParam2; /**< second param (message dependant) */ -}; - -#define _rt2dMessageGetMessageTypeMacro(_message) \ - ((_message)->messageType); - -#define _rt2dMessageSetMessageTypeMacro(_message, _messageType) \ - ((_message)->messageType = (_messageType)); - -#define _rt2dMessageGetIndexMacro(_message) \ - ((_message)->index); - -#define _rt2dMessageSetIndexMacro(_message, _index) \ - ((_message)->index = (_index)); - -#define _rt2dMessageSetParamMacro(_message, _param1, _param2) \ -MACRO_START \ -{ \ - ((_message)->intParam1 = (_param1)); \ - ((_message)->intParam2 = (_param2)); \ -} \ -MACRO_STOP - -#define _rt2dMessageGetParamMacro(_message, _param1, _param2) \ -MACRO_START \ -{ \ - (*(_param1) = (_message)->intParam1); \ - (*(_param2) = (_message)->intParam2); \ -} \ -MACRO_STOP - -/* - * 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 - (see Rt2dStringLabelType) */ - RwInt32 nameIndex; /* index of name in internal data - area */ - void *internalData; /* internal data */ - void *userData; /* customizable data */ - -}; - -#endif /* (!defined(DOXYGEN)) */ - -#define _rt2dStringLabelGetStringLabelTypeMacro(_strLabel) \ - ((_strLabel)->entityType) - -#define _rt2dStringLabelSetStringLabelTypeMacro(_strLabel, _entityType) \ - ((_strLabel)->entityType = (_entityType)) - -#define _rt2dStringLabelGetNameIndexMacro(_strLabel) \ - ((_strLabel)->nameIndex) - -#define _rt2dStringLabelSetNameIndexMacro(_strLabel, _index) \ - ((_strLabel)->nameIndex = (_index)) - -#define _rt2dStringLabelGetInternalDataMacro(_strLabel) \ - ((_strLabel)->internalData) - -#define _rt2dStringLabelSetInternalDataMacro(_strLabel, _internalData) \ - ((_strLabel)->internalData = (_internalData)) - -#define _rt2dStringLabelGetUserDataMacro(_strLabel) \ - ((_strLabel)->userData) - -#define _rt2dStringLabelSetUserDataMacro(_strLabel, _userData) \ - ((_strLabel)->userData = (_userData)) - -/* - * 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 - * 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 */ -}; - -#endif /* (!defined(DOXYGEN)) */ - -#define _rt2dCelGetStringLabelIndexMacro(_cel) \ - ((_cel)->strLabelIndex); - -#define _rt2dCelSetStringLabelIndexMacro(_cel, _index) \ - ((_cel)->strLabelIndex = (_index)); - -#define _rt2dCelGetCelIndexMacro(_cel) \ - ((_cel)->celIndex); - -#define _rt2dCelSetCelIndexMacro(_cel, _index) \ - ((_cel)->celIndex = (_index)); - -#define _rt2dCelGetMessageListIndexMacro(_cel) \ - ((_cel)->messageListIndex); - -#define _rt2dCelSetMessageListIndexMacro(_cel, _index) \ - ((_cel)->messageListIndex = (_index)); - -/* Callback typedefs */ - -typedef Rt2dAnim *(*Rt2dAnimCallBack)(Rt2dAnim *object, - Rt2dAnimProps *props, - void *data); -/** - * \ingroup rt2danimsub - * \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 keyframeListTime The key frame list time - * \param data User defined data - * - * \return return value is ignored - */ -typedef Rt2dKeyFrameList *(Rt2dKeyFrameListCallBack)( - Rt2dAnim *anim, - Rt2dAnimProps *props, - Rt2dKeyFrameList *keyframeList, - RwReal keyframeListTime, - void *data); - -/** - * \ingroup rt2danimsub - * \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 remainingDeltaTime Remaining time - * - * \return return value is ignored - */ -typedef Rt2dAnim *(*Rt2dAnimOnEndReachedCallBack)(Rt2dAnim *anim, - Rt2dAnimProps *props, - RwReal remainingDeltaTime); - -/** - * \ingroup rt2dmaestro - * \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 anim Pointer to the animation. - * \param props Pointer to the anim's props. - * \param pData Pointer to private data. - * - * \return Pointer to the maestro. - */ - -typedef Rt2dMaestro *(*Rt2dMaestroAnimationsCallBack) - (Rt2dMaestro *maestro, Rt2dAnim *anim, Rt2dAnimProps *props, void * pData); - -/** - * \ingroup rt2dmessage - * \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 - * handler may process or ignore any messages it is given. - * - * This function should return the current message to indicate success. The - * callback may return NULL to terminate further callbacks on the maestro. - * - * \param maestro Pointer to parent maestro. - * \param message Pointer to the message. - * - * \return Pointer to the message. - */ - -typedef Rt2dMessage *(*Rt2dMessageHandlerCallBack) - (Rt2dMaestro *maestro, Rt2dMessage *message); - -/* Message streaming call backs. */ - -typedef RwInt32 -(*Rt2dMessageStreamGetSizeCallBack) - (Rt2dMaestro *maestro, Rt2dMessage *message); - -typedef Rt2dMessage * -(*Rt2dMessageStreamReadCallBack) - (Rt2dMaestro *maestro, Rt2dMessage *message, RwStream *stream); - -typedef Rt2dMessage * -(*Rt2dMessageStreamWriteCallBack) - (Rt2dMaestro *maestro, Rt2dMessage *message, RwStream *stream); - -/* - * Data access macros. - */ - -/* - * Toolkit-level initialization / finalization - */ -/* - * INITIALIZE - */ -extern void -Rt2dAnimOpen(void); - -extern void -Rt2dAnimClose(void); - -/* - * Rt2dAnim - */ - -/* General */ - -extern Rt2dAnimOnEndReachedCallBack -Rt2dAnimSetOnEndReachedCallBack(Rt2dAnimOnEndReachedCallBack callback); - -extern Rt2dAnimOnEndReachedCallBack -Rt2dAnimGetOnEndReachedCallBack(void); - - -extern Rt2dAnim * -Rt2dAnimOnEndReachedCallBackLoop(Rt2dAnim *anim, Rt2dAnimProps *props, - RwReal remainingDeltaTime); - -extern Rt2dAnim * -Rt2dAnimOnEndReachedCallBackStop(Rt2dAnim *anim, Rt2dAnimProps *props, - RwReal remainingDeltaTime); - -/* Management */ -extern Rt2dAnim * -Rt2dAnimCreate(void); - -extern RwBool -Rt2dAnimDestroy(Rt2dAnim *anim, Rt2dAnimProps *props); - -extern Rt2dAnim * -Rt2dAnimLock(Rt2dAnim *anim, Rt2dAnimProps *props); - -extern Rt2dAnim * -Rt2dAnimUnlock(Rt2dAnim *anim, Rt2dAnimProps *props); - -extern Rt2dAnim * -Rt2dAnimAddKeyFrameList(Rt2dAnim *anim, - Rt2dKeyFrameList *keyframeList, - RwReal time); - - -extern Rt2dAnim * -Rt2dAnimCopy(Rt2dAnim *srcAnim, Rt2dAnimProps *srcProps); - -/* Streaming */ -extern RwUInt32 -Rt2dAnimStreamGetSize( Rt2dAnim *anim, - Rt2dAnimProps *props); - -extern Rt2dAnim * -Rt2dAnimStreamRead(RwStream *stream, - Rt2dAnimProps *props); - -extern Rt2dAnim * -Rt2dAnimStreamReadTo(RwStream *dest, - RwStream *stream, - Rt2dAnimProps *props); - -extern Rt2dAnim * -Rt2dAnimStreamWrite(Rt2dAnim *anim, RwStream *stream, - Rt2dAnimProps *data); - -/* Playback */ -extern RwBool -Rt2dAnimIsInterpolated(Rt2dAnim *anim); - -extern Rt2dAnim * -Rt2dAnimSetInterpolate(Rt2dAnim *anim, RwBool interpolate); - -extern Rt2dAnim * -Rt2dAnimReset(Rt2dAnim *anim, Rt2dAnimProps *props); - -extern Rt2dAnim * -Rt2dAnimSetDeltaTimeScale(Rt2dAnim *anim, RwReal timeScale); - -extern Rt2dAnim * -Rt2dAnimAddDeltaTime(Rt2dAnim *anim, Rt2dAnimProps *props, - RwReal deltaTime); - -extern Rt2dAnim * -Rt2dAnimAddDeltaFrameIndex(Rt2dAnim *anim, Rt2dAnimProps *props, - RwInt32 deltaFrame); - -extern Rt2dAnim * -Rt2dAnimTimeUpdate(Rt2dAnim *anim, Rt2dAnimProps *props); - -extern Rt2dAnim * -Rt2dAnimGotoKeyFrameListByTime(Rt2dAnim *anim, Rt2dAnimProps *props, - RwReal time); - -extern Rt2dAnim * -Rt2dAnimGotoKeyFrameListByIndex(Rt2dAnim *anim, Rt2dAnimProps *props, - RwInt32 frameIndex); - -/* Utilities */ -extern Rt2dAnim * -Rt2dAnimForAllKeyFrameLists(Rt2dAnim *anim, Rt2dKeyFrameListCallBack callBack, - Rt2dAnimProps *props, void *data); - -/* Interrogation */ -extern RwInt32 -Rt2dAnimGetNumberOfKeyFrames(Rt2dAnim *anim); - -extern Rt2dKeyFrameList * -Rt2dAnimGetKeyFrameListByIndex(Rt2dAnim *anim, RwUInt32 frameIndex); - -extern RwReal -Rt2dAnimGetCurrentTime(Rt2dAnim *anim); - -extern RwReal -Rt2dAnimGetFinalKeyFrameListTime(Rt2dAnim *anim); - -extern RwInt32 -Rt2dAnimGetPrevFrameIndex(Rt2dAnim *anim); - -extern RwReal -Rt2dAnimGetPrevFrameTime(Rt2dAnim *anim); - -extern RwInt32 -Rt2dAnimGetNextFrameIndex(Rt2dAnim *anim); - -extern RwReal -Rt2dAnimGetNextFrameTime(Rt2dAnim *anim); - -/* KeyFrameList Management */ -extern Rt2dKeyFrameList * -Rt2dKeyFrameListCreate(Rt2dAnimProps *props); - -extern RwBool -Rt2dKeyFrameListDestroy(Rt2dKeyFrameList *keyframeList); - -extern Rt2dKeyFrameList * -Rt2dKeyFrameListLock(Rt2dKeyFrameList *keyframeList, Rt2dAnimProps *props); - -extern Rt2dKeyFrameList * -Rt2dKeyFrameListUnlock(Rt2dKeyFrameList *keyframeList, - Rt2dAnimProps *props); - -extern Rt2dKeyFrameList* -Rt2dKeyFrameListAddUpdateObject(Rt2dKeyFrameList *keyframeList, - Rt2dAnimObjectUpdate *update); - -/* KeyFrameList Streaming */ -extern Rt2dKeyFrameList * -Rt2dKeyFrameListStreamRead(RwStream *stream); - -extern RwUInt32 -Rt2dKeyFrameListStreamGetSize(Rt2dKeyFrameList *keyframeList); - -extern Rt2dKeyFrameList * -Rt2dKeyFrameListStreamWrite(Rt2dKeyFrameList *keyframeList, - RwStream *stream); - -/* KeyFrameList Playback */ -extern Rt2dKeyFrameList * -Rt2dKeyFrameListAdvance(Rt2dKeyFrameList *keyframeList, - Rt2dAnimProps *props); - -extern Rt2dKeyFrameList * -Rt2dKeyFrameListApply(Rt2dKeyFrameList *keyframeList, Rt2dAnimProps *props, - RwReal alpha); - -/* KeyFrameList edition object */ -extern Rt2dAnimObjectUpdate * -Rt2dAnimObjectUpdateCreate(Rt2dObject *object); - -extern RwBool -Rt2dAnimObjectUpdateDestroy(Rt2dAnimObjectUpdate *update); - -extern Rt2dAnimObjectUpdate * -Rt2dAnimObjectUpdateClear(Rt2dAnimObjectUpdate *update); - -extern Rt2dAnimObjectUpdate* -Rt2dAnimObjectUpdateSetTransform(Rt2dAnimObjectUpdate *update, - Rt2dKeyFrameTransform *transform); - -extern Rt2dAnimObjectUpdate* -Rt2dAnimObjectUpdateSetColorOffs(Rt2dAnimObjectUpdate *update, - Rt2dKeyFrameColor *colorOffs); - -extern Rt2dAnimObjectUpdate* -Rt2dAnimObjectUpdateSetColorMult(Rt2dAnimObjectUpdate *update, - Rt2dKeyFrameColor *colorMult); - -extern Rt2dAnimObjectUpdate* -Rt2dAnimObjectUpdateSetShow(Rt2dAnimObjectUpdate *update, - Rt2dKeyFrameShow *show); - -extern Rt2dAnimObjectUpdate* -Rt2dAnimObjectUpdateSetMorph(Rt2dAnimObjectUpdate *update, - Rt2dKeyFrameMorph *morph); - -extern Rt2dAnimObjectUpdate * -Rt2dAnimObjectUpdateSetObject(Rt2dAnimObjectUpdate *update, - Rt2dObject *object); - -/* Props management */ -extern Rt2dAnimProps * -Rt2dAnimPropsCreate(Rt2dObject *scene); - -extern RwBool -Rt2dAnimPropsDestroy(Rt2dAnimProps *props); - -/* - * Rt2dButton - */ - -extern Rt2dMaestro * -Rt2dMaestroAddButton(Rt2dMaestro *maestro, RwInt32 strLabelIdx, RwInt32 objectIdx, - RwUInt32 stateFlag, RwInt32 *actionListIdx, - RwInt32 *index); - -/* - * Rt2dCel & Rt2dCelList - */ - -extern Rt2dCel * -Rt2dCelCreate(Rt2dMaestro *maestro, - const RwChar *name, - RwInt32 celIndex, RwInt32 messageListIndex); - -extern Rt2dCelList * -Rt2dCelListCreate( void ); - -extern RwBool -Rt2dCelDestroy(Rt2dMaestro *maestro, Rt2dCel *cel); - -extern Rt2dCel * -Rt2dCelAddButtonIndex(Rt2dCel * cel, RwInt32 buttonIndex, RwInt32 *index); - -#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -#define Rt2dCelGetStringLabelIndex(_cel) \ - _rt2dCelGetStringLabelIndexMacro((_cel)); - -#define Rt2dCelSetStringLabelIndex(_cel, _index) \ - _rt2dCelSetStringLabelIndexMacro((_cel), (_index)); - -#define Rt2dCelGetCelIndex(_cel) \ - _rt2dCelGetCelIndexMacro((_cel)); - -#define Rt2dCelSetCelIndex(_cel, _index) \ - _rt2dCelSetCelIndexMacro((_cel), (_index)); - -#define Rt2dCelGetMessageListIndex(_cel) \ - _rt2dCelGetMessageListIndexMacro((_cel)); - -#define Rt2dCelSetMessageListIndex(_cel, _index) \ - _rt2dCelSetMessageListIndexMacro((_cel), (_index)); - -#else /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -extern RwInt32 -Rt2dCelGetStringLabelIndex(Rt2dCel *cel); - -extern void -Rt2dCelSetStringLabelIndex(Rt2dCel *cel, RwInt32 index); - -extern RwInt32 -Rt2dCelGetCelIndex(Rt2dCel *cel); - -extern void -Rt2dCelSetCelIndex(Rt2dCel *cel, RwInt32 index); - -extern RwInt32 -Rt2dCelGetMessageListIndex(Rt2dCel *cel); - -extern void -Rt2dCelSetMessageListIndex(Rt2dCel *cel, RwInt32 index); - -#endif /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -extern RwBool -Rt2dCelListDestroy(Rt2dCelList *celList); - -extern Rt2dCelList * -Rt2dCelListLock(Rt2dCelList *celList); - -extern Rt2dCelList * -Rt2dCelListUnlock(Rt2dCelList * celList); - -extern Rt2dCelList * -Rt2dCelListCopy(Rt2dCelList *srcCelList); - -extern Rt2dCelList * -Rt2dCelListAddCel(Rt2dCelList *celList, Rt2dCel *cel, RwInt32 *index); - -extern Rt2dCelList * -Rt2dCelListCelGetStringLabelIndex(Rt2dCelList *celList, RwInt32 celIndex, RwInt32 *index); - -extern Rt2dCelList * -Rt2dCelListCelButtonGetDisplayVersion(Rt2dMaestro *maestro, Rt2dCelList * celList, - RwInt32 celIndex, RwInt32 celButtonIndex, RwInt32 *index); - -/* - * Rt2dMaestro - */ -extern Rt2dMaestro * -Rt2dMaestroCreate(void); - -extern RwBool -Rt2dMaestroDestroy(Rt2dMaestro *maestro); - -extern RwUInt32 -Rt2dMaestroStreamGetSize(Rt2dMaestro *maestro); - -extern Rt2dMaestro * -Rt2dMaestroStreamRead(Rt2dMaestro *maestro, RwStream *stream); - -extern Rt2dMaestro * -Rt2dMaestroStreamWrite(Rt2dMaestro *maestro, RwStream *stream); - - -extern Rt2dMaestro * -Rt2dMaestroForAllAnimations(Rt2dMaestro *maestro, - Rt2dMaestroAnimationsCallBack callback, void *data); - -extern Rt2dMaestro * -Rt2dMaestroForAllVisibleAnimations(Rt2dMaestro *maestro, - Rt2dMaestroAnimationsCallBack callback, void *data); - -extern Rt2dMaestro * -Rt2dMaestroAddAnimations(Rt2dMaestro *maestro, - RwInt32 parent, RwInt32 posInParentScene, - Rt2dAnim *anim, Rt2dAnimProps *animProps, Rt2dCelList *celList, - RwInt32 *index); - -extern Rt2dAnim * -Rt2dMaestroGetAnimationsByIndex(Rt2dMaestro *maestro, RwInt32 index); - -extern Rt2dAnimProps * -Rt2dMaestroGetAnimPropsByIndex(Rt2dMaestro *maestro, RwInt32 index); - -extern Rt2dMaestro * -Rt2dMaestroUpdateAnimations(Rt2dMaestro *maestro); - -extern Rt2dMaestro * -Rt2dMaestroAddDeltaTime(Rt2dMaestro *maestro, RwReal deltaTime); - -extern Rt2dMaestro * -Rt2dMaestroLock(Rt2dMaestro * maestro); - -extern Rt2dMaestro * -Rt2dMaestroUnlock(Rt2dMaestro *maestro); - -extern Rt2dObject * -Rt2dMaestroGetScene(Rt2dMaestro *maestro); - -extern Rt2dMaestro * -Rt2dMaestroSetScene(Rt2dMaestro *maestro, Rt2dObject *scene); - -extern Rt2dObject * -Rt2dMaestroGetAnimSceneByIndex(Rt2dMaestro *maestro, RwInt32 index); - -extern Rt2dMaestro * -Rt2dMaestroRender(Rt2dMaestro *maestro); - -extern Rt2dBBox * -Rt2dMaestroGetBBox(Rt2dMaestro *maestro); - -extern Rt2dMaestro * -Rt2dMaestroSetBBox(Rt2dMaestro *maestro, Rt2dBBox *bbox); - - -/* - * Message & Message handlers. - */ -extern Rt2dMessageHandlerCallBack -Rt2dMaestroGetMessageHandler(Rt2dMaestro *maestro); - -extern Rt2dMaestro * -Rt2dMaestroSetMessageHandler(Rt2dMaestro *maestro, Rt2dMessageHandlerCallBack handler); - -extern Rt2dMaestro * -Rt2dMaestroAddMessageList(Rt2dMaestro *maestro, - Rt2dMessage *message, RwInt32 num, RwInt32 *index); - -extern Rt2dMaestro * -Rt2dMaestroPostMessages(Rt2dMaestro *maestro, Rt2dMessage *message, RwInt32 num); - -extern Rt2dMaestro * -Rt2dMaestroProcessMessages(Rt2dMaestro *maestro); - -#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -#define Rt2dMessageGetMessageType(_message) \ - _rt2dMessageGetMessageTypeMacro((_message)); - -#define Rt2dMessageSetMessageTypeMacro(_message, _messageType) \ - _rt2dMessageSetMessageTypeMacro((_message), (_messageType)); - -#define Rt2dMessageGetIndex(_message) \ - _rt2dMessageGetIndexMacro((_message)); - -#define Rt2dMessageSetIndex(_message, _index) \ - _rt2dMessageSetIndexMarco((_message), (_index)); - -#define Rt2dMessageSetParam(_message, _param1, _param2) \ - _rt2dMessageSetParamMacro((_message), (_param1), (_param2)); - -#define Rt2dMessageGetParam(_message, _param1, _param2) \ - _rt2dMessageGetParamMacro((_message), (_param1), (_param2)); - -#else /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -extern Rt2dMessageType -Rt2dMessageGetMessageType(Rt2dMessage *message); - -extern void -Rt2dMessageSetMessageType(Rt2dMessage *message, Rt2dMessageType messageType); - -extern RwInt32 -Rt2dMessageGetIndex(Rt2dMessage *message); - -extern void -Rt2dMessageSetIndex(Rt2dMessage *message, RwInt32 index); - -extern void -Rt2dMessageGetParam(Rt2dMessage *message, RwInt32 *param1, RwInt32 *param2); - -extern void -Rt2dMessageSetParam(Rt2dMessage *message, RwInt32 param1, RwInt32 param2); - -#endif /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -/* - * Default message handler. - */ -extern Rt2dMessage * -Rt2dMessageHandlerDefaultCallBack(Rt2dMaestro *maestro, Rt2dMessage *message); - - -/* - * Labels. - */ -extern Rt2dStringLabel * -Rt2dMaestroFindStringLabel(Rt2dMaestro *maestro, - Rt2dStringLabelType entityType, const RwChar *lookupName, - RwInt32 *index); - -extern Rt2dStringLabel * -Rt2dMaestroGetStringLabelByIndex(Rt2dMaestro *maestro, RwInt32 index); - -extern Rt2dMaestro * -Rt2dMaestroAddStringLabel(Rt2dMaestro *maestro, - Rt2dStringLabelType entityType, const RwChar *name, - void *internalData, RwInt32 *index); - -extern const RwChar * -Rt2dMaestroGetStringLabelName(Rt2dMaestro *maestro, - Rt2dStringLabel *strLabel); - - -#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -#define Rt2dStringLabelGetStringLabelType(_strLabel) \ - _rt2dStringLabelGetStringLabelTypeMacro((_strLabel)) - -#define Rt2dStringLabelSetStringLabelType(_strLabel, _entityType) \ - _rt2dStringLabelSetStringLabelTypeMacro((_strLabel), (_entityType)) - -#define Rt2dStringLabelGetNameIndex(_strLabel) \ - _rt2dStringLabelGetNameIndexMacro((_strLabel)) - -#define Rt2dStringLabelSetNameIndex(_strLabel, _index) \ - _rt2dStringLabelSetNameIndexMacro((_strLabel), (_index)) - -#define Rt2dStringLabelGetInternalData(_strLabel) \ - _rt2dStringLabelGetInternalDataMacro((_strLabel)) - -#define Rt2dStringLabelSetInternalData(_strLabel, _internalData) \ - _rt2dStringLabelSetInternalDataMacro((_strLabel), (_internalData)) - -#define Rt2dStringLabelGetUserData(_strLabel) \ - _rt2dStringLabelGetUserDataMacro((_strLabel)) - -#define Rt2dStringLabelSetUserData(_strLabel, _userData) \ - _rt2dStringLabelSetUserDataMacro((_strLabel), (_userData)) - -#else /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -extern Rt2dStringLabelType -Rt2dStringLabelGetStringLabelType(Rt2dStringLabel *strLabel); - -extern void -Rt2dStringLabelSetStringLabelType(Rt2dStringLabel *strLabel, - Rt2dStringLabelType entityType); - -extern RwInt32 -Rt2dStringLabelGetNameIndex(Rt2dStringLabel *strLabel); - -extern void -Rt2dStringLabelSetNameIndex(Rt2dStringLabel *strLabel, RwInt32 index); - -extern void * -Rt2dStringLabelGetInternalData(Rt2dStringLabel *strLabel); - -extern void -Rt2dStringLabelSetInternalData(Rt2dStringLabel *strLabel, void *internalData); - -extern void * -Rt2dStringLabelGetUserData(Rt2dStringLabel *strLabel); - -extern void -Rt2dStringLabelSetUserData(Rt2dStringLabel *strLabel, void *userData); - -#endif /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - - - - -/* - * Cels & Cel Lists - */ -extern Rt2dCelList * -Rt2dMaestroGetCelListByIndex(Rt2dMaestro *maestro, RwInt32 index); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* RWPUBLICEND */ - -#endif /* RT2DANIM_H*/ diff --git a/sdk/rwsdk/include/d3d8/rt2danim.rpe b/sdk/rwsdk/include/d3d8/rt2danim.rpe deleted file mode 100644 index 0e61ec5c..00000000 --- a/sdk/rwsdk/include/d3d8/rt2danim.rpe +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_Criterion2DAnim -{ - - - - e_rwdb_Criterion2DAnimLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_Criterion2DAnim e_rwdb_Criterion2DAnim; - - diff --git a/sdk/rwsdk/include/d3d8/rtanim.h b/sdk/rwsdk/include/d3d8/rtanim.h deleted file mode 100644 index 4def7f1f..00000000 --- a/sdk/rwsdk/include/d3d8/rtanim.h +++ /dev/null @@ -1,638 +0,0 @@ -#ifndef RTANIM_H -#define RTANIM_H - -#include /* automatically generated header file */ - -#define rtANIMSTREAMCURRENTVERSION 0x100 - -/* Doxygen plugin groups. */ - -/** - * \defgroup rtanim RtAnim - * \ingroup animtools - * - * Animation Toolkit for RenderWare Graphics. - */ - -/** - * \ingroup rtanim - * Typedef for struct \ref RtAnimAnimation. - */ -typedef struct RtAnimAnimation RtAnimAnimation; - -/* - * The following CallBacks are needed for each interpolation scheme. - * See RtAnimInterpolatorInfo. - */ - -/** - * \ingroup rtanim - * \ref RtAnimKeyFrameApplyCallBack - * defines a callback function for converting - * an interpolated animation keyframe into the required result. - * - * \param result Void pointer to store the output of the conversion. - * \param voidIFrame Void pointer to the keyframe and should be cast - * to the interpolated keyframe type this callback - * is for. - */ -typedef void (*RtAnimKeyFrameApplyCallBack) (void *result, void *voidIFrame); - -/** - * \ingroup rtanim - * \ref RtAnimKeyFrameBlendCallBack - * defines a callback function for blending between two - * interpolated keyframes by the given blend factor. This is used for - * blending the states of two different \ref RtAnimInterpolator objects. - * The \ref RtAnimKeyFrameInterpolateCallBack is used for interpolating - * actual animation keyframes into an interpolated frame. - * - * \param voidOut Void pointer to store the output of the blend. - * \param voidIn1 Void pointer containing the first input - * interpolated keyframe. - * \param voidIn2 Void pointer containing the second input - * interpolated keyframe. - * \param alpha \ref RwReal containing the blend factor. - */ -typedef void (*RtAnimKeyFrameBlendCallBack) (void *voidOut, void *voidIn1, - void *voidIn2, RwReal alpha); - -/** - * \ingroup rtanim - * \ref RtAnimKeyFrameInterpolateCallBack - * defines a callback function for interpolating between two - * animation keyframes according to the given time. The output is - * an interpolated frame object residing in an \ref RtAnimInterpolator - * and will usually have the same structure as the keyframe apart from - * the header data (\ref RtAnimInterpFrameHeader). - * - * \param voidOut Void pointer for the output of the interpolation. - * \param voidIn1 Void pointer containing the first input keyframe. - * \param voidIn2 Void pointer containing the second input keyframe. - * \param time \ref RwReal containing the time at which to interpolate. - */ -typedef void (*RtAnimKeyFrameInterpolateCallBack) (void *voidOut, void *voidIn1, - void *voidIn2, RwReal time); - -/** - * \ingroup rtanim - * \ref RtAnimKeyFrameAddCallBack - * defines a callback function for adding two interpolated - * keyframes together. This is used when adding the states of two - * \ref RtAnimInterpolator objects, such as when adding a delta animation - * to a base animation. - * - * \param voidOut Void pointer for the output interpolated frame. - * \param voidIn1 Void pointer containing the first input - * interpoalted keyframe. - * \param voidIn2 Void pointer containing the second input - * interpolated keyframe. - */ -typedef void (*RtAnimKeyFrameAddCallBack) (void *voidOut, void *voidIn1, - void *voidIn2); - -/** - * \ingroup rtanim - * \ref RtAnimKeyFrameMulRecipCallBack - * defines a callback function for multiplying a keyframe - * by the inverse of another keyframe. This is used for creating delta - * animations. - * - * \param voidFrame Void pointer for the keyframe to be modified. - * \param voidStart Void pointer for the start keyframe to take the reciprocal of. - */ -typedef void (*RtAnimKeyFrameMulRecipCallBack) - (void *voidFrame, void *voidStart); - -/** - * \ingroup rtanim - * \ref RtAnimKeyFrameStreamReadCallBack - * defines a callback function for reading in keyframes - * from an \ref RwStream for the given animation. - * - * \param stream Pointer to the \ref RwStream to read the keyframes from. - * \param animation Pointer to the \ref RtAnimAnimation to read the keyframes into. - * - * \return Pointer to the \ref RtAnimAnimation. - */ -typedef RtAnimAnimation * (*RtAnimKeyFrameStreamReadCallBack) - (RwStream *stream, RtAnimAnimation *animation); - -/** - * \ingroup rtanim - * \ref RtAnimKeyFrameStreamWriteCallBack - * defines a callback function for writing keyframes from the - * given animation to an \ref RwStream. - * - * \param animation Pointer to the \ref RtAnimAnimation to write out from. - * \param stream Pointer to the \ref RwStream to write the keyframes to. - * - * \return \ref RwBool, TRUE if successful. - */ -typedef RwBool (*RtAnimKeyFrameStreamWriteCallBack) - (RtAnimAnimation *animation, RwStream *stream); - -/** - * \ingroup rtanim - * \ref RtAnimKeyFrameStreamGetSizeCallBack - * defines a callback function for calculating the binary stream - * size of keyframe data within an animation. - * - * \param animation Pointer to the \ref RtAnimAnimation to calculate sizes from. - * - * \return \ref RwInt32 containing the size, in bytes, of the keyframe data. - */ -typedef RwInt32 (*RtAnimKeyFrameStreamGetSizeCallBack) - (RtAnimAnimation *animation); - -/** - * \ingroup rtanim - * \ref RtAnimInterpolatorInfo - * Typedef for struct \ref RtAnimInterpolatorInfo - */ -typedef struct RtAnimInterpolatorInfo RtAnimInterpolatorInfo; - -/** - * \ingroup rtanim - * \struct RtAnimInterpolatorInfo - * This structure is used to hold information for a keyframe interpolation scheme. - * - * \see RtAnimRegisterInterpolationScheme - * \see RtAnimGetInterpolatorInfo - */ -struct RtAnimInterpolatorInfo -{ - RwInt32 typeID; - /**< The ID of the interpolation scheme. */ - RwInt32 keyFrameSize; - /**< Size, in bytes, of the keyframe structure. */ - RtAnimKeyFrameApplyCallBack keyFrameApplyCB; - /**< Pointer to a function that converts a keyframe to the needed - * format. This function is never called from the \ref rtanim - * toolkit (as the toolit doesn't know the data layout of the - * results) but is stored to ease the creation of overloaded - * interpolators. */ - RtAnimKeyFrameBlendCallBack keyFrameBlendCB; - /**< Pointer to a function that blends between two - * interpolated keyframes, for the purpose of blending - * between the states of two \ref RtAnimInterpolator objects. */ - RtAnimKeyFrameInterpolateCallBack keyFrameInterpolateCB; - /**< Pointer to a function that interpolates between two keyframes - * for a given time in between. */ - RtAnimKeyFrameAddCallBack keyFrameAddCB; - /**< Pointer to a function that adds two interpolated keyframes - * for the purpose of adding the states of two - * \ref RtAnimInterpolator objects. */ - RtAnimKeyFrameMulRecipCallBack keyFrameMulRecipCB; - /**< Pointer to a function that multiplies a keyframe by the - * reciprocal of another. */ - RtAnimKeyFrameStreamReadCallBack keyFrameStreamReadCB; - /**< Pointer to a function that reads the keyframes from a stream - * for a given animation. */ - RtAnimKeyFrameStreamWriteCallBack keyFrameStreamWriteCB; - /**< Pointer to a function that writes the keyframes to a stream for - * a given animation. */ - RtAnimKeyFrameStreamGetSizeCallBack keyFrameStreamGetSizeCB; - /**< Pointer to a function that returns the binary stream size of - * the keyframes for a given animation. */ -}; - - -/** - * \ingroup rtanim - * \struct RtAnimAnimation - * A keyframed 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. That is, the next keyframe - * at some point in the sequence should correspond to the node whose - * previous two keyframes are next to expire as an interpolation - * pair. - * - * Put another way, the correct ordering can be achieved by sorting - * an unordered keyframe array using the following primary and secondary - * sort keys:- - * - * - time of previous keyframe for node - * - node index - * - * An example is shown in the following diagram, where each vertical bar - * indicates a keyframe point in time. The position of the keyframe - * within the animation sequence is shown by an index to the left of - * each bar. - * - * \verbatim - - t=0 t=duration - node 0 kf0..| kf3.......| kf8....| kf10....| - node 1 kf1..| kf4...| kf6........| kf11....| - node 2 kf2..| kf5.....| kf7..| kf9.........| - - \endverbatim - * - * Each node MUST have an initial keyframe at time = 0.0, and a terminal - * keyframe at time = duration of the animation. - * - * Pointers link all of the keyframes for a particular node backwards - * through time in a list. - * - * \see RtAnimAnimationCreate - */ -struct RtAnimAnimation -{ - RtAnimInterpolatorInfo *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 rtanim - * \ref RtAnimKeyFrameHeader - * Typedef for struct RtAnimKeyFrameHeader - */ -typedef struct RtAnimKeyFrameHeader RtAnimKeyFrameHeader; - -/** - * \ingroup rtanim - * \struct RtAnimKeyFrameHeader - * holds header information for a keyframe. All keyframe structures used with - * the overloadable interpolation system should start with this data. - * - * \see RtAnimRegisterInterpolationScheme - */ -struct RtAnimKeyFrameHeader -{ - void *prevFrame; - /**< Previous keyframe for particular hierarchy node */ - RwReal time; - /**< Time at keyframe */ -}; - -/** - * \ingroup rtanim - * \ref RtAnimInterpFrameHeader - * Typedef for struct RtAnimInterpFrameHeader - */ -typedef struct RtAnimInterpFrameHeader RtAnimInterpFrameHeader; - -/** - * \ingroup rtanim - * \struct RtAnimInterpFrameHeader - * is the header for an interpolated animation frame, intermediate - * between a keyframe pair. This structure is intentionally the same size as an - * \ref RtAnimKeyFrameHeader, so that an interpolated frame and key frame data - * block can be otherwise identical. It relies on the - * fact that the prevFrame and time fields of a keyframe header are not - * relevant to an interpolated frame. These fields should therefore not be - * be modified by a custom keyframe interpolator. - * - * \see RtAnimRegisterInterpolationScheme - */ -struct RtAnimInterpFrameHeader -{ - RtAnimKeyFrameHeader *keyFrame1; - /**< Pointer to the first of the current pair of keyframes in - the associated \ref RtAnimAnimation */ - RtAnimKeyFrameHeader *keyFrame2; - /**< Pointer to the second of the current pair of keyframes in - the associated \ref RtAnimAnimation */ -}; - -/** - * \ingroup rtanim - * \ref RtAnimInterpolator - * Typedef for struct \ref RtAnimInterpolator - */ -typedef struct RtAnimInterpolator RtAnimInterpolator; - -/** - * \ingroup rtanim - * \ref RtAnimCallBack - * defines a callback function for use with the - * \ref RtAnimInterpolatorSetAnimCallBack and - * \ref RtAnimInterpolatorSetAnimLoopCallBack functions. - * - * \param animInstance - * A pointer to the \ref RtAnimInterpolator structure. - * - * \param data Void pointer for user-defined data. - * You can use this to pass your own data - * structure(s) to the callback function. - * - * \see RtAnimInterpolatorSetAnimCallBack - * \see RtAnimInterpolatorSetAnimLoopCallBack - * - */ - -typedef RtAnimInterpolator * (*RtAnimCallBack) - (RtAnimInterpolator *animInstance, - void *data); - -/** - * \ingroup rtanim - * \struct RtAnimInterpolator - * holds the current state for a particular instance of an animation, - * corresponding to a specific point in time. - * - * The current interpolated keyframes are stored in an array after the - * end of this structure. For advanced use, these may be accessed - * using the macro rtANIMGETINTERPFRAME(interpolator, nodeIndex) - * which takes a pointer to the interpolator and the node index - * for the interpolated keyframe required. - * - * \see \ref RtAnimInterpolatorCreate - * \see \ref RtAnimInterpolatorDestroy - * \see \ref RtAnimInterpolatorSetCurrentAnim - * \see \ref RtAnimInterpolatorGetCurrentAnim - * \see \ref RtAnimInterpolatorSetKeyFrameCallBacks - * \see \ref RtAnimInterpolatorSetAnimLoopCallBack - * \see \ref RtAnimInterpolatorSetAnimCallBack - * \see \ref RtAnimInterpolatorCopy - * \see \ref RtAnimInterpolatorSubAnimTime - * \see \ref RtAnimInterpolatorAddAnimTime - * \see \ref RtAnimInterpolatorSetCurrentTime - * \see \ref RtAnimCallBack - */ -struct RtAnimInterpolator -{ - RtAnimAnimation *pCurrentAnim; - /**< Current \ref RtAnimAnimation applied */ - RwReal currentTime; - /**< Current animation time */ - void *pNextFrame; - /**< Next animation keyframe to be played */ - RtAnimCallBack pAnimCallBack; - /**< Animation callback function pointer */ - void *pAnimCallBackData; - /**< Animation callback function user data */ - RwReal animCallBackTime; - /**< Trigger time for callback function */ - RtAnimCallBack pAnimLoopCallBack; - /**< Animation loop callback function pointer */ - void *pAnimLoopCallBackData; - /**< Animation loop callback function data */ - RwInt32 maxKeyFrameSize; - /**< Maximum size of keyframes usable on - * this animation (set at creation time) */ - RwInt32 currentKeyFrameSize; - /**< Size of keyframes in the current - * animation */ - RwInt32 numNodes; - /**< Number of nodes driven by the animation */ - RwBool isSubInterpolator; - /**< Internal use */ - RwInt32 offsetInParent; - /**< Internal use */ - RtAnimInterpolator *parentAnimation; - /**< Internal use */ - - RtAnimKeyFrameApplyCallBack keyFrameApplyCB; - /**< Internal use */ - RtAnimKeyFrameBlendCallBack keyFrameBlendCB; - /**< Internal use */ - RtAnimKeyFrameInterpolateCallBack keyFrameInterpolateCB; - /**< Internal use */ - RtAnimKeyFrameAddCallBack keyFrameAddCB; - /**< Internal use */ -}; - -/* Access to array of interpolated frames occupying a block of memory - * after the end of the RtAnimInterpolator structure. - */ -#define rtANIMGETINTERPFRAME( anim, nodeIndex ) \ - ( (void *)( ( (RwUInt8 *)&(anim[1]) + \ - ((nodeIndex) * \ - anim->currentKeyFrameSize) ) ) ) - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* Engine functions */ -extern void -RtAnimAnimationFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); - -extern RwBool -RtAnimInitialize(void); - -extern RwBool -RtAnimRegisterInterpolationScheme(RtAnimInterpolatorInfo *interpolatorInfo); - -extern RtAnimInterpolatorInfo * -RtAnimGetInterpolatorInfo(RwInt32 typeID); - -/* RtAnimAnimation */ -extern RtAnimAnimation * -RtAnimAnimationCreate(RwInt32 typeID, - RwInt32 numFrames, - RwInt32 flags, - RwReal duration); - -extern RtAnimAnimation * -RtAnimAnimationDestroy(RtAnimAnimation *animation); - -extern RtAnimAnimation * -RtAnimAnimationRead(const RwChar * filename); - -extern RwBool -RtAnimAnimationWrite(RtAnimAnimation *animation, - const RwChar * filename); - -extern RtAnimAnimation * -RtAnimAnimationStreamRead(RwStream *stream); - -extern RwBool -RtAnimAnimationStreamWrite(RtAnimAnimation *animation, - RwStream *stream); - -extern RwInt32 -RtAnimAnimationStreamGetSize(RtAnimAnimation *animation); - -extern RwUInt32 -RtAnimAnimationGetNumNodes(RtAnimAnimation *animation); - -#ifdef RWDEBUG - -extern RwInt32 -RtAnimAnimationGetTypeID(RtAnimAnimation *animation); - -#else /* RWDEBUG */ - -#define RtAnimAnimationGetTypeID(animation) \ - (animation->interpInfo->typeID) - -#endif /* RWDEBUG */ - -/* RtAnimInterpolator */ -extern RtAnimInterpolator * -RtAnimInterpolatorCreate(RwInt32 numNodes, - RwInt32 maxKeyFrameSize); - -extern void -RtAnimInterpolatorDestroy(RtAnimInterpolator *anim); - -extern RwBool -RtAnimInterpolatorSetCurrentAnim(RtAnimInterpolator *animI, - RtAnimAnimation *anim); - - -#ifdef RWDEBUG - -extern RtAnimAnimation * -RtAnimInterpolatorGetCurrentAnim(RtAnimInterpolator *animI); - -#else /* RWDEBUG */ - -#define RtAnimInterpolatorGetCurrentAnim(animI) \ - (animI->pCurrentAnim) - -#endif /* RWDEBUG */ - - -extern RwBool -RtAnimInterpolatorSetKeyFrameCallBacks(RtAnimInterpolator *anim, - RwInt32 keyFrameTypeID); - - -extern void -RtAnimInterpolatorSetAnimLoopCallBack(RtAnimInterpolator *anim, - RtAnimCallBack callBack, - void *data ); - -extern void -RtAnimInterpolatorSetAnimCallBack(RtAnimInterpolator *anim, - RtAnimCallBack callBack, - RwReal time, - void *data ); - -extern RwBool -RtAnimInterpolatorCopy(RtAnimInterpolator *outAnim, - RtAnimInterpolator *inAnim); - -extern RwBool -RtAnimInterpolatorSubAnimTime(RtAnimInterpolator *anim, - RwReal time); - -extern RwBool -RtAnimInterpolatorAddAnimTime(RtAnimInterpolator *anim, - RwReal time); - -extern RwBool -RtAnimInterpolatorSetCurrentTime(RtAnimInterpolator *anim, - RwReal time); - -extern RwBool -RtAnimAnimationMakeDelta(RtAnimAnimation *animation, - RwInt32 numNodes, - RwReal time); - - -extern RwBool -RtAnimInterpolatorBlend(RtAnimInterpolator *outAnim, - RtAnimInterpolator *inAnim1, - RtAnimInterpolator *inAnim2, - RwReal alpha); - -extern RwBool -RtAnimInterpolatorAddTogether(RtAnimInterpolator *outAnim, - RtAnimInterpolator *inAnim1, - RtAnimInterpolator *inAnim2); - -#define RtAnimKeyFrameApplyMacro(animation, out, in) \ -MACRO_START \ -{ \ - (anim)->keyFrameApplyCB((out), (in1), (in2), (time)); \ -} \ -MACRO_STOP - - -#define RtAnimKeyFrameInterpolateMacro(anim, out, in1, in2, time) \ -MACRO_START \ -{ \ - (anim)->keyFrameInterpolateCB((out), (in1), (in2), (time)); \ -} \ -MACRO_STOP - -#define RtAnimKeyFrameBlendMacro(anim, out, in1, in2, fAlpha) \ -MACRO_START \ -{ \ - (anim)->keyFrameBlendCB((out), (in1), (in2), (fAlpha)); \ -} \ -MACRO_STOP - -#define RtAnimKeyFrameAddTogetherMacro(anim, out, in1, in2) \ -MACRO_START \ -{ \ - (anim)->keyFrameAddCB((out), (in1), (in2)); \ -} \ -MACRO_STOP - -#ifdef RWDEBUG -extern void -RtAnimKeyFrameApply(RtAnimInterpolator *animation, - void *result, void *iFrame); - -extern void -RtAnimKeyFrameInterpolate(RtAnimInterpolator *animation, - void *out, void *in1, - void *in2, RwReal time); - -extern void -RtAnimKeyFrameBlend(RtAnimInterpolator *animation, - void *out, - void *in1, - void *in2, - RwReal alpha); - -extern void -RtAnimKeyFrameAddTogether(RtAnimInterpolator *animation, - void *out, void *in1, void *in2); - -#else /* RWDEBUG */ -#define RtAnimKeyFrameApply(animation, out, in) \ - RtAnimKeyFrameApplyMacro(animation, out, in) - -#define RtAnimKeyFrameInterpolate(animation, out, in1, in2, time) \ - RtAnimKeyFrameInterpolateMacro(animation, out, in1, in2, time) - -#define RtAnimKeyFrameBlend(animation, out, in1, in2, alpha) \ - RtAnimKeyFrameBlendMacro(animation, out, in1, in2, alpha) - -#define RtAnimKeyFrameAddTogether(animation, out, in1, in2) \ - RtAnimKeyFrameAddTogetherMacro(animation, out, in1, in2) -#endif /* RWDEBUG */ - -extern RtAnimInterpolator * -RtAnimInterpolatorCreateSubInterpolator( - RtAnimInterpolator *parentAnim, - RwInt32 startNode, - RwInt32 numNodes, - RwInt32 maxKeyFrameSize); - -extern RwBool -RtAnimInterpolatorBlendSubInterpolator(RtAnimInterpolator *outAnim, - RtAnimInterpolator *inAnim1, - RtAnimInterpolator *inAnim2, - RwReal alpha); - -extern RwBool -RtAnimInterpolatorAddSubInterpolator(RtAnimInterpolator *outAnim, - RtAnimInterpolator *mainAnim, - RtAnimInterpolator *subAnim); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* RTANIM_H */ diff --git a/sdk/rwsdk/include/d3d8/rtanim.rpe b/sdk/rwsdk/include/d3d8/rtanim.rpe deleted file mode 100644 index ae8fcf33..00000000 --- a/sdk/rwsdk/include/d3d8/rtanim.rpe +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionAnim -{ - - -E_RT_ANIM_INTERP_IDINUSE, - -E_RT_ANIM_INTERP_BLOCKFULL, - -E_RT_ANIM_INTERP_IDUNKNOWN, - - e_rwdb_CriterionAnimLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionAnim e_rwdb_CriterionAnim; - - diff --git a/sdk/rwsdk/include/d3d8/rtbary.h b/sdk/rwsdk/include/d3d8/rtbary.h deleted file mode 100644 index 2531914d..00000000 --- a/sdk/rwsdk/include/d3d8/rtbary.h +++ /dev/null @@ -1,141 +0,0 @@ -/*************************************************************************** - * * - * Module : rtbary.h * - * * - * Purpose : Barycentric operations * - * * - **************************************************************************/ - -#ifndef RTBARY_H -#define RTBARY_H - -/** - * \defgroup rtbary RtBary - * \ingroup mathtools - * - * Barycentric Toolkit for RenderWare. - */ - - -/**************************************************************************** - Includes - */ - -#include - -#include /* automatically generated header file */ - - -/**************************************************************************** - Global types - */ - -/** - * \ingroup rtbary - * \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. - */ -typedef RwReal RtBaryV4d[4]; - -/** - * \ingroup rtbary - * \ref RtBaryTransform - * typedef for the 4x4 homogeneous transform matrix mapping a point - * from Cartesian space to the barycentric space defined by a triangle. - */ -typedef RtBaryV4d RtBaryTransform[4]; - -/**************************************************************************** - Defines - */ - -#define RtBaryV3dFromWeightsMacro(_out, _b, _v0, _v1, _v2) \ -MACRO_START \ -{ \ - (_out)->x = (RwReal)( ((_v0)->x * (_b)[0]) + \ - ((_v1)->x * (_b)[1]) + \ - ((_v2)->x * (_b)[2]) ); \ - (_out)->y = (RwReal)( ((_v0)->y * (_b)[0]) + \ - ((_v1)->y * (_b)[1]) + \ - ((_v2)->y * (_b)[2]) ); \ - (_out)->z = (RwReal)( ((_v0)->z * (_b)[0]) + \ - ((_v1)->z * (_b)[1]) + \ - ((_v2)->z * (_b)[2]) ); \ -} \ -MACRO_STOP - -#define RtBaryWeightsFromV3dMacro(_out, _m, _in) \ -MACRO_START \ -{ \ - (_out)[0] = ( (_m)[0][0] * (_in)->x + \ - (_m)[1][0] * (_in)->y + \ - (_m)[2][0] * (_in)->z + \ - (_m)[3][0] ); \ - (_out)[1] = ( (_m)[0][1] * (_in)->x + \ - (_m)[1][1] * (_in)->y + \ - (_m)[2][1] * (_in)->z + \ - (_m)[3][1] ); \ - (_out)[2] = ( (_m)[0][2] * (_in)->x + \ - (_m)[1][2] * (_in)->y + \ - (_m)[2][2] * (_in)->z + \ - (_m)[3][2] ); \ - (_out)[3] = ( (_m)[0][3] * (_in)->x + \ - (_m)[1][3] * (_in)->y + \ - (_m)[2][3] * (_in)->z + \ - (_m)[3][3] ); \ -} \ -MACRO_STOP - -#if (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) )) - -#define RtBaryV3dFromWeights(_out, _b, _v0, _v1, _v2) \ - RtBaryV3dFromWeightsMacro(_out, _b, _v0, _v1, _v2) - -#define RtBaryWeightsFromV3d(_out, _m, _in) \ - RtBaryWeightsFromV3dMacro(_out, _m, _in) - -#endif /* (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) )) */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RwBool -RtBaryGetTransform(RtBaryTransform m, - RwReal * const area, - const RwV3d * const v0, - const RwV3d * const v1, - const RwV3d * const v2); - -#if ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) - -extern void -RtBaryV3dFromWeights(RwV3d * const out, - const RtBaryV4d weights, - const RwV3d * const v0, - const RwV3d * const v1, - const RwV3d * const v2); - -extern void -RtBaryWeightsFromV3d(RtBaryV4d out, - RtBaryTransform mat, - const RwV3d * const in); - -extern void -_rtImportWorldBaryFromEdge(RtBaryV4d out, - RtBaryTransform mat, - const RwV3d * const in); - -#endif /* ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* RTBARY_H */ diff --git a/sdk/rwsdk/include/d3d8/rtbary.rpe b/sdk/rwsdk/include/d3d8/rtbary.rpe deleted file mode 100644 index 0fec6a77..00000000 --- a/sdk/rwsdk/include/d3d8/rtbary.rpe +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionBary -{ - - - - e_rwdb_CriterionBaryLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionBary e_rwdb_CriterionBary; - - diff --git a/sdk/rwsdk/include/d3d8/rtbezpat.h b/sdk/rwsdk/include/d3d8/rtbezpat.h deleted file mode 100644 index f25f5ce9..00000000 --- a/sdk/rwsdk/include/d3d8/rtbezpat.h +++ /dev/null @@ -1,396 +0,0 @@ -/* - * Data structures for rtbezpat toolkit - * Copyright (c) Criterion Software Limited - */ - -#if (!defined(RTBEZPAT_H)) -#define RTBEZPAT_H - -/** - * \defgroup rtbezpatch RtBezPat - * \ingroup mathtools - * - * The Bezier Patch Toolkit is a group of functions that support the way - * RenderWare processes patches. - */ - -typedef struct RtBezierV4d RtBezierV4d; - -/** - * \ingroup rtbezpatch - * \struct RtBezierV4d - * 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. - */ -struct RtBezierV4d -{ - RwReal x; - /**< X value */ - RwReal y; - /**< Y value */ - RwReal z; - /**< Z value */ - RwReal w; - /**< W value */ -}; - -/** - * \ingroup rtbezpatch - * \ref RtBezierRow - * typedef for a row of vectors. - * RtBezierRow is an array of 4 vectors - */ -typedef RtBezierV4d RtBezierRow[4]; - -/** - * \ingroup rtbezpatch - * \ref RtBezierMatrix - * typedef for a matrix of 4*4 vectors. - * RtBezierMatrix is an array of 4 rows. - */ -typedef RtBezierRow RtBezierMatrix[4]; - -/* - * Bernstein polynomials; - */ - -#define RtBern03(_u, _cu) ( (_cu) * (_cu) * (_cu) ) -#define RtBern13(_u, _cu) ( 3 * (_u) * (_cu) * (_cu) ) -#define RtBern23(_u, _cu) ( 3 * (_u) * (_u) * (_cu) ) -#define RtBern33(_u, _cu) ( (_u) * (_u) * (_u) ) - -#define RtBezierQuadSample3dMacro(_out, _P, _u, _v) \ -MACRO_START \ -{ \ - const RtBezierV4d * const P0 = &(_P)[0][0]; \ - const RtBezierV4d * const P1 = &(_P)[1][0]; \ - const RtBezierV4d * const P2 = &(_P)[2][0]; \ - const RtBezierV4d * const P3 = &(_P)[3][0]; \ - const RwReal _pu = (_u); \ - const RwReal _cu = ((RwReal)1) - _pu; \ - const RwReal B03u = RtBern03(_pu,_cu); \ - const RwReal B13u = RtBern13(_pu,_cu); \ - const RwReal B23u = RtBern23(_pu,_cu); \ - const RwReal B33u = RtBern33(_pu,_cu); \ - const RwReal _pv = (_v); \ - const RwReal _cv = ((RwReal)1) - _pv; \ - const RwReal B03v = RtBern03(_pv,_cv); \ - const RwReal B13v = RtBern13(_pv,_cv); \ - const RwReal B23v = RtBern23(_pv,_cv); \ - const RwReal B33v = RtBern33(_pv,_cv); \ - RtBezierRow A; \ - \ - A[0].x = B03u*P0[0].x + B13u*P1[0].x + B23u*P2[0].x + B33u*P3[0].x; \ - A[0].y = B03u*P0[0].y + B13u*P1[0].y + B23u*P2[0].y + B33u*P3[0].y; \ - A[0].z = B03u*P0[0].z + B13u*P1[0].z + B23u*P2[0].z + B33u*P3[0].z; \ - A[1].x = B03u*P0[1].x + B13u*P1[1].x + B23u*P2[1].x + B33u*P3[1].x; \ - A[1].y = B03u*P0[1].y + B13u*P1[1].y + B23u*P2[1].y + B33u*P3[1].y; \ - A[1].z = B03u*P0[1].z + B13u*P1[1].z + B23u*P2[1].z + B33u*P3[1].z; \ - A[2].x = B03u*P0[2].x + B13u*P1[2].x + B23u*P2[2].x + B33u*P3[2].x; \ - A[2].y = B03u*P0[2].y + B13u*P1[2].y + B23u*P2[2].y + B33u*P3[2].y; \ - A[2].z = B03u*P0[2].z + B13u*P1[2].z + B23u*P2[2].z + B33u*P3[2].z; \ - A[3].x = B03u*P0[3].x + B13u*P1[3].x + B23u*P2[3].x + B33u*P3[3].x; \ - A[3].y = B03u*P0[3].y + B13u*P1[3].y + B23u*P2[3].y + B33u*P3[3].y; \ - A[3].z = B03u*P0[3].z + B13u*P1[3].z + B23u*P2[3].z + B33u*P3[3].z; \ - \ - (_out)->x = A[0].x*B03v + A[1].x*B13v + A[2].x*B23v + A[3].x*B33v; \ - (_out)->y = A[0].y*B03v + A[1].y*B13v + A[2].y*B23v + A[3].y*B33v; \ - (_out)->z = A[0].z*B03v + A[1].z*B13v + A[2].z*B23v + A[3].z*B33v; \ -} \ -MACRO_STOP - -#define RtBezierQuadDifferenceStepU3dMacro(_row) \ -MACRO_START \ -{ \ - (_row)[0].x += (_row)[1].x; \ - (_row)[0].y += (_row)[1].y; \ - (_row)[0].z += (_row)[1].z; \ - \ - (_row)[1].x += (_row)[2].x; \ - (_row)[1].y += (_row)[2].y; \ - (_row)[1].z += (_row)[2].z; \ - \ - (_row)[2].x += (_row)[3].x; \ - (_row)[2].y += (_row)[3].y; \ - (_row)[2].z += (_row)[3].z; \ - \ -} \ -MACRO_STOP - -#define RtBezierQuadDifferenceStepU4dMacro(_row) \ -MACRO_START \ -{ \ - (_row)[0].x += (_row)[1].x; \ - (_row)[0].y += (_row)[1].y; \ - (_row)[0].z += (_row)[1].z; \ - (_row)[0].w += (_row)[1].w; \ - \ - (_row)[1].x += (_row)[2].x; \ - (_row)[1].y += (_row)[2].y; \ - (_row)[1].z += (_row)[2].z; \ - (_row)[1].w += (_row)[2].w; \ - \ - (_row)[2].x += (_row)[3].x; \ - (_row)[2].y += (_row)[3].y; \ - (_row)[2].z += (_row)[3].z; \ - (_row)[2].w += (_row)[3].w; \ - \ -} \ -MACRO_STOP - -#define RtBezierQuadDifferenceStepV3dMacro(_mat) \ -MACRO_START \ -{ \ - RtBezierV4d * const m0 = &(_mat)[0][0]; \ - RtBezierV4d * const m1 = &(_mat)[1][0]; \ - RtBezierV4d * const m2 = &(_mat)[2][0]; \ - RtBezierV4d * const m3 = &(_mat)[3][0]; \ - \ - /* (_row) 0 */ \ - m0[0].x += m1[0].x; \ - m0[0].y += m1[0].y; \ - m0[0].z += m1[0].z; \ - \ - m0[1].x += m1[1].x; \ - m0[1].y += m1[1].y; \ - m0[1].z += m1[1].z; \ - \ - m0[2].x += m1[2].x; \ - m0[2].y += m1[2].y; \ - m0[2].z += m1[2].z; \ - \ - m0[3].x += m1[3].x; \ - m0[3].y += m1[3].y; \ - m0[3].z += m1[3].z; \ - \ - /* (_row) 1 */ \ - m1[0].x += m2[0].x; \ - m1[0].y += m2[0].y; \ - m1[0].z += m2[0].z; \ - \ - m1[1].x += m2[1].x; \ - m1[1].y += m2[1].y; \ - m1[1].z += m2[1].z; \ - \ - m1[2].x += m2[2].x; \ - m1[2].y += m2[2].y; \ - m1[2].z += m2[2].z; \ - \ - m1[3].x += m2[3].x; \ - m1[3].y += m2[3].y; \ - m1[3].z += m2[3].z; \ - \ - /* (_row) 2 */ \ - m2[0].x += m3[0].x; \ - m2[0].y += m3[0].y; \ - m2[0].z += m3[0].z; \ - \ - m2[1].x += m3[1].x; \ - m2[1].y += m3[1].y; \ - m2[1].z += m3[1].z; \ - \ - m2[2].x += m3[2].x; \ - m2[2].y += m3[2].y; \ - m2[2].z += m3[2].z; \ - \ - m2[3].x += m3[3].x; \ - m2[3].y += m3[3].y; \ - m2[3].z += m3[3].z; \ -} \ -MACRO_STOP - -#define RtBezierQuadDifferenceStepV4dMacro(_mat) \ -MACRO_START \ -{ \ - RtBezierV4d * const m0 = &(_mat)[0][0]; \ - RtBezierV4d * const m1 = &(_mat)[1][0]; \ - RtBezierV4d * const m2 = &(_mat)[2][0]; \ - RtBezierV4d * const m3 = &(_mat)[3][0]; \ - \ - /* (_row) 0 */ \ - m0[0].x += m1[0].x; \ - m0[0].y += m1[0].y; \ - m0[0].z += m1[0].z; \ - m0[0].w += m1[0].w; \ - \ - m0[1].x += m1[1].x; \ - m0[1].y += m1[1].y; \ - m0[1].z += m1[1].z; \ - m0[1].w += m1[1].w; \ - \ - m0[2].x += m1[2].x; \ - m0[2].y += m1[2].y; \ - m0[2].z += m1[2].z; \ - m0[2].w += m1[2].w; \ - \ - m0[3].x += m1[3].x; \ - m0[3].y += m1[3].y; \ - m0[3].z += m1[3].z; \ - m0[3].w += m1[3].w; \ - \ - /* (_row) 1 */ \ - m1[0].x += m2[0].x; \ - m1[0].y += m2[0].y; \ - m1[0].z += m2[0].z; \ - m1[0].w += m2[0].w; \ - \ - m1[1].x += m2[1].x; \ - m1[1].y += m2[1].y; \ - m1[1].z += m2[1].z; \ - m1[1].w += m2[1].w; \ - \ - m1[2].x += m2[2].x; \ - m1[2].y += m2[2].y; \ - m1[2].z += m2[2].z; \ - m1[2].w += m2[2].w; \ - \ - m1[3].x += m2[3].x; \ - m1[3].y += m2[3].y; \ - m1[3].z += m2[3].z; \ - m1[3].w += m2[3].w; \ - \ - /* (_row) 2 */ \ - m2[0].x += m3[0].x; \ - m2[0].y += m3[0].y; \ - m2[0].z += m3[0].z; \ - m2[0].w += m3[0].w; \ - \ - m2[1].x += m3[1].x; \ - m2[1].y += m3[1].y; \ - m2[1].z += m3[1].z; \ - m2[1].w += m3[1].w; \ - \ - m2[2].x += m3[2].x; \ - m2[2].y += m3[2].y; \ - m2[2].z += m3[2].z; \ - m2[2].w += m3[2].w; \ - \ - m2[3].x += m3[3].x; \ - m2[3].y += m3[3].y; \ - m2[3].z += m3[3].z; \ - m2[3].w += m3[3].w; \ -} \ -MACRO_STOP - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ -extern void -RtBezierQuadControlFit3d(RtBezierMatrix B, - RtBezierMatrix P); - -extern void -RtBezierQuadBernsteinWeight3d(RtBezierMatrix W, - RtBezierMatrix B); - -extern void -RtBezierQuadBernsteinWeight4d(RtBezierMatrix W, - RtBezierMatrix B); - -extern void -RtBezierQuadPointDifference3d(RtBezierMatrix D, - RtBezierMatrix W, - RwReal PointU, - RwReal PointV, - RwReal StepU, - RwReal stepV); - -extern void -RtBezierQuadPointDifference4d(RtBezierMatrix D, - RtBezierMatrix W, - RwReal PointU, - RwReal PointV, - RwReal StepU, - RwReal stepV); - -extern void -RtBezierQuadOriginDifference3d(RtBezierMatrix D, - RtBezierMatrix W, - RwReal stepU, - RwReal setpV); - -extern void -RtBezierQuadOriginDifference4d(RtBezierMatrix D, - RtBezierMatrix W, - RwReal stepU, - RwReal setpV); - -#if ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) - -extern void -RtBezierQuadSample3d(RwV3d * out, - RtBezierMatrix B, - RwReal u, - RwReal v); - -extern void RtBezierQuadDifferenceStepU3d(RtBezierRow row); -extern void RtBezierQuadDifferenceStepU4d(RtBezierRow row); - -extern void RtBezierQuadDifferenceStepV3d(RtBezierMatrix mat); -extern void RtBezierQuadDifferenceStepV4d(RtBezierMatrix mat); - - -#else /* ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) */ - -#define RtBezierQuadSample3d(_out, _P, _u, _v) \ - RtBezierQuadSample3dMacro(_out, _P, _u, _v) - -#define RtBezierQuadDifferenceStepU3d(_row) \ - RtBezierQuadDifferenceStepU3dMacro(_row) - -#define RtBezierQuadDifferenceStepU4d(_row) \ - RtBezierQuadDifferenceStepU4dMacro(_row) - -#define RtBezierQuadDifferenceStepV3d(_mat) \ - RtBezierQuadDifferenceStepV3dMacro(_mat) - -#define RtBezierQuadDifferenceStepV4d(_mat) \ - RtBezierQuadDifferenceStepV4dMacro(_mat) - -#endif /* ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) */ - -/* - * - */ - -extern void -RtBezierTriangleControlFit3d(RtBezierMatrix T, RtBezierMatrix P); - -extern void -RtBezierQuadFromTriangle(RtBezierMatrix Q, RtBezierMatrix T); - -extern void -RtBezierQuadTangent(RtBezierMatrix D, - RwReal theta, - RtBezierMatrix P); - -extern void -RtBezierQuadTangentPair(RtBezierMatrix Dt, - RtBezierMatrix Dp, - RwReal theta, - RtBezierMatrix P); - -extern void -RtBezierQuadGetNormals(RtBezierMatrix N, - RtBezierMatrix B); - -#if (defined(RWDEBUG) && defined(RWVERBOSE)) - -extern void -_rtBezierGnuPlot(RtBezierMatrix B, - RwChar * name, - RwChar * title); - -#else /* (defined(RWDEBUG) && defined(RWVERBOSE)) */ - -#define _rtBezierGnuPlot(B, name, title) /* No-op */ - -#endif /* (defined(RWDEBUG) && defined(RWVERBOSE)) */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* (!defined(RTBEZPAT_H)) */ diff --git a/sdk/rwsdk/include/d3d8/rtbezpat.rpe b/sdk/rwsdk/include/d3d8/rtbezpat.rpe deleted file mode 100644 index 0f6dc700..00000000 --- a/sdk/rwsdk/include/d3d8/rtbezpat.rpe +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionBEZPATCH -{ - - - - e_rwdb_CriterionBEZPATCHLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionBEZPATCH e_rwdb_CriterionBEZPATCH; - - diff --git a/sdk/rwsdk/include/d3d8/rtbmp.h b/sdk/rwsdk/include/d3d8/rtbmp.h deleted file mode 100644 index c3bb5c95..00000000 --- a/sdk/rwsdk/include/d3d8/rtbmp.h +++ /dev/null @@ -1,51 +0,0 @@ - -/*************************************************************************** - * * - * Module : rtBMP.h * - * * - * Purpose : Load BMP format files * - * * - **************************************************************************/ - -#ifndef RTBMP_H -#define RTBMP_H - -/** - * \defgroup rtbmp RtBMP - * \ingroup imageconversiontools - * - * BMP Image Format Toolkit for RenderWare. - * - * See also http://www.daubnet.com/formats/BMP.html - */ - -/**************************************************************************** - Includes - */ - -/*--- Include files ---*/ -#include "rwcore.h" - -#include "rtbmp.rpe" /* automatically generated header file */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RwImage *RtBMPImageWrite(RwImage * image, - const RwChar * imageName); -extern RwImage *RtBMPImageRead(const RwChar * imageName); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* RWPUBLICEND */ - -#endif /* RTBMP_H */ diff --git a/sdk/rwsdk/include/d3d8/rtbmp.rpe b/sdk/rwsdk/include/d3d8/rtbmp.rpe deleted file mode 100644 index 37c546f9..00000000 --- a/sdk/rwsdk/include/d3d8/rtbmp.rpe +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionBMP -{ - - - - e_rwdb_CriterionBMPLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionBMP e_rwdb_CriterionBMP; - - diff --git a/sdk/rwsdk/include/d3d8/rtcharse.h b/sdk/rwsdk/include/d3d8/rtcharse.h deleted file mode 100644 index 6c7a3902..00000000 --- a/sdk/rwsdk/include/d3d8/rtcharse.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * - * Data structures for the charse toolkit - */ - -/*************************************************************************** - * * - * Module : rtcharse.h * - * * - * Purpose : Charset handling * - * * - **************************************************************************/ - -#ifndef RTCHARSE_H -#define RTCHARSE_H - -/** - * \defgroup rtcharset RtCharset - * \ingroup 2dtools - * - * Character Set/Foot Toolkit for RenderWare. - */ - -/**************************************************************************** - Includes - */ - -#include - -/**************************************************************************** - Global Types - */ - -/* RWPUBLIC */ - -typedef struct RtCharsetDesc RtCharsetDesc; - -/** - * \ingroup rtcharset - * \struct RtCharsetDesc - * Holds information about a character set. - */ -struct RtCharsetDesc -{ - RwInt32 width; - /**< Pixel-width of each character. */ - RwInt32 height; - /**< Pixel-height of each character. */ - RwInt32 width_internal; - /**< Pixel-width used internally, this is usually width+1 to add a border */ - RwInt32 height_internal; - /**< Pixel-height used internally, this is usually height+1 to add a border */ - RwInt32 count; - /**< Number of characters in the set. */ - RwInt32 tilewidth; - /**< Width of raster in characters. */ - RwInt32 tileheight; - /**< Height of raster in characters. */ - -}; - -/** - * \ingroup rtcharset - * \ref RtCharset - * typedef for a structure defining a character set (opaque). - * \see RtCharsetCreate - */ -typedef RwRaster RtCharset; - -/* RWPUBLICEND */ - -/**************************************************************************** - Function prototypes - */ - -/* RWPUBLIC */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RwBool RtCharsetOpen(void); -extern void RtCharsetClose(void); - -extern RtCharset *RtCharsetPrint(RtCharset * charSet, - const RwChar * string, - RwInt32 x, RwInt32 y); -extern RtCharset *RtCharsetPrintBuffered(RtCharset * charSet, - const RwChar * string, - RwInt32 x, RwInt32 y, - RwBool hideSpaces); -extern RwBool RtCharsetBufferFlush(void); - -extern RtCharset *RtCharsetSetColors(RtCharset * charSet, - const RwRGBA * foreGround, - const RwRGBA * backGround); -extern RtCharset *RtCharsetGetDesc(RtCharset * charset, - RtCharsetDesc * desc); - -extern RtCharset *RtCharsetCreate(const RwRGBA * foreGround, - const RwRGBA * backGround); -extern RwBool RtCharsetDestroy(RtCharset * charSet); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* RWPUBLICEND */ - -#endif /* RTCHARSE_H */ diff --git a/sdk/rwsdk/include/d3d8/rtcharse.rpe b/sdk/rwsdk/include/d3d8/rtcharse.rpe deleted file mode 100644 index 30c5ff4d..00000000 --- a/sdk/rwsdk/include/d3d8/rtcharse.rpe +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionCharset -{ - - - - e_rwdb_CriterionCharsetLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionCharset e_rwdb_CriterionCharset; - - diff --git a/sdk/rwsdk/include/d3d8/rtgncpip.h b/sdk/rwsdk/include/d3d8/rtgncpip.h deleted file mode 100644 index b18f2bb7..00000000 --- a/sdk/rwsdk/include/d3d8/rtgncpip.h +++ /dev/null @@ -1,256 +0,0 @@ -/* *INDENT-OFF* */ - -/* RWPUBLIC */ - -/**************************************************************************** - * - * File: rwg/rwsdk/tool/gencpipe/rtgncpip.h - * - * Copyright (C) 2002 Criterion Technologies. - * - * Purpose: Toolkit containing generic C rendering pipeline nodes. - * - ****************************************************************************/ - -#if (!defined(_RTGNCPIP_H)) -#define _RTGNCPIP_H - -/*===========================================================================* - *--- Include files ---------------------------------------------------------* - *===========================================================================*/ - -#include "rwcore.h" -#include "rpworld.h" - - - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/**************************************************************************** - global types - */ - -typedef RpLight *RxLight; - - -/* RGBA Interpolation node structures */ -#if (!defined(DOXYGEN)) -struct NodeRGBAInterpData -{ - RwBool rgbaInterpOn; - RxRenderStateVector state; -}; -#endif /* (!defined(DOXYGEN)) */ - -typedef struct NodeRGBAInterpData NodeRGBAInterpData; - -/* UV Interpolation node structures */ -typedef struct RxNodeUVInterpSettings RxNodeUVInterpSettings; - -/** - * \ingroup rtgencpipe - * \struct RxNodeUVInterpSettings - * - * TODO - */ -struct RxNodeUVInterpSettings -{ - RwBool uvInterpOn; /**< TODO */ - RxRenderStateVector state; /**< TODO */ -}; - -/* Cloning node structures */ -typedef struct RxPacketCacheCluster RxPacketCacheCluster; - -/** - * \ingroup rtgencpipe - * \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 rtgencpipe - * \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 rtgencpipe - * \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 rtgencpipe - * \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 */ -}; - -/**************************************************************************** - global prototypes - */ - -extern RxClusterDefinition RxClLights; /* Uses the RxLight type (see above) */ - - -/********************************************************************************* - - Generic Nodes - - *******************************************************************************/ - -extern RxNodeDefinition *RxNodeDefinitionGetAtomicInstance(void); -extern RxNodeDefinition *RxNodeDefinitionGetClipLine(void); -extern RxNodeDefinition *RxNodeDefinitionGetClipTriangle(void); -extern RxNodeDefinition *RxNodeDefinitionGetWorldSectorEnumerateLights(void); -extern RxNodeDefinition *RxNodeDefinitionGetCullTriangle(void); -extern RxNodeDefinition *RxNodeDefinitionGetFastPathSplitter(void); -extern RxNodeDefinition *RxNodeDefinitionGetImmInstance(void); -extern RxNodeDefinition *RxNodeDefinitionGetImmMangleLineIndices(void); -extern RxNodeDefinition *RxNodeDefinitionGetImmMangleTriangleIndices(void); -extern RxNodeDefinition *RxNodeDefinitionGetImmRenderSetup(void); -extern RxNodeDefinition *RxNodeDefinitionGetImmStash(void); -extern RxNodeDefinition *RxNodeDefinitionGetLight(void); -extern RxNodeDefinition *RxNodeDefinitionGetMaterialScatter(void); -extern RxNodeDefinition *RxNodeDefinitionGetPostLight(void); -extern RxNodeDefinition *RxNodeDefinitionGetPreLight(void); -extern RxNodeDefinition *RxNodeDefinitionGetRGBAInterp(void); -extern RxNodeDefinition *RxNodeDefinitionGetUVInterp(void); -extern RxNodeDefinition *RxNodeDefinitionGetScatter(void); -extern RxNodeDefinition *RxNodeDefinitionGetSubmitLine(void); -extern RxNodeDefinition *RxNodeDefinitionGetSubmitTriangle(void); -extern RxNodeDefinition *RxNodeDefinitionGetTransform(void); -extern RxNodeDefinition *RxNodeDefinitionGetAtomicEnumerateLights(void); -extern RxNodeDefinition *RxNodeDefinitionGetWorldSectorInstance(void); -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); - - -/********************************************************************************* - - Generic Core Pipes - - *******************************************************************************/ - - -extern RwBool RtGenCPipeCreateGenericIm3DTransformPipeline(void); -extern void RtGenCPipeDestroyGenericIm3DTransformPipeline(void); -extern RwBool RtGenCPipeCreateGenericIm3DRenderPipelines(void); -extern void RtGenCPipeDestroyGenericIm3DRenderPipelines(void); - -extern RxPipeline *RwIm3DGetGenericTransformPipeline(void); -extern RxPipeline *RwIm3DGetGenericRenderPipeline(RwPrimitiveType primType); - - -/********************************************************************************* - - Generic World Pipes - - *******************************************************************************/ - -extern RwBool RtGenCPipeCreateGenericWorldPipelines(void); -extern void RtGenCPipeDestroyGenericWorldPipelines(void); - -#define RpWorldGetGenericSectorPipelineMacro() \ - (RXPIPELINEGLOBAL(genericWorldSectorPipeline)) - -#define RpAtomicGetGenericPipelineMacro() \ - (RXPIPELINEGLOBAL(genericAtomicPipeline)) - -#define RpMaterialGetGenericPipelineMacro() \ - (RXPIPELINEGLOBAL(genericMaterialPipeline)) - - -#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -#define RpWorldGetGenericSectorPipeline RpWorldGetGenericSectorPipelineMacro -#define RpAtomicGetGenericPipeline RpAtomicGetGenericPipelineMacro -#define RpMaterialGetGenericPipeline RpMaterialGetGenericPipelineMacro - -#endif /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - - -#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -extern RxPipeline *RpWorldGetGenericSectorPipeline(void); - -extern RxPipeline *RpAtomicGetGenericPipeline(void); - -extern RxPipeline *RpMaterialGetGenericPipeline(void); - -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* (!defined(_RTGNCPIP_H)) */ - -/* RWPUBLICEND */ - -/* *INDENT-ON* */ diff --git a/sdk/rwsdk/include/d3d8/rtgncpip.rpe b/sdk/rwsdk/include/d3d8/rtgncpip.rpe deleted file mode 100644 index 4f676526..00000000 --- a/sdk/rwsdk/include/d3d8/rtgncpip.rpe +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionGENCPIPETOOL -{ - - - - e_rwdb_CriterionGENCPIPETOOLLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionGENCPIPETOOL e_rwdb_CriterionGENCPIPETOOL; - - diff --git a/sdk/rwsdk/include/d3d8/rtimport.h b/sdk/rwsdk/include/d3d8/rtimport.h deleted file mode 100644 index 2cc6383b..00000000 --- a/sdk/rwsdk/include/d3d8/rtimport.h +++ /dev/null @@ -1,1338 +0,0 @@ -/*************************************************************************** - * * - * Module : rtimport.h * - * * - * Purpose : World handling functions. * - * * - **************************************************************************/ - -#ifndef RTIMPORT_H -#define RTIMPORT_H - -/** - * \defgroup rtworldimport RtWorldImport - * \ingroup basicgeometry - * - * World Import Toolkit for RenderWare. - */ - -/** - * \defgroup selectors RtWorldImportPartitionSelectors - * \ingroup rtworldimport - * - * The set of provided RtWorldImportPartitionSelectors: - * Selects a good partition by calling one of the - * \ref iterators and then - * one of the \ref evaluators to - * see which is best. - */ - -/** - * \defgroup iterators RtWorldImportPartitionIterators - * \ingroup rtworldimport - * - * The set of provided RtWorldImportPartitionIterators: - * Iterates through a set of candidate partitions, possibly - * using the geometric information in the build sector, or perhaps - * using some other criteria. - */ - -/** - * \defgroup evaluators RtWorldImportPartitionEvaluators - * \ingroup rtworldimport - * - * The set of provided RtWorldImportPartitionEvaluators: - * Uses a combination of statistics, build sector, build status, and - * possibly other criteria to evaluate a partition. While the value - * returned can be any real value, all provided evaluators are return - * lower values for better partitioners, and are in the range [0..1] - * where appropriate - */ - -/** - * \defgroup terminators RtWorldImportPartitionTerminators - * \ingroup rtworldimport - * - * The set of provided RtWorldImportPartitionTerminators: - * Checks given criteria about the statistics, build sector, build status, and - * possibly other criteria to see whether the building process should be - * allowed to terminate, or whether more parititoning is necessary. - */ - -/** - * \defgroup kd RtWorldImportGuideKD - * \ingroup rtworldimport - * - * Tools to manipulate the \ref RtWorldImportGuideKDTree that is used to - * manually build the sectors of a world. - */ - -/** - * \defgroup hints RtWorldImportHints - * \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. - */ - -/**************************************************************************** - Includes - */ -#include "rwcore.h" -#include "rpworld.h" - -#include "rtimport.rpe" /* automatically generated header file */ - -/**************************************************************************** - Defines - */ - -/* Progress callback message types */ -#define rtWORLDIMPORTPROGRESSBSPBUILDSTART 0 -#define rtWORLDIMPORTPROGRESSBSPBUILDUPDATE 1 -#define rtWORLDIMPORTPROGRESSBSPBUILDEND 2 -#define rtWORLDIMPORTPROGRESSBSPCOMPRESSSTART 3 -#define rtWORLDIMPORTPROGRESSBSPCOMPRESSUPDATE 4 -#define rtWORLDIMPORTPROGRESSBSPCOMPRESSEND 5 - -/** - * \ingroup rtworldimport - * \def rtWORLDIMPORTINVALIDPARTITION - * - * This value means that no partition was found, or that the partition was - * invalid or impractical. The value represents infinity. - */ -#define rtWORLDIMPORTINVALIDPARTITION RwRealMAXVAL - -/* maintained in Bin-tree */ -#define CONGRUENTVERTEXCHILDREN 2 - -/* maintained in Quad-tree */ -#define WELDVERTEXCHILDREN 4 - -/**************************************************************************** - Global types - */ -#if (!defined(DOXYGEN)) -typedef struct RtWorldImportVertex RtWorldImportVertex; - -typedef struct RtWorldImportWeldVertex RtWorldImportWeldVertex; - -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 rtworldimport - * \struct RtWorldImportVertex - * Holds data for each vertex in the import world. - * - */ -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 rtworldimport - * \struct RtWorldImportBuildPolyInfo - * - * Information about a polygon - */ -struct RtWorldImportBuildPolyInfo -{ - RwInt16 matIndex; - /**< The material index */ - RwUInt8 clipFlags; - /**< Clipping flags */ - RwUInt8 hasAlpha; - /**< Alpha status */ - void *pUserdata; - /**< Userdata */ -}; - -typedef union RtWorldImportBuildVertexMode RtWorldImportBuildVertexMode; -/** - * \ingroup rtworldimport - * \struct RtWorldImportBuildVertexMode - * - * Mode of the vertex. - * - */ -union RtWorldImportBuildVertexMode -{ - RtWorldImportVertex *vpVert; - /**< The vertex */ - RwInt32 index; - /**< The index */ -}; - -/** - * \ingroup rtworldimport - * \struct RtWorldImportBuildVertex - * - * A list of polygons as a list of vertices where the end of poly boundary - * is marked by mode.vpVert == NULL. - * - */ -struct RtWorldImportBuildVertex -{ - RtWorldImportBuildVertexMode mode; - /**< The mode of the element */ - - RtWorldImportBuildPolyInfo pinfo; - /**< we store some poly info in the end marker of a boundary */ -}; - -/* 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... - */ - - -typedef struct RtWorldImportBuildClipStatistics RtWorldImportBuildClipStatistics; - -/** - * \ingroup rtworldimport - * \struct RtWorldImportBuildClipStatistics - * - * Holds statistics about a partition or candidate partition during - * the build process. - */ -struct RtWorldImportBuildClipStatistics -{ - RwInt32 numPotentialSplit; - /**< The number of polygons split by the partition, - * disregarding overlaps */ - - RwInt32 numPotentialLeft; - /**< The number of potential polygons and fragments on the - * left of the partition, disregarding overlaps */ - - RwInt32 numPotentialRight; - /**< The number of potential polygons and fragments on the - * right of the partition, disregarding overlaps */ - - - RwInt32 numActualSplit; - /**< The number of polygons split by the partition */ - - RwInt32 numActualLeft; - /**< The number of polygons and fragments on the - * left of the partition */ - - RwInt32 numActualRight; - /**< The number of polygons and fragments on the - * right of the partition */ - - - RwInt32 numMaterialLeft; - /**< The number of materials on the left of the partition */ - - RwInt32 numMaterialRight; - /**< The number of materials on the right of the partition */ - - RwInt32 numMaterialSplits; - /**< The number of materials split by the partition */ - - - RwInt32 numMaterialSector; - /**< The total number of materials in the sector containing - * the partition */ - - - RwReal overlapLeft; - /**< The actual, relative size of the overlap on the left of the partition */ - - RwReal overlapRight; - /**< The actual, relative size of the overlap on the right of the partition */ -}; - -/* - * typedef for struct RtWorldImportPartition - */ -typedef struct RtWorldImportPartition RtWorldImportPartition; - -/** - * \ingroup rtworldimport - * \struct RtWorldImportPartition - * - * A partitioning plane. - */ -struct RtWorldImportPartition -{ - RwInt32 type; - /**< Plane type, i.e. 0,4,8 for being normal to the x,y,z axes respectively. */ - - RwReal value; - /**< The distance of the plane from the origin */ - - RwReal maxLeftValue; - /**< The maximum value of the left face of the overlap. This is derived - * from the maxOverlapPercent value in \ref RtWorldImportParameters - */ - - RwReal maxRightValue; - /**< The maximum value of the right face of the overlap. This is derived - * from the maxOverlapPercent value in \ref RtWorldImportParameters - */ - - RtWorldImportBuildClipStatistics buildStats; - /**< The statistics for the partition */ -}; - -/* - * typedef for struct \ref RtWorldImportGuideKDTree - */ -typedef struct RtWorldImportGuideKDTree RtWorldImportGuideKDTree; - - -/** - * \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 - * manner instead of using any heuristic. - * - */ -struct RtWorldImportGuideKDTree -{ - RtWorldImportPartition partition; - /**< A partitioning plane */ - - RwBBox bbox; - /**< Bounding box of the sector or super-sector */ - - RtWorldImportGuideKDTree *parent; - /**< Pointer to its parent */ - - RwInt32 order; - /**< Relationship information - 0 for left child, 1 for right child */ - - RtWorldImportGuideKDTree *left; - /**< Left child */ - - RtWorldImportGuideKDTree *right; - /**< Right child */ -}; - -typedef struct _rtWorldImportGuideKDStackElement _rtWorldImportGuideKDStackElement; - -#if (!defined(DOXYGEN)) -struct _rtWorldImportGuideKDStackElement -{ - RwBool terminal; - RtWorldImportGuideKDTree *node; - _rtWorldImportGuideKDStackElement *next; -}; - -typedef struct _rtWorldImportGuideKDStack _rtWorldImportGuideKDStack; - -struct _rtWorldImportGuideKDStack -{ - _rtWorldImportGuideKDStackElement *top; - _rtWorldImportGuideKDStackElement *current; - _rtWorldImportGuideKDStackElement *bottom; -}; -#endif /* (!defined(DOXYGEN)) */ - -/* - * typedef for struct RtWorldImportBuildSector - */ -typedef struct RtWorldImportBuildSector RtWorldImportBuildSector; - -/** - * \ingroup rtworldimport - * \struct RtWorldImportBuildSector - * - * Holds information about the sector that is being subdivided - */ -struct RtWorldImportBuildSector -{ - RwInt32 type; - /**< Sector type (so can handle in an RpWorld) */ - - RtWorldImportVertex *vertices; - /**< A pointer to the list of vertices */ - - RwInt32 numVertices; - /**< The number of vertices */ - - RtWorldImportBuildVertex *boundaries; - /**< A list of boundaries \see RtWorldImportBuildVertex */ - - RwInt32 numBoundaries; - /**< The number of boundaries */ - - RwInt32 numPolygons; - /**< The number of polygons (triangles) */ - - RwBBox boundingBox; - /**< Sector's bounding box */ - - RwReal overlap; - /**< The percentage that the sector overlaps with its neighbour */ - - RwUInt32 maxNumMaterials; - /**< Maximum number of materials in the in the world */ -}; - -/* - * typedef for struct RtWorldImportBuildStatus - */ -typedef struct RtWorldImportBuildStatus RtWorldImportBuildStatus; - -/** - * \ingroup rtworldimport - * \struct RtWorldImportBuildStatus - * World Import Build Status Structure - * Used to store the current tree's build status - */ -struct RtWorldImportBuildStatus -{ - RwInt32 depth; /**< current depth in the tree */ -}; - -typedef struct RwRGBAUInt32 RwRGBAUInt32; - -#if (!defined(DOXYGEN)) -struct RwRGBAUInt32 -{ - RwUInt32 red, green, blue, alpha; -}; - -typedef struct RtWorldImportCongruentVertex RtWorldImportCongruentVertex; - -struct RtWorldImportCongruentVertex -{ - RwInt32 destIdx; - RtWorldImportVertex vertex; - RtWorldImportVertex Mean; - RwRGBAUInt32 preLitMean; - RwInt32 refCount; - RtWorldImportCongruentVertex *child[CONGRUENTVERTEXCHILDREN]; -}; - -struct RtWorldImportWeldVertex -{ - RtWorldImportVertex *sourcePtr; - RtWorldImportCongruentVertex *CongruentVertex; - RtWorldImportWeldVertex *child[WELDVERTEXCHILDREN]; -}; -#endif /* (!defined(DOXYGEN)) */ - -/* - * Holds data for each triangle in the import world. - */ -typedef struct RtWorldImportTriangle RtWorldImportTriangle; - -/** - * \ingroup rtworldimport - * \struct RtWorldImportTriangle - * Holds data for each triangle in the import world. - * - * \see RtWorldImportTriangle - */ -struct RtWorldImportTriangle -{ - RwInt32 matIndex; /**< Index into material list */ - RwInt32 vertIndex[3]; /**< Indices into vertex list */ - void *pUserdata; /**< Pointer to unspecified per triangle user data */ -}; - - - - -/* - * typedef for struct RtWorldImportBBoxHintDesc - */ -typedef struct RtWorldImportBBoxHintDesc RtWorldImportBBoxHintDesc; -/** - * \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 rtworldimport - * \struct RtWorldImportHints - * Bounding box hints used to control the world sectorization process. - * \see RtWorldImportHintsSet - */ -struct RtWorldImportHints -{ - RtWorldImportBBoxHintDesc *boundingBoxes; /**< The bounding box hints */ - RwInt32 numBoundingBoxes; /**< The number of bounding box hints */ -}; - - -/** - * \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 rtworldimport - * \struct RtWorldImportParameters - * Parameters used with \ref RtWorldImportCreateWorld. - * They are initialized to default values using \ref RtWorldImportParametersInit. - * - */ -struct RtWorldImportParameters -{ - RwReal worldSectorMaxSize; - /**< The maximum world sector size. */ - RwInt32 maxWorldSectorPolygons; - /**< The maximum number of polygons in a world sector. */ - RwReal maxOverlapPercent; - /**< Total fraction of world sector overlap allowed. */ - RwReal weldThreshold; - /**< Threshold for welding vertices. */ - RwReal angularThreshold; - /**< Angular threshold for welding vertex normals */ - RwBool calcNormals; - /**< If TRUE then importer creates normals. */ - RwBool conditionGeometry; - /**< If TRUE perform vertex welding and degenerate triangle removal.*/ - RwBool userSpecifiedBBox; - /**< If TRUE allows user to specify minimum bounding-box for the - * world using the userBBox parameter. */ - RwBBox userBBox; - /**< User specified world bounding-box if userSpecifiedBBox is TRUE.*/ - RwReal uvLimit; - /**< If conditionGeometry is TRUE limit texture coordinates to this - * value. */ - RwBool retainCreases; - /**< If TRUE then duplicate vertices with differing normals will not - * be merged. */ - RwBool fixTJunctions; - /**< If TRUE then T-junctions are fixed in the geometry (slow). */ - RwBool weldPolygons; - /**< If TRUE then polygons are welded where possible to reduce the - * polygon count. */ - RwInt32 flags; - /**< Conversion flags (see RpWorldFlag). */ - RwTextureAddressMode mode; - /**< If \ref rwTEXTUREADDRESSWRAP than weld vertices according to - * mod(1) congruent texture coordinates */ - RwBool sortPolygons; - /**< If TRUE then polygons are sorted by their centroid */ - RwBool cullZeroAreaPolygons; - /**< If TRUE then zero-area polygons are culled */ - RwInt32 numTexCoordSets; - /**< The number of texture coordinate sets to use. If set to zero, then - * the number is taken from the flags parameter which, for backward - * compatibility, can include the \ref rpWORLDTEXTURED or \ref rpWORLDTEXTURED2 - * flags. These specify one or two sets respectively. */ - RwBool terminatorCheck; - /**< If TRUE the world will be checked for validity during the build process. */ -}; - -/* - * typedef for struct RtWorldImport - */ -typedef struct RtWorldImport RtWorldImport; - -/** - * \ingroup rtworldimport - * \struct RtWorldImport - * World Import State Structure - */ -struct RtWorldImport -{ - RpMaterialList matList; /**< Material list */ - RtWorldImportVertex *vertices; /**< Vertex array */ - RwInt32 numVertices; /**< Vertex count */ - - RtWorldImportTriangle *polygons; /**< Triangle array */ - RwInt32 numPolygons; /**< Triangle count */ -}; - -/** - * \ingroup rtworldimport - * \ref RtWorldImportProgressCallBack is the type for the callback function supplied to - * \ref RtWorldImportSetProgressCallBack. - * - * \param msg Message type corresponding to one of the following: - * \li rtWORLDIMPORTPROGRESSBSPBUILDSTART - - * The BSP creation process is about to start. - * The argument value is equal to 0.0. - * \li rtWORLDIMPORTPROGRESSBSPBUILDUPDATE - - * The BSP creation process has finished processing a subsection of - * the world. The argument value is equal to the percentage of the - * world processed up to this point. - * \li rtWORLDIMPORTPROGRESSBSPBUILDEND - - * The BSP creation process has ended. - * The argument value is equal to 100.0. - * \li rtWORLDIMPORTPROGRESSBSPCOMPRESSSTART - - * The BSP compression process is about to start. The argument value - * is equal to 0.0. - * \li rtWORLDIMPORTPROGRESSBSPCOMPRESSUPDATE - - * The BSP compression has finished processing a subsection of the - * world. The argument value is equal to the percentage of the world - * processed up to this point. - * \li rtWORLDIMPORTPROGRESSBSPCOMPRESSEND - - * The BSP compression process has ended. The argument value is equal - * to 100.0. - * - * \param value The percentage of the progress made in either BSP - * building or BSP compression. - * - * \return TRUE to continue BSP processing, FALSE to abort. - * - * \see RtWorldImportSetProgressCallBack - */ -typedef RwBool (*RtWorldImportProgressCallBack)(RwInt32 msg, RwReal value); - -/** - * \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 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 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 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 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 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 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); - - - - -/** - * \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, - RtWorldImportBuildStatus *buildStatus, - void *pData); - -/** - * \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, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void *pData); - -/* - * typedef for struct \ref RtWorldImportBuildCallBacks - */ -typedef struct RtWorldImportBuildCallBacks RtWorldImportBuildCallBacks; /* MAYBE: rename to SectorCallBacks ?*/ - -/** - * \ingroup rtworldimport - * \struct RtWorldImportBuildCallBacks - * Sectorization callbacks - */ -struct RtWorldImportBuildCallBacks -{ - RtWorldImportPartitionBuildCallBack partitionBuild; - /**< Callback for choosing partition */ - void *partitionUserData; - /**< Partition callback user data */ - RtWorldImportTerminationBuildCallBack terminationBuild; - /**< Callback for termination of further partitioning */ - void *terminationUserData; - /**< Termination callback user data */ -}; - -/* - * typedef for struct \ref RtWorldImportUserdataCallBacks - */ -typedef struct RtWorldImportUserdataCallBacks RtWorldImportUserdataCallBacks; - -/** - * \ingroup rtworldimport - * \struct RtWorldImportUserdataCallBacks - * Bundle of callbacks - */ -struct RtWorldImportUserdataCallBacks -{ - RtWorldImportDestroyVertexUserdataCallBack destroyVertexUserdata; - /**< Callback on vertex destruction */ - RtWorldImportCloneVertexUserdataCallBack cloneVertexUserdata; - /**< Callback on vertex cloning */ - RtWorldImportInterpVertexUserdataCallBack interpVertexUserdata; - /**< Callback on vertex interpolation */ - RtWorldImportDestroyPolygonUserdataCallBack destroyPolygonUserdata; - /**< Callback on polygon destruction */ - RtWorldImportSplitPolygonUserdataCallBack splitPolygonUserdata; - /**< Callback on polygon division */ - RtWorldImportSectorSetVertexUserdataCallBack sectorSetVertexUserdata; - /**< Callback on setting vertex user data */ - RtWorldImportSectorSetPolygonUserdataCallBack sectorSetPolygonUserdata; - /**< Callback on setting polygon user data */ -}; - -/** - * \ingroup rtworldimport - * \ref RtWorldImportBuildPartitionSelector - * - * An enumeration that can be passed to - * \ref RtWorldImportSetStandardBuildPartitionSelector to determine - * whether partitioning will be achieved automatically, using the - * default partition selected, or manually using the \ref RtWorldImportGuideKDTree - */ -typedef enum -{ - rwBUILDPARTITIONSELECTOR_DEFAULT, - /**< Sets the default automated process */ - rwBUILDPARTITIONSELECTOR_GUIDED - /**< Sets the guided manual process */ -} -RtWorldImportBuildPartitionSelector; - - - - -/* Builds overlaps from plane and conversion params */ -#define BuildSectorSetOverlapsMacro(_boundingBox, _partition, _conversionParams) \ -MACRO_START \ -{ \ - RwReal sup = GETCOORD((_boundingBox).sup, (_partition).type); \ - RwReal inf = GETCOORD((_boundingBox).inf, (_partition).type); \ - \ - (_partition).maxLeftValue = \ - (_partition).value + \ - ((sup - (_partition).value) * (_conversionParams).maxOverlapPercent); \ - \ - (_partition).maxRightValue = \ - (_partition).value - \ - ((((_partition).value) - inf) * (_conversionParams).maxOverlapPercent); \ -} \ -MACRO_STOP - -/***************************************************************************** - * Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RwBool -_rtImportBuildSectorFindBBox(RtWorldImportBuildSector *buildSector, RwBBox *bbpOut); - -extern void - _rtWorldImportGuideKDCopy(RtWorldImportGuideKDTree *KD, RpSector *spSector, RwInt32 depth); -extern void _rtWorldImportGuideKDStackDestroy(_rtWorldImportGuideKDStack *stack); -extern void -_rtWorldImportGuideKDEncodeAsStack(RtWorldImportGuideKDTree *tree, _rtWorldImportGuideKDStack *stack); - -extern RtWorldImportGuideKDTree *RtWorldImportGuideKDCreate(RwBBox *bbox); -extern RtWorldImportGuideKDTree *RtWorldImportGuideKDAddPartition - (RtWorldImportGuideKDTree *KD, RwInt32 type, RwReal value); -extern void RtWorldImportGuideKDDeletePartition(RtWorldImportGuideKDTree *KD); -extern void RtWorldImportGuideKDDestroy(RtWorldImportGuideKDTree *KD); - -extern RtWorldImportGuideKDTree *RtWorldImportGuideKDWrite( - RtWorldImportGuideKDTree *guideKD, const RwChar *filename); -extern RtWorldImportGuideKDTree * RtWorldImportGuideKDRead( - const RwChar *filename, const RwBBox *bbox); - -/***************************************************************************** - * PARTITION SELECTORS - These callbacks for used to select a partition - * from a sector. - */ - -extern RwReal -RtWorldImportBalancedCullPartitionSelector(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void *userData); - -extern RwReal -RtWorldImportMaterialCountPartitionSelector(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void *userData); - -extern RwReal -RtWorldImportMaterialSeparatePartitionSelector(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void *userData); -extern RwReal -RtWorldImportPartitionHintPartitionSelector(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * __RWUNUSED__ userData); - - -extern RwReal -RtWorldImportMaximumOccluderPartitionSelector(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData); - -extern RwReal -RtWorldImportDisjointOccluderPartitionSelector(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData); - -extern RwReal -RtWorldImportLeastCutAndBalancedPartitionSelector(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData); - -extern RwReal -RtWorldImportMaximumExtentPartitionSelector(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData); - -extern RwReal -RtWorldImportCullMiddleSpacePartitionSelector(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void *userData); - -extern RwReal -RtWorldImportCullEndSpacePartitionSelector(RtWorldImportBuildSector * buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void *userData); - -extern RwReal -RtWorldImportCullSpacePartitionSelector(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void *userData); - -extern RwReal -RtWorldImportHintBBoxPartitionSelector(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void *userData); - -extern RwReal -RtWorldImportGeneralOccluderPartitionSelector(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData); - -extern RwReal -RtWorldImportBalancedTreePartitionSelector(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData); - -/***************************************************************************** - * PARTITION ITERATORS - These callbacks iterate though a set of partitions - */ - -extern RwBool -RtWorldImportOrthogonalAutoPartitionIterator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData, - RwInt32* loopCounter); - - -extern RwBool -RtWorldImportRegularIntervalPartitionIterator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData, - RwInt32* loopCounter); - - -extern RwBool -RtWorldImportMiddleAxisPartitionIterator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData, - RwInt32 * loopCounter); - - -extern RwBool -RtWorldImportMedianPercentagePartitionIterator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void *userData, - RwInt32 *loopCounter); - - -extern RwBool -RtWorldImportHintBBoxPartitionIterator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData, - RwInt32* loopCounter); - -extern RwBool -RtWorldImportHighestVertexAccommodatingPlanePartitionIterator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus * buildStatus, - RtWorldImportPartition *partition, - void * userData, - RwInt32* loopCounter); - -extern RwBool -RtWorldImportMaterialBoundsPartitionIterator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus * buildStatus, - RtWorldImportPartition *partition, - void *userData, - RwInt32 *loopCounter); - -/***************************************************************************** - * PARTITION EVALUATORS - These callbacks iterate though a set of partitions - */ - -extern RwReal -RtWorldImportFuzzyBalancedPartitionEvaluator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void *userData); - - -extern RwReal -RtWorldImportPotentialSplitPartitionEvaluator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData); - - -extern RwReal -RtWorldImportBalancedPartitionEvaluator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData); - - -extern RwReal -RtWorldImportExtentPartitionEvaluator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData); - - -extern RwReal -RtWorldImportOccluderPartitionEvaluator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData); - - -extern RwReal -RtWorldImportWeightedOccluderPartitionEvaluator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData); - -extern RwReal -RtWorldImportHintBBoxPartitionEvaluator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void *userData); - -extern RwReal -RtWorldImportVolumeBalancedPartitionEvaluator(RtWorldImportBuildSector * buildSector, - RtWorldImportBuildStatus * buildStatus, - RtWorldImportPartition *partition, - void * userData); - -extern RwReal -RtWorldImportWeightedDisjointOccluderPartitionEvaluator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData); - -extern RwReal -RtWorldImportMaterialCutsPartitionEvaluator(RtWorldImportBuildSector * buildSector, - RtWorldImportBuildStatus * buildStatus, - RtWorldImportPartition *partition, - void * userData); - -extern RwReal -RtWorldImportMaterialBalancedPartitionEvaluator(RtWorldImportBuildSector * buildSector, - RtWorldImportBuildStatus *buildStatus, - RtWorldImportPartition *partition, - void * userData); - -extern RwReal -RtWorldImportAspectPartitionEvaluator(RtWorldImportBuildSector *buildSector, - RtWorldImportBuildStatus * buildStatus, - RtWorldImportPartition *partition, - void * userData); - -extern RwReal -RtWorldImportMaterialSeparatorPartitionEvaluator(RtWorldImportBuildSector * buildSector, - RtWorldImportBuildStatus * buildStatus, - RtWorldImportPartition *partition, - void * userData); -/***************************************************************************** - * PARTITION TERMINATORS - These callbacks are used to decide when - * partitioning of a sector should stop - */ -extern RwBool -RtWorldImportNeverPartitionTerminator(RtWorldImportBuildSector * buildSector, - RtWorldImportBuildStatus * buildStatus, - void * userData); - -extern RwBool -RtWorldImportMaximumLegalPartitionTerminator(RtWorldImportBuildSector * buildSector, - RtWorldImportBuildStatus * __RWUNUSED__ buildStatus, - void * __RWUNUSED__ userData); - -extern RwBool -RtWorldImportDefaultPartitionTerminator(RtWorldImportBuildSector * buildSector, - RtWorldImportBuildStatus * buildStatus, - void * pData); - - -extern RwBool -RtWorldImportDepthPartitionTerminator(RtWorldImportBuildSector * buildSector, - RtWorldImportBuildStatus * buildStatus, - void * userData); - - -extern RwBool -RtWorldImportSectorHeightPartitionTerminator(RtWorldImportBuildSector * buildSector, - RtWorldImportBuildStatus * buildStatus, - void * userData); - -extern RwBool -RtWorldImportSizePartitionTerminator(RtWorldImportBuildSector * buildSector, - RtWorldImportBuildStatus * buildStatus, - void * userData); - -extern RwBool -RtWorldImportSectorAspectSizePartitionTerminator(RtWorldImportBuildSector * buildSector, - RtWorldImportBuildStatus * buildStatus, - void * userData); - - - - -/* WorldImport hints */ -extern void -RtWorldImportHintsSetGroup(RtWorldImportHints *hints, RtWorldImportHintGroup group); - -extern RtWorldImportHints * -RtWorldImportHintsGetGroup(RtWorldImportHintGroup group); - -extern RtWorldImportHints * -RtWorldImportHintsCreate(void); - -extern RwBool -RtWorldImportHintsDestroy(RtWorldImportHints *hints); - -extern RtWorldImportHints * -RtWorldImportHintsAddBoundingBoxes(RtWorldImportHints *hints, RwInt32 numBoundingBoxes); - -extern void -RtWorldImportMaterialGroupHintGenerator(RtWorldImportBuildSector *buildSector, - RtWorldImportHints *materialGroupHints); - -/* Initializing the conversion structure */ -extern RtWorldImportParameters *RtWorldImportParametersInit(void); -extern void RtWorldImportParametersSet(RtWorldImportParameters *params); -extern RtWorldImportParameters *RtWorldImportParametersGet(void); - - -extern RpWorld *RtWorldImportCreateWorld(RtWorldImport * - nohsworld, - RtWorldImportParameters - * conversionParams); - -extern RpGeometry *RtWorldImportCreateGeometry(RtWorldImport * - nohsworld, - RtWorldImportParameters - * conversionParams); - -extern RtWorldImport *RtWorldImportCreate(void); - -extern RwBool RtWorldImportDestroy(RtWorldImport * nohsworld); - -extern RtWorldImport *RtWorldImportAddNumVertices(RtWorldImport * - nohsworld, - RwInt32 - numNewVertices); - -extern RtWorldImport *RtWorldImportAddNumTriangles(RtWorldImport * - nohsworld, - RwInt32 - numNewTriangles); - -extern RpMaterial *RtWorldImportGetMaterial(RtWorldImport * - nohsworld, - RwInt32 matInd); - -extern RwInt32 RtWorldImportGetNumVertices(RtWorldImport * nohsworld); - -extern RtWorldImportVertex *RtWorldImportGetVertices(RtWorldImport * - nohsworld); - -extern RwInt32 RtWorldImportGetNumTriangles(RtWorldImport * nohsworld); - -extern RtWorldImportTriangle * -RtWorldImportGetTriangles(RtWorldImport * nohsworld); - - -/* Progress callbacks */ -extern void -RtWorldImportSetProgressCallBack(RtWorldImportProgressCallBack CB); - -extern RpWorldSector * RtWorldImportGetNumMaterials(RpWorldSector *worldSector, void *data); - -extern void -_rtImportWorldSendProgressMessage(RwInt32 msgtype, RwReal value); - -/* Reading and Writing */ - -extern RtWorldImport *RtWorldImportWrite(RtWorldImport * world, - RwChar * filename); - -extern RtWorldImport *RtWorldImportRead(RwChar * filename); - -extern RwInt32 RtWorldImportAddMaterial(RtWorldImport * nohsworld, - RpMaterial * material); - -extern RwInt32 RtWorldImportGetMaterialIndex(RtWorldImport * nohsworld, - RpMaterial * material); - -extern RtWorldImport *RtWorldImportForAllMaterials(RtWorldImport * - nohsworld, - RpMaterialCallBack - fpCallBack, - void *pData); - -extern void -RtWorldImportSetUserdataCallBacks(RtWorldImportDestroyVertexUserdataCallBack - destroyVertexUserdataCB, - RtWorldImportCloneVertexUserdataCallBack - cloneVertexUserdataCB, - RtWorldImportInterpVertexUserdataCallBack - interpVertexUserdataCB, - RtWorldImportSectorSetVertexUserdataCallBack - sectorSetVertexUserdata, - RtWorldImportDestroyPolygonUserdataCallBack - destroyPolygonUserdataCB, - RtWorldImportSplitPolygonUserdataCallBack - splitPolygonUserdataCB, - RtWorldImportSectorSetPolygonUserdataCallBack - sectorSetPolygonUserdata); - -extern void -RtWorldImportSetBuildCallBacks(RtWorldImportPartitionBuildCallBack - partitionBuildCB, - RtWorldImportTerminationBuildCallBack - terminationBuildCB); - -extern void -RtWorldImportSetPartitionStatistics(RtWorldImportBuildSector * buildSector, - RtWorldImportPartition * partition); - -extern void -RtWorldImportSetBuildCallBacksUserData(void *partitionUserData, - void *terminateUserData); - - -extern void -RtWorldImportSetStandardBuildPartitionSelector(RtWorldImportBuildPartitionSelector partitionSelector, void* userData); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#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/sdk/rwsdk/include/d3d8/rtimport.rpe b/sdk/rwsdk/include/d3d8/rtimport.rpe deleted file mode 100644 index ff8d3d5c..00000000 --- a/sdk/rwsdk/include/d3d8/rtimport.rpe +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionNoHSWorld -{ - - -E_RW_SECTORDEGENERATE, - -E_RW_SECTORINVNOPOLYGONS, - -E_RW_NOPLANE, - -E_RW_SECTORINVPOLY, - -E_RW_SECTORUSED, - -E_RW_MAXBSPDEPTHEXCEEDED, - - - e_rwdb_CriterionNoHSWorldLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionNoHSWorld e_rwdb_CriterionNoHSWorld; - - diff --git a/sdk/rwsdk/include/d3d8/rtintsec.h b/sdk/rwsdk/include/d3d8/rtintsec.h deleted file mode 100644 index a2e4c3d6..00000000 --- a/sdk/rwsdk/include/d3d8/rtintsec.h +++ /dev/null @@ -1,138 +0,0 @@ -/*************************************************************************** - * * - * Module : rtintsec.h * - * * - * Purpose : Intersection tests on geometry primitives. * - * * - **************************************************************************/ - -#ifndef RTINTSEC_H -#define RTINTSEC_H - -/** - * \defgroup rtintersection RtIntersection - * \ingroup mathtools - * - * Object Intersection Toolkit for RenderWare. - */ - -/**************************************************************************** - Includes - */ - -#include -#include "rtintsec.rpe" /* automatically generated header file */ - -/**************************************************************************** - Defines - */ - -#define RTINTSECEPSILON (RwReal)(1e-8) -#define RTINTSECEDGEEPS (RwReal)(1e-5) - -#define RtIntersectionLineTriangleMacro(_result, \ - _lineStart, _lineDelta, \ - _v0, _v1, _v2, \ - _distance) \ -MACRO_START \ -{ \ - RwV3d edge1, edge2, tVec, pVec, qVec; \ - RwReal det; \ - \ - /* Find vectors for two edges sharing vert0 */ \ - RwV3dSubMacro(&edge1, (_v1), (_v0)); \ - RwV3dSubMacro(&edge2, (_v2), (_v0)); \ - \ - /* Begin calculating determinant \ - * - also used to calculate U parameter */ \ - RwV3dCrossProductMacro(&pVec, (_lineDelta), &edge2); \ - \ - /* If determinant is \ - * + near zero, ray lies in plane of \ - * triangle \ - * + negative, triangle is backfacing \ - */ \ - det = RwV3dDotProductMacro(&edge1, &pVec); \ - (_result) = (det > RTINTSECEPSILON); \ - \ - if ((_result)) \ - { \ - RwReal lo, hi, u; \ - \ - /* Calculate bounds for parameters with tolerance */ \ - lo = - det*RTINTSECEDGEEPS; \ - hi = det - lo; \ - \ - /* Calculate U parameter and test bounds */ \ - RwV3dSubMacro(&tVec, (_lineStart), (_v0)); \ - u = RwV3dDotProductMacro(&tVec, &pVec); \ - (_result) = (u >= lo && u <= hi); \ - \ - if ((_result)) \ - { \ - RwReal v; \ - \ - /* Calculate V parameter and test bounds */ \ - RwV3dCrossProductMacro(&qVec, &tVec, &edge1); \ - v = RwV3dDotProductMacro((_lineDelta), &qVec); \ - (_result) = (v >= lo && (u + v) <= hi); \ - \ - if ((_result)) \ - { \ - /* Calculate t, \ - * and make sure intersection is in bounds of line */ \ - *(_distance) = RwV3dDotProductMacro(&edge2, &qVec); \ - \ - /* Within bounds of line? */ \ - (_result) = (*(_distance) >= lo && *(_distance) <= hi); \ - \ - if ((_result)) \ - { \ - *(_distance) = ((*(_distance)) / (det)); \ - } \ - } \ - } \ - } \ -} \ -MACRO_STOP - - -/**************************************************************************** - Global Types - */ - - -/* RWPUBLIC */ -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Line intersections */ -extern RwBool -RtIntersectionLineTriangle(RwV3d *lineStart, RwV3d *lineDelta, - RwV3d *v0, RwV3d *v1, RwV3d *v2, - RwReal *distance); - -/* Sphere intersections */ -extern RwBool -RtIntersectionSphereTriangle(RwSphere *sphere, - RwV3d *v0, RwV3d *v1, RwV3d *v2, - RwV3d *normal, - RwReal *distance); - -/* BBox intersections */ -extern RwBool -RtIntersectionBBoxTriangle(RwBBox *bbox, RwV3d *v0, RwV3d *v1, RwV3d *v2); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* RWPUBLICEND */ - -#endif /* RTINTSEC_H */ diff --git a/sdk/rwsdk/include/d3d8/rtintsec.rpe b/sdk/rwsdk/include/d3d8/rtintsec.rpe deleted file mode 100644 index 3c7f7bf3..00000000 --- a/sdk/rwsdk/include/d3d8/rtintsec.rpe +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionIntsec -{ - - - - e_rwdb_CriterionIntsecLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionIntsec e_rwdb_CriterionIntsec; - - diff --git a/sdk/rwsdk/include/d3d8/rtltmap.h b/sdk/rwsdk/include/d3d8/rtltmap.h deleted file mode 100644 index 8ee15a43..00000000 --- a/sdk/rwsdk/include/d3d8/rtltmap.h +++ /dev/null @@ -1,644 +0,0 @@ - -/** - * \defgroup rtltmap RtLtMap - * \ingroup lighting - * - * Lightmap Generation Toolkit for RenderWare. - */ - -#ifndef RTLTMAP_H -#define RTLTMAP_H - -/*===========================================================================* - *--- Includes --------------------------------------------------------------* - *===========================================================================*/ - -#include "rwcore.h" -#include "rpworld.h" - -#include "rpltmap.h" - - -/** - * \ingroup rtltmap - * \ref RtLtMapIlluminateSampleCallBack is the callback to be called, from - * within \ref RtLtMapIlluminate, for groups of samples in the objects - * currently being illuminated. - * - * For lightmapped objects, samples are grouped on a per-polygon basis and - * for vertex-lit objects, samples are grouped on a per-object basis (see - * \ref RtLtMapObjectFlags). - * - * 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 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 - * across polygons for non-flat-shaded materials. See \ref RtLtMapMaterialFlags). - * For lightmap samples (not vertex-lighting samples), it will receive - * barycentric coordinates within the current polygon. It will also receive - * a list of RpLights affecting the current object. - * - * 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). - * - * NOTE: The alpha channel of the RwRGBA results array must NOT be modified. - * These values are used internally and their modification may result in - * unwanted visual artifacts in the resulting lighting solution. - * - * The default RtLtMapIlluminateSampleCallBacks supplied with RtLtMap is - * \ref RtLtMapDefaultSampleCallBack. This callback performs point and area - * lighting (the area lights use are those passed to \ref RtLtMapIlluminate). - * - * \param results A pointer to an array of \ref RwRGBA sample color values - * \param samplePositions A pointer to an array of \ref RwV3d values specifying the - * world-space positions of each of the samples in the results array - * \param baryCoords A pointer to an array of \ref RwV3d values specifying the - * barycentric coordinates (within the current polygon) of - * each of the samples in the results array - * \param numSamples The length of the results, samplePositions, baryCoords and normals arrays - * \param lights An array of pointers to \ref RpLight's affecting the current object - * \param numLights The length of the lights array - * \param normals A pointer to an array of \ref RwV3d values specifying the - * world-space, unit normals of each of the samples in the results array - * - * \return A pointer to the results array on success, NULL otherwise - * - * \see RtLtMapIlluminate - * \see RtLtMapIlluminateVisCallBack - * \see RtLtMapIlluminateProgressCallBack - */ -typedef RwRGBA *(*RtLtMapIlluminateSampleCallBack)(RwRGBA *results, - RwV3d *samplePositions, - RwV3d *baryCoords, - RwUInt32 numSamples, - RpLight **lights, - RwUInt32 numLights, - RwV3d *normals); - -/** - * \ingroup rtltmap - * \ref RtLtMapIlluminateVisCallBack is the callback to be called, from - * within \ref RtLtMapIlluminate, to determine the visibility between a - * sample and a light. - * - * This callback is called for all samples in the current - * \ref RtLtMapLightingSession and for each light source which may - * potentially affect each of those samples (this may not be all the - * lights in the scene, as some hierarchical culling is performed). - * 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 - * position of the light, a pointer to a light and a pointer to an - * \ref RwRGBAReal result value. - * - * If the light pointer is NULL, this means that the current light - * is an area light (as opposed to an \ref RpLight), of an internal - * format. The area lights use are those passed to \ref RtLtMapIlluminate. - * - * The callback should return FALSE to signify that the light is wholly - * occluded w.r.t the sample position, otherwise it should return TRUE. - * Partial degrees of (color-frequency-dependent) occlusion may be - * 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 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 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 - * \param samplePos The world-space positiuon of the sample - * \param lightPos The world-space positiuon of the light - * \param light A pointer to the light (NULL if it is an are light) - * - * \return TRUE if the light is visible from the sample, FALSE if it is occluded - * - * \see RtLtMapIlluminate - * \see RtLtMapIlluminateSampleCallBack - * \see RtLtMapIlluminateProgressCallBack - */ -typedef RwBool (*RtLtMapIlluminateVisCallBack)(RpWorld *world, - RwRGBAReal *result, - RwV3d *samplePos, - RwV3d *lightPos, - RpLight *light); - -/** - * \ingroup rtltmap - * \ref RtLtMapIlluminateProgressCallBack is the callback to be called, from - * within \ref RtLtMapIlluminate, to allow a user to track lighting progress. - * - * The progress callback will be called at several stages during lighting, - * with a different 'message' parameter value used at each stage (see - * \ref RtLtMapProgressMessage). It will be called at the very start of - * lighting (for a given \ref RtLtMapLightingSession), before any samples - * are lit. It will also be called at the very end of lighting, after all - * samples have been lit. It will be called before and after each lighting - * 'slice' (see \ref RtLtMapIlluminate) and also after each group of - * samples have been lit. - * - * For lightmapped objects, samples are grouped on a per-polygon basis and - * for vertex-lit objects, samples are grouped on a per-object basis (see - * \ref RtLtMapObjectFlags). - * - * The progress callback will receive a RwReal value specifying the percentage - * of samples already lit in the current \ref RtLtMapLightingSession (see - * \ref RtLtMapLightingSessionGetNumSamples). - * - * By returning FALSE, the progress callback may cause early termination of - * the current lighting 'slice' (this may be used, for example, to keep - * the time spent lighting each slice fairly constant). - * - * There is no default progress callback supplied with RtLtMap. - * - * \param message A \ref RtLtMapProgressMessage identifying the stage - * of the current call to the progress callback - * \param value The percentage of samples already lit in the - * current \ref RtLtMapLightingSession - * - * \return FALSE to immediately terminate lighting, otherwise TRUE - * - * \see RtLtMapIlluminate - * \see RtLtMapIlluminateSampleCallBack - * \see RtLtMapIlluminateVisCallBack - */ -typedef RwBool (*RtLtMapIlluminateProgressCallBack)(RwInt32 message, - RwReal value); - - -/** - * \ingroup rtltmap - * \ref RtLtMapProgressMessage is an enumerated type identifying the different - * stages at which the \ref RtLtMapIlluminateProgressCallBack may be called - * from within \ref RtLtMapIlluminate. - * - * \see RtLtMapIlluminateProgressCallBack - * \see RtLtMapIlluminate - */ -enum RtLtMapProgressMessage -{ - rtLTMAPPROGRESSNAMESSAGE = 0, - - rtLTMAPPROGRESSSTART = 1, /**< This is issued at the beginning of - * an incremental lighting session */ - rtLTMAPPROGRESSSTARTSLICE = 2, /**< This is issued at the beginning of every - * slice in an incremental lighting session */ - rtLTMAPPROGRESSUPDATE = 3, /**< This is issued after the lighting of each - * lightmapped triangle or vertex-lit object */ - rtLTMAPPROGRESSENDSLICE = 4, /**< This is issued at the end of every slice - * in an incremental lighting session */ - rtLTMAPPROGRESSEND = 5, /**< This is issued at the end of an - * incremental lighting session */ - - rtLTMAPPROGRESSFORCEENUMSIZEINT = 0x7FFFFFFF -}; -typedef enum RtLtMapProgressMessage RtLtMapProgressMessage; - -typedef struct RtLtMapLightingSession RtLtMapLightingSession; -/** - * \ingroup rtltmap - * \struct RtLtMapLightingSession - * The RtLtMapLightingSession structure holds information to be passed to - * \ref RtLtMapIlluminate. It is used to parameterize the lighting process. - * - * 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 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 - * each of these cases. - * - * \see RtLtMapIlluminate - * \see RtLtMapLightMapsCreate - * \see RtLtMapLightMapsClear - * \see RtLtMapLightMapsDestroy - * \see RtLtMapAreaLightGroupCreate - */ -struct RtLtMapLightingSession -{ - RpWorld *world; /**< This world is that in which collisions are performed - * during illumination (for the purposes of lighting - * visibility determination) */ - RwCamera *camera; /**< An optional pointer to a camera. The camera's frustum - * may be used to cull objects and/or triangles from the - * set of those to be processed. */ - RpWorldSector **sectorList; /**< An optional array of \ref RpWorldSector pointers, - * specifying which sectors in the world to light. If - * this is NULL, then all sectors in the world (or those - * inside the optional camera's frustum) will be lit. */ - RwInt32 numSectors; /**< The length of the sectorList array. If this is set to - * '-1' then none of the sectors in the world will be lit. */ - RpAtomic **atomicList; /**< An optional array of \ref RpAtomic pointers, - * specifying which atomics to light. If this is NULL - * then all atomics in the world (or those inside the - * optional camera's frustum) will be lit. */ - RwInt32 numAtomics; /**< The length of the atomicList array. If this is set to - * '-1' then none of the atomics in the world will be lit. */ - RwUInt32 startSample; /**< Lighting for the current 'slice' should begin with this - * sample. It is the user's responsibility to increment this - * value after each slice. Note that partial lighting is - * quantized to be per-polygon (for lightmapped objects). - * startSample will always be rounded down, not up. */ - RwUInt32 numSamples; /**< This specifies how many lightmap samples should be lit. - * If it is left zero then all samples in the current set - * of objects will be lit. Note that partial lighting is - * quantized to be per-polygon (for lightmapped objects). - * numSamples will always be rounded up, not down. */ - RwUInt32 totalSamples;/**< This specifies how many lightmap samples will be lit in - * total for the world specified (this is filled in by - * \ref RtLtMapIlluminate, not the calling function). */ - RtLtMapIlluminateSampleCallBack sampleCallBack; /**< A \ref RtLtMapIlluminateSampleCallBack - * to use during lighting. If this is left - * NULL, the default callback will be used. */ - RtLtMapIlluminateVisCallBack visCallBack; /**< A \ref RtLtMapIlluminateVisCallBack - * to use during lighting. If this is left - * NULL, the default callback will be used. */ - RtLtMapIlluminateProgressCallBack progressCallBack; /**< A \ref RtLtMapIlluminateProgressCallBack - * to use during lighting. If this is left - * NULL, no progress callback will be used. */ -}; - -/** - * \ingroup rtltmap - * \ref RtLtMapMaterialFlags is an enumerated type specifying the different - * lightmap-related flags which may be applied to materials. These values - * will be taken into consideration within \ref RtLtMapIlluminate. - * - * \see RtLtMapMaterialGetFlags - * \see RtLtMapMaterialSetFlags - * \see RtLtMapMaterialGetAreaLightColor - * \see RtLtMapMaterialSetAreaLightColor - * \see RtLtMapMaterialGetLightMapDensityModifier - * \see RtLtMapMaterialSetLightMapDensityModifier - * \see RtLtMapMaterialGetAreaLightDensityModifier - * \see RtLtMapMaterialSetAreaLightDensityModifier - * \see RtLtMapMaterialSetAreaLightRadiusModifier - * \see RtLtMapMaterialGetAreaLightRadiusModifier - * \see RtLtMapIlluminate - * \see RtLtMapAreaLightGroupCreate - * \see RtLtMapIlluminateVisCallBack - */ -enum RtLtMapMaterialFlags -{ - rtLTMAPMATERIALNAFLAG = 0, - - rtLTMAPMATERIALLIGHTMAP = 1, /**< This material should be lightmapped - * [for non-lightmapped materials within lightmapped objects, - * texel values will be set to (0, 0, 0) (or (255, 255, 255) if - * the rtLTMAPMATERIALAREALIGHT flag is present, so that light- - * emitting textures appear as bright as the light which they are - * emittering) and the mesh may be 'shrunk' in UV-space so as not - * to waste lightmap texels] */ - rtLTMAPMATERIALAREALIGHT = 2, /**< This material is an area light emitter - * (see \ref RtLtMapAreaLightGroupCreate) */ - rtLTMAPMATERIALNOSHADOW = 4, /**< This material does not block light */ - rtLTMAPMATERIALSKY = 8, /**< This material blocks everything but directional - * lights, to allow sky polygons to occlude geometry - * and yet emit directional light (sky or sun light, - * being as if cast from an infinite distance) */ - rtLTMAPMATERIALFLATSHADE = 16, /**< This material will be lit as if flat-shaded - * (polygon normals will be used during illumination) */ - - rtLTMAPMATERIALFLAGFORCEENUMSIZEINT = 0x7FFFFFFF -}; -typedef enum RtLtMapMaterialFlags RtLtMapMaterialFlags; - -/** - * \ingroup rtltmap - * 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. - * - * \see RtLtMapAtomicGetFlags - * \see RtLtMapAtomicSetFlags - * \see RtLtMapWorldSectorGetFlags - * \see RtLtMapWorldSectorSetFlags - * \see RtLtMapLightMapsCreate - * \see RtLtMapIlluminate - * \see RtLtMapIlluminateVisCallBack - */ -enum RtLtMapObjectFlags -{ - rtLTMAPOBJECTNAFLAG = 0, - - rtLTMAPOBJECTLIGHTMAP = 1, /**< This object is to be lightmapped */ - 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) */ - - rtLTMAPOBJECTFLAGFORCEENUMSIZEINT = 0x7FFFFFFF -}; -typedef enum RtLtMapObjectFlags RtLtMapObjectFlags; - -/* Area-lighting stuff:* - ***********************/ - - -typedef struct RtLtMapAreaLightGroup RtLtMapAreaLightGroup; - -/** - * \ingroup rtltmap - * \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 - * transform the contained area lights relative to the world of the current - * \ref RtLtMapLightingSession and relative to each other (such that, for - * example, lights from multiple worlds, which are connected by portals, - * or which are composed of atomics and not world sectors, may be used - * within a single call to \ref RtLtMapIlluminate). - * - * \see RtLtMapAreaLightGroupCreate - * \see RtLtMapAreaLightGroupDestroy - * \see RtLtMapIlluminate - * \see RtLtMapIlluminateVisCallBack - */ -struct RtLtMapAreaLightGroup -{ - RwSList *meshes; /**< A list of hierarchically-grouped area lights */ - RwFrame *frame; /**< An (optional) pointer to a frame (owned by something else) - * whose LTM specifies the coordinate system of this container, - * relative to the world of the current \ref RtLtMapLightingSession. */ - RtLtMapAreaLightGroup *next; /**< A pointer for chaining are light groups together */ -}; - -/* 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 color, etc */ - RwSphere sphere; /* Each mesh has an associated center and radius */ - 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 */ -}; - -/* Area light samples are grouped by source triangle */ -typedef struct LtMapAreaLight LtMapAreaLight; -struct LtMapAreaLight -{ - RwUInt16 flags; /* To hold hierarchical visibility culling flags, - * relevant to the object/triangle *currently* being lit. */ - RwUInt16 numSamples; /* Number of area light samples in this triangle */ - RwReal areaPerSample; /* (triangleArea / numSamples) for this triangle */ - RwPlane plane; /* This 'area light' is a triangle, this is its plane. */ - RwSphere sphere; /* This bounds the triangle's points in world-space (it's - * 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 -extern "C" -{ -#endif /* __cplusplus */ - - -/* Lightmap creation functionality: */ -extern RtLtMapLightingSession * -RtLtMapLightMapsCreate(RtLtMapLightingSession *session, - RwReal density, RwRGBA *color); - -extern void -RtLtMapLightMapsDestroy(RtLtMapLightingSession *session); -extern RpAtomic * -RtLtMapAtomicLightMapDestroy(RpAtomic *atomic); -extern RpWorldSector * -RtLtMapWorldSectorLightMapDestroy(RpWorldSector *sector); - -extern RwReal -RtLtMapGetVertexWeldThreshold(void); -extern RwBool -RtLtMapSetVertexWeldThreshold(RwReal threshold); - -extern RwUInt32 -RtLtMapLightMapGetDefaultSize(void); -extern RwBool -RtLtMapLightMapSetDefaultSize(RwUInt32 size); - -extern RwUInt32 -RtLtMapAtomicGetLightMapSize(RpAtomic *atomic); -extern RpAtomic * -RtLtMapAtomicSetLightMapSize(RpAtomic *atomic, RwUInt32 size); -extern RwUInt32 -RtLtMapWorldSectorGetLightMapSize(RpWorldSector *sector); -extern RpWorldSector * -RtLtMapWorldSectorSetLightMapSize(RpWorldSector *sector, RwUInt32 size); - -extern RwUInt32 -RtLtMapAtomicGetFlags(RpAtomic *atomic); -extern RpAtomic * -RtLtMapAtomicSetFlags(RpAtomic *atomic, RwUInt32 flags); -extern RwUInt32 -RtLtMapWorldSectorGetFlags(RpWorldSector *sector); -extern RpWorldSector * -RtLtMapWorldSectorSetFlags(RpWorldSector *sector, RwUInt32 flags); - - -/* Lightmap illumination functionality: */ -extern RwUInt32 -RtLtMapIlluminate(RtLtMapLightingSession *session, - RtLtMapAreaLightGroup *lights); - -extern RwReal -RtLtMapGetSliverAreaThreshold(void); -extern RwBool -RtLtMapSetSliverAreaThreshold(RwReal threshold); - -extern RwRGBA * -RtLtMapDefaultSampleCallBack(RwRGBA *results, - RwV3d *samplePositions, - RwV3d * __RWUNUSED__ baryCoords, - RwUInt32 numSamples, - RpLight **lights, - RwUInt32 numLights, - RwV3d *normals); - -extern RwBool -RtLtMapDefaultVisCallBack(RpWorld *world, - RwRGBAReal __RWUNUSED__ *result, - RwV3d *samplePos, - RwV3d *lightPos, - RpLight __RWUNUSED__ *light); - -extern void -RtLtMapSetVisCallBackCollisionScalar(RwReal scalar); - -extern RwReal -RtLtMapGetVisCallBackCollisionScalar(void); - -extern RtLtMapLightingSession * -RtLtMapLightingSessionInitialize(RtLtMapLightingSession *session, - RpWorld *world); - -extern RwInt32 -RtLtMapLightingSessionGetNumSamples(RtLtMapLightingSession *session); -extern RwInt32 -RtLtMapWorldSectorGetNumSamples(RpWorldSector *sector); -extern RwInt32 -RtLtMapAtomicGetNumSamples(RpAtomic *atomic); - -extern RtLtMapLightingSession * -RtLtMapImagesPurge(RtLtMapLightingSession *session); -extern RpAtomic * -RtLtMapAtomicImagePurge(RpAtomic *atomic); -extern RpWorldSector * -RtLtMapWorldSectorImagePurge(RpWorldSector *sector); - -extern RtLtMapLightingSession * -RtLtMapLightMapsClear(RtLtMapLightingSession *session, RwRGBA *color); -extern RpAtomic * -RtLtMapAtomicLightMapClear(RpAtomic *atomic, RwRGBA *color); -extern RpWorldSector * -RtLtMapWorldSectorLightMapClear(RpWorldSector *sector, RwRGBA *color); - - -/* Material/area-lighting functionality: */ -extern RtLtMapAreaLightGroup * -RtLtMapAreaLightGroupCreate(RtLtMapLightingSession *session, RwReal density); -extern RwBool -RtLtMapAreaLightGroupDestroy(RtLtMapAreaLightGroup *lights); - -extern RwUInt32 -RtLtMapMaterialGetFlags(RpMaterial *material); -extern RpMaterial * -RtLtMapMaterialSetFlags(RpMaterial *material, RwUInt32 flags); - -extern RwReal -RtLtMapMaterialGetLightMapDensityModifier(RpMaterial *material); -extern RpMaterial * -RtLtMapMaterialSetLightMapDensityModifier(RpMaterial *material, RwReal modifier); - -extern RwRGBA -RtLtMapMaterialGetAreaLightColor(RpMaterial *material); -extern RpMaterial * -RtLtMapMaterialSetAreaLightColor(RpMaterial *material, RwRGBA color); - -extern RwReal -RtLtMapMaterialGetAreaLightDensityModifier(RpMaterial *material); -extern RpMaterial * -RtLtMapMaterialSetAreaLightDensityModifier(RpMaterial *material, RwReal modifier); - -extern RwReal -RtLtMapMaterialGetAreaLightRadiusModifier(RpMaterial *material); -extern RpMaterial * -RtLtMapMaterialSetAreaLightRadiusModifier(RpMaterial *material, RwReal modifier); - -extern RwUInt32 -RtLtMapGetMaxAreaLightSamplesPerMesh(void); -extern RwBool -RtLtMapSetMaxAreaLightSamplesPerMesh(RwUInt32 maxSamples); -extern RwReal -RtLtMapGetAreaLightDensityModifier(void); -extern RwBool -RtLtMapSetAreaLightDensityModifier(RwReal modifier); -extern RwReal -RtLtMapGetAreaLightRadiusModifier(void); -extern RwBool -RtLtMapSetAreaLightRadiusModifier(RwReal modifier); -extern RwReal -RtLtMapGetAreaLightErrorCutoff(void); -extern RwBool -RtLtMapSetAreaLightErrorCutoff(RwReal tolerance); - - -/* Texture-saving functionality: */ -extern RwTexDictionary * -RtLtMapTexDictionaryCreate(RtLtMapLightingSession *session); - -extern const RwChar * -RtLtMapGetDefaultPrefixString(void); -extern RwBool -RtLtMapSetDefaultPrefixString(RwChar *string); - -extern RwUInt32 -RtLtMapGetLightMapCounter(void); -extern RwBool -RtLtMapSetLightMapCounter(RwUInt32 value); - - -#if (defined(SKY2_DRVMODEL_H) || defined(NULLSKY_DRVMODEL_H)) - -/* PS2-specific functionality: */ -extern RwTexture *RtLtMapSkyLightMapMakeDarkMap(RwTexture *lightMap); - -extern RwTexture *RtLtMapSkyBaseTextureProcess(RwTexture *texture); -extern RpAtomic *RtLtMapSkyAtomicBaseTexturesProcess(RpAtomic *atomic); -extern RpWorldSector * -RtLtMapSkyWorldSectorBaseTexturesProcess(RpWorldSector *sector); -extern RtLtMapLightingSession * -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)) */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* RTLTMAP_H */ - - diff --git a/sdk/rwsdk/include/d3d8/rtltmap.rpe b/sdk/rwsdk/include/d3d8/rtltmap.rpe deleted file mode 100644 index fb171c51..00000000 --- a/sdk/rwsdk/include/d3d8/rtltmap.rpe +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionLTMAPTOOL -{ - - - - e_rwdb_CriterionLTMAPTOOLLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionLTMAPTOOL e_rwdb_CriterionLTMAPTOOL; - - diff --git a/sdk/rwsdk/include/d3d8/rtmipk.h b/sdk/rwsdk/include/d3d8/rtmipk.h deleted file mode 100644 index 6c777b41..00000000 --- a/sdk/rwsdk/include/d3d8/rtmipk.h +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Mipmap K toolkit - */ - -/*************************************************************************** - * * - * Module : rtmipk.h * - * * - * Purpose : To calculate mipmap K values for Sky * - * * - **************************************************************************/ - -#ifndef RTMIPK_H -#define RTMIPK_H - -/** - * \defgroup rtmipk RtMipmapK - * \ingroup mipmapping - * - * PlayStation 2 / Mipmap K Value Toolkit for RenderWare. - */ - -/**************************************************************************** - Includes - */ - -#include "rwcore.h" -#include "rpworld.h" - -/* RWPUBLIC */ - -/**************************************************************************** - Defines - */ - -/**************************************************************************** - Global Types - */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern void RtMipKWorldCalculateKValues(RpWorld *world, RwCamera *camera); -extern void RtMipKClumpCalculateKValues(RpClump *clump, RwCamera *camera); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* RWPUBLICEND */ - -#endif /* RTMIPK_H */ diff --git a/sdk/rwsdk/include/d3d8/rtmipk.rpe b/sdk/rwsdk/include/d3d8/rtmipk.rpe deleted file mode 100644 index 04500e1d..00000000 --- a/sdk/rwsdk/include/d3d8/rtmipk.rpe +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionMipmapK -{ - - - - e_rwdb_CriterionMipmapKLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionMipmapK e_rwdb_CriterionMipmapK; - - diff --git a/sdk/rwsdk/include/d3d8/rtpick.h b/sdk/rwsdk/include/d3d8/rtpick.h deleted file mode 100644 index 62f564a3..00000000 --- a/sdk/rwsdk/include/d3d8/rtpick.h +++ /dev/null @@ -1,59 +0,0 @@ -/*************************************************************************** - * * - * Module : rtpick.h * - * * - * Purpose : Utils for picking atomics. * - * * - **************************************************************************/ - -#ifndef RTPICK_H -#define RTPICK_H - -/** - * \defgroup rtpick RtPick - * \ingroup collisiondetection - * - * Picking Toolkit for RenderWare. - */ - -/**************************************************************************** - Includes - */ - -#include "rwcore.h" -#include "rtpick.rpe" /* automatically generated header file */ - -/**************************************************************************** - Defines - */ - -/**************************************************************************** - Global Types - */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Camera pixel ray */ -extern const RwCamera *RwCameraCalcPixelRay(const RwCamera *camera, - RwLine *line, - const RwV2d *pixel); - -/* Picking atomics */ -extern RpAtomic *RpWorldPickAtomicOnLine(RpWorld *world, - const RwLine *line); -extern RpAtomic *RwCameraPickAtomicOnPixel(const RwCamera *camera, - const RwV2d *pixel); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* RTPICK_H */ diff --git a/sdk/rwsdk/include/d3d8/rtpick.rpe b/sdk/rwsdk/include/d3d8/rtpick.rpe deleted file mode 100644 index 779e2f9a..00000000 --- a/sdk/rwsdk/include/d3d8/rtpick.rpe +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionPick -{ - - - - e_rwdb_CriterionPickLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionPick e_rwdb_CriterionPick; - - diff --git a/sdk/rwsdk/include/d3d8/rtpitexd.h b/sdk/rwsdk/include/d3d8/rtpitexd.h deleted file mode 100644 index 602c608a..00000000 --- a/sdk/rwsdk/include/d3d8/rtpitexd.h +++ /dev/null @@ -1,74 +0,0 @@ -/*********************************************************************** - * - * Module: rtpitexd.h - * - * Purpose: Platform Independent Texture Dictionaries - * - ***********************************************************************/ - -#if !defined( RTPITEXD_H ) -#define RTPITEXD_H - -/** - * \defgroup rtpitexd RtPITexD - * \ingroup texturedictionaries - * - * Platform Independent Texture Dictionaries - * - */ - - -/* ===================================================================== - * Includes - * ===================================================================== */ -#include -#include /* automatically generated */ - - -/* ===================================================================== - * Defines - * ===================================================================== */ - - -/* ===================================================================== - * Module specific type definitions - * ===================================================================== */ - -/* ===================================================================== - * Extern variables - * ===================================================================== */ - - -/* ===================================================================== - * Extern function prototypes - * ===================================================================== */ - -#if defined( __cplusplus ) -extern "C" -{ -#endif /* defined( __cplusplus ) */ - -/* RWPUBLIC */ - -extern RwUInt32 -RtPITexDictionaryStreamGetSize( const RwTexDictionary *texDict ); - -extern RwTexDictionary * -RtPITexDictionaryStreamRead( RwStream *stream ); - -extern RwTexDictionary * -RtPITexDictionaryStreamWrite( RwTexDictionary *texDict, - RwStream *stream ); - -/* RWPUBLICEND */ - -extern void -_rwImageGammaUnCorrectArrayOfRGBA( RwRGBA * rgbaOut, - RwRGBA * rgbaIn, - RwInt32 numEls ); - -#if defined( __cplusplus ) -} -#endif /* defined( __cplusplus ) */ - -#endif /* !defined( RTPITEXD_H ) */ diff --git a/sdk/rwsdk/include/d3d8/rtpitexd.rpe b/sdk/rwsdk/include/d3d8/rtpitexd.rpe deleted file mode 100644 index 290ac864..00000000 --- a/sdk/rwsdk/include/d3d8/rtpitexd.rpe +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionPITexDict -{ - - - - e_rwdb_CriterionPITexDictLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionPITexDict e_rwdb_CriterionPITexDict; - - diff --git a/sdk/rwsdk/include/d3d8/rtpng.h b/sdk/rwsdk/include/d3d8/rtpng.h deleted file mode 100644 index 4ba8cf0f..00000000 --- a/sdk/rwsdk/include/d3d8/rtpng.h +++ /dev/null @@ -1,49 +0,0 @@ - -/*************************************************************************** - * * - * Module : rtPng.h * - * * - * Purpose : Load PNG format files * - * * - **************************************************************************/ - -#ifndef RTPNG_H -#define RTPNG_H - -/** - * \defgroup rtpng RtPNG - * \ingroup imageconversiontools - * - * PNG/Portable Network Graphics Image Format Toolkit for RenderWare. - * - * See also http://www.libpng.org/pub/png/ - */ - -/**************************************************************************** - Includes - */ - -/*--- Include files ---*/ -#include "rwcore.h" - -#include "rtpng.rpe" /* automatically generated header file */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RwImage *RtPNGImageWrite(RwImage * image, const RwChar * imageName); -extern RwImage *RtPNGImageRead(const RwChar * imageName); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* RWPUBLICEND */ - -#endif /* RTPNG_H */ diff --git a/sdk/rwsdk/include/d3d8/rtpng.rpe b/sdk/rwsdk/include/d3d8/rtpng.rpe deleted file mode 100644 index e3f6f0d7..00000000 --- a/sdk/rwsdk/include/d3d8/rtpng.rpe +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionPNG -{ - - - - e_rwdb_CriterionPNGLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionPNG e_rwdb_CriterionPNG; - - diff --git a/sdk/rwsdk/include/d3d8/rtquat.h b/sdk/rwsdk/include/d3d8/rtquat.h deleted file mode 100644 index a0a6e89d..00000000 --- a/sdk/rwsdk/include/d3d8/rtquat.h +++ /dev/null @@ -1,646 +0,0 @@ -/* - * Data structures for Quaternions - * See http://www-groups.dcs.st-and.ac.uk/~history/Mathematicians/Hamilton.html - * - * Copyright (c) Criterion Software Limited - */ - -#ifndef RTQUAT_H -#define RTQUAT_H - -/** - * \defgroup rtquat RtQuat - * \ingroup mathtools - * - * Quaternion Toolkit for RenderWare. - * - * See also http://www.gamasutra.com/features/19980703/quaternions_01.htm - */ - -/* - * See http://www-groups.dcs.st-and.ac.uk/~history/Mathematicians/Hamilton.html - * On 16 October 1843 (a Monday) Hamilton was walking in along the Royal - * Canal with his wife to preside at a Council meeting of the Royal Irish - * Academy. - * - * Although his wife talked to him now and again Hamilton hardly - * heard, for the discovery of the quaternions, the first noncommutative - * algebra to be studied, was taking shape in his mind:- - * - * "And here there dawned on me the notion that we must admit, in - * some sense, a fourth dimension of space for the purpose of calculating - * with triples ... An electric circuit seemed to close, and a spark - * flashed forth." - */ - - -/**************************************************************************** - Includes - */ - -#include -/* renderware */ -#include "rwcore.h" - -#include "rtquat.rpe" /* automatically generated header file */ - -#define RW_TOL_ORTHONORMAL ((RwReal)0.01) - -/**************************************************************************** - Global Types - */ - - -typedef struct RtQuat RtQuat; -/** - * \ingroup rtquat - * \struct RtQuat - * A structure describing a Quaternion - * -*/ -struct RtQuat -{ - RwV3d imag; /**< The imaginary part(s) */ - RwReal real; /**< The real part */ -}; - - -/**************************************************************************** - Defines - */ - -#define RtQuatInitMacro( result, _x, _y, _z, _w) \ -MACRO_START \ -{ \ - (result)->real = (_w); \ - (result)->imag.x = (_x); \ - (result)->imag.y = (_y); \ - (result)->imag.z = (_z); \ -} \ -MACRO_STOP - -#if (!defined(RtQuatAssignMacro)) -#define RtQuatAssignMacro(_target, _source) \ - ( *(_target) = *(_source) ) -#endif /* (!defined(RtQuatAssignMacro)) */ - -#define RtQuatAddMacro( result, q1, q2 ) \ -MACRO_START \ -{ \ - (result)->real = (q1)->real + (q2)->real; \ - RwV3dAddMacro(&(result)->imag, &(q1)->imag, &(q2)->imag); \ -} \ -MACRO_STOP - -#define RtQuatIncrementRealPartMacro(result, s, q) \ -MACRO_START \ -{ \ - (result)->real = (q)->real + s; \ - (result)->imag.x = (q)->imag.x; \ - (result)->imag.y = (q)->imag.y; \ - (result)->imag.z = (q)->imag.z; \ -} \ -MACRO_STOP - -#define RtQuatDecrementRealPartMacro(result, s, q) \ -MACRO_START \ -{ \ - (result)->real = (q)->real - s; \ - (result)->imag.x = (q)->imag.x; \ - (result)->imag.y = (q)->imag.y; \ - (result)->imag.z = (q)->imag.z; \ -} \ -MACRO_STOP - -#define RtQuatIncrementMacro( result, dq ) \ -MACRO_START \ -{ \ - (result)->real = (result)->real + (dq)->real; \ - RwV3dAddMacro(&(result)->imag, &(result)->imag, &(dq)->imag); \ -} \ -MACRO_STOP - -#define RtQuatSubMacro( result, q1, q2 ) \ -MACRO_START \ -{ \ - (result)->real = (q1)->real - (q2)->real; \ - RwV3dSubMacro(&(result)->imag, &(q1)->imag, &(q2)->imag); \ -} \ -MACRO_STOP - -#define RtQuatNegateMacro( result, q ) \ -MACRO_START \ -{ \ - (result)->real = -(q)->real; \ - (result)->imag.x = -(q)->imag.x; \ - (result)->imag.y = -(q)->imag.y; \ - (result)->imag.z = -(q)->imag.z; \ -} \ -MACRO_STOP - -#define RtQuatConjugateMacro( result, q) \ -MACRO_START \ -{ \ - (result)->real = (q)->real; \ - (result)->imag.x = -(q)->imag.x; \ - (result)->imag.y = -(q)->imag.y; \ - (result)->imag.z = -(q)->imag.z; \ -} \ -MACRO_STOP - -#define RtQuatScaleMacro(result, q, scale ) \ -MACRO_START \ -{ \ - (result)->real = (q)->real * scale; \ - RwV3dScaleMacro(&(result)->imag, &(q)->imag, scale); \ -} \ -MACRO_STOP - -#define RtQuatModulusSquaredMacro( q ) \ - ((q)->real * (q)->real + \ - RwV3dDotProductMacro(&(q)->imag, &(q)->imag)) - -#define RtQuatModulusMacro( result, q ) \ -MACRO_START \ -{ \ - (result) = RtQuatModulusSquaredMacro(q); \ - rwSqrtMacro(&result, result); \ -} \ -MACRO_STOP - -#define RtQuatMultiplyMacro( result, q1, q2) \ -MACRO_START \ -{ \ - /* \ - * Assumes q1 != result != q2 \ - */ \ - (result)->real = \ - (q1)->real * (q2)->real - \ - RwV3dDotProductMacro(&(q1)->imag,&(q2)->imag); \ - RwV3dCrossProductMacro(&(result)->imag, &(q1)->imag, &(q2)->imag); \ - RwV3dIncrementScaledMacro(&(result)->imag, &(q2)->imag, (q1)->real); \ - RwV3dIncrementScaledMacro(&(result)->imag, &(q1)->imag, (q2)->real); \ -} \ -MACRO_STOP - -#define RtQuatReciprocalMacro( result, q) \ -MACRO_START \ -{ \ - /* \ - * Assumes result != q \ - */ \ - RwReal val = RtQuatModulusSquaredMacro(q); \ - \ - if (val > (RwReal) 0) \ - { \ - val = ((RwReal)1) / val; \ - (result)->real = (q)->real * val; \ - val = -val; \ - RwV3dScaleMacro(&(result)->imag, &(q)->imag, val); \ - } \ -} \ -MACRO_STOP - -#define RtQuatSquareMacro( result, q ) \ -MACRO_START \ -{ \ - /* \ - * Assumes result != q \ - */ \ - RwReal val = ((RwReal)2) * (q)->real ; \ - \ - (result)->real = \ - (q)->real * (q)->real - \ - RwV3dDotProductMacro(&(q)->imag, &(q)->imag); \ - RwV3dScaleMacro(&(result)->imag, &(q)->imag, val); \ -} \ -MACRO_STOP - -#define RtQuatSquareRootMacro( result, q ) \ -MACRO_START \ -{ \ - /* \ - * Assumes result != q \ - * other root is of course -result \ - */ \ - RwReal val; \ - \ - RtQuatModulusMacro(val,q); \ - val = ((q)->real + val) * ((RwReal) 0.5); \ - \ - if (val > ((RwReal)0)) \ - { \ - rwSqrtMacro(&val, val); \ - (result)->real = val; \ - val = ((RwReal)0.5) / val; \ - RwV3dScale(&(result)->imag, &(q)->imag, val); \ - } \ - else \ - { \ - result->imag.x = -(q)->real; \ - rwSqrtMacro(&(result->imag.x), result->imag.x); \ - result->imag.y = ((RwReal)0); \ - result->imag.x = ((RwReal)0); \ - result->real = ((RwReal)0); \ - } \ -} \ -MACRO_STOP - -#define RtQuatLogMacro(result, q) \ -MACRO_START \ -{ \ - /* \ - * Assumes result != q \ - */ \ - const RwReal mod2 = RtQuatModulusSquaredMacro(q); \ - RwReal sin_b; \ - RwReal radians; \ - RwReal factor; \ - \ - sin_b = RwV3dDotProduct(&(q)->imag, &(q)->imag); \ - rwSqrtMacro(&sin_b, sin_b); \ - radians = (RwReal) RwATan2(sin_b, (q)->real); \ - factor = (sin_b > (RwReal) 0) ? (((RwReal)radians) / sin_b) : 0 ; \ - \ - RwV3dScaleMacro(&(result)->imag, &(q)->imag, factor); \ - (result)->real = ((RwReal) RwLog(mod2)) * ((RwReal) 0.5); \ - \ -} \ -MACRO_STOP - -#define RtQuatExpMacro(result, q) \ -MACRO_START \ -{ \ - /* \ - * Assumes result != q \ - */ \ - const RwReal exp_a = (RwReal)RwExp((q)->real); \ - RwReal mod_b; \ - RwReal factor; \ - \ - mod_b = RwV3dDotProduct(&(q)->imag, &(q)->imag); \ - rwSqrtMacro(&mod_b, mod_b); \ - factor = ( (mod_b > (RwReal) 0) ? \ - (exp_a * ((RwReal)RwSin(mod_b)) / mod_b) : \ - 0 ) ; \ - \ - RwV3dScaleMacro(&(result)->imag, &(q)->imag, factor); \ - (result)->real = exp_a * (RwReal)RwCos(mod_b); \ -} \ -MACRO_STOP - -#define RtQuatPowMacro( result, q, e) \ -MACRO_START \ -{ \ - RtQuat qLog; \ - \ - RtQuatLogMacro(&qLog, q); \ - RtQuatScaleMacro(&qLog, &qLog, e); \ - RtQuatExpMacro(result, &qLog); \ -} \ -MACRO_STOP - -#define RtQuatUnitLogMacro(result, q) \ -MACRO_START \ -{ \ - /* \ - * Assumes result != q \ - */ \ - RwReal sin_b ; \ - RwReal radians ; \ - RwReal factor ; \ - \ - sin_b = RwV3dDotProduct(&(q)->imag, &(q)->imag); \ - rwSqrtMacro(&sin_b, sin_b); \ - radians = (RwReal)RwATan2(sin_b, (q)->real); \ - factor = (sin_b > (RwReal) 0) ? (((RwReal)radians) / sin_b) : 0 ; \ - \ - RwV3dScaleMacro(&(result)->imag, &(q)->imag, factor); \ - (result)->real = (RwReal)0; \ - \ -} \ -MACRO_STOP - -#define RtQuatUnitExpMacro(result, q) \ -MACRO_START \ -{ \ - /* \ - * Assumes result != q \ - */ \ - RwReal mod_b; \ - RwReal factor; \ - \ - mod_b = RwV3dDotProduct(&(q)->imag, &(q)->imag); \ - rwSqrtMacro(&mod_b, mod_b); \ - factor = (mod_b > (RwReal) 0) ? (((RwReal)RwSin(mod_b)) / mod_b) : 0 ; \ - \ - RwV3dScaleMacro(&(result)->imag, &(q)->imag, factor); \ - (result)->real = (RwReal)RwCos(mod_b); \ - \ -} \ -MACRO_STOP - -#define RtQuatUnitPowMacro( result, q, e) \ -MACRO_START \ -{ \ - RtQuat qLog; \ - \ - RtQuatUnitLogMacro(&qLog, q); \ - RwV3dScaleMacro(&qLog.imag, &qLog.imag, e); \ - RtQuatUnitExpMacro(result, &qLog); \ -} \ -MACRO_STOP - -#define RtQuatConvertToMatrixMacro(qpQuat, mpMatrix) \ -MACRO_START \ -{ \ - RwReal rS; \ - RwV3d rV; \ - RwV3d rW; \ - RwV3d square; \ - RwV3d cross; \ - \ - rS = ((RwReal) 2) / RtQuatModulusSquaredMacro((qpQuat)); \ - \ - RwV3dScale(&rV, &(qpQuat)->imag, rS); \ - RwV3dScale(&rW, &rV, (qpQuat)->real); \ - \ - square.x = (qpQuat)->imag.x * rV.x; \ - square.y = (qpQuat)->imag.y * rV.y; \ - square.z = (qpQuat)->imag.z * rV.z; \ - \ - cross.x = (qpQuat)->imag.y * rV.z; \ - cross.y = (qpQuat)->imag.z * rV.x; \ - cross.z = (qpQuat)->imag.x * rV.y; \ - \ - (mpMatrix)->right.x = ((RwReal) 1) - (square.y + square.z); \ - (mpMatrix)->right.y = cross.z + rW.z; \ - (mpMatrix)->right.z = cross.y - rW.y; \ - \ - (mpMatrix)->up.x = cross.z - rW.z; \ - (mpMatrix)->up.y = ((RwReal) 1) - (square.z + square.x); \ - (mpMatrix)->up.z = cross.x + rW.x; \ - \ - (mpMatrix)->at.x = cross.y + rW.y; \ - (mpMatrix)->at.y = cross.x - rW.x; \ - (mpMatrix)->at.z = ((RwReal) 1) - (square.x + square.y); \ - \ - /* Set position */ \ - (mpMatrix)->pos.x = ((RwReal) 0); \ - (mpMatrix)->pos.y = ((RwReal) 0); \ - (mpMatrix)->pos.z = ((RwReal) 0); \ - \ - /* Matrix is orthogonal */ \ - rwMatrixSetFlags((mpMatrix), \ - (rwMATRIXTYPEORTHOGONAL & \ - ~rwMATRIXINTERNALIDENTITY) ); \ - \ -} \ -MACRO_STOP - -#define RtQuatUnitConvertToMatrixMacro(qpQuat, mpMatrix) \ -MACRO_START \ -{ \ - const RwReal x = (qpQuat)->imag.x; \ - const RwReal y = (qpQuat)->imag.y; \ - const RwReal z = (qpQuat)->imag.z; \ - const RwReal w = (qpQuat)->real; \ - RwV3d square; \ - RwV3d cross; \ - RwV3d wimag; \ - \ - square.x = x * x; \ - square.y = y * y; \ - square.z = z * z; \ - \ - cross.x = y * z; \ - cross.y = z * x; \ - cross.z = x * y; \ - \ - wimag.x = w * x; \ - wimag.y = w * y; \ - wimag.z = w * z; \ - \ - (mpMatrix)->right.x = 1 - 2 * (square.y + square.z); \ - (mpMatrix)->right.y = 2 * (cross.z + wimag.z); \ - (mpMatrix)->right.z = 2 * (cross.y - wimag.y); \ - \ - (mpMatrix)->up.x = 2 * (cross.z - wimag.z); \ - (mpMatrix)->up.y = 1 - 2 * (square.x + square.z); \ - (mpMatrix)->up.z = 2 * (cross.x + wimag.x); \ - \ - (mpMatrix)->at.x = 2 * (cross.y + wimag.y); \ - (mpMatrix)->at.y = 2 * (cross.x - wimag.x); \ - (mpMatrix)->at.z = (1 - 2 * (square.x + square.y)); \ - \ - /* Set position */ \ - (mpMatrix)->pos.x = ((RwReal) 0); \ - (mpMatrix)->pos.y = ((RwReal) 0); \ - (mpMatrix)->pos.z = ((RwReal) 0); \ - \ - /* Matrix is orthonormal */ \ - rwMatrixSetFlags((mpMatrix), \ - (rwMATRIXTYPEORTHONORMAL & \ - ~rwMATRIXINTERNALIDENTITY) ); \ -} \ -MACRO_STOP - -#if (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) )) - -#define RtQuatInit( result, _x, _y, _z, _w) \ - RtQuatInitMacro( result, _x, _y, _z, _w) - -#define RtQuatAssign( to, from ) \ - RtQuatAssignMacro( to, from ) - -#define RtQuatAdd( result, q1, q2 ) \ - RtQuatAddMacro( result, q1, q2 ) - -#define RtQuatIncrementRealPart(result, s, q) \ - RtQuatIncrementRealPartMacro(result, s, q) - -#define RtQuatDecrementRealPart(result, s, q) \ - RtQuatDecrementRealPartMacro(result, s, q) - -#define RtQuatIncrement( result, dq ) \ - RtQuatIncrementMacro( result, dq ) - -#define RtQuatSub( result, q1, q2 ) \ - RtQuatSubMacro( result, q1, q2 ) - -#define RtQuatNegate( result, q ) \ - RtQuatNegateMacro( result, q ) - -#define RtQuatConjugate( result, q) \ - RtQuatConjugateMacro( result, q) - -#define RtQuatScale(result, q, scale ) \ - RtQuatScaleMacro(result, q, scale ) - -#define RtQuatModulusSquared( q ) \ - RtQuatModulusSquaredMacro( q ) - -#define RtQuatMultiply( result, q1, q2) \ - RtQuatMultiplyMacro( result, q1, q2) - -#define RtQuatReciprocal( result, q) \ - RtQuatReciprocalMacro( result, q) - -#define RtQuatSquare( result, q ) \ - RtQuatSquareMacro( result, q ) - -#define RtQuatSquareRoot( result, q ) \ - RtQuatSquareRootMacro( result, q ) - -#define RtQuatLog( result, q ) \ - RtQuatLogMacro( result, q ) - -#define RtQuatExp( result, q ) \ - RtQuatExpMacro( result, q ) - -#define RtQuatPow( result, q, e ) \ - RtQuatPowMacro( result, q, e ) - -#define RtQuatUnitLog( result, q ) \ - RtQuatUnitLogMacro( result, q ) - -#define RtQuatUnitExp( result, q ) \ - RtQuatUnitExpMacro( result, q ) - -#define RtQuatUnitPow( result, q, e ) \ - RtQuatUnitPowMacro( result, q, e ) - -#define RtQuatConvertToMatrix(qpQuat, mpMatrix) \ - RtQuatConvertToMatrixMacro(qpQuat, mpMatrix) - -#define RtQuatUnitConvertToMatrix(qpQuat, mpMatrix) \ - RtQuatUnitConvertToMatrixMacro(qpQuat, mpMatrix) - -#endif /* (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) )) */ - -/**************************************************************************** - Function prototypes - */ -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RwBool -RtQuatConvertFromMatrix(RtQuat * const qpQuat, - const RwMatrix * const mpMatrix); - -extern RtQuat * -RtQuatRotate(RtQuat * quat, - const RwV3d * axis, - RwReal angle, - RwOpCombineType combineOp); - -extern const RtQuat * -RtQuatQueryRotate(const RtQuat *quat, - RwV3d * unitAxis, - RwReal * angle); - -extern RwV3d * -RtQuatTransformVectors(RwV3d * vectorsOut, - const RwV3d * vectorsIn, - const RwInt32 numPoints, - const RtQuat *quat); - -extern RwReal -RtQuatModulus(RtQuat * q); - -#if ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) - -extern void -RtQuatInit(RtQuat * result, RwReal x, RwReal y, RwReal z, RwReal w); - -extern void -RtQuatAssign(RtQuat * to, RtQuat * from); - -extern void -RtQuatAdd(RtQuat * result, RtQuat * q1, RtQuat * q2); - -extern void -RtQuatIncrementRealPart(RtQuat * result, RwReal s, RtQuat * q); - -extern void -RtQuatDecrementRealPart(RtQuat * result, RwReal s, RtQuat * q); - -extern void -RtQuatIncrement(RtQuat * result, RtQuat * dq); - -extern void -RtQuatSub(RtQuat * result, RtQuat * q1, RtQuat * q2); - -extern void -RtQuatNegate(RtQuat * result, RtQuat * q); - -extern void -RtQuatConjugate(RtQuat * result, RtQuat * q); - -extern void -RtQuatScale(RtQuat * result, RtQuat * q, RwReal scale); - -extern RwReal -RtQuatModulusSquared(RtQuat * q); - -extern void -RtQuatMultiply(RtQuat * result, RtQuat * q1, RtQuat * q2); - -extern void -RtQuatReciprocal(RtQuat * result, RtQuat * q); - -extern void -RtQuatSquare(RtQuat * result, RtQuat * q); - -extern void -RtQuatSquareRoot(RtQuat * result, RtQuat * q); - -extern void -RtQuatLog(RtQuat * result, RtQuat * q); - -extern void -RtQuatExp(RtQuat * result, RtQuat * q); - -extern void -RtQuatPow(RtQuat * result, RtQuat * q, RwReal e); - -extern void -RtQuatUnitLog(RtQuat * result, RtQuat * q); - -extern void -RtQuatUnitExp(RtQuat * result, RtQuat * q); - -extern void -RtQuatUnitPow(RtQuat * result, RtQuat * q, RwReal e); - -extern void -RtQuatConvertToMatrix(const RtQuat * const qpQuat, - RwMatrix * const mpMatrix); - -extern void -RtQuatUnitConvertToMatrix(const RtQuat * const qpQuat, - RwMatrix * const mpMatrix); - -#endif /* ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* - * Backwards compatibility code - */ - -typedef RtQuat RpQuat; - -#define RpAnimQuatConvertFromMatrix(qpQuat, mpMatrix) \ - RtQuatConvertFromMatrix(qpQuat, mpMatrix) - -#define RpAnimQuatConvertToMatrix(qpQuat,mpMatrix) \ - RtQuatUnitConvertToMatrix(qpQuat,mpMatrix) - - -#endif /* RTQUAT_H */ - diff --git a/sdk/rwsdk/include/d3d8/rtquat.rpe b/sdk/rwsdk/include/d3d8/rtquat.rpe deleted file mode 100644 index b239aba0..00000000 --- a/sdk/rwsdk/include/d3d8/rtquat.rpe +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionQuat -{ - - - - e_rwdb_CriterionQuatLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionQuat e_rwdb_CriterionQuat; - - diff --git a/sdk/rwsdk/include/d3d8/rtras.h b/sdk/rwsdk/include/d3d8/rtras.h deleted file mode 100644 index 957e21e6..00000000 --- a/sdk/rwsdk/include/d3d8/rtras.h +++ /dev/null @@ -1,54 +0,0 @@ -/*************************************************************************** - * * - * Module : rtRAS.h * - * * - * Purpose : Load RAS format files * - * * - **************************************************************************/ - -#ifndef RTRAS_H -#define RTRAS_H - -/** - * \defgroup rtras RtRAS - * \ingroup imageconversiontools - * - * RAS/Sun Raster Fule Format Image Format Toolkit for RenderWare. - * - * See also http://www.sworks.com/hollasch/cgindex/formats/sunraster.html - * - */ - -/**************************************************************************** - Includes - */ - -/*--- Include files ---*/ -#include "rwcore.h" - -#include "rtras.rpe" /* automatically generated header file */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RwImage *RtRASImageWrite(RwImage * image, - const RwChar * imageName); -extern RwImage *RtRASImageRead(const RwChar * imageName); - -extern void _rwImageGammaUnCorrectArrayOfRGBA(RwRGBA * rgbaOut, - RwRGBA * rgbaIn, - RwInt32 numEls); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* RWPUBLICEND */ - -#endif /* RTRAS_H */ diff --git a/sdk/rwsdk/include/d3d8/rtras.rpe b/sdk/rwsdk/include/d3d8/rtras.rpe deleted file mode 100644 index a242ef49..00000000 --- a/sdk/rwsdk/include/d3d8/rtras.rpe +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionRAS -{ - - - - e_rwdb_CriterionRASLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionRAS e_rwdb_CriterionRAS; - - diff --git a/sdk/rwsdk/include/d3d8/rtray.h b/sdk/rwsdk/include/d3d8/rtray.h deleted file mode 100644 index b2f3d4bc..00000000 --- a/sdk/rwsdk/include/d3d8/rtray.h +++ /dev/null @@ -1,63 +0,0 @@ -/*************************************************************************** - * * - * Module : rtray.h * - * * - * Purpose : Picking with rays * - * * - **************************************************************************/ - -#ifndef RTRAY_H -#define RTRAY_H - -/** - * \defgroup rtray RtRay - * \ingroup mathtools - * - * Line Toolkit for RenderWare. - */ - -/**************************************************************************** - Includes - */ - -#include "rwcore.h" -#include "rtray.rpe" /* automatically generated header file */ - -/**************************************************************************** - Defines - */ - - - /**************************************************************************** - Global Types - */ - - -/* RWPUBLIC */ -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Line intersections */ -extern RwReal RtLineTriangleIntersectionTest(RwLine *line, RwV3d *normal, - RwV3d *v0, RwV3d *v1, RwV3d *v2); -extern RwBool RtLineSphereIntersectionTest(RwLine *line, - RwSphere *sphere, - RwReal *centerDist); - -/* Line clipping */ -extern RwLine *RtLineClipPlane(RwLine *line, RwPlane *plane); -extern RwLine *RtLineClipBBox(RwLine *line, RwBBox *box); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* RWPUBLICEND */ - -#endif /* RTRAY_H */ diff --git a/sdk/rwsdk/include/d3d8/rtray.rpe b/sdk/rwsdk/include/d3d8/rtray.rpe deleted file mode 100644 index c1ff4458..00000000 --- a/sdk/rwsdk/include/d3d8/rtray.rpe +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionRay -{ - - - - e_rwdb_CriterionRayLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionRay e_rwdb_CriterionRay; - - diff --git a/sdk/rwsdk/include/d3d8/rtskinsp.h b/sdk/rwsdk/include/d3d8/rtskinsp.h deleted file mode 100644 index 7e40c13f..00000000 --- a/sdk/rwsdk/include/d3d8/rtskinsp.h +++ /dev/null @@ -1,57 +0,0 @@ -/*************************************************************************** - * * - * Module : * - * * - * Purpose : * - * * - **************************************************************************/ - -/* RWPUBLIC */ - -#ifndef RTSKINSP_H -#define RTSKINSP_H - -/** - * \defgroup rtskinsplit RtSkinSplit - * \ingroup skinning - * - * Skin Splitting Toolkit for RenderWare Graphics. - */ - -/**************************************************************************** - Includes - */ -#include -#include - -/**************************************************************************** - Defines - */ - -/**************************************************************************** - Global Types - */ - -/**************************************************************************** - Global variables (across program) - */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cpluscplus */ - -extern RpAtomic * -RtSkinSplitAtomicSplitGeometry( RpAtomic *atomic, RwUInt32 boneLimit ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* RTSKINSP_H */ - -/* RWPUBLICEND */ diff --git a/sdk/rwsdk/include/d3d8/rtskinsp.rpe b/sdk/rwsdk/include/d3d8/rtskinsp.rpe deleted file mode 100644 index f86623b4..00000000 --- a/sdk/rwsdk/include/d3d8/rtskinsp.rpe +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionSkinSplit -{ - - - - e_rwdb_CriterionSkinSplitLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionSkinSplit e_rwdb_CriterionSkinSplit; - - diff --git a/sdk/rwsdk/include/d3d8/rtslerp.h b/sdk/rwsdk/include/d3d8/rtslerp.h deleted file mode 100644 index 4262b894..00000000 --- a/sdk/rwsdk/include/d3d8/rtslerp.h +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Data Structures for Slerps/Spherical Linear Interpolations - * See also GemsIII/quatspin.c in - * http://www.acm.org/pubs/tog/GraphicsGems/gemsiii.zip - * Copyright (c) Criterion Software Limited - */ - -/*************************************************************************** - * * - * Module : rtslerp.h * - * * - * Purpose : Slerp functionality * - * * - **************************************************************************/ - -#ifndef RTSLERP_H -#define RTSLERP_H - -/** - * \defgroup rtslerp RtSlerp - * \ingroup mathtools - * - * Slerp/Spherical Linear Interpolations Toolkit for RenderWare. - * - * See also http://www.cis.ohio-state.edu/~parent/book/Full.html - */ - -#include "rwcore.h" -#include "rtquat.h" - -/**************************************************************************** - Includes - */ - -#include "rtslerp.rpe" /* automatically generated header file */ - -/**************************************************************************** - Defines - */ - -/* Masks for specifying which matrices to store by reference */ -#define rtSLERPREFNONE 0x00 -#define rtSLERPREFSTARTMAT 0x01 -#define rtSLERPREFENDMAT 0x02 -#define rtSLERPREFALL (~rtSLERPREFNONE) - -/**************************************************************************** - Global Types - */ - - -typedef struct RtSlerp RtSlerp; -/** - * \ingroup rtslerp - * \struct RtSlerp - * structure describing a Slerps/Spherical Linear Interpolations. - * See also GemsIII/quatspin.c in - * http://www.acm.org/pubs/tog/GraphicsGems/gemsiii.zip - */ -struct RtSlerp -{ - RwInt32 matRefMask; /**< Which matrices do we NOT own */ - RwMatrix *startMat; /**< The start matrix */ - RwMatrix *endMat; /**< The end matrix */ - RwV3d axis; /**< The axis of rotation for the slerp */ - RwReal angle; /**< The angle (in degrees) between src & dest */ - - /* Though a slerp may be a bad idea and opting for a lerp is better */ - RwBool useLerp; /**< Do we want to use lerps? */ -}; - -/* static frame sequence animation - contains no state */ - - -typedef struct RtQuatSlerpCache RtQuatSlerpCache; -/** - * \ingroup rtslerp - * \struct RtQuatSlerpCache - * structure describing a SlerpCache, - * which should be initialized with \ref RtQuatSetupSlerpCache. - */ -struct RtQuatSlerpCache -{ - RtQuat raFrom; /**< Scaled initial quaternion */ - RtQuat raTo; /**< Scaled final quaternion */ - RwReal omega; /**< Angular displacement in radians */ - RwBool nearlyZeroOm; /**< Flags near-zero angular - displacement*/ -}; - - -typedef struct RtQuatSlerpArgandCache RtQuatSlerpArgandCache; -/** - * \ingroup rtslerp - * \struct RtQuatSlerpArgandCache - * a structure describing - * an Argand SlerpCache which should be - * initialized with \ref RtQuatSetupSlerpArgandCache. - * See http://www-groups.dcs.st-and.ac.uk/~history/Mathematicians/Argand.html - * Jean Argand was an accountant and amateur mathematician. - * He is famed for his geometrical interpretation of the complex numbers - * where i is interpreted as a rotation through 90. - */ -struct RtQuatSlerpArgandCache -{ - RtQuat logTo; /**< field Logarithm of final quaternion */ - RtQuat logBase; /**< Logarithm of initial relative to final quaternion */ -}; - -#define RtQuatSlerpMacro(qpResult, qpFrom, qpTo, rT, sCache) \ -MACRO_START \ -{ \ - if ((rT) <= ((RwReal) 0)) \ - { \ - /* t is before start */ \ - *(qpResult) = *(qpFrom); \ - } \ - else if (((RwReal) 1) <= (rT)) \ - { \ - \ - /* t is after end */ \ - *(qpResult) = *(qpTo); \ - } \ - else \ - { \ - /* ... so t must be in the interior then */ \ - /* Calc coefficients rSclFrom, rSclTo */ \ - RwReal rSclFrom = ((RwReal) 1) - (rT); \ - RwReal rSclTo = (rT); \ - \ - if (!((sCache)->nearlyZeroOm)) \ - { \ - /* Standard case: slerp */ \ - /* SLERPMESSAGE(("Neither nearly ZERO nor nearly PI")); */ \ - \ - rSclFrom *= (sCache)->omega; \ - RwSinMinusPiToPiMacro(rSclFrom, rSclFrom); \ - rSclTo *= (sCache)->omega; \ - RwSinMinusPiToPiMacro(rSclTo, rSclTo); \ - } \ - \ - /* Calc final values */ \ - RwV3dScaleMacro(&(qpResult)->imag, \ - &(sCache)->raFrom.imag, rSclFrom); \ - RwV3dIncrementScaledMacro(&(qpResult)->imag, \ - &(sCache)->raTo.imag, rSclTo); \ - (qpResult)->real = \ - ((sCache)->raFrom.real * rSclFrom) + \ - ((sCache)->raTo.real * rSclTo); \ - } \ -} \ -MACRO_STOP - -#define RtQuatSlerpArgandMacro(qpResult, qpFrom, qpTo, rT, sArgandCache) \ -MACRO_START \ -{ \ - if ((rT) <= ((RwReal) 0)) \ - { \ - /* t is before start */ \ - *(qpResult) = *(qpFrom); \ - } \ - else if (((RwReal) 1) <= (rT)) \ - { \ - /* t is after end */ \ - *(qpResult) = *(qpTo); \ - } \ - else \ - { \ - RtQuat logBlend; \ - \ - /* ... so t must be in the interior then */ \ - \ - logBlend.imag.x = \ - (sArgandCache)->logBase.imag.x + \ - (rT) * (sArgandCache)->logTo.imag.x; \ - logBlend.imag.y = \ - (sArgandCache)->logBase.imag.y + \ - (rT) * (sArgandCache)->logTo.imag.y; \ - logBlend.imag.z = \ - (sArgandCache)->logBase.imag.z + \ - (rT) * (sArgandCache)->logTo.imag.z; \ - logBlend.real = 0; \ - \ - RtQuatUnitExpMacro((qpResult), &logBlend); \ - \ - } \ -} \ -MACRO_STOP - -#if (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) )) - -#define RtQuatSlerp(qpResult, qpFrom, qpTo, rT, sCache) \ - RtQuatSlerpMacro(qpResult, qpFrom, qpTo, rT, sCache) - -#define RtQuatSlerpArgand(qpResult, qpFrom, qpTo, rT, sArgandCache) \ - RtQuatSlerpArgandMacro(qpResult, qpFrom, qpTo, rT, sArgandCache) - -#endif /* (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) )) */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Creating and destroying slerps */ - -extern RtSlerp *RtSlerpCreate(RwInt32 nMatRefMask); - -extern void RtSlerpDestroy(RtSlerp * spSlerp); - -/* setting up a slerp */ -extern RtSlerp *RtSlerpInitialize(RtSlerp * spSlerp, - RwMatrix * mpMat1, - RwMatrix * mpMat2); - -/* Get a matrix */ -extern RwMatrix *RtSlerpGetMatrix(RtSlerp * spSlerp, - RwMatrix * mpResultMat, - RwReal nDelta); - -/* Set if lerp or slerp */ -extern RtSlerp *RtSlerpSetLerp(RtSlerp * spSlerp, - RwBool bUseLerp); - -extern void -RtQuatSetupSlerpCache(RtQuat * qpFrom, - RtQuat * qpTo, - RtQuatSlerpCache * sCache); - -extern void -RtQuatSetupSlerpArgandCache(RtQuat * qpFrom, - RtQuat * qpTo, - RtQuatSlerpArgandCache * sArgandCache); - -#if ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) - -extern void -RtQuatSlerp(RtQuat * qpResult, - RtQuat * qpFrom, - RtQuat * qpTo, - RwReal rT, - RtQuatSlerpCache * sCache); - -extern void -RtQuatSlerpArgand(RtQuat * qpResult, - RtQuat * qpFrom, - RtQuat * qpTo, - RwReal rT, - RtQuatSlerpArgandCache * sArgandCache); - -#endif /* ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* RTSLERP_H */ - diff --git a/sdk/rwsdk/include/d3d8/rtslerp.rpe b/sdk/rwsdk/include/d3d8/rtslerp.rpe deleted file mode 100644 index 64bd7571..00000000 --- a/sdk/rwsdk/include/d3d8/rtslerp.rpe +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionSlerp -{ - - - - e_rwdb_CriterionSlerpLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionSlerp e_rwdb_CriterionSlerp; - - diff --git a/sdk/rwsdk/include/d3d8/rtsplpvs.h b/sdk/rwsdk/include/d3d8/rtsplpvs.h deleted file mode 100644 index 419717a1..00000000 --- a/sdk/rwsdk/include/d3d8/rtsplpvs.h +++ /dev/null @@ -1,65 +0,0 @@ - -/*************************************************************************** - * * - * Module : rtsplpvs.h * - * * - * Purpose : To generate pvs data for a world froma spline * - * * - **************************************************************************/ - -#ifndef RTSPLINEPVS_H -#define RTSPLINEPVS_H - -/** - * \defgroup rtsplinepvs RtSplinePVS - * \ingroup pvs - * - * Spline PVS Toolkit for RenderWare. - */ - -/**************************************************************************** - Includes - */ - -#include "rwcore.h" -#include "rpworld.h" -#include "rpspline.h" - -/* RWPUBLIC */ - -/**************************************************************************** - Defines - */ - -/**************************************************************************** - Global Types - */ - -/**************************************************************************** - Function prototypes - */ - - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RpWorld * -RtSplinePVSConstruct(RpWorld * world, - RpSpline *spline, RwInt32 samples); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* RWPUBLICEND */ - -/* for back compatibility */ -#define RtSplinePVSCreate(_world, _raster, _zraster, \ - _mindist, _maxdist, _spline, _samples) \ - RtSplinePVSConstruct(_world, \ - _spline, _samples) - - -#endif /* RTSPLINEPVS_H */ diff --git a/sdk/rwsdk/include/d3d8/rtsplpvs.rpe b/sdk/rwsdk/include/d3d8/rtsplpvs.rpe deleted file mode 100644 index 9736cbbc..00000000 --- a/sdk/rwsdk/include/d3d8/rtsplpvs.rpe +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionSplinePVS -{ - - - - e_rwdb_CriterionSplinePVSLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionSplinePVS e_rwdb_CriterionSplinePVS; - - diff --git a/sdk/rwsdk/include/d3d8/rttiff.h b/sdk/rwsdk/include/d3d8/rttiff.h deleted file mode 100644 index b5d0ec00..00000000 --- a/sdk/rwsdk/include/d3d8/rttiff.h +++ /dev/null @@ -1,47 +0,0 @@ -/*************************************************************************** - * * - * Module : rttiff.h * - * * - * Purpose : Load TIFF format files * - * * - **************************************************************************/ - -#ifndef RWTIFF_H -#define RWTIFF_H - -/** - * \defgroup rttiff RtTIFF - * \ingroup imageconversiontools - * - * TIFF/Tag Image File Format Image Format Toolkit for RenderWare. - * - * See also http://www.libtiff.org - */ - -/**************************************************************************** - Includes - */ - -/*--- Include files ---*/ -#include "rwcore.h" - -#include "rttiff.rpe" /* automatically generated header file */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RwImage *RtTIFFImageRead(const RwChar *imageName); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* RWPUBLICEND */ - -#endif /* RWTIFF_H */ diff --git a/sdk/rwsdk/include/d3d8/rttiff.rpe b/sdk/rwsdk/include/d3d8/rttiff.rpe deleted file mode 100644 index 260b2329..00000000 --- a/sdk/rwsdk/include/d3d8/rttiff.rpe +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionTIFF -{ - - - - e_rwdb_CriterionTIFFLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionTIFF e_rwdb_CriterionTIFF; - - diff --git a/sdk/rwsdk/include/d3d8/rttilerd.h b/sdk/rwsdk/include/d3d8/rttilerd.h deleted file mode 100644 index 7cb8f887..00000000 --- a/sdk/rwsdk/include/d3d8/rttilerd.h +++ /dev/null @@ -1,70 +0,0 @@ -/*************************************************************************** - * * - * Module : rttilerd.h * - * * - * Purpose : Tile renderer * - * * - **************************************************************************/ - -#ifndef RTTILERD_H -#define RTTILERD_H - -/** - * \defgroup rttilerender RtTileRender - * \ingroup cameras - * - * Tile renderer - e.g. grabbing screen shots - Toolkit for RenderWare. - */ - -/**************************************************************************** - Includes - */ -#include "rwcore.h" - -#include "rpcriter.h" - -/**************************************************************************** - Defines - */ - -/**************************************************************************** - Global Types - */ - -typedef RwCamera * (*RtTileRenderCallBack)(RwCamera *camera, - RwInt32 x, RwInt32 y, - void *pData); - -typedef RwImage * (*RtTileArchiveCallBack)(RwImage *image, - RwInt32 x, RwInt32 y, - void *pData); - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Tile renderer */ - -extern RwCamera * -RtTileRender(RwCamera *camera, - RwInt32 imageWidth, RwInt32 imageHeight, - RwInt32 tileWidth, RwInt32 tileHeight, - RtTileRenderCallBack renderCallBack, - RtTileArchiveCallBack archiveCallBack, - void *pData); - -extern RwImage * -RtTileDefaultArchive(RwImage *image, - RwInt32 x, RwInt32 y, void *pData); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* RTTILERD_H */ diff --git a/sdk/rwsdk/include/d3d8/rttilerd.rpe b/sdk/rwsdk/include/d3d8/rttilerd.rpe deleted file mode 100644 index 15c929f9..00000000 --- a/sdk/rwsdk/include/d3d8/rttilerd.rpe +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionTileRend -{ - - - - e_rwdb_CriterionTileRendLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionTileRend e_rwdb_CriterionTileRend; - - diff --git a/sdk/rwsdk/include/d3d8/rttoc.h b/sdk/rwsdk/include/d3d8/rttoc.h deleted file mode 100644 index 88926062..00000000 --- a/sdk/rwsdk/include/d3d8/rttoc.h +++ /dev/null @@ -1,102 +0,0 @@ -/****************************************************************************** - * * - * Module : rttoc.h * - * * - * Purpose : Table Of Contents (TOC) * - * * - ******************************************************************************/ - -#ifndef RTTOC_H -#define RTTOC_H - -/** - * \defgroup rttoc RtTOC - * \ingroup streaming - * - * 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; - RwUInt16 data2; - RwUInt16 data3; - RwUInt8 data4[8]; -}; -#endif /* (!defined(DOXYGEN)) */ - -typedef struct RtTOCEntry RtTOCEntry; -/** - * \ingroup rttoc - * \struct RtTOCEntry - * - * A Table Of Contents (TOC) entry structure. - */ -struct RtTOCEntry -{ - 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; - -/** - * \ingroup rttoc - * \struct RtTOC - * - * Table Of Contents (TOC) structure. - */ -struct RtTOC -{ - RwInt32 numEntries; /**< Number of entries */ - RtTOCEntry entry[1]; /**< Entry */ -}; - -/****************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Create/Destroy */ -extern RtTOC *RtTOCCreate(RwStream *stream); -extern void RtTOCDestroy(RtTOC *toc); - -/* Access */ -extern RwInt32 RtTOCGetNumEntries(const RtTOC *toc); -extern RtTOCEntry *RtTOCGetEntry(RtTOC *toc, RwInt32 entry); - -/* Serialization */ -extern RwUInt32 RtTOCStreamGetSize(const RtTOC *toc); -extern const RtTOC *RtTOCStreamWrite(RtTOC *toc, RwStream *stream); -extern RtTOC *RtTOCStreamRead(RwStream *stream); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* RTTOC_H */ diff --git a/sdk/rwsdk/include/d3d8/rttoc.rpe b/sdk/rwsdk/include/d3d8/rttoc.rpe deleted file mode 100644 index 706372f2..00000000 --- a/sdk/rwsdk/include/d3d8/rttoc.rpe +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionTOC -{ - - - - e_rwdb_CriterionTOCLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionTOC e_rwdb_CriterionTOC; - - diff --git a/sdk/rwsdk/include/d3d8/rtvcat.h b/sdk/rwsdk/include/d3d8/rtvcat.h deleted file mode 100644 index 474095e1..00000000 --- a/sdk/rwsdk/include/d3d8/rtvcat.h +++ /dev/null @@ -1,38 +0,0 @@ - -/*************************************************************************** - * * - * Module : rtvcat.h * - * * - * Purpose : Tristripping callback for vertex cache aware strips * - * * - **************************************************************************/ - -#ifndef RTVCAT_H -#define RTVCAT_H - -/**************************************************************************** - Includes - */ - -/*--- Include files ---*/ -#include "rwcore.h" - -#include "rtvcat.rpe" /* automatically generated header file */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" { -#endif - -extern RpMeshHeader * -RpBuildMeshGenerateCacheAwareTriStrip(RpBuildMesh *buildMesh, - void *data); - -#ifdef __cplusplus -} -#endif - -#endif /* RTVCAT_H */ diff --git a/sdk/rwsdk/include/d3d8/rtvcat.rpe b/sdk/rwsdk/include/d3d8/rtvcat.rpe deleted file mode 100644 index ef5e286e..00000000 --- a/sdk/rwsdk/include/d3d8/rtvcat.rpe +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionVextexCacheStrip -{ - - - - e_rwdb_CriterionVextexCacheStripLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionVextexCacheStrip e_rwdb_CriterionVextexCacheStrip; - - diff --git a/sdk/rwsdk/include/d3d8/rtworld.h b/sdk/rwsdk/include/d3d8/rtworld.h deleted file mode 100644 index 727d8122..00000000 --- a/sdk/rwsdk/include/d3d8/rtworld.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * World toolkit. - */ -/*************************************************************************** - * * - * Module : rtworld.h * - * * - * Purpose : World tool helper functions header * - * * - **************************************************************************/ - -#ifndef RTWORLD_H -#define RTWORLD_H - -/** - * \defgroup rtworld RtWorld - * \ingroup basicgeometry - * - * World Import Toolkit for RenderWare. - */ - -/**************************************************************************** - Includes - */ - -#include "rpworld.h" - -#include "rtworld.rpe" /* automatically generated header file */ - -/**************************************************************************** - Defines - */ - -/* RWPUBLIC */ -/**************************************************************************** - Global Types - */ - -/* RWPUBLICEND */ - -/**************************************************************************** - Exported globals - */ - -/* RWPUBLIC */ -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Get the number of various things in the world */ -extern RwInt32 RtWorldGetNumWorldSectors(RpWorld *world); -extern RwInt32 RtWorldGetNumVertices(RpWorld *world); -extern RwInt32 RtWorldGetNumPolygons(RpWorld *world); - -/* Find things out about materials in the world */ -extern RwInt32 RtWorldFindMaterialNum(RpWorld *world, RpMaterial *material); -extern RpMaterial *RtWorldFindMaterialWithTextureName(RpWorld *world, RwChar *name); - -/* Optimisation functions in optimise.c */ -extern RpClump *RtClumpOptimize(RpClump *clump, RwReal dist); -extern RpAtomic *RtAtomicOptimize(RpAtomic *atomic, RwReal dist); - -/* - * This function has been removed, however it still exists as a stealth - * function, _rtGeometryOptimize. - */ -#define RtGeometryOptimize(geometry, dist) (geometry) - -extern RpGeometry *_rtGeometryOptimize(RpGeometry *geometry, RwReal dist); - -/* Import utility functions from imputil.c */ -extern RpGeometry *RtGeometryCalculateVertexNormals(RpGeometry *geometry); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* RWPUBLICEND */ - -#endif /* RWTLWRLD_H */ diff --git a/sdk/rwsdk/include/d3d8/rtworld.rpe b/sdk/rwsdk/include/d3d8/rtworld.rpe deleted file mode 100644 index 83449720..00000000 --- a/sdk/rwsdk/include/d3d8/rtworld.rpe +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum e_rwdb_CriterionTlWorld -{ - - - - e_rwdb_CriterionTlWorldLAST = RWFORCEENUMSIZEINT -}; - -typedef enum e_rwdb_CriterionTlWorld e_rwdb_CriterionTlWorld; - - diff --git a/sdk/rwsdk/include/d3d8/rwcore.h b/sdk/rwsdk/include/d3d8/rwcore.h deleted file mode 100644 index 583de35f..00000000 --- a/sdk/rwsdk/include/d3d8/rwcore.h +++ /dev/null @@ -1,4428 +0,0 @@ -/******************************************/ -/* */ -/* RenderWare(TM) Graphics Library */ -/* */ -/******************************************/ - -/* - * 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. and Canon Inc. will not, under any - * circumstances, be liable for any lost revenue or other damages - * arising from the use of this file. - * - * Copyright (c) 1999. Criterion Software Ltd. - * All Rights Reserved. - */ - -/************************************************************************* - * - * Filename: - * Automatically Generated on: Thu Jan 23 11:06:24 2003 - * - ************************************************************************/ - -#ifndef RWCORE_H -#define RWCORE_H - -/*--- System Header Files ---*/ -#include - - -/*--- Automatically derived from: C:/daily/rwsdk/driver/common/barwasmm.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/p2resort.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/p2macros.h ---*/ - -#define RxClusterDecCursorByStride(_cluster, _stride) \ - ((_cluster)->currentData = \ - (void *)(((RwUInt8 *)(_cluster)->currentData) - \ - (_stride))) - -#define RxClusterDecCursor(_cluster) \ - RxClusterDecCursorByStride(_cluster, (_cluster)->stride) - -#define RxClusterIncCursorByStride(_cluster, _stride) \ - ((_cluster)->currentData = \ - (void *)(((RwUInt8 *)(_cluster)->currentData) + \ - (_stride))) - -#define RxClusterIncCursor(_cluster) \ - RxClusterIncCursorByStride(_cluster, (_cluster)->stride) - -#define RxClusterResetCursor(_cluster) \ - ((_cluster)->currentData = (_cluster)->data) - -#define RxClusterGetCursorData(_cluster, _type) \ - ((_type *)(_cluster)->currentData) - -#define RxClusterGetIndexedData(_cluster, _type, _index) \ - ((_type *)(((RwUInt8 *)(_cluster)->data) + (_cluster)->stride*(_index))) - -#define RxClusterGetFreeIndex(_cluster) ( (_cluster)->numUsed++ ) - -#define RxPipelineClusterAssertAttributeSet(_cluster, _attributeSet) \ - RWASSERT( (_cluster)->clusterRef->attributeSet != NULL && \ - rwstrcmp((_cluster)->clusterRef->attributeSet, \ - (_attributeSet)) == 0 ) - -#define RxPipelineNodeParamGetData(_param) \ - ( (_param)->dataParam ) - -#define RxPipelineNodeParamGetHeap(_param) \ - ( (_param)->heap ) - - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/p2heap.h ---*/ - -#if (defined(RWDEBUG) && (defined(RWMEMDEBUG))) - -#if (!defined(DISABLERWHEAP)) -#define DISABLERWHEAP -#endif /* (!defined(DISABLERWHEAP)) */ - -#endif /* (defined(RWDEBUG) && (defined(RWMEMDEBUG))) */ - -typedef struct rxHeapFreeBlock rxHeapFreeBlock; -typedef struct rxHeapSuperBlockDescriptor rxHeapSuperBlockDescriptor; -typedef struct RxHeap RxHeap; -typedef struct rxHeapBlockHeader rxHeapBlockHeader; - -#if (!defined(DOXYGEN)) -struct rxHeapFreeBlock -{ - RwUInt32 size; - rxHeapBlockHeader *ptr; -}; - -struct rxHeapSuperBlockDescriptor -{ - void *start; - RwUInt32 size; - rxHeapSuperBlockDescriptor *next; -}; -#endif /* (!defined(DOXYGEN)) */ - -/** - * \ingroup rwcoregeneric - * \struct RxHeap - * structure describing a pipeline execution heap - */ -struct RxHeap -{ - RwUInt32 superBlockSize; /**< Granularity of heap growth */ - rxHeapSuperBlockDescriptor *head; /**< Internally used superblock pointer */ - rxHeapBlockHeader *headBlock; /**< Internally used block pointer */ - rxHeapFreeBlock *freeBlocks; /**< Internally used free blocks pointer */ - RwUInt32 entriesAlloced; /**< Number of entries allocated */ - RwUInt32 entriesUsed; /**< Number of entries used */ - RwBool dirty; /**< Internally used boolean, flags whether - * the heap needs resetting or not. */ -}; - -#if (!defined(DOXYGEN)) -struct rxHeapBlockHeader -{ - /* present in all blocks (used & unused) */ - rxHeapBlockHeader *prev, *next; - RwUInt32 size; - 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) \ - ((FALSE == (heap)->dirty) ? (TRUE) : (_rxHeapReset(heap))) - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RxHeap *RxHeapCreate(RwUInt32 size); -extern void RxHeapDestroy(RxHeap * heap); -extern RwBool _rxHeapReset(RxHeap * heap); -extern void *RxHeapAlloc(RxHeap * heap, RwUInt32 size); -extern void RxHeapFree(RxHeap * heap, void *block); -extern void *RxHeapRealloc(RxHeap * heap, void *block, - RwUInt32 newSize, RwBool allowCopy); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#if (defined(DISABLERWHEAP)) - -typedef struct rxHeapMallocTrace rxHeapMallocTrace; -struct rxHeapMallocTrace -{ - rxHeapMallocTrace *next; - rxHeapBlockHeader *block; -}; - -#endif /* (defined(DISABLERWHEAP)) */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/p2dep.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/p2core.h ---*/ - -extern RwInt32 _rxPipelineMaxNodes; -extern RwInt32 _rxHeapInitialSize; -/* LEGACY-SUPPORT MACRO */ -#define _rwRxHeapInitialSize _rxHeapInitialSize - -/* Beneficial padding of PowerPipe types is still being worked out... */ -#define PADCLUSTERSx - - -/************************************************************* - * Global Defines - */ - -#define RWBOOLTOGGLE(bVar) ((bVar == FALSE)?(bVar = TRUE):(bVar = FALSE)) - -/* Both these currently limited due to the use of RwUInt32 bit-fields */ -#define RXNODEMAXCLUSTERSOFINTEREST 32 -#define RXNODEMAXOUTPUTS 32 - -/* Useful (for memory alloc) to limit this during pipeline construction */ -#define RXPIPELINEDEFAULTMAXNODES 64 - -/* - * Cluster flags - */ - -#define rxCLFLAGS_NULL ((RwUInt16) 0x0000U) -#define rxCLFLAGS_CLUSTERVALID ((RwUInt16) 0x0001U) -#define rxCLFLAGS_EXTERNAL ((RwUInt16) 0x0002U) -#define rxCLFLAGS_EXTERNALMODIFIABLE ((RwUInt16) 0x0004U | 0x0002U) -#define rxCLFLAGS_MODIFIED ((RwUInt16) 0x0008U) - -/* - * Packet flags - */ - -#define rxPKFLAGS_NULL ((RwUInt16) 0x0000U) - -/* - * used in input specification - */ - -/** - * \ingroup rwcoregeneric - * \ref RxClusterValidityReq - * Flags specifying the state requirements for - * a \ref RxCluster on entry to a node */ -enum RxClusterValidityReq -{ - rxCLREQ_DONTWANT = 0, /**inputToClusterSlot[(CLIND)]) - -#define RxClusterLockRead(PKT, CLIND) \ - ( (((RwInt32)RXCLSLOT(PKT, CLIND)) == -1) ? \ - ((RxCluster *)NULL) : \ - (RxClusterResetCursor(&PKT->clusters[RXCLSLOT(PKT, CLIND)]), \ - &PKT->clusters[RXCLSLOT(PKT, CLIND)]) ) - -#endif /* !RWDEBUG */ - -extern RxCluster * -RxClusterLockWrite(RxPacket * packet, - RwUInt32 clusterIndex, - RxPipelineNode * node); - -extern void -RxClusterUnlock(RxCluster * cluster); - -extern RwUInt32 -RxPipelineNodeSendConfigMsg(RxPipelineNode * dest, - RwUInt32 msg, - RwUInt32 intparam, - void *ptrparam); - -extern RxPipelineNode * -RxPipelineNodeForAllConnectedOutputs(RxPipelineNode * node, - RxPipeline * pipeline, - RxPipelineNodeOutputCallBack callbackfn, - void *callbackdata); - -/* Cluster attributes api [pipeline construction time] */ - -extern RxPipelineCluster * -RxPipelineNodeGetPipelineCluster(RxPipelineNode *node, - RwUInt32 clustersOfInterestIndex); - -extern RwUInt32 -RxPipelineClusterGetCreationAttributes(RxPipelineCluster *cluster); - -extern RxPipelineCluster * -RxPipelineClusterSetCreationAttributes(RxPipelineCluster *cluster, - RwUInt32 creationAttributes); - -/* Cluster attributes api [pipeline execution time] */ - -extern RwUInt32 -RxClusterGetAttributes(RxCluster *cluster); - -extern RxCluster * -RxClusterSetAttributes(RxCluster *cluster, RwUInt32 attributes); - - -extern void -_rxEmbeddedPacketBetweenPipelines(RxPipeline * fromPipeline, - RxPipeline * toPipeline); - -extern RxPipelineNode * -_rxEmbeddedPacketBetweenNodes(RxPipeline *pipeline, - RxPipelineNode *nodeFrom, - RwUInt32 whichOutput); - -extern RxExecutionContext _rxExecCtxGlobal; - -/* Summary of dispatch rules: - * o nodes that never fetch are safe to dispatch NULL, whether - * nodes above pass them a packet or not - * o if you destroy the packet you can dispatch(NULL,,) - * o if you fetch/create and dispatch(NULL), it doesn't really - * matter - the packet'll get passed on anyway */ - -/* TODO: there's currently no way to prematurely terminate the pipeline - * without doing so as an error condition. You should create an - * enum for the exit code, either RXNODEEXITCONTINUE, RXNODEEXITTERMINATE - * or RXNODEEXTTERMINATEERROR and then test for RXNODEEXITCONTINUE in - * the below macros rather than FALSE. */ - -/* TODO: _packet redundant here... create a new macro and legacy wrapper */ -#define rxPacketDispatchMacro(_packet, _output, _self) \ -MACRO_START \ -{ \ - RxPipeline *curPipeline = _rxExecCtxGlobal.pipeline; \ - \ - /* _packet is now an obsolete parameter */ \ - \ - if ( FALSE != _rxExecCtxGlobal.exitCode ) \ - { \ - RxPipelineNode *nextNode = \ - _rxEmbeddedPacketBetweenNodes(curPipeline, \ - _self, \ - (_output)); \ - if ( nextNode != NULL ) \ - { \ - RwUInt32 exitCode = \ - nextNode->nodeDef->nodeMethods.nodeBody( \ - nextNode, &(_rxExecCtxGlobal.params)); \ - /* Don't overwrite 'error' with 'success' */ \ - if (FALSE == exitCode) _rxExecCtxGlobal.exitCode = exitCode; \ - } \ - } \ - if ( curPipeline->embeddedPacketState > rxPKST_UNUSED \ - /* !UNUSED and !PACKETLESS */ ) \ - { \ - curPipeline->embeddedPacketState = rxPKST_INUSE; \ - _rxPacketDestroy(curPipeline->embeddedPacket); \ - } \ -} \ -MACRO_STOP - -/* TODO: _self redundant here... create a new macro and legacy wrapper */ -#define rxPacketDispatchToPipelineMacro(_packet, _pipeline, _self) \ -MACRO_START \ -{ \ - RxPipeline *toPipeline = (_pipeline); \ - \ - /* _packet is now an obsolete parameter */ \ - \ - if ( FALSE != _rxExecCtxGlobal.exitCode ) \ - { \ - RwUInt32 exitCode; \ - RxPipeline *fromPipeline = _rxExecCtxGlobal.pipeline; /* save */ \ - _rxEmbeddedPacketBetweenPipelines(fromPipeline, \ - toPipeline); \ - _rxExecCtxGlobal.pipeline = toPipeline; /* modify */ \ - exitCode = \ - toPipeline->nodes[0].nodeDef->nodeMethods.nodeBody( \ - &toPipeline->nodes[0], &(_rxExecCtxGlobal.params)); \ - if ( FALSE == exitCode ) _rxExecCtxGlobal.exitCode = exitCode; \ - _rxExecCtxGlobal.pipeline = fromPipeline; /* restore */ \ - } \ - if ( toPipeline->embeddedPacketState > rxPKST_UNUSED \ - /* !UNUSED and !PACKETLESS */ ) \ - { \ - toPipeline->embeddedPacketState = rxPKST_INUSE; \ - _rxPacketDestroy(toPipeline->embeddedPacket); \ - } \ -} \ -MACRO_STOP - -#define rxPacketFetchMacro(_node) \ - ( ((_rxExecCtxGlobal.pipeline)->embeddedPacketState == rxPKST_PENDING) ?\ - ((_rxExecCtxGlobal.pipeline)->embeddedPacketState = rxPKST_INUSE, \ - (_rxExecCtxGlobal.pipeline)->embeddedPacket) : \ - (NULL) ) - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/d3d8/nodeD3D8SubmitNoLight.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/p2define.h ---*/ - -/** - * \ingroup rwcoregeneric - * \ref RxNodeOutput - * typedef for a reference to an output of a pipeline node */ -typedef RwUInt32 *RxNodeOutput; - -/** - * \ingroup rwcoregeneric - * \ref RxNodeInput - * typedef for a reference to the input of a pipeline node */ -typedef RxPipelineNode *RxNodeInput; - -/** - * \ingroup rwcoregeneric - * \ref RxLockedPipe - * typedef for a reference to a locked pipeline - */ -typedef RxPipeline RxLockedPipe; - - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -/* PIPELINENODE API */ - -extern RxNodeOutput -RxPipelineNodeFindOutputByName(RxPipelineNode *node, - const RwChar *outputname); - -extern RxNodeOutput -RxPipelineNodeFindOutputByIndex(RxPipelineNode *node, - RwUInt32 outputindex); - -extern RxNodeInput -RxPipelineNodeFindInput(RxPipelineNode *node); - -extern RxNodeDefinition * -RxPipelineNodeCloneDefinition(RxPipelineNode *node, - RxClusterDefinition *cluster2add); - -extern RxPipeline * -RxPipelineNodeRequestCluster(RxPipeline *pipeline, - RxPipelineNode *node, - RxClusterDefinition *clusterDef); - -extern RxPipeline * -RxPipelineNodeReplaceCluster(RxPipeline *pipeline, - RxPipelineNode *node, - RxClusterDefinition *oldClusterDef, - RxClusterDefinition *newClusterDef); - -extern void * -RxPipelineNodeGetInitData(RxPipelineNode *node); - -extern void * -RxPipelineNodeCreateInitData(RxPipelineNode *node, - RwUInt32 size); - -/* PIPELINE MANIPULATION API */ - -extern RxPipeline * -RxPipelineClone(RxPipeline *pipeline); - -extern RxPipelineNode * -RxPipelineFindNodeByName(RxPipeline *pipeline, - const RwChar *name, - RxPipelineNode *start, - RwInt32 *nodeIndex); - -extern RxPipelineNode * -RxPipelineFindNodeByIndex(RxPipeline *pipeline, - RwUInt32 nodeindex); - -extern RxLockedPipe * -RxPipelineLock(RxPipeline *pipeline); - -extern RxPipeline * -RxLockedPipeUnlock(RxLockedPipe *pipeline); - - -extern RxLockedPipe * -RxLockedPipeAddFragment(RxLockedPipe *pipeline, - RwUInt32 *firstIndex, - RxNodeDefinition *nodeDef0, - ...); - - -extern RxPipeline * -RxLockedPipeReplaceNode(RxLockedPipe *pipeline, - RxPipelineNode *node, - RxNodeDefinition *nodeDef); - -extern RxPipeline * -RxLockedPipeDeleteNode(RxLockedPipe *pipeline, - RxPipelineNode *node); - - -extern RxPipeline * -RxLockedPipeSetEntryPoint(RxLockedPipe *pipeline, - RxNodeInput in); - - -extern RxPipelineNode * -RxLockedPipeGetEntryPoint(RxLockedPipe *pipeline); - - -extern RxPipeline * -RxLockedPipeAddPath(RxLockedPipe *pipeline, - RxNodeOutput out, - RxNodeInput in); - -extern RxPipeline * -RxLockedPipeDeletePath(RxLockedPipe *pipeline, - RxNodeOutput out, - RxNodeInput in); - - -extern RxPipeline * -RxPipelineInsertDebugNode(RxPipeline *pipeline, - RxPipelineNode *before, - RxPipelineNode *after, - RxNodeDefinition *debugNode); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/p2altmdl.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/driver/d3d8/d3d8texdic.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/driver/d3d8/d3d8rendst.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/driver/d3d8/d3d8raster.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/driver/d3d8/d3d8device.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/driver/d3d8/d3d8convrt.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/driver/d3d8/d3d82drend.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/driver/common/ssematml.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/driver/common/cpuext.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/driver/common/palquant.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/driver/common/datblkcb.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/src/baraster.h ---*/ - -/**************************************************************************** - Defines - */ - -/** - * \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 - * simultaneously write and read a raster (rwRASTERLOCKWRITE | rwRASTERLOCKREAD). - */ -enum RwRasterLockMode -{ - rwRASTERLOCKWRITE = 0x01, /** - *
  • The pixel color format corresponding to one of the following values:- - *
      - *
    • rwRASTERFORMAT1555 - *
    • rwRASTERFORMAT565 - *
    • rwRASTERFORMAT4444 - *
    • rwRASTERFORMATLUM8 - *
    • rwRASTERFORMAT8888 - *
    • rwRASTERFORMAT888 - *
    • rwRASTERFORMAT16 - *
    • rwRASTERFORMAT24 - *
    • rwRASTERFORMAT32 - *
    • rwRASTERFORMAT555 - *
    - * This value may be masked out of the raster format using - * rwRASTERFORMATPIXELFORMATMASK. - *
  • The palette depth if the raster is palettized:- - *
      - *
    • rwRASTERFORMATPAL4 - *
    • rwRASTERFORMATPAL8 - *
    - * In these cases, the color format refers to that of the palette. - *
  • Flag rwRASTERFORMATMIPMAP. Set if the raster contains mipmap levels. - *
  • Flag rwRASTERFORMATAUTOMIPMAP. Set if the mipmap levels were generated - * automatically by RenderWare. - * - */ -enum RwRasterFormat -{ - rwRASTERFORMATDEFAULT = 0x0000, /* Whatever the hardware likes best */ - - rwRASTERFORMAT1555 = 0x0100, /**<16 bits - 1 bit alpha, 5 bits red, green and blue */ - rwRASTERFORMAT565 = 0x0200, /**<16 bits - 5 bits red and blue, 6 bits green */ - rwRASTERFORMAT4444 = 0x0300, /**<16 bits - 4 bits per component */ - rwRASTERFORMATLUM8 = 0x0400, /**width) - -#define RwRasterGetHeightMacro(_raster) \ - ((_raster)->height) - -#define RwRasterGetStrideMacro(_raster) \ - ((_raster)->stride) - -#define RwRasterGetDepthMacro(_raster) \ - ((_raster)->depth) - -#define RwRasterGetFormatMacro(_raster) \ - ((((_raster)->cFormat) & (rwRASTERFORMATMASK >> 8)) << 8) - -#define RwRasterGetTypeMacro(_raster) \ - (((_raster)->cType) & rwRASTERTYPEMASK) - -#define RwRasterGetParentMacro(_raster) \ - ((_raster)->parent) - - -#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -#define RwRasterGetWidth(_raster) \ - RwRasterGetWidthMacro(_raster) - -#define RwRasterGetHeight(_raster) \ - RwRasterGetHeightMacro(_raster) - -#define RwRasterGetStride(_raster) \ - RwRasterGetStrideMacro(_raster) - -#define RwRasterGetDepth(_raster) \ - RwRasterGetDepthMacro(_raster) - -#define RwRasterGetFormat(_raster) \ - RwRasterGetFormatMacro(_raster) - -#define RwRasterGetType(_raster) \ - RwRasterGetTypeMacro(_raster) - -#define RwRasterGetParent(_raster) \ - RwRasterGetParentMacro(_raster) - -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -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); - -/* Pulling info out of raster structure */ - -#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) -extern RwInt32 RwRasterGetWidth(const RwRaster *raster); -extern RwInt32 RwRasterGetHeight(const RwRaster *raster); -extern RwInt32 RwRasterGetStride(const RwRaster *raster); -extern RwInt32 RwRasterGetDepth(const RwRaster *raster); -extern RwInt32 RwRasterGetFormat(const RwRaster *raster); -extern RwInt32 RwRasterGetType(const RwRaster *raster); -extern RwRaster *RwRasterGetParent(const RwRaster *raster); -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -extern RwRaster *RwRasterGetOffset(RwRaster *raster, - RwInt16 *xOffset, RwInt16 *yOffset); - -extern RwInt32 RwRasterGetNumLevels(RwRaster * raster); - -extern RwRaster *RwRasterSubRaster(RwRaster * subRaster, - RwRaster * raster, RwRect * rect); - -extern RwRaster *RwRasterRenderFast(RwRaster * raster, RwInt32 x, - RwInt32 y); -extern RwRaster *RwRasterRender(RwRaster * raster, RwInt32 x, - RwInt32 y); -extern RwRaster *RwRasterRenderScaled(RwRaster * raster, - RwRect * rect); - -/* Raster rendering context */ -extern RwRaster *RwRasterPushContext(RwRaster * raster); -extern RwRaster *RwRasterPopContext(void); -extern RwRaster *RwRasterGetCurrentContext(void); - -/* Clearing rasters */ -extern RwBool RwRasterClear(RwInt32 pixelValue); -extern RwBool RwRasterClearRect(RwRect * rpRect, - RwInt32 pixelValue); - -/* Displaying rasters */ -extern RwRaster *RwRasterShowRaster(RwRaster * raster, void *dev, - RwUInt32 flags); - -/* Locking and releasing */ -extern RwUInt8 *RwRasterLock(RwRaster * raster, RwUInt8 level, - RwInt32 lockMode); -extern RwRaster *RwRasterUnlock(RwRaster * raster); -extern RwUInt8 *RwRasterLockPalette(RwRaster * raster, - RwInt32 lockMode); -extern RwRaster *RwRasterUnlockPalette(RwRaster * raster); - -/* Attaching toolkits */ -extern RwInt32 RwRasterRegisterPlugin(RwInt32 size, - RwUInt32 pluginID, - RwPluginObjectConstructor - constructCB, - RwPluginObjectDestructor - destructCB, - RwPluginObjectCopy copyCB); -extern RwInt32 RwRasterGetPluginOffset(RwUInt32 pluginID); -extern RwBool RwRasterValidatePlugins(const RwRaster * raster); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/driver/d3d8/drvmodel.h ---*/ -#ifndef D3D8_DRVMODEL_H -#define D3D8_DRVMODEL_H - -#if (defined(__ICL)) -/* Avoid voluminous - * 'warning #344: typedef name has already been declared (with same type)' - * warnings from MS include files - */ -#pragma warning( disable : 344 ) -#endif /* (defined(__ICL)) */ - - -#if (defined(RWDEBUG)) -#if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) -#define _CRTDBG_MAP_ALLOC -#endif /* defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) */ -#include -#define ERR_WRAP(A) (_rwRePrintErrorDDD3D((A), __FILE__, __LINE__)) -#endif /* (defined(RWDEBUG)) */ - -#if (!defined(ERR_WRAP)) -#define ERR_WRAP(A) (A) -#endif /* (!defined(ERR_WRAP)) */ - -/**************************************************************************** - Defines - */ - -/* Set true depth information (for fogging, eg) */ -#define RwIm2DVertexSetCameraX(vert, camx) /* Nothing */ -#define RwIm2DVertexSetCameraY(vert, camy) /* Nothing */ -#define RwIm2DVertexSetCameraZ(vert, camz) /* Nothing */ - -#define RwIm2DVertexSetRecipCameraZ(vert, recipz) ((vert)->rhw = recipz) - -#define RwIm2DVertexGetCameraX(vert) (cause an error) -#define RwIm2DVertexGetCameraY(vert) (cause an error) -#define RwIm2DVertexGetCameraZ(vert) (cause an error) -#define RwIm2DVertexGetRecipCameraZ(vert) ((vert)->rhw) - -/* Set screen space coordinates in a device vertex */ -#define RwIm2DVertexSetScreenX(vert, scrnx) ((vert)->x = (scrnx)) -#define RwIm2DVertexSetScreenY(vert, scrny) ((vert)->y = (scrny)) -#define RwIm2DVertexSetScreenZ(vert, scrnz) ((vert)->z = (scrnz)) -#define RwIm2DVertexGetScreenX(vert) ((vert)->x) -#define RwIm2DVertexGetScreenY(vert) ((vert)->y) -#define RwIm2DVertexGetScreenZ(vert) ((vert)->z) - -/* Set texture coordinates in a device vertex */ -#define RwIm2DVertexSetU(vert, texU, recipz) ((vert)->u = (texU)) -#define RwIm2DVertexSetV(vert, texV, recipz) ((vert)->v = (texV)) -#define RwIm2DVertexGetU(vert) ((vert)->u) -#define RwIm2DVertexGetV(vert) ((vert)->v) - -/* Modify the luminance stuff */ -#define RwIm2DVertexSetRealRGBA(vert, red, green, blue, alpha) \ - ((vert)->emissiveColor = \ - (((RwFastRealToUInt32(alpha)) << 24) | \ - ((RwFastRealToUInt32(red)) << 16) | \ - ((RwFastRealToUInt32(green)) << 8) | \ - ((RwFastRealToUInt32(blue))))) - -#define RwIm2DVertexSetIntRGBA(vert, red, green, blue, alpha) \ - ((vert)->emissiveColor = \ - ((((RwUInt32)(alpha)) << 24) | \ - (((RwUInt32)(red)) << 16) | \ - (((RwUInt32)(green)) << 8) | \ - (((RwUInt32)(blue))))) - -#define RwIm2DVertexGetRed(vert) \ - (((vert)->emissiveColor >> 16) & 0xFF) - -#define RwIm2DVertexGetGreen(vert) \ - (((vert)->emissiveColor >> 8) & 0xFF) - -#define RwIm2DVertexGetBlue(vert) \ - ((vert)->emissiveColor & 0xFF) - -#define RwIm2DVertexGetAlpha(vert) \ - (((vert)->emissiveColor >> 24) & 0xFF) - -#define RwIm2DVertexCopyRGBA(dst, src) \ - ((dst)->emissiveColor = (src)->emissiveColor) - -/* Clipper stuff */ - -#define RwIm2DVertexClipRGBA(o, i, n, f) \ -MACRO_START \ -{ \ - const RwInt32 _factor = \ - (RwFastRealToUInt32(i * (RwReal)(255))) & 255; \ - \ - (o)->emissiveColor = \ - (((((RwIm2DVertexGetAlpha(f) - RwIm2DVertexGetAlpha(n)) * \ - _factor) >> 8) + RwIm2DVertexGetAlpha(n)) << 24) | \ - (((((RwIm2DVertexGetRed(f) - RwIm2DVertexGetRed(n)) * \ - _factor) >> 8) + RwIm2DVertexGetRed(n)) << 16) | \ - (((((RwIm2DVertexGetGreen(f) - RwIm2DVertexGetGreen(n)) * \ - _factor) >> 8) + RwIm2DVertexGetGreen(n)) << 8) | \ - (((((RwIm2DVertexGetBlue(f) - RwIm2DVertexGetBlue(n)) * \ - _factor) >> 8) + RwIm2DVertexGetBlue(n))); \ -} \ -MACRO_STOP - -/**************************************************************************** - Global Types - */ - -/* We use RwD3D8Vertex to drive the hardware in 2D mode */ - -/* - * D3D8 vertex structure definition for 2D geometry - */ -#if !defined(RWADOXYGENEXTERNAL) -typedef struct RwD3D8Vertex RwD3D8Vertex; -/** - * \ingroup rwcoredriverd3d8 - * \struct RwD3D8Vertex - * D3D8 vertex structure definition for 2D geometry - */ -struct RwD3D8Vertex -{ - RwReal x; /**< Screen X */ - RwReal y; /**< Screen Y */ - RwReal z; /**< Screen Z */ - RwReal rhw; /**< Reciprocal of homogeneous W */ - - RwUInt32 emissiveColor; /**< Vertex color */ - - RwReal u; /**< Texture coordinate U */ - RwReal v; /**< Texture coordinate V */ -}; -#endif /* !defined(RWADOXYGENEXTERNAL) */ - -/* Define types used */ - -#if !defined(RWADOXYGENEXTERNAL) -/** - * \ingroup rwcoredriverd3d8 - * \ref RwIm2DVertex - * Typedef for a RenderWare Graphics Immediate Mode 2D Vertex - */ -typedef RwD3D8Vertex RwIm2DVertex; -#endif /* !defined(RWADOXYGENEXTERNAL) */ - -#if !defined(RWADOXYGENEXTERNAL) -/** - * \ingroup rwcoredriverd3d8 - * \ref RxVertexIndex - * - * Typedef for a RenderWare Graphics PowerPipe Immediate - * Mode Vertex - */ -typedef RwUInt16 RxVertexIndex; -#endif /* !defined(RWADOXYGENEXTERNAL) */ - -#if !defined(RWADOXYGENEXTERNAL) - -/** - * \ingroup rwcoredriverd3d8 - * \ref RwImVertexIndex - * Typedef for a RenderWare Graphics Immediate Mode Vertex. - */ -typedef RxVertexIndex RwImVertexIndex; -#endif /* !defined(RWADOXYGENEXTERNAL) */ - -#if !defined(RWADOXYGENEXTERNAL) - -/** - * \ingroup rwcoredriverd3d8 - * \struct RwD3D8Metrics - * Structure containing metrics counters - */ -typedef struct -{ - RwUInt32 numRenderStateChanges; /**< Number of Render States changed */ - 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 */ - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/d3d8/pip2model.h ---*/ - - - - - -/**************************************************************************** - Global Defines - */ - -#define RXHEAPPLATFORMDEFAULTSIZE (1 << 12) /* 4k */ - -/**************************************************************************** - Global Types - */ - -/* We use D3D8 formats for the instanced versions, to allow hardware T&L */ - -/* - * Typedef for an RxObjSpace3DVertex. - */ -typedef struct RxObjSpace3DVertex RxObjSpace3DVertex; - -/** - * \ingroup cored3d8 - * \struct RxObjSpace3DVertex - * Structure representing object space vertex. - */ -struct RxObjSpace3DVertex -{ - RwV3d objVertex; /**< position */ - RwV3d objNormal; /**< normal */ - RwUInt32 color; /**< emissive color*/ - RwReal u; /**< u */ - RwReal v; /**< v */ -}; - -/* This vertex is non truncatable */ -#define RxObjSpace3DVertexNoUVsNoNormalsSize (sizeof(RxObjSpace3DVertex)) -#define RxObjSpace3DVertexNoUVsSize (sizeof(RxObjSpace3DVertex)) -#define RxObjSpace3DVertexFullSize (sizeof(RxObjSpace3DVertex)) - -/** - * \ingroup cored3d8 - * \ref RxObjSpace3DLitVertex - * Typedef for an RxObjSpace3DLitVertex. - */ -typedef RxObjSpace3DVertex RxObjSpace3DLitVertex; - -/** - * \ingroup cored3d8 - * \ref RwIm3DVertex - * Typedef for an RwIm3DVertex. - */ -typedef RxObjSpace3DLitVertex RwIm3DVertex; - -/* LEGACY-SUPPORT macro */ -/** - * \ingroup cored3d8 - * \ref RxScrSpace2DVertex - * Typedef for an RxScrSpace2DVertex structure - */ -typedef RwIm2DVertex RxScrSpace2DVertex; - -/**************************************************************************** - Object-space 3D unlit vertex macros - */ - -/* Vertex positions */ -#define RxObjSpace3DVertexGetPos(_vert, _pos) \ - (*(_pos) = (_vert)->objVertex) -#define RxObjSpace3DVertexSetPos(_vert, _pos) \ - ((_vert)->objVertex = *(_pos)) - -/* Pre-lighting colours */ -#define RxObjSpace3DVertexGetPreLitColor(_vert, _col) \ -MACRO_START \ -{ \ - (_col)->alpha = (RwUInt8)((_vert)->color >> 24) & 0xFF; \ - (_col)->red = (RwUInt8)((_vert)->color >> 16) & 0xFF; \ - (_col)->green = (RwUInt8)((_vert)->color >> 8) & 0xFF; \ - (_col)->blue = (RwUInt8)((_vert)->color ) & 0xFF; \ -} \ -MACRO_STOP - -#define RxObjSpace3DVertexSetPreLitColor(_vert, _col) \ - ((_vert)->color = (((RwUInt32)(_col)->alpha) << 24) | \ - (((RwUInt32)(_col)->red) << 16) | \ - (((RwUInt32)(_col)->green) << 8) | \ - (((RwUInt32)(_col)->blue) )) - -/* This uses the same slot as color (they are mutually exclusive) */ -#define RxObjSpace3DVertexGetColor RxObjSpace3DVertexGetPreLitColor - -/* Normals */ -#define RxObjSpace3DVertexGetNormal(_vert, _normal) \ - (*(_normal) = (_vert)->objNormal) -#define RxObjSpace3DVertexSetNormal(_vert, _normal) \ - ((_vert)->objNormal = *(_normal)) - -/* Us and Vs */ -#define RxObjSpace3DVertexGetU(_vert) \ - ((_vert)->u) -#define RxObjSpace3DVertexGetV(_vert) \ - ((_vert)->v) -#define RxObjSpace3DVertexSetU(_vert, _imu) \ - ((_vert)->u = (_imu)) -#define RxObjSpace3DVertexSetV(_vert, _imv) \ - ((_vert)->v = (_imv)) - -/**************************************************************************** - Object-space 3D lit vertex macros - */ - -/* Vertex positions */ -#define RxObjSpace3DLitVertexGetPos(_vert, _pos) \ - (*(_pos) = (_vert)->objVertex) -#define RxObjSpace3DLitVertexSetPos(_vert, _pos) \ - ((_vert)->objVertex = *(_pos)) - -/* Vertex colours */ -#define RxObjSpace3DLitVertexGetColor(_vert, _col) \ -MACRO_START \ -{ \ - (_col)->red = ((_vert)->color >> 16) & 0xFF; \ - (_col)->green = ((_vert)->color >> 8) & 0xFF; \ - (_col)->blue = ((_vert)->color ) & 0xFF; \ - (_col)->alpha = ((_vert)->color >> 24) & 0xFF; \ -} \ -MACRO_STOP -#define RxObjSpace3DLitVertexSetColor(_vert, _col) \ - ((_vert)->color = (((RwUInt32)(_col)->alpha) << 24) | \ - (((RwUInt32)(_col)->red) << 16) | \ - (((RwUInt32)(_col)->green) << 8) | \ - (((RwUInt32)(_col)->blue) )) - -/* Us and Vs */ -#define RxObjSpace3DLitVertexGetU(_vert) \ - ((_vert)->u) -#define RxObjSpace3DLitVertexGetV(_vert) \ - ((_vert)->v) -#define RxObjSpace3DLitVertexSetU(_vert, _imu) \ - ((_vert)->u = (_imu)) -#define RxObjSpace3DLitVertexSetV(_vert, _imv) \ - ((_vert)->v = (_imv)) - -/* LEGACY-SUPPORT for old objvert names - NB does NOT guarantee the - * app will work, because the old IM3DVERTEX macros are NOT correctly - * abstracted - 'Get' will return pointers to RwV3ds inside the - * ObjVert, but you can't assume there are any RwV3ds inside an - * opaque vertex type */ - -#define RwIm3DVertexSetU RxObjSpace3DLitVertexSetU -#define RwIm3DVertexSetV RxObjSpace3DLitVertexSetV -#define RwIm3DVertexGetNext(_vert) ((_vert) + 1) - -#define RwIm2DCameraVertexSetU(_devvert, _camvert, _u, _recipz) \ -MACRO_START \ -{ \ - RwReal _uTmp = _u; \ - _camvert->u = _uTmp; \ - RwIm2DVertexSetU(_devvert, _uTmp, _recipz); \ -} \ -MACRO_STOP -#define RwIm2DCameraVertexSetV(_devvert, _camvert, _v, _recipz) \ -MACRO_START \ -{ \ - RwReal _vTmp = _v; \ - _camvert->v = _vTmp; \ - RwIm2DVertexSetV(_devvert, _vTmp, _recipz); \ -} \ -MACRO_STOP - -#define RwIm3DVertexSetPos(_vert, _imx, _imy, _imz) \ -MACRO_START \ -{ \ - (_vert)->objVertex.x = _imx; \ - (_vert)->objVertex.y = _imy; \ - (_vert)->objVertex.z = _imz; \ -} \ -MACRO_STOP - -#define RwIm3DVertexSetNormal(vert, imx, imy, imz) \ -MACRO_START \ -{ \ - RwV3d packed; \ - packed.x = imx; \ - packed.y = imy; \ - packed.z = imz; \ - RxObjSpace3DVertexSetNormal(vert, &packed); \ -} \ -MACRO_STOP - -#define RwIm3DVertexSetRGBA(_vert, _r, _g, _b, _a) \ -MACRO_START \ -{ \ - ((_vert)->color = ((_a) << 24) | \ - ((_r) << 16) | \ - ((_g) << 8) | \ - ((_b))); \ -} \ -MACRO_STOP - -#define RwIm3DVertexGetPos(_vert) (&((_vert)->objVertex)) -#define RwIm3DVertexGetNormal(vert) (&((vert)->objNormal)) - -#define RwIm3DVertexCopyRGBA(_dst, _src) (((_dst)->color) = ((_src)->color)) - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/p2renderstate.h ---*/ - -/** - * \ingroup rwcoregeneric - * RxRenderStateFlag - * Flags used in the \ref RxRenderStateVector structure */ -enum RxRenderStateFlag -{ - rxRENDERSTATEFLAG_TEXTUREPERSPECTIVE = 0x00000001, /**stride = (_stride)), (_image)) - -#define RwImageSetPixelsMacro(_image, _pixels) \ - (((_image)->cpPixels = (_pixels)), (_image)) - -#define RwImageSetPaletteMacro(_image, _palette) \ - (((_image)->palette = (_palette)), (_image)) - -#define RwImageGetWidthMacro(_image) \ - ((_image)->width) - -#define RwImageGetHeightMacro(_image) \ - ((_image)->height) - -#define RwImageGetDepthMacro(_image) \ - ((_image)->depth) - -#define RwImageGetStrideMacro(_image) \ - ((_image)->stride) - -#define RwImageGetPixelsMacro(_image) \ - ((_image)->cpPixels) - -#define RwImageGetPaletteMacro(_image) \ - ((_image)->palette) - - -#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -#define RwImageSetStride(_image, _stride) \ - RwImageSetStrideMacro(_image, _stride) - -#define RwImageSetPixels(_image, _pixels) \ - RwImageSetPixelsMacro(_image, _pixels) - -#define RwImageSetPalette(_image, _palette) \ - RwImageSetPaletteMacro(_image, _palette) - -#define RwImageGetWidth(_image) \ - RwImageGetWidthMacro(_image) - -#define RwImageGetHeight(_image) \ - RwImageGetHeightMacro(_image) - -#define RwImageGetDepth(_image) \ - RwImageGetDepthMacro(_image) - -#define RwImageGetStride(_image) \ - RwImageGetStrideMacro(_image) - -#define RwImageGetPixels(_image) \ - RwImageGetPixelsMacro(_image) - -#define RwImageGetPalette(_image) \ - RwImageGetPaletteMacro(_image) - -#endif /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -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); - - /* Allocating */ -extern RwImage *RwImageAllocatePixels(RwImage * image); -extern RwImage *RwImageFreePixels(RwImage * image); - - /* Converting images */ -extern RwImage *RwImageCopy(RwImage * destImage, - const RwImage * sourceImage); - - /* Resizing images */ -extern RwImage *RwImageResize(RwImage * image, RwInt32 width, - RwInt32 height); - - /* Producing masks ! */ -extern RwImage *RwImageApplyMask(RwImage * image, - const RwImage * mask); -extern RwImage *RwImageMakeMask(RwImage * image); - - /* Helper functions */ -extern RwImage *RwImageReadMaskedImage(const RwChar * imageName, - const RwChar * maskname); -extern RwImage *RwImageRead(const RwChar * imageName); -extern RwImage *RwImageWrite(RwImage * image, - const RwChar * imageName); - - /* 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)) -extern RwImage *RwImageSetStride(RwImage * image, RwInt32 stride); -extern RwImage *RwImageSetPixels(RwImage * image, RwUInt8 * pixels); -extern RwImage *RwImageSetPalette(RwImage * image, RwRGBA * palette); - - /* Getting */ -extern RwInt32 RwImageGetWidth(const RwImage * image); -extern RwInt32 RwImageGetHeight(const RwImage * image); -extern RwInt32 RwImageGetDepth(const RwImage * image); -extern RwInt32 RwImageGetStride(const RwImage * image); -extern RwUInt8 *RwImageGetPixels(const RwImage * image); -extern RwRGBA *RwImageGetPalette(const RwImage * image); -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - - /* Get device dependent pixel value */ -extern RwUInt32 RwRGBAToPixel(RwRGBA * rgbIn, RwInt32 rasterFormat); -extern RwRGBA *RwRGBASetFromPixel(RwRGBA * rgbOut, - RwUInt32 pixelValue, - RwInt32 rasterFormat); - - /* Gamma correction */ -extern RwBool RwImageSetGamma(RwReal gammaValue); -extern RwReal RwImageGetGamma(void); -extern RwImage *RwImageGammaCorrect(RwImage * image); - - /* Adding and removing gamma correction */ -extern RwRGBA *RwRGBAGammaCorrect(RwRGBA * rgb); - - /* Attaching toolkits */ -extern RwInt32 RwImageRegisterPlugin(RwInt32 size, RwUInt32 pluginID, - RwPluginObjectConstructor - constructCB, - RwPluginObjectDestructor - destructCB, - RwPluginObjectCopy copyCB); -extern RwInt32 RwImageGetPluginOffset(RwUInt32 pluginID); -extern RwBool RwImageValidatePlugins(const RwImage * image); - -extern RwBool RwImageRegisterImageFormat(const RwChar * extension, - RwImageCallBackRead - imageRead, - RwImageCallBackWrite - imageWrite); - - /* Finding an extension for an image to load */ -extern const RwChar *RwImageFindFileType(const RwChar * imageName); - - /* Reading and writing images to streams */ -extern RwInt32 RwImageStreamGetSize(const RwImage * image); -extern RwImage *RwImageStreamRead(RwStream * stream); -extern const RwImage *RwImageStreamWrite(const RwImage * image, - RwStream * stream); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/*--- Automatically derived from: C:/daily/rwsdk/src/batextur.h ---*/ - -/**************************************************************************** - Defines - */ - -/* Type ID */ -#define rwTEXDICTIONARY 6 - -/* Mipmap Name generation - maximum number of RwChar characters which can - * be appended to the root name. - */ -#define rwTEXTUREMIPMAPNAMECHARS 16 - -/* We define texture names to be a maximum of 16 ISO chars */ -#define rwTEXTUREBASENAMELENGTH 32 - -#define rwTEXTUREFILTERMODEMASK 0x000000FF -#define rwTEXTUREADDRESSINGUMASK 0x00000F00 -#define rwTEXTUREADDRESSINGVMASK 0x0000F000 -#define rwTEXTUREADDRESSINGMASK (rwTEXTUREADDRESSINGUMASK | \ - rwTEXTUREADDRESSINGVMASK) - -/**************************************************************************** - Global Types - */ - -/** - * \ingroup rwtexdict - * \struct RwTexDictionary - * is a texture dictionary containing textures. - * This should be considered an opaque type. - * Use the RwTexDictionary API functions to access. - */ -typedef struct RwTexDictionary RwTexDictionary; - -#if (!defined(DOXYGEN)) -struct RwTexDictionary -{ - RwObject object; /* Homogeneous type */ - RwLinkList texturesInDict; /* List of textures in dictionary */ - RwLLLink lInInstance; /* Link list of all dicts in system */ -}; -/* Information is entirely device dependent */ -#endif /* (!defined(DOXYGEN)) */ - - -/* Parent is the dictionary */ - -/** - * \ingroup rwtexture - * \struct RwTexture - * is a texture object. - * This should be considered an opaque type. - * Use the RwTexture API functions to access. - */ -typedef struct RwTexture RwTexture; - -#if (!defined(DOXYGEN)) -struct RwTexture -{ - RwRaster *raster; /** pointer to RwRaster with data */ - RwTexDictionary *dict; /* Dictionary this texture is in */ - RwLLLink lInDictionary; /* List of textures in this dictionary */ - - RwChar name[rwTEXTUREBASENAMELENGTH]; /* Name of the texture */ - RwChar mask[rwTEXTUREBASENAMELENGTH]; /* Name of the textures mask */ - - /* 31 [xxxxxxxx xxxxxxxx vvvvuuuu ffffffff] 0 */ - RwUInt32 filterAddressing; /* Filtering & addressing mode flags */ - - RwInt32 refCount; /* Reference count, surprisingly enough */ -}; -#endif /* (!defined(DOXYGEN)) */ - -/** - * \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 - * texture to indicate success. - * - * \param name Pointer to a string containing the name of - * the texture to read. - * - * \param maskName Pointer to a string containing the name - * of the mask to read and apply to the texture. - * - * \return Pointer to the texture - * - * \see RwTextureSetReadCallBack - * \see RwTextureGetReadCallBack - */ -typedef RwTexture *(*RwTextureCallBackRead)(const RwChar *name, - const RwChar *maskName); - -/** - * \ingroup rwtexture - * \ref RwTextureCallBack - * represents the function called from \ref RwTexDictionaryForAllTextures - * for all textures in a given texture dictionary. This function should - * return the current texture to indicate success. The callback may return - * NULL to terminate further callbacks on the texture dictionary. - * - * \param texture Pointer to the current texture. - * - * \param pData User-defined data pointer. - * - * \return Pointer to the current texture - * - * \see RwTexDictionaryForAllTextures - */ -typedef RwTexture *(*RwTextureCallBack)(RwTexture *texture, void *pData); - - -/** - * \ingroup rwtexdict - * \ref RwTexDictionaryCallBack - * represents the function called from \ref RwTexDictionaryForAllTexDictionaries - * for all texture dictionaries that currently exist. This function should - * return the current texture dictionary to indicate success. The callback may - * return NULL to terminate further callbacks on the texture dictionary. It may - * safely destroy the current texture dictionary without adversely affecting - * the iteration process. - * - * \param dict Pointer to the current texture dictionary. - * - * \param pData User-defined data pointer. - * - * \return Pointer to the current texture dictionary - * - * \see RwTexDictionaryForAllTexdictionaries - */ -typedef RwTexDictionary *(*RwTexDictionaryCallBack)(RwTexDictionary *dict, void *data); - - -/** - * \ingroup rwtexture - * \ref RwTextureCallBackMipmapGeneration - * is the callback function supplied to \ref RwTextureSetMipmapGenerationCallBack - * and returned from \ref RwTextureGetMipmapGenerationCallBack. - * - * The supplied function will be passed a pointer to a raster and an image. - * The raster is the target for the generated mipmap levels and the image - * provides the base for their generation. - * - * \param raster Pointer to raster, the target for generated mipmap levels - * \param image Pointer to image, used to generate mipmap levels. - * - * \return - * Returns a pointer to the raster if successful or NULL if an error occurred. - * - * \see RwTextureSetMipmapGenerationCallBack - * \see RwTextureGetMipmapGenerationCallBack - * \see RwTextureSetAutoMipmapping - * \see RwTextureGetAutoMipmapping - */ -typedef RwRaster *(*RwTextureCallBackMipmapGeneration)(RwRaster * raster, - RwImage * image); - -/** - * \ingroup rwtexture - * \ref RwTextureCallBackMipmapName - * is the callback function supplied to \ref RwTextureSetMipmapNameCallBack and - * returned from \ref RwTextureGetMipmapNameCallBack. - * - * The supplied function will be passed a pointer to a root name, a maskName, a mipmap - * level and a format. The function returns TRUE if successful and the root name will have been - * modified to equal the mipmap name. - * - * \param name Pointer to a string containing the root name of the texture. The - * mipmap level name is put here. - * \param maskName Pointer to a string containing the root mask name of the texture or - * NULL if no mask name is required. - * \param mipLevel A value equal to the mipmap level for which the name is required. - * \param format A value describing the mipmapping mode. A combination of the bit - * flags rwRASTERFORMATMIPMAP and rwRASTERFORMATAUTOMIPMAP. - * - * \return - * Returns TRUE if the name is generated successfully or FALSE if an error occurred. - * - * \see RwTextureGenerateMipmapName - * \see RwTextureSetMipmapNameCallBack - * \see RwTextureGetMipmapNameCallBack - * \see RwTextureSetAutoMipmapping - * \see RwTextureGetAutoMipmapping - */ -typedef RwBool (*RwTextureCallBackMipmapName)(RwChar *name, - RwChar *maskName, - RwUInt8 mipLevel, - RwInt32 format); - -/**************************************************************************** - raster) - -#define RwTextureAddRefMacro(_tex) \ - (((_tex)->refCount++), (_tex)) - -#define RwTextureAddRefVoidMacro(_tex) \ -MACRO_START \ -{ \ - (_tex)->refCount++; \ -} \ -MACRO_STOP - -#define RwTextureGetNameMacro(_tex) \ - ((_tex)->name) - -#define RwTextureGetMaskNameMacro(_tex) \ - ((_tex)->mask) - -#define RwTextureGetDictionaryMacro(_tex) \ - ((_tex)->dict) - -#define RwTextureSetFilterModeMacro(_tex, _filtering) \ - (((_tex)->filterAddressing = \ - ((_tex)->filterAddressing & ~rwTEXTUREFILTERMODEMASK) | \ - (((RwUInt32)(_filtering)) & rwTEXTUREFILTERMODEMASK)), \ - (_tex)) - -#define RwTextureGetFilterModeMacro(_tex) \ - ((RwTextureFilterMode)((_tex)->filterAddressing & \ - rwTEXTUREFILTERMODEMASK)) - -#define RwTextureSetAddressingMacro(_tex, _addressing) \ - (((_tex)->filterAddressing = \ - ((_tex)->filterAddressing & ~rwTEXTUREADDRESSINGMASK) | \ - (((((RwUInt32)(_addressing)) << 8) & rwTEXTUREADDRESSINGUMASK) | \ - ((((RwUInt32)(_addressing)) << 12) & rwTEXTUREADDRESSINGVMASK))), \ - (_tex)) - -#define RwTextureSetAddressingUMacro(_tex, _addressing) \ - (((_tex)->filterAddressing = \ - ((_tex)->filterAddressing & ~rwTEXTUREADDRESSINGUMASK) | \ - (((RwUInt32)(_addressing) << 8) & rwTEXTUREADDRESSINGUMASK)), \ - (_tex)) - -#define RwTextureSetAddressingVMacro(_tex, _addressing) \ - (((_tex)->filterAddressing = \ - ((_tex)->filterAddressing & ~rwTEXTUREADDRESSINGVMASK) | \ - (((RwUInt32)(_addressing) << 12) & rwTEXTUREADDRESSINGVMASK)), \ - (_tex)) - -#define RwTextureGetAddressingMacro(_tex) \ - (((((_tex)->filterAddressing & rwTEXTUREADDRESSINGUMASK) >> 8) == \ - (((_tex)->filterAddressing & rwTEXTUREADDRESSINGVMASK) >> 12)) ? \ - ((RwTextureAddressMode)(((_tex)->filterAddressing & \ - rwTEXTUREADDRESSINGVMASK) >> 12)) : \ - rwTEXTUREADDRESSNATEXTUREADDRESS) - -#define RwTextureGetAddressingUMacro(_tex) \ - ((RwTextureAddressMode)(((_tex)->filterAddressing & \ - rwTEXTUREADDRESSINGUMASK) >> 8)) - -#define RwTextureGetAddressingVMacro(_tex) \ - ((RwTextureAddressMode)(((_tex)->filterAddressing & \ - rwTEXTUREADDRESSINGVMASK) >> 12)) - - -#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -#define RwTextureGetRaster(_tex) \ - RwTextureGetRasterMacro(_tex) - -#define RwTextureAddRef(_tex) \ - RwTextureAddRefMacro(_tex) - -#define RwTextureGetName(_tex) \ - RwTextureGetNameMacro(_tex) - -#define RwTextureGetMaskName(_tex) \ - RwTextureGetMaskNameMacro(_tex) - -#define RwTextureGetDictionary(_tex) \ - RwTextureGetDictionaryMacro(_tex) - -#define RwTextureSetFilterMode(_tex, _filtering) \ - RwTextureSetFilterModeMacro(_tex, _filtering) - -#define RwTextureGetFilterMode(_tex) \ - RwTextureGetFilterModeMacro(_tex) - -#define RwTextureSetAddressing(_tex, _addressing) \ - RwTextureSetAddressingMacro(_tex, _addressing) - -#define RwTextureSetAddressingU(_tex, _addressing) \ - RwTextureSetAddressingUMacro(_tex, _addressing) - -#define RwTextureSetAddressingV(_tex, _addressing) \ - RwTextureSetAddressingVMacro(_tex, _addressing) - -#define RwTextureGetAddressing(_tex) \ - RwTextureGetAddressingMacro(_tex) - -#define RwTextureGetAddressingU(_tex) \ - RwTextureGetAddressingUMacro(_tex) - -#define RwTextureGetAddressingV(_tex) \ - RwTextureGetAddressingVMacro(_tex) - -#endif /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - - - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - /* Reading mip maps */ - - /* Setting mip mapping states */ -extern RwBool RwTextureSetMipmapping(RwBool enable); -extern RwBool RwTextureGetMipmapping(void); -extern RwBool RwTextureSetAutoMipmapping(RwBool enable); -extern RwBool RwTextureGetAutoMipmapping(void); - - /* Setting and getting the mipmap generation function */ -extern RwBool -RwTextureSetMipmapGenerationCallBack(RwTextureCallBackMipmapGeneration - callback); -extern RwTextureCallBackMipmapGeneration -RwTextureGetMipmapGenerationCallBack(void); - - /* Setting and getting the mipmap file name generation function */ -extern RwBool -RwTextureSetMipmapNameCallBack(RwTextureCallBackMipmapName callback); -extern RwTextureCallBackMipmapName RwTextureGetMipmapNameCallBack(void); - - /* Generating mipmaps for a raster */ -extern RwBool RwTextureGenerateMipmapName(RwChar * name, - RwChar * maskName, - RwUInt8 mipLevel, - RwInt32 format); -extern RwBool RwTextureRasterGenerateMipmaps(RwRaster * raster, - RwImage * image); - - /* LEGACY-SUPPORT mip mapping */ -extern RwBool _rwTextureSetAutoMipMapState(RwBool enable); -extern RwBool _rwTextureGetAutoMipMapState(void); - - /* Setting and getting the callback function */ -extern RwTextureCallBackRead RwTextureGetReadCallBack(void); -extern RwBool RwTextureSetReadCallBack(RwTextureCallBackRead - fpCallBack); - - /* Texture and mask names */ -extern RwTexture *RwTextureSetName(RwTexture * texture, - const RwChar * name); -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); - - /* Setting and getting texture map rasters */ -extern RwTexture *RwTextureSetRaster(RwTexture * texture, - RwRaster * raster); - - /* Dictionary access */ -extern RwTexture *RwTexDictionaryAddTexture(RwTexDictionary * dict, - RwTexture * texture); -extern RwTexture *RwTexDictionaryRemoveTexture(RwTexture * texture); -extern RwTexture *RwTexDictionaryFindNamedTexture(RwTexDictionary * - dict, - const RwChar * name); - - /* Reading a texture */ -extern RwTexture *RwTextureRead(const RwChar * name, - const RwChar * maskName); - - /* Setting the current dictionary */ -extern RwTexDictionary *RwTexDictionaryGetCurrent(void); -extern RwTexDictionary *RwTexDictionarySetCurrent(RwTexDictionary * dict); - - /* Enumerating textures */ -extern const RwTexDictionary *RwTexDictionaryForAllTextures(const - RwTexDictionary - * dict, - RwTextureCallBack - fpCallBack, - void *pData); - - /* Enumerating the texture dictionaries currently in the system */ -extern RwBool RwTexDictionaryForAllTexDictionaries( - RwTexDictionaryCallBack fpCallBack, void *pData); - - - /* Attaching toolkits */ -extern RwInt32 RwTextureRegisterPlugin(RwInt32 size, - RwUInt32 pluginID, - RwPluginObjectConstructor - constructCB, - RwPluginObjectDestructor - destructCB, - RwPluginObjectCopy copyCB); -extern RwInt32 RwTexDictionaryRegisterPlugin(RwInt32 size, - RwUInt32 pluginID, - RwPluginObjectConstructor - constructCB, - RwPluginObjectDestructor - destructCB, - RwPluginObjectCopy - copyCB); -extern RwInt32 RwTextureGetPluginOffset(RwUInt32 pluginID); -extern RwInt32 RwTexDictionaryGetPluginOffset(RwUInt32 pluginID); -extern RwBool RwTextureValidatePlugins(const RwTexture * texture); -extern RwBool RwTexDictionaryValidatePlugins(const RwTexDictionary * - dict); - -#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) -/* Textures */ -extern RwRaster *RwTextureGetRaster(const RwTexture *texture); -extern RwTexture *RwTextureAddRef(RwTexture *texture); - -/* Texture and mask names */ -extern RwChar *RwTextureGetName(RwTexture *texture); -extern RwChar *RwTextureGetMaskName(RwTexture *texture); - -/* Get owner dictionary */ -extern RwTexDictionary *RwTextureGetDictionary(RwTexture *texture); - -/* Filtering */ -extern RwTexture *RwTextureSetFilterMode(RwTexture *texture, - RwTextureFilterMode filtering); - -extern RwTextureFilterMode RwTextureGetFilterMode(const RwTexture *texture); - -/* Addressing */ -extern RwTexture *RwTextureSetAddressing(RwTexture *texture, - RwTextureAddressMode addressing); -extern RwTexture *RwTextureSetAddressingU(RwTexture *texture, - RwTextureAddressMode addressing); -extern RwTexture *RwTextureSetAddressingV(RwTexture *texture, - RwTextureAddressMode addressing); - -extern RwTextureAddressMode RwTextureGetAddressing(const RwTexture *texture); -extern RwTextureAddressMode RwTextureGetAddressingU(const RwTexture *texture); -extern RwTextureAddressMode RwTextureGetAddressingV(const RwTexture *texture); - -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#define RwTextureSetAutoMipMapState(_enable) \ - _rwTextureSetAutoMipMapState(_enable) - -#define RwTextureGetAutoMipMapState() \ - _rwTextureGetAutoMipMapState() - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/p2stdcls.h ---*/ - -/* - * Current: - * - * wait on Simon for instructions to do cluster renaming thing, - * or go thru and change all cluster type names and cluster - * names (add CSL?) - * - */ - -/* CamVerts.csl */ - -/* clip flags */ - -/** - * \ingroup rwcoregeneric - * \ref RwClipFlag - * Flags specifying the clipping status of a vertex - */ -enum RwClipFlag -{ - rwXLOCLIP = 0x01, /**col.red = (r)); \ - ((camvert)->col.green = (g)); \ - ((camvert)->col.blue = (b)); \ - ((camvert)->col.alpha = (a)); \ -} \ -MACRO_STOP - -#define RxCamSpace3DVertexAddRGBA(camvert, r, g, b, a) \ -MACRO_START \ -{ \ - ((camvert)->col.red += (r)); \ - ((camvert)->col.green += (g)); \ - ((camvert)->col.blue += (b)); \ - ((camvert)->col.alpha += (a)); \ -} \ -MACRO_STOP - -/* LEGACY-SUPPORT macros */ -#define RXCAMSPACE3DVERTEXSetRGBA(camvert, r, g, b, a) \ - RxCamSpace3DVertexSetRGBA(camvert, r, g, b, a) -#define RXCAMSPACE3DVERTEXAddRGBA(camvert, r, g, b, a) \ - RxCamSpace3DVertexAddRGBA(camvert, r, g, b, a) - -/* MeshState.csl */ - - -/** - * \ingroup rwcoregeneric - * \ref RxGeometryFlag - * Flags describing geometry properties - */ -enum RxGeometryFlag -{ - rxGEOMETRY_TRISTRIP = 0x01, /**=1000) -# pragma pack(push, 1) -# endif /* (_MSC_VER>=1000) */ -#endif /* (defined(_MSC_VER)) */ - -typedef struct RxVStep RxVStep; -/** - * \ingroup rwcoregeneric - * \struct RxVStep - * Structure used by the RxClVStep cluster. - * To use the step values in the RxClVStep cluster, start at the beginning - * of the RxVStep and vertex arrays and proceed as follows: (a) Process one - * vertex, (b) Skip 'step' vertices, (c) Increment the cursor of the RxClVStep - * cluster. Repeat (a)-(c) until the entire vertex array has been processed. - * If the RxVStep array contains valid data, you should not have to bounds-check - * its cursor. - */ -struct RxVStep -{ - RwUInt8 step; /**< \ref RwUInt8 The number of vertices after the current one - * which can be skipped in lighting and other calculations because, - * for example, they belong only to back-facing triangles */ -}; - -#if (defined(_MSC_VER)) -# if (_MSC_VER>=1000) -# pragma pack(pop) -# endif /* (_MSC_VER>=1000) */ -#endif /* (defined(_MSC_VER)) */ - -/* CamNorms.csl */ -/** - * \ingroup rwcoregeneric - * \ref RxCamNorm - * typedef for \ref RwV3d used by the RxClVStep cluster */ -typedef RwV3d RxCamNorm; - - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Uses the RxObjSpace3DVertex type (see pipmodel.h) */ -extern RxClusterDefinition RxClObjSpace3DVertices; -/* Uses the RxCamSpace3DVertex type */ -extern RxClusterDefinition RxClCamSpace3DVertices; -/* Uses the RxScrSpace2DVertex type (see pipmodel.h) */ -extern RxClusterDefinition RxClScrSpace2DVertices; -/* Uses the RxInterp type */ -extern RxClusterDefinition RxClInterpolants; -/* Uses the RxMeshStateVector type */ -extern RxClusterDefinition RxClMeshState; -/* Uses the RxRenderStateVector type (p2renderstate.c/h) */ -extern RxClusterDefinition RxClRenderState; -/* Uses the RxVertexIndex type */ -extern RxClusterDefinition RxClIndices; -/* Uses the RxScatter type */ -extern RxClusterDefinition RxClScatter; -/* Uses the RxUV type */ -extern RxClusterDefinition RxClUVs; -/* Uses the RxVStep type */ -extern RxClusterDefinition RxClVSteps; -/* Uses the RwRGBAReal type */ -extern RxClusterDefinition RxClRGBAs; -/* Uses the RxCamNorm type */ -extern RxClusterDefinition RxClCamNorms; - -/* Uses the RxTriPlane type. - * NOTE: this is currently not used in any nodes that ship with the SDK */ -extern RxClusterDefinition RxClTriPlanes; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/baim3d.h ---*/ - -/** - * \ingroup rwim3d - * RwIm3DTransformFlags - * The bit-field type RwIm3DTransformFlags - * specifies options available for controlling execution of the 3D immediate - * mode pipeline (see API function \ref RwIm3DTransform):*/ -enum RwIm3DTransformFlags -{ - rwIM3D_VERTEXUV = 1, /**modelling) -#if (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) )) -#define RwFrameGetMatrix(_f) RwFrameGetMatrixMacro(_f) -#endif - - - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern void RwFrameSetFreeListCreateParams(RwInt32 blockSize, - RwInt32 numBlocksToPrealloc ); - -/* Finding what is attached to a frame */ -extern RwFrame * -RwFrameForAllObjects(RwFrame * frame, - RwObjectCallBack callBack, - void *data); - -/* Matrix operations */ -extern RwFrame * -RwFrameTranslate(RwFrame * frame, - const RwV3d * v, - RwOpCombineType combine); - -extern RwFrame * -RwFrameRotate(RwFrame * frame, - const RwV3d * axis, - RwReal angle, - RwOpCombineType combine); - -extern RwFrame * -RwFrameScale(RwFrame * frame, - const RwV3d * v, - RwOpCombineType combine); - -extern RwFrame * -RwFrameTransform(RwFrame * frame, - const RwMatrix * m, - RwOpCombineType combine); - -extern RwFrame * -RwFrameOrthoNormalize(RwFrame * frame); - -extern RwFrame * -RwFrameSetIdentity(RwFrame * frame); - -/* Cloning */ -extern RwFrame * -RwFrameCloneHierarchy(RwFrame * root); - -/* Destruction */ -extern RwBool -RwFrameDestroyHierarchy(RwFrame * frame); - -/* Building a frame */ -extern RwFrame * -RwFrameForAllChildren(RwFrame * frame, - RwFrameCallBack callBack, - void *data); - -extern RwFrame * -RwFrameRemoveChild(RwFrame * child); - -extern RwFrame * -RwFrameAddChild(RwFrame * parent, - RwFrame * child); - -#if ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) -extern RwFrame * -RwFrameGetParent(const RwFrame * frame); -#endif - -/* Getting the root */ -extern RwFrame * -RwFrameGetRoot(const RwFrame * frame); - -/* Getting Matrices */ -extern RwMatrix * -RwFrameGetLTM(RwFrame * frame); - -#if ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) -extern RwMatrix * -RwFrameGetMatrix(RwFrame * frame); -#endif - -/* Elements */ -extern RwFrame * -RwFrameUpdateObjects(RwFrame * frame); - -/* Creating destroying frames */ -extern void -RwFrameSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); - -extern RwFrame * -RwFrameCreate(void); - -extern RwBool -RwFrameInit(RwFrame *frame); - -extern RwBool -RwFrameDeInit(RwFrame *frame); - -extern RwBool -RwFrameDestroy(RwFrame * frame); - -/* internal function used by Create and Init */ -extern void -_rwFrameInit(RwFrame *frame); - -/* internal function used by Destroy and DeInit */ -extern void -_rwFrameDeInit(RwFrame *frame); - -/* Finding a frames state */ -extern RwBool -RwFrameDirty(const RwFrame * frame); - -/* Find the amount of frames in a hierarchy */ -extern RwInt32 -RwFrameCount(RwFrame * frame); - -/* Plugins */ -extern RwBool -RwFrameSetStaticPluginsSize(RwInt32 size); - -extern RwInt32 -RwFrameRegisterPlugin(RwInt32 size, - RwUInt32 pluginID, - RwPluginObjectConstructor constructCB, - RwPluginObjectDestructor destructCB, - RwPluginObjectCopy copyCB); - -extern RwInt32 -RwFrameGetPluginOffset(RwUInt32 pluginID); - -extern RwBool -RwFrameValidatePlugins(const RwFrame * frame); - -/* Cloning */ -extern RwFrame * -_rwFrameCloneAndLinkClones(RwFrame * root); - -extern -RwFrame * -_rwFramePurgeClone(RwFrame *root); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* Compatibility macros */ - -#define rwFrameGetParent(frame) \ - _rwFrameGetParent(frame) - -#define rwFrameInit(frame) \ - _rwFrameInit(frame) - -#define rwFrameDeInit(frame) \ - _rwFrameDeInit(frame) - -#define rwFrameCloneAndLinkClones(root) \ - _rwFrameCloneAndLinkClones(root) - -#define rwFramePurgeClone(root) \ - _rwFramePurgeClone(root) - -#define rwFrameClose(instance, offset, size) \ - _rwFrameClose(instance, offset, size) - -#define rwFrameOpen(instance, offset, size) \ - _rwFrameOpen(instance, offset, size) - - -/*--- Automatically derived from: C:/daily/rwsdk/src/batypehf.h ---*/ - -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 - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Frames */ -extern void _rwObjectHasFrameSetFrame(void *object, RwFrame *frame); -extern void _rwObjectHasFrameReleaseFrame(void *object); - -/* ObjectHASFRAME METHODS */ -#define rwObjectHasFrameInitialize(o, type, subtype, syncFunc) \ -MACRO_START \ -{ \ - rwObjectInitialize(o, type, subtype); \ - ((RwObjectHasFrame *)o)->sync = syncFunc; \ -} \ -MACRO_STOP - -#define rwObjectHasFrameSync(o) \ - ((RwObjectHasFrame *)(o))->sync(o) - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* Compatibility macros */ - -#define rwObjectHasFrameSetFrame(object, frame) \ - _rwObjectHasFrameSetFrame(object, frame) -#define rwObjectHasFrameReleaseFrame(object) \ - _rwObjectHasFrameReleaseFrame(object) - - - -/*--- Automatically derived from: C:/daily/rwsdk/src/basync.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/src/babintex.h ---*/ -/**************************************************************************** - 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 -{ - rwNATEXTURESTREAMFLAG = 0x00, - rwTEXTURESTREAMFLAGSUSERMIPMAPS = 0x01, - rwTEXTURESTREAMFLAGSFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; -typedef enum RwTextureStreamFlags RwTextureStreamFlags; -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Texture binary format */ -extern RwInt32 -RwTextureRegisterPluginStream(RwUInt32 pluginID, - RwPluginDataChunkReadCallBack readCB, - RwPluginDataChunkWriteCallBack writeCB, - RwPluginDataChunkGetSizeCallBack getSizeCB); - -extern RwInt32 -RwTextureSetStreamAlwaysCallBack(RwUInt32 pluginID, - RwPluginDataChunkAlwaysCallBack alwaysCB); - -extern RwUInt32 -RwTextureStreamGetSize(const RwTexture *texture); - -extern RwTexture * -RwTextureStreamRead(RwStream *stream); - -extern const RwTexture * -RwTextureStreamWrite(const RwTexture *texture, - RwStream *stream); - -/* Texture dictionary binary format */ -extern RwInt32 -RwTexDictionaryRegisterPluginStream(RwUInt32 pluginID, - RwPluginDataChunkReadCallBack readCB, - RwPluginDataChunkWriteCallBack writeCB, - RwPluginDataChunkGetSizeCallBack getSizeCB); - -extern RwInt32 -RwTexDictionarySetStreamAlwaysCallBack(RwUInt32 pluginID, - RwPluginDataChunkAlwaysCallBack alwaysCB); - -extern RwUInt32 -RwTexDictionaryStreamGetSize(const RwTexDictionary *texDict); - -extern RwTexDictionary -*RwTexDictionaryStreamRead(RwStream *stream); - -extern const RwTexDictionary * -RwTexDictionaryStreamWrite(const RwTexDictionary *texDict, - RwStream *stream); - -extern RwTextureChunkInfo * -_rwTextureChunkInfoRead(RwStream *stream, - RwTextureChunkInfo *textureChunkInfo, - RwInt32 *bytesRead); - -/* Compatibility macro */ - -#define RwTextureChunkInfoRead(_stream, _textureChunkInfo, _bytesRead) \ - _rwTextureChunkInfoRead(_stream, _textureChunkInfo, _bytesRead) - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/babinfrm.h ---*/ -/**************************************************************************** - Global types - */ - -typedef struct rwFrameList rwFrameList; - -#if (!defined(DOXYGEN)) -struct rwFrameList -{ - RwFrame **frames; - RwInt32 numFrames; -}; -#endif /* (!defined(DOXYGEN)) */ - -/**************************************************************************** - Global Variables - */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Frame binary format */ - -extern RwInt32 -RwFrameRegisterPluginStream(RwUInt32 pluginID, - RwPluginDataChunkReadCallBack readCB, - RwPluginDataChunkWriteCallBack writeCB, - RwPluginDataChunkGetSizeCallBack getSizeCB); - -extern RwInt32 -RwFrameSetStreamAlwaysCallBack(RwUInt32 pluginID, - RwPluginDataChunkAlwaysCallBack alwaysCB); - - -extern rwFrameList * -_rwFrameListInitialize(rwFrameList *frameList, - RwFrame *frame); - -extern RwBool -_rwFrameListFindFrame(const rwFrameList *frameList, - const RwFrame *frame, - RwInt32 *npIndex); - -extern rwFrameList * -_rwFrameListDeinitialize(rwFrameList *frameList); - -extern RwUInt32 -_rwFrameListStreamGetSize(const rwFrameList *frameList); - -extern rwFrameList * -_rwFrameListStreamRead(RwStream *stream, - rwFrameList *fl); - -extern const rwFrameList * -_rwFrameListStreamWrite(const rwFrameList *frameList, - RwStream *stream); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* Comparibility macros */ - -#define rwFrameListInitialize(frameList,frame) \ - _rwFrameListInitialize(frameList,frame) - -#define rwFrameListFindFrame(frameList, frame, index) \ - _rwFrameListFindFrame(frameList, frame, index) - -#define rwFrameListDeinitialize(frameList) \ - _rwFrameListDeinitialize(frameList) - -#define rwFrameListStreamGetSize(frameList) \ - _rwFrameListStreamGetSize(frameList) - -#define rwFrameListStreamRead(stream, fl) \ - _rwFrameListStreamRead(stream, fl) - -#define rwFrameListStreamWrite(frameList, stream) \ - _rwFrameListStreamWrite(frameList, stream) - - -/*--- Automatically derived from: C:/daily/rwsdk/src/babbox.h ---*/ -/**************************************************************************** - Global types - */ - -typedef struct RwBBox RwBBox; -/** - * \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. - * Typically used to specify a world bounding-box when the world is created - * - * \param sup Supremum vertex (contains largest values) - * \param inf Infimum vertex (contains smallest values) - * - * \see RpWorldCreate - */ -struct RwBBox -{ - /* Must be in this order */ - RwV3d sup; /**< Supremum vertex. */ - RwV3d inf; /**< Infimum vertex. */ -}; - -#if (!defined(RwBBoxAssign)) -#define RwBBoxAssign(_target, _source) \ - ( *(_target) = *(_source) ) -#endif /* (!defined(RwBBoxAssign)) */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -extern RwBBox *RwBBoxCalculate(RwBBox *boundBox, - const RwV3d *verts, - RwInt32 numVerts); -extern RwBBox *RwBBoxInitialize(RwBBox *boundBox, - const RwV3d *vertex); -extern RwBBox *RwBBoxAddPoint(RwBBox *boundBox, - const RwV3d *vertex); -extern RwBool RwBBoxContainsPoint(const RwBBox *boundBox, - const RwV3d *vertex); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/bacamera.h ---*/ - -/**************************************************************************** - Defines - */ - -/* Type ID */ -#define rwCAMERA 4 - - - -/**************************************************************************** - viewOffset)) - -#define RwCameraSetRasterMacro(_camera, _raster) \ - (((_camera)->frameBuffer = (_raster)), (_camera)) - -#define RwCameraSetRasterVoidMacro(_camera, _raster) \ -MACRO_START \ -{ \ - (_camera)->frameBuffer = (_raster); \ -} \ -MACRO_STOP - -#define RwCameraGetRasterMacro(_camera) \ - ((_camera)->frameBuffer) - -#define RwCameraSetZRasterMacro(_camera, _raster) \ - (((_camera)->zBuffer = (_raster)), (_camera)) - -#define RwCameraSetZRasterVoidMacro(_camera, _raster) \ -MACRO_START \ -{ \ - (_camera)->zBuffer = (_raster); \ -} \ -MACRO_STOP - -#define RwCameraGetZRasterMacro(_camera) \ - ((_camera)->zBuffer) - -#define RwCameraGetNearClipPlaneMacro(_camera) \ - ((_camera)->nearPlane) - -#define RwCameraGetFarClipPlaneMacro(_camera) \ - ((_camera)->farPlane) - -#define RwCameraSetFogDistanceMacro(_camera, _distance) \ - (((_camera)->fogPlane = (_distance)), (_camera)) - -#define RwCameraGetFogDistanceMacro(_camera) \ - ((_camera)->fogPlane) - -#define RwCameraGetCurrentCameraMacro() \ - ((RwCamera *)RWSRCGLOBAL(curCamera)) - -#define RwCameraGetProjectionMacro(_camera) \ - ((_camera)->projectionType) - -#define RwCameraGetViewWindowMacro(_camera) \ - (&((_camera)->viewWindow)) - -#define RwCameraGetViewMatrixMacro(_camera) \ - (&((_camera)->viewMatrix)) - -#define RwCameraSetFrameMacro(_camera, _frame) \ - (_rwObjectHasFrameSetFrame((_camera), (_frame)), (_camera)) - -#define RwCameraSetFrameVoidMacro(_camera, _frame) \ -MACRO_START \ -{ \ - _rwObjectHasFrameSetFrame((_camera), (_frame)); \ -} \ -MACRO_STOP - - -#define RwCameraGetFrameMacro(_camera) \ - ((RwFrame *)rwObjectGetParent((_camera))) - -#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -#define RwCameraGetViewOffset(_camera) \ - RwCameraGetViewOffsetMacro(_camera) - -#define RwCameraSetRaster(_camera, _raster) \ - RwCameraSetRasterMacro(_camera, _raster) - -#define RwCameraGetRaster(_camera) \ - RwCameraGetRasterMacro(_camera) - -#define RwCameraSetZRaster(_camera, _raster) \ - RwCameraSetZRasterMacro(_camera, _raster) - -#define RwCameraGetZRaster(_camera) \ - RwCameraGetZRasterMacro(_camera) - -#define RwCameraGetNearClipPlane(_camera) \ - RwCameraGetNearClipPlaneMacro(_camera) - -#define RwCameraGetFarClipPlane(_camera) \ - RwCameraGetFarClipPlaneMacro(_camera) - -#define RwCameraSetFogDistance(_camera, _distance) \ - RwCameraSetFogDistanceMacro(_camera, _distance) - -#define RwCameraGetFogDistance(_camera) \ - RwCameraGetFogDistanceMacro(_camera) - -#define RwCameraGetCurrentCamera() \ - RwCameraGetCurrentCameraMacro() - -#define RwCameraGetProjection(_camera) \ - RwCameraGetProjectionMacro(_camera) - -#define RwCameraGetViewWindow(_camera) \ - RwCameraGetViewWindowMacro(_camera) - -#define RwCameraGetViewMatrix(_camera) \ - RwCameraGetViewMatrixMacro(_camera) - -#define RwCameraSetFrame(_camera, _frame) \ - RwCameraSetFrameMacro(_camera, _frame) - -#define RwCameraGetFrame(_camera) \ - RwCameraGetFrameMacro(_camera) - -#endif /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - - -/**************************************************************************** - Global Types - */ - -/** - * \ingroup rwcamera - * RwCameraClearMode - * Camera clear flags */ -enum RwCameraClearMode -{ - rwCAMERACLEARIMAGE = 0x1, /** used for the frustum callback stuff */ - RwUInt16 renderFrame; - RwUInt16 pad; - - /* The clip-planes making up the viewing frustum */ - RwFrustumPlane frustumPlanes[6]; - RwBBox frustumBoundBox; - - /* Points on the tips of the view frustum */ - RwV3d frustumCorners[8]; -}; -#endif /* (!defined(DOXYGEN)) */ - -/** - * \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 - * NULL to terminate further callbacks on other cameras. - * - * \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); - - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - /* Rendering */ -extern RwCamera *RwCameraBeginUpdate(RwCamera * camera); -extern RwCamera *RwCameraEndUpdate(RwCamera * camera); - -extern RwCamera *RwCameraClear(RwCamera * camera, RwRGBA * colour, - RwInt32 clearMode); - -/* Displaying results */ -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); - -/* Offset */ -extern RwCamera *RwCameraSetViewOffset(RwCamera *camera, - const RwV2d *offset); - -/* View window */ -extern RwCamera *RwCameraSetViewWindow(RwCamera *camera, - const RwV2d *viewWindow); - -/* Projection */ -extern RwCamera *RwCameraSetProjection(RwCamera *camera, - RwCameraProjection projection); - -/* Clip planes */ -extern RwCamera *RwCameraSetNearClipPlane(RwCamera *camera, RwReal nearClip); -extern RwCamera *RwCameraSetFarClipPlane(RwCamera *camera, RwReal farClip); - -/* Attaching toolkits */ -extern RwInt32 RwCameraRegisterPlugin(RwInt32 size, - RwUInt32 pluginID, - RwPluginObjectConstructor - constructCB, - RwPluginObjectDestructor - destructCB, - RwPluginObjectCopy copyCB); -extern RwInt32 RwCameraGetPluginOffset(RwUInt32 pluginID); -extern RwBool RwCameraValidatePlugins(const RwCamera * camera); - -/* Frustum testing */ -extern RwFrustumTestResult RwCameraFrustumTestSphere(const RwCamera * - camera, - const RwSphere * - sphere); - -#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) - -/* Offset */ -extern const RwV2d *RwCameraGetViewOffset(const RwCamera *camera); - -/* Rasters */ -extern RwCamera *RwCameraSetRaster(RwCamera *camera, RwRaster *raster); -extern RwRaster *RwCameraGetRaster(const RwCamera *camera); -extern RwCamera *RwCameraSetZRaster(RwCamera *camera, RwRaster *zRaster); -extern RwRaster *RwCameraGetZRaster(const RwCamera *camera); - -/* Clip planes */ -extern RwReal RwCameraGetNearClipPlane(const RwCamera *camera); -extern RwReal RwCameraGetFarClipPlane(const RwCamera *camera); -extern RwCamera *RwCameraSetFogDistance(RwCamera *camera, RwReal fogDistance); -extern RwReal RwCameraGetFogDistance(const RwCamera *camera); - -extern RwCamera *RwCameraGetCurrentCamera(void); - -/* Projection */ -extern RwCameraProjection RwCameraGetProjection(const RwCamera *camera); - -/* View window */ -extern const RwV2d *RwCameraGetViewWindow(const RwCamera *camera); - -extern RwMatrix *RwCameraGetViewMatrix(RwCamera *camera); - -/* Frames */ -extern RwCamera *RwCameraSetFrame(RwCamera *camera, RwFrame *frame); -extern RwFrame *RwCameraGetFrame(const RwCamera *camera); -#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/*--- Automatically derived from: C:/daily/rwsdk/driver/common/barwtyp.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/bapipe.h ---*/ - -#if (!defined(DOXYGEN)) -struct rwPipeGlobals -{ - RwFreeList *pipesFreeList; /* Save mallocs, use a freelist */ - RxRenderStateVector defaultRenderState; - RwLinkList allPipelines; /* Unused as of yet, meant to be used to keep track of all - * created pipelines (for CBs and maybe cleanup) */ - RwUInt32 maxNodesPerPipe; /* Initialised from _rxPipelineMaxNodes at startup. Used to - * allow conservative, single allocations during pipelock */ - - /* NOTE: Rw and RpWorld PowerPipe globals kept together for simplicity */ - - /* The current default pipelines (used if pipe == NULL for an object) */ - RxPipeline *currentAtomicPipeline; - RxPipeline *currentWorldSectorPipeline; - RxPipeline *currentMaterialPipeline; - /* Generic C-based pipes that run on all platforms - * - these are set as the current pipes at startup unless - * platform-specific pipes (below) are created */ - RxPipeline *genericAtomicPipeline; - RxPipeline *genericWorldSectorPipeline; - RxPipeline *genericMaterialPipeline; - /* Platforms that have their own non-generic pipelines - * (OPENGL, D3D8, SKY2, KAMUI2, DOLPHIN) put them here: */ - RxPipeline *platformAtomicPipeline; - RxPipeline *platformWorldSectorPipeline; - RxPipeline *platformMaterialPipeline; -}; -#endif /* (!defined(DOXYGEN)) */ - -typedef struct rwPipeGlobals rwPipeGlobals; - -#define RXPIPELINEGLOBAL(var) (RWPLUGINOFFSET(rwPipeGlobals, RwEngineInstance, _rxPipelineGlobalsOffset)->var) - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RwInt32 _rxPipelineGlobalsOffset; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/driver/common/imrascnv.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/src/babincam.h ---*/ -/**************************************************************************** - Global types - */ - -/* Camera stream format */ - -/** - * \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. - */ - -typedef struct rwStreamCamera RwCameraChunkInfo; -typedef struct rwStreamCamera rwStreamCamera; - -#if (!defined(DOXYGEN)) -struct rwStreamCamera -{ - RwV2d viewWindow; - RwV2d viewOffset; - RwReal nearPlane, farPlane; - RwReal fogPlane; - RwUInt32 projection; -}; -#endif /* (!defined(DOXYGEN)) */ - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Camera binary format */ -extern RwInt32 RwCameraRegisterPluginStream(RwUInt32 pluginID, - RwPluginDataChunkReadCallBack readCB, - RwPluginDataChunkWriteCallBack writeCB, - RwPluginDataChunkGetSizeCallBack getSizeCB); -extern RwInt32 RwCameraSetStreamAlwaysCallBack( - RwUInt32 pluginID, - RwPluginDataChunkAlwaysCallBack alwaysCB); -extern RwUInt32 RwCameraStreamGetSize(const RwCamera *camera); -extern RwCamera *RwCameraStreamRead(RwStream *stream); -extern const RwCamera *RwCameraStreamWrite(const RwCamera *camera, - RwStream *stream); -extern RwCameraChunkInfo * RwCameraChunkInfoRead(RwStream *stream, - RwCameraChunkInfo *cameraChunkInfo, - RwInt32 *bytesRead); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* RWCORE_H */ diff --git a/sdk/rwsdk/include/d3d8/rwplcore.h b/sdk/rwsdk/include/d3d8/rwplcore.h deleted file mode 100644 index 3740ae60..00000000 --- a/sdk/rwsdk/include/d3d8/rwplcore.h +++ /dev/null @@ -1,6271 +0,0 @@ -/******************************************/ -/* */ -/* RenderWare(TM) Graphics Library */ -/* */ -/******************************************/ - -/* - * 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. and Canon Inc. will not, under any - * circumstances, be liable for any lost revenue or other damages - * arising from the use of this file. - * - * Copyright (c) 1999. Criterion Software Ltd. - * All Rights Reserved. - */ - -/************************************************************************* - * - * Filename: - * Automatically Generated on: Thu Jan 23 11:06:23 2003 - * - ************************************************************************/ - -#ifndef RWPLCORE_H -#define RWPLCORE_H - -/*--- System Header Files ---*/ -#include -#include -#include -#include - - -/*--- Automatically derived from: C:/daily/rwsdk/os/win/ostypes.h ---*/ -#ifndef WIN_OSTYPES_H -#define WIN_OSTYPES_H - -#define rwLITTLEENDIAN /* This is a little endian machine */ - -typedef long RwFixed; -typedef int RwInt32; -typedef unsigned int RwUInt32; -typedef short RwInt16; -typedef unsigned short RwUInt16; -typedef unsigned char RwUInt8; -typedef signed char RwInt8; - -#ifdef RWUNICODE -typedef wchar_t RwChar; -#else /* RWUNICODE */ -typedef char RwChar; -#endif /* RWUNICODE */ -typedef float RwReal; -typedef RwInt32 RwBool; - -#ifdef _MSC_VER -typedef __int64 RwInt64; -typedef unsigned __int64 RwUInt64; -#define RWZERO64 ((RwUInt64)0) -#else /* _MSC_VER */ - -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 -{ - RwUInt32 top; - RwUInt32 bottom; -}; - -struct _RwInt64 -{ - RwInt32 top; - RwUInt32 bottom; -}; - -#else /* rwBIGENDIAN */ -#ifdef rwLITTLEENDIAN -struct _RwUInt64 -{ - RwUInt32 bottom; - RwUInt32 top; -}; - -struct _RwInt64 -{ - RwUInt32 bottom; - RwInt32 top; -}; - -#else /* rwLITTLEENDIAN */ -#error "ENDIAN-ness undefined!" -#endif /* rwLITTLEENDIAN */ -#endif /* rwBIGENDIAN */ -#endif /* (!defined(DOXYGEN)) */ - -#define RWZERO64 { (RwUInt32)0, (RwUInt32)0 } -#endif /* _MSC_VER */ - -typedef struct _RwUInt128 RwUInt128; -typedef struct _RwInt128 RwInt128; - -/* We'll do it with structures - * (can't do maths on these, but OK for allocation): */ -#if (!defined(DOXYGEN)) -#ifdef rwBIGENDIAN -struct _RwUInt128 -{ - RwUInt64 top; - RwUInt64 bottom; -}; - -struct _RwInt128 -{ - RwInt64 top; - RwUInt64 bottom; -}; - -#else /* rwBIGENDIAN */ -#ifdef rwLITTLEENDIAN -struct _RwUInt128 -{ - RwUInt64 bottom; - RwUInt64 top; -}; - -struct _RwInt128 -{ - RwUInt64 bottom; - RwInt64 top; -}; - -#else /* rwLITTLEENDIAN */ -#error "ENDIAN-ness undefined!" -#endif /* rwLITTLEENDIAN */ -#endif /* rwBIGENDIAN */ -#endif /* (!defined(DOXYGEN)) */ - -#define RWZERO128 { RWZERO64, RWZERO64 } - -/* Limits of types */ -#define RwInt32MAXVAL 0x7FFFFFFF -#define RwInt32MINVAL 0x80000000 -#define RwUInt32MAXVAL 0xFFFFFFFF -#define RwUInt32MINVAL 0x00000000 -#define RwRealMAXVAL (RwReal)(3.40282347e+38) -#define RwRealMINVAL (RwReal)(1.17549435e-38) -#define RwInt16MAXVAL 0x7FFF -#define RwInt16MINVAL 0x8000 -#define RwUInt16MAXVAL 0xFFFF -#define RwUInt16MINVAL 0x0000 - -/* Structure alignment */ -#define RWALIGN(type, x) type /* nothing */ -#define rwMATRIXALIGNMENT sizeof(RwUInt32) -#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)) -#include -#pragma comment (lib , "advapi32.LIB") /* Registry functions */ - -/* - * registry code - */ - -#if (defined(RpWinRegGetDWordValue)) -#undef RpWinRegGetDWordValue -#endif /* (defined(RpWinRegGetDWordValue)) */ - -#define RpWinRegGetDWordValue(_result, _hKey, _name, _val) \ -MACRO_START \ -{ \ - DWORD _size; \ - DWORD _type; \ - LONG _status; \ - \ - _status = \ - RegQueryValueEx((_hKey), (_name), 0, &_type, NULL, &_size); \ - (_result) = ((ERROR_SUCCESS == _status) && (REG_DWORD == _type)); \ - \ - if ((_result)) \ - { \ - _status = \ - RegQueryValueEx((_hKey), (_name), 0, &_type, \ - (BYTE *) (_val), &_size); \ - (_result) = (ERROR_SUCCESS == _status); \ - } \ -} \ -MACRO_STOP - -#if (defined(RpWinRegGetBinaryValue)) -#undef RpWinRegGetBinaryValue -#endif /* (defined(RpWinRegGetBinaryValue)) */ - -#define RpWinRegGetBinaryValue(_result, _hKey, _name, _val) \ -MACRO_START \ -{ \ - DWORD _size; \ - DWORD _type; \ - LONG _status; \ - \ - _status = \ - RegQueryValueEx((_hKey), (_name), 0, &_type, NULL, &_size); \ - (_result) = \ - ((ERROR_SUCCESS == _status) && \ - (REG_BINARY == _type) && (0 < _size)); \ - \ - if ((_result)) \ - { \ - *(_val) = RwMalloc(sizeof(BYTE) * _size); \ - (_result) = (NULL != *(_val)); \ - \ - if ((_result)) \ - { \ - \ - _status = \ - RegQueryValueEx((_hKey), \ - (_name), 0, &_type, \ - (BYTE *) * (_val), &_size); \ - (_result =) (ERROR_SUCCESS == _status); \ - \ - if (!(_result)) \ - { \ - RwFree(*(_val)); \ - *(_val) = NULL; \ - } \ - \ - } \ - \ - } \ -} \ -MACRO_STOP - -#if (defined(RpWinRegGetStringValue)) -#undef RpWinRegGetStringValue -#endif /* (defined(RpWinRegGetStringValue)) */ - -#define RpWinRegGetStringValue(_result, _hKey, _name, _val) \ -MACRO_START \ -{ \ - DWORD _size; \ - DWORD _type; \ - LONG _status; \ - \ - _status = \ - RegQueryValueEx((_hKey), (_name), 0, &_type, NULL, &_size); \ - (_result) = \ - ((ERROR_SUCCESS == _status) && \ - (REG_SZ == _type) && (0 < _size)); \ - \ - if ((_result)) \ - { \ - \ - *(_val) = RwMalloc(sizeof(TCHAR) * _size); \ - (_result) = (NULL != *(_val)); \ - \ - if ((_result)) \ - { \ - _status = \ - RegQueryValueEx((_hKey), (_name), 0, &_type, \ - (BYTE *) * (_val), &_size); \ - (_result) = (ERROR_SUCCESS == _status); \ - \ - if (!(_result)) \ - { \ - RwFree(*(_val)); \ - *(_val) = NULL; \ - } \ - } \ - } \ -} \ -MACRO_STOP - -/* ------------------------------------------------------------------- */ - -#define RpWinRegCloseKey(hKey) \ -MACRO_START \ -{ \ - RegCloseKey(hKey); \ -} \ -MACRO_STOP - -/* ------------------------------------------------------------------- */ - -#define RpWinRegOpenMachineKey(result) \ -MACRO_START \ -{ \ - static const TCHAR RenderWareKey[] = \ - "Software\\Criterion\\RenderWare"; \ - DWORD disposition; \ - LONG status = \ - RegCreateKeyEx(HKEY_LOCAL_MACHINE, RenderWareKey, 0, \ - REG_NONE, REG_OPTION_NON_VOLATILE, \ - KEY_READ | KEY_WRITE, \ - NULL, &result, &disposition); \ - \ - if (status != ERROR_SUCCESS) \ - { \ - result = NULL; \ - } \ -} \ -MACRO_STOP - -/* ------------------------------------------------------------------- */ - -#if (defined(RWGETWINREGDWORD)) -#undef RWGETWINREGDWORD -#endif /* (defined(RWGETWINREGDWORD)) */ - -#define RWGETWINREGDWORD(result, match) \ -MACRO_START \ -{ \ - HKEY hKey; \ - \ - RpWinRegOpenMachineKey(hKey); \ - if (hKey) \ - { \ - RwBool success; \ - \ - RpWinRegGetDWordValue(success, hKey, match, \ - &result); \ - \ - RpWinRegCloseKey(hKey); \ - } \ -} \ -MACRO_STOP - -#if (defined(RWGETWINREGBINARY)) -#undef RWGETWINREGBINARY -#endif /* (defined(RWGETWINREGBINARY)) */ - -#define RWGETWINREGBINARY(result, match) \ -MACRO_START \ -{ \ - HKEY hKey; \ - \ - result = NULL; \ - RpWinRegOpenMachineKey(hKey); \ - if (hKey) \ - { \ - RwBool success; \ - \ - RpWinRegGetBinaryValue(success, hKey, match, \ - &result, NULL); \ - \ - if (!success) \ - result = NULL; \ - \ - RpWinRegCloseKey(hKey); \ - } \ -} \ -MACRO_STOP - -#if (defined(RWGETWINREGSTRING)) -#undef RWGETWINREGSTRING -#endif /* (defined(RWGETWINREGSTRING)) */ - -#define RWGETWINREGSTRING(result, match) \ -MACRO_START \ -{ \ - HKEY hKey; \ - \ - result = NULL; \ - RpWinRegOpenMachineKey(hKey); \ - if (hKey) \ - { \ - RwBool success; \ - \ - RpWinRegGetStringValue(success, hKey, match, \ - &result); \ - \ - if (!success) \ - result = NULL; \ - \ - RpWinRegCloseKey(hKey); \ - } \ -} \ -MACRO_STOP - -#if (defined(_DEBUG)) - -#if (defined(RWREGSETBREAKALLOC)) -#undef RWREGSETBREAKALLOC -#endif /* (defined(RWREGSETBREAKALLOC)) */ - -#define RWREGSETBREAKALLOC(_name) \ -MACRO_START \ -{ \ - char _message[256]; \ - long _lBreakAlloc = -1; \ - \ - RWGETWINREGDWORD(_lBreakAlloc, _name); \ - \ - RWCRTSETBREAKALLOC(_lBreakAlloc); \ - \ - _snprintf(_message, sizeof(_message), \ - "%s(%d): RWCRTSETBREAKALLOC(%ld)\n", \ - __FILE__, __LINE__, \ - _lBreakAlloc); \ - OutputDebugString(_message); \ - \ -} \ -MACRO_STOP - -#if (defined(RWREGSETDEBUGTRACE)) -#undef RWREGSETDEBUGTRACE -#endif /* (defined(RWREGSETDEBUGTRACE)) */ - -#define RWREGSETDEBUGTRACE(_name) \ -MACRO_START \ -{ \ - char _message[256]; \ - long _lDebugtrace = 0; \ - \ - RWGETWINREGDWORD(_lDebugtrace, _name); \ - \ - RwDebugSetTraceState(_lDebugtrace); \ - \ - _snprintf(_message, sizeof(_message), \ - "%s(%d): RwDebugSetTraceState(%ld)\n", \ - __FILE__, __LINE__, \ - _lDebugtrace); \ - OutputDebugString(_message); \ - \ -} \ -MACRO_STOP - -#if (defined(_CRTDBG_FLAGS)) -#undef _CRTDBG_FLAGS -#endif /* (defined(_CRTDBG_FLAGS)) */ - -#define _CRTDBG_FLAGS \ -( _CRTDBG_ALLOC_MEM_DF || /* Turn on the debug heap allocations \ - * and use the memory block identifiers. \ - * This is the only flag that's on by default. */ \ - _CRTDBG_CHECK_ALWAYS_DF || /* Check and validate all memory \ - * on each allocation and deallocation request. \ - * Setting this flag on is what catches the \ - * under and overwrites \ - * so it is very important to \ - * get it turned on. */ \ - _CRTDBG_CHECK_CRT_DF || /* Include _CRT_BLOCK memory allocations \ - * in all leak detection and state differences. */ \ - _CRTDBG_DELAY_FREE_MEM_DF || /* Instead of truly freeing memory, \ - * keep the block allocated and \ - * in the internal heap list. \ - * The blocks are filled with the value0xDD \ - * so you know the memory is freed when \ - * looking at it in the debugger. \ - * By also not freeing the memory, \ - * this can help provide stress \ - * conditions for the program. */ \ - _CRTDBG_LEAK_CHECK_DF) /* Do memory leak checking at \ - * the end of the program. */ - -#endif /* (defined(_DEBUG)) */ -#endif /* (defined(RWVERBOSE)) */ - -#include -/* - * Keep true calls to these functions since - * some x86 runtime libraries do not support _CIpow() etc - */ -#pragma function( acos, asin, cosh, fmod, pow, sinh , tanh ) - -#if (!defined(RWINT32FROMFLOAT)) - -static __inline RwInt32 -int32fromreal(RwReal x) -{ - RwInt16 savemode; - RwInt16 workmode; - RwInt32 res; - - _asm - { - fnstcw savemode ; get fpu mode - fld dword ptr[x] ; load rwreal x - - mov ax,savemode ; put fpu mode in register - or ah,0ch ; or-in truncate mode - - mov workmode,ax ; make ready to set fpu mode - fldcw workmode ; set fpu to truncate mode - fistp dword ptr[res]; store the rwint32eger result - fldcw savemode ; restore fpu mode - } - - return res; -} -#define RwInt32FromRealMacro(x) int32fromreal(x) - -#endif /* (!defined(RWINT32FROMFLOAT)) */ - -#if (!defined(NOASM)) -static __inline RwUInt32 -RwFastRealToUInt32Inline(RwReal x) -{ - RwUInt32 res; - - __asm FLD DWord Ptr[x]; - __asm FISTP DWord Ptr[res]; - - return(res); -} - -#define RwFastRealToUInt32 RwFastRealToUInt32Inline - -#endif /* (defined(NOASM)) */ - -#endif /* (defined(_MSC_VER)) */ - -#endif /* WIN_OSTYPES_H */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/bamath.h ---*/ - -/**************************************************************************** - Defines - */ - -#if (!defined(RwInt32FromRealMacro)) -#define RwInt32FromRealMacro(x) \ - ((RwInt32)(x)) -#endif /* (!defined(RwInt32FromRealMacro)) */ - -#if (!defined(RwFastRealToUInt32)) -#define RwFastRealToUInt32(_x) \ - ((RwUInt32)RwInt32FromRealMacro(((RwReal)(_x)))) -#endif /* (!defined(RwFastRealToUInt32)) */ - -/* - * Ensure inclusion of prototypes for single precison maths functions - * e.g. from - * /usr/local/sce/ee/gcc/ee/include/math.h - * /Program Files/Intel/Compiler4.0/include/mathf.h - */ - -#if (defined(__ICL)) - -#if (defined(RWVERBOSE)) - -/* - * See - * http://www.eskimo.com/~scs/C-faq/q11.17.html - */ - -#define _STRINGIFY(X) #X -#define _STRINGIFY_EXP(X) _STRINGIFY(X) - -#pragma message ("Intel Compiler Version " _STRINGIFY_EXP(__ICL) ":" __FILE__ "(" _STRINGIFY_EXP(__LINE__) ")\n") -#pragma comment ( user, "comment:" "Intel Compiler Version " _STRINGIFY_EXP(__ICL) ":" __FILE__ "(" _STRINGIFY_EXP(__LINE__) ")\n") - -#endif /* (defined(RWVERBOSE)) */ - -#if (400 <= __ICL) -#if (defined(__cplusplus)) -#define _INC_MATH -#endif /* (defined(__cplusplus)) */ -#include -#else /* (400 < __ICL) */ -#undef RW_USE_SPF -#endif /* (400 < __ICL) */ - -#endif /* (defined(__ICL)) */ - -#include - -#define _RW_C1 ( (float) 4.1666667908e-02 ) -#define _RW_C2 ( (float)-1.3888889225e-03 ) -#define _RW_C3 ( (float) 2.4801587642e-05 ) -#define _RW_C4 ( (float)-2.7557314297e-07 ) -#define _RW_C5 ( (float) 2.0875723372e-09 ) -#define _RW_C6 ( (float)-1.1359647598e-11 ) -#define _RW_S1 ( (float)-1.6666667163e-01 ) -#define _RW_S2 ( (float) 8.3333337680e-03 ) -#define _RW_S3 ( (float)-1.9841270114e-04 ) -#define _RW_S4 ( (float) 2.7557314297e-06 ) -#define _RW_S5 ( (float)-2.5050759689e-08 ) -#define _RW_S6 ( (float) 1.5896910177e-10 ) -#define _RW_one ( (float) 1.0000000000e+00 ) -#define _RW_pS0 ( (float) 1.6666667163e-01 ) -#define _RW_pS1 ( (float)-3.2556581497e-01 ) -#define _RW_pS2 ( (float) 2.0121252537e-01 ) -#define _RW_pS3 ( (float)-4.0055535734e-02 ) -#define _RW_pS4 ( (float) 7.9153501429e-04 ) -#define _RW_pS5 ( (float) 3.4793309169e-05 ) -#define _RW_pi ( (float) 3.1415925026e+00 ) -#define _RW_pi_tol ( (float) 0.0312500000e+00 ) -#define _RW_pio2_hi ( (float) 1.5707962513e+00 ) -#define _RW_pio2_lo ( (float) 7.5497894159e-08 ) -#define _RW_qS1 ( (float)-2.4033949375e+00 ) -#define _RW_qS2 ( (float) 2.0209457874e+00 ) -#define _RW_qS3 ( (float)-6.8828397989e-01 ) -#define _RW_qS4 ( (float) 7.7038154006e-02 ) - -#define RwCosMinusPiToPiMacro(result, x) \ -MACRO_START \ -{ \ - const float z = x * x; \ - const float r = ( z * (_RW_C1 + \ - z * (_RW_C2 + \ - z * (_RW_C3 + \ - z * (_RW_C4 + \ - z * (_RW_C5 + \ - z * _RW_C6)))))); \ - result = (_RW_one - ((float) 0.5 * z - (z * r ))); \ -} \ -MACRO_STOP - -#define RwSinMinusPiToPiMacro(result, x) \ -do \ -{ \ - const float z = x * x; \ - const float v = z * x; \ - const float r = ( _RW_S2 + \ - z * (_RW_S3 + \ - z * (_RW_S4 + \ - z * (_RW_S5 + \ - z * _RW_S6))) ); \ - result = x + v * (_RW_S1 + z * r); \ -} \ -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 { \ - _rwIEEEFloatShapeType gf_u; \ - gf_u.value = (d); \ - (i) = gf_u.word; \ -} while (0) - -/* Set a float from a 32 bit int. */ - -#define _RW_SET_FLOAT_WORD(d,i) \ -do { \ - _rwIEEEFloatShapeType sf_u; \ - sf_u.word = (i); \ - (d) = sf_u.value; \ -} while (0) - -#define RwIEEEACosfMacro(result, x) \ -do \ -{ \ - float z, p, q, r, w, s, c, df; \ - int hx, ix; \ - \ - _RW_GET_FLOAT_WORD(hx, x); \ - ix = hx & 0x7fffffff; \ - if (ix >= 0x3f800000) \ - { /* |x|>=1 */ \ - if (hx > 0) \ - { \ - /* acos(1) = 0 */ \ - result = (0.0); \ - } \ - else \ - { \ - /* acos(-1)= _RW_pi */ \ - result = (_RW_pi + (float) 2.0 * _RW_pio2_lo); \ - } \ - \ - } \ - else if (ix < 0x3f000000) \ - { /* |x| < 0.5 */ \ - if (ix <= 0x23000000) \ - { \ - /*if |x|<2**-57 */ \ - result = (_RW_pio2_hi + _RW_pio2_lo); \ - } \ - else \ - { \ - z = x * x; \ - p = z * (_RW_pS0 + \ - z * (_RW_pS1 + \ - z * (_RW_pS2 + \ - z * (_RW_pS3 + \ - z * (_RW_pS4 + z * _RW_pS5))))); \ - q = _RW_one + z * (_RW_qS1 + \ - z * (_RW_qS2 + \ - z * (_RW_qS3 + z * _RW_qS4))); \ - r = p / q; \ - result = (_RW_pio2_hi - (x - (_RW_pio2_lo - x * r))); \ - } \ - \ - } \ - else if (hx < 0) \ - { /* x < -0.5 */ \ - z = (_RW_one + x) * (float) 0.5; \ - p = z * (_RW_pS0 + \ - z * (_RW_pS1 + \ - z * (_RW_pS2 + \ - z * (_RW_pS3 + \ - z * (_RW_pS4 + z * _RW_pS5))))); \ - q = _RW_one + z * (_RW_qS1 + \ - z * (_RW_qS2 + z * (_RW_qS3 + z * _RW_qS4))); \ - rwSqrtMacro(&s, z); \ - r = p / q; \ - w = r * s - _RW_pio2_lo; \ - result = (_RW_pi - (float) 2.0 * (s + w)); \ - } \ - else \ - { /* x > 0.5 */ \ - int idf; \ - \ - z = (_RW_one - x) * (float) 0.5; \ - rwSqrtMacro(&s, z); \ - df = s; \ - _RW_GET_FLOAT_WORD(idf, df); \ - _RW_SET_FLOAT_WORD(df, idf & 0xfffff000); \ - c = (z - df * df) / (s + df); \ - p = z * (_RW_pS0 + \ - z * (_RW_pS1 + \ - z * (_RW_pS2 + \ - z * (_RW_pS3 + \ - z * (_RW_pS4 + z * _RW_pS5))))); \ - q = _RW_one + z * (_RW_qS1 + \ - z * (_RW_qS2 + z * (_RW_qS3 + z * _RW_qS4))); \ - r = p / q; \ - w = r * s + c; \ - result = ((float) 2.0 * (df + w)); \ - } \ -} \ -while(0) - -#if (defined(RW_USE_SPF)) - -#define RwACos(_x) acosf(_x) -#define RwACosh(_x) acoshf(_x) -#define RwASin(_x) asinf(_x) -#define RwASinh(_x) asinhf(_x) - -#if (!defined(__ICL)) -/* - * No SPF version in - * Program Files/Intel/compilerXXX/include/mathf.h - * of atan2() - */ -#define RwATan2(_x, _y) atan2f(_x, _y) -#endif /* (!defined(__ICL)) */ - -#define RwATan(_x) atanf(_x) -#define RwATanh(_x) atanhf(_x) -#define RwCabs() cabsf() -#define RwCbrt(_x) cbrtf(_x) -#define RwCeil(_x) ceilf(_x) -#define RwCopysign(_x, _y) copysignf(_x, _y) -#define RwCos(_x) cosf(_x) -#define RwCosh(_x) coshf(_x) -#define RwDrem(_x, _y) dremf(_x, _y) -#define RwErfc(_x) erfcf(_x) -#define RwErf(_x) erff(_x) -#define RwExp(_x) expf(_x) -#define RwExpm1(_x) expm1f(_x) -#define RwFinite(_x) finitef(_x) -#define RwIlogb(_x) ilogbf(_x) -#define RwIsinf(_x) isinff(_x) -#define RwIsnan(_x) isnanf(_x) -#define RwFabs(_x) fabsf(_x) -#define RwFloor(_x) floorf(_x) -#define RwFmod(_x, _y) fmodf(_x, _y) -#define RwFrexp(_x, _iptr) frexpf(_x, _iptr) -#define RwGamma(_x) gammaf(_x) -#define RwGammaf_(_x, _iptr) gammaf_r(_x, _iptr) -#define RwHypot(_x, _y) hypotf(_x, _y) -#define RwInfinity() infinityf() -#define RwJ0(_x) j0f(_x) -#define RwJ1(_x) j1f(_x) -#define RwJn(_i, _x) jnf(_i, _x) -#define RwLdexp(_x, _i) ldexpf(_x, _i) -#define RwLgamma(_x) lgammaf(_x) -#define RwLgammaf_(_x, _iptr) lgammaf_r(_x, _iptr) -#define RwLog10(_x) log10f(_x) -#define RwLog1p(_x) log1pf(_x) -#define RwLog(_x) logf(_x) -#define RwModf(_x, _y) modff(_x, _y) -#define RwNan() nanf() -#define RwNextafter(_x, _y) nextafterf(_x, _y) -#define RwPow(_x, _y) powf(_x, _y) -#define RwRemainder(_x, _y) remainderf(_x, _y) -#define RwRint(_x) rintf(_x) -#define RwScalbn(_x, _i) scalbnf(_x, _i) -#define RwSin(_x) sinf(_x) -#define RwSinh(_x) sinhf(_x) -/* rwSqrtMacro/rwInvSqrtMacro are overloaded in drvmodel.h - * (if they are at all) and wrapped as func/macro below */ -#define RwTan(_x) tanf(_x) -#define RwTanh(_x) tanhf(_x) -#define RwY0(_x) y0f(_x) -#define RwY1(_x) y1f(_x) -#define RwYn(_i, _x) ynf(_i, _x) - -#endif /* (defined(RW_USE_SPF)) */ - -#if (!defined(RwACos)) -#define RwACos(_x) acos(_x) -#endif /* (!defined(RwACos)) */ -#if (!defined(RwACosh)) -#define RwACosh(_x) acosh(_x) -#endif /* (!defined(RwACosh)) */ -#if (!defined(RwASin)) -#define RwASin(_x) asin(_x) -#endif /* (!defined(RwASin)) */ -#if (!defined(RwASinh)) -#define RwASinh(_x) asinh(_x) -#endif /* (!defined(RwASinh)) */ -#if (!defined(RwATan2)) -#define RwATan2(_x, _y) atan2(_x, _y) -#endif /* (!defined(RwATan2)) */ -#if (!defined(RwATan)) -#define RwATan(_x) atan(_x) -#endif /* (!defined(RwATan)) */ -#if (!defined(RwATanh)) -#define RwATanh(_x) atanh(_x) -#endif /* (!defined(RwATanh)) */ -#if (!defined(RwCabs)) -#define RwCabs() cabs() -#endif /* (!defined(RwCabs)) */ -#if (!defined(RwCbrt)) -#define RwCbrt(_x) cbrt(_x) -#endif /* (!defined(RwCbrt)) */ -#if (!defined(RwCeil)) -#define RwCeil(_x) ceil(_x) -#endif /* (!defined(RwCeil)) */ -#if (!defined(RwCopysign)) -#define RwCopysign(_x, _y) copysign(_x, _y) -#endif /* (!defined(RwCopysign)) */ -#if (!defined(RwCos)) -#define RwCos(_x) cos(_x) -#endif /* (!defined(RwCos)) */ -#if (!defined(RwCosh)) -#define RwCosh(_x) cosh(_x) -#endif /* (!defined(RwCosh)) */ -#if (!defined(RwDrem)) -#define RwDrem(_x, _y) drem(_x, _y) -#endif /* (!defined(RwDrem)) */ -#if (!defined(RwErfc)) -#define RwErfc(_x) erfc(_x) -#endif /* (!defined(RwErfc)) */ -#if (!defined(RwEr)) -#define RwEr(_x) erf(_x) -#endif /* (!defined(RwEr)) */ -#if (!defined(RwExp)) -#define RwExp(_x) exp(_x) -#endif /* (!defined(RwExp)) */ -#if (!defined(RwExpm1)) -#define RwExpm1(_x) expm1(_x) -#endif /* (!defined(RwExpm1)) */ -#if (!defined(RwFinite)) -#define RwFinite(_x) finite(_x) -#endif /* (!defined(RwFinite)) */ -#if (!defined(RwIlogb)) -#define RwIlogb(_x) ilogb(_x) -#endif /* (!defined(RwIlogb)) */ -#if (!defined(RwIsin)) -#define RwIsin(_x) isinf(_x) -#endif /* (!defined(RwIsin)) */ -#if (!defined(RwIsnan)) -#define RwIsnan(_x) isnan(_x) -#endif /* (!defined(RwIsnan)) */ -#if (!defined(RwFabs)) -#define RwFabs(_x) fabs(_x) -#endif /* (!defined(RwFabs)) */ -#if (!defined(RwFloor)) -#define RwFloor(_x) floor(_x) -#endif /* (!defined(RwFloor)) */ -#if (!defined(RwFmod)) -#define RwFmod(_x, _y) fmod(_x, _y) -#endif /* (!defined(RwFmod)) */ -#if (!defined(RwFrexp)) -#define RwFrexp(_x, _iptr) frexp(_x, _iptr) -#endif /* (!defined(RwFrexp)) */ -#if (!defined(RwGamma)) -#define RwGamma(_x) gamma(_x) -#endif /* (!defined(RwGamma)) */ -#if (!defined(RwGammaf_)) -#define RwGammaf_(_x, _iptr) gammaf_r(_x, _iptr) -#endif /* (!defined(RwGammaf_)) */ -#if (!defined(RwHypot)) -#define RwHypot(_x, _y) hypot(_x, _y) -#endif /* (!defined(RwHypot)) */ -#if (!defined(RwInfinity)) -#define RwInfinity() infinity() -#endif /* (!defined(RwInfinity)) */ -#if (!defined(RwJ0)) -#define RwJ0(_x) j0(_x) -#endif /* (!defined(RwJ0)) */ -#if (!defined(RwJ1)) -#define RwJ1(_x) j1(_x) -#endif /* (!defined(RwJ1)) */ -#if (!defined(RwJn)) -#define RwJn(_i, _x) jn(_i, _x) -#endif /* (!defined(RwJn)) */ -#if (!defined(RwLdexp)) -#define RwLdexp(_x, _i) ldexp(_x, _i) -#endif /* (!defined(RwLdexp)) */ -#if (!defined(RwLgamma)) -#define RwLgamma(_x) lgamma(_x) -#endif /* (!defined(RwLgamma)) */ -#if (!defined(RwLgammaf_)) -#define RwLgammaf_(_x, _iptr) lgammaf_r(_x, _iptr) -#endif /* (!defined(RwLgammaf_)) */ -#if (!defined(RwLog10)) -#define RwLog10(_x) log10(_x) -#endif /* (!defined(RwLog10)) */ -#if (!defined(RwLog1p)) -#define RwLog1p(_x) log1p(_x) -#endif /* (!defined(RwLog1p)) */ -#if (!defined(RwLog)) -#define RwLog(_x) log(_x) -#endif /* (!defined(RwLog)) */ -#if (!defined(RwMod)) -#define RwMod(_x, _y) mod(_x, _y ) -#endif /* (!defined(RwMod)) */ -#if (!defined(RwNan)) -#define RwNan() nan() -#endif /* (!defined(RwNan)) */ -#if (!defined(RwNextafter)) -#define RwNextafter(_x, _y) nextafter(_x, _y) -#endif /* (!defined(RwNextafter)) */ -#if (!defined(RwPow)) -#define RwPow(_x, _y) pow(_x, _y) -#endif /* (!defined(RwPow)) */ -#if (!defined(RwRemainder)) -#define RwRemainder(_x, _y) remainder(_x, _y) -#endif /* (!defined(RwRemainder)) */ -#if (!defined(RwRint)) -#define RwRint(_x) rint(_x) -#endif /* (!defined(RwRint)) */ -#if (!defined(RwScalbn)) -#define RwScalbn(_x, _i) scalbn(_x, _i) -#endif /* (!defined(RwScalbn)) */ -#if (!defined(RwSin)) -#define RwSin(_x) sin(_x) -#endif /* (!defined(RwSin)) */ -#if (!defined(RwSinh)) -#define RwSinh(_x) sinh(_x) -#endif /* (!defined(RwSinh)) */ -#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 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 D3D8, OpenGL and SoftRas] */ -#define rwInvSqrt(_recip, _x) rwInvSqrtMacro(_recip, _x) -#endif /* (!defined(rwInvSqrt)) */ -#if (!defined(RwTan)) -#define RwTan(_x) tan(_x) -#endif /* (!defined(RwTan)) */ -#if (!defined(RwTanh)) -#define RwTanh(_x) tanh(_x) -#endif /* (!defined(RwTanh)) */ -#if (!defined(RwY0)) -#define RwY0(_x) y0(_x) -#endif /* (!defined(RwY0)) */ -#if (!defined(RwY1)) -#define RwY1(_x) y1(_x) -#endif /* (!defined(RwY1)) */ -#if (!defined(RwYn)) -#define RwYn(_i, _x) yn(_i, _x) -#endif /* (!defined(RwYn)) */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/batypes.h ---*/ -#define rwLIBRARYBASEVERSION 0x31000 -#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 - * This 16-bit int will be externally defined in an official build, and - * is used to construct chunk header library ID when streaming out. All - * unofficial builds will be stamped with the following:- - */ -#if !defined(RWBUILDNUMBER) -#define RWBUILDNUMBER 0xffff -#endif - -/* IMPORTANT: - * The following Doxygen comment MUST be copied into RwCore.h, - * so don't move it from here. */ - -#ifndef RWADOXYGENEXTERNAL -/** - * \ingroup fundamentaltypes - * \page fundtypesoverview Fundamental Types Overview - * - * \par Requirements - * \li \b Headers: rwcore.h - * \li \b Libraries: rwcore.lib - * - * The rwcore.lib library provides the fundamental RenderWare features. - * - * When creating a RenderWare application, this library must always be - * linked. - * - * Functionality includes: - * \li Immediate Modes (2D \ref rwim2d and 3D \ref rwim3d ) - * \li Plugin Management - * \li Base Datatypes - * \li Cameras \ref rwcamera - * \li Frames \ref rwframe - * \li the RenderWare Engine \ref rwengine - * - * RenderWare uses an object-oriented design philosophy, so this - * documentation is split across a number of objects. - * - * These objects are implemented in C, so C terminology is generally - * used, rather than C++ -- hence 'functions' instead of 'methods' and - * 'elements' instead of 'members'. - * - * If you are new to RenderWare programming, please read through the - * 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)) -#endif /* (!defined(RWFORCEENUMSIZEINT)) */ - -/* - * See - * http://www.eskimo.com/~scs/C-faq/q11.17.html - */ - -#define RW_STRINGIFY(X) #X -#define RW_STRINGIFY_EXPANDED(X) RW_STRINGIFY(X) - -/**************************************************************************** - Attributes - */ - -#if (defined(__GNUC__)) - -/* See http://www.gnu.org/software/gcc/onlinedocs/gcc_4.html#SEC91 */ - -#if (!(defined(__cplusplus) || defined(__MWERKS__) || defined(__RWUNUSED__))) -#define __RWUNUSED__ __attribute__ ((unused)) -#endif /* (!(defined(__cplusplus) || defined(__MWERKS__) || defined(__RWUNUSED__))) */ - -#if (!(defined(__RWUNUSEDRELEASE__) || defined(RWVALIDATEPARAM))) -#if (!( defined(__cplusplus) || defined(__MWERKS__) || defined(RWDEBUG))) -#define __RWUNUSEDRELEASE__ __attribute__ ((unused)) -#endif /* (!(defined(__cplusplus) || defined(__MWERKS__) || defined(RWDEBUG))) */ -#endif /* (!(defined(__RWUNUSEDRELEASE__) || defined(RWVALIDATEPARAM))) */ - -#if (!defined(__RWFORMAT__)) -#define __RWFORMAT__(_archetype, _string_index, _first_to_check) \ - __attribute__ ((format (_archetype, _string_index, _first_to_check))) -#endif /* (!defined(__RWFORMAT__)) */ - -#endif /* (defined(__GNUC__)) */ - -#if (!defined(__RWUNUSED__)) -#define __RWUNUSED__ /* No op */ -#endif /* (!defined(__RWUNUSED__)) */ - -#if (!defined(__RWUNUSEDRELEASE__)) -#define __RWUNUSEDRELEASE__ /* No op */ -#endif /* (!defined(__RWUNUSEDRELEASE__)) */ - -#if (!defined(__RWFORMAT__)) -#define __RWFORMAT__(_archetype, _string_index, _first_to_check) /* No op */ -#endif /* (!defined(__RWFORMAT__)) */ - -/**************************************************************************** - Calling conventions - */ - -#if (defined(WIN32)) -#define RWASMCALL __cdecl -#define RWASMAPI(TYPE) TYPE RWASMCALL -#endif /* (defined(WIN32)) */ - -#if (!defined(RWASMCALL)) -#define RWASMCALL /* No op */ -#endif /* (!defined(RWASMCALL)) */ - -#if (!defined(RWASMAPI)) -#define RWASMAPI(TYPE) TYPE -#endif /* (!defined(RWASMAPI)) */ - - -/* Maximum number of nested contexts */ -#define rwMAXPIPECONTEXT 10 - - -/**************************************************************************** - Macro wrappers. These are needed everywhere. - */ - -#ifndef MACRO_START -#define MACRO_START do -#endif /* MACRO_START */ - -#ifndef MACRO_STOP -#define MACRO_STOP while(0) -#endif /* MACRO_STOP */ - -/**************************************************************************** - Types needed everywhere - */ - -#ifdef FALSE -#undef FALSE -#endif -#define FALSE 0 - -#ifdef TRUE -#undef TRUE -#endif -#define TRUE !FALSE - -/**************************************************************************** - MS VC/C++ Specific - */ - -#if (defined(_MSC_VER)) -#if (_MSC_VER>=1000) - - -/* - * Check for correct compiler version - */ -#define RW_MSC_VER 1200 - -#if (0 && !defined(RW_NO_COMPILER_CHECK)) -#if (_MSC_VER != RW_MSC_VER ) -# pragma message (__FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) "):" "\n This compiler is a different version (" RW_STRINGIFY_EXPANDED(_MSC_VER) ")\n to the compiler used to build the RenderWare product libraries (" RW_STRINGIFY_EXPANDED(RW_MSC_VER) ") \n To turn off this warning please define RW_NO_COMPILER_CHECK " ) -# pragma comment ( user, "comment:" __FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) "):" "\n This compiler is a different version (" RW_STRINGIFY_EXPANDED(_MSC_VER) ")\n to the compiler used to build the RenderWare product libraries (" RW_STRINGIFY_EXPANDED(RW_MSC_VER) ") \n To turn off this warning please define RW_NO_COMPILER_CHECK " ) -#endif /* (_MSC_VER != RW_MSC_VER ) */ -#endif /* (0 && !defined(RW_NO_COMPILER_CHECK)) */ - -/* - * Output some compiler messages and object file comments - */ - -#pragma comment ( compiler ) - -#pragma comment ( user, "comment:" __DATE__" " __TIME__ " - " __FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) ")") -#pragma comment ( user, "comment:" " _MSC_VER==" RW_STRINGIFY_EXPANDED(_MSC_VER) "; _M_IX86==" RW_STRINGIFY_EXPANDED(_M_IX86)) -#if (defined(rwLIBRARYCURRENTVERSION)) -#pragma comment ( user, "comment:" "rwLIBRARYCURRENTVERSION:" RW_STRINGIFY_EXPANDED(rwLIBRARYCURRENTVERSION) ) -#endif /* (defined(rwLIBRARYCURRENTVERSION)) */ - -#if (defined(RWDEBUG) && defined(RWVERBOSE)) - -#if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) -#define _CRTDBG_MAP_ALLOC -#endif /* defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) */ -#include - -#pragma message (__DATE__" " __TIME__ " - " __FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) ")" ) -#pragma message ("_MSC_VER==" RW_STRINGIFY_EXPANDED(_MSC_VER) "; _M_IX86==" RW_STRINGIFY_EXPANDED(_M_IX86)) - -#if (defined(rwLIBRARYCURRENTVERSION)) -#pragma message ( "rwLIBRARYCURRENTVERSION:" RW_STRINGIFY_EXPANDED(rwLIBRARYCURRENTVERSION) ) -#endif /* (defined(rwLIBRARYCURRENTVERSION)) */ - -#endif /* (defined(RWDEBUG) && defined(RWVERBOSE) ) */ - -#endif /* (_MSC_VER>=1000) */ -#endif /* (defined(_MSC_VER)) */ - -/*******************/ -/* Primitive types */ -/*******************/ - -/* String construction stuff (gets us UNICODE support) */ -#ifdef RWUNICODE -#define _RWSTRING(x) L ## x -#else /* RWUNICODE */ -#define _RWSTRING(x) x -#endif /* RWUNICODE */ -#define RWSTRING(x) _RWSTRING(x) - -/* NB volatile keyword required for VC5.0 to ensure a reload - AMB */ -typedef union RwSplitBits RwSplitBits; - -#if (!defined(DOXYGEN)) -union RwSplitBits -{ - RwReal nReal; - volatile RwInt32 nInt; - volatile RwUInt32 nUInt; -}; - -typedef struct RwSplitFixed RwSplitFixed; - -#ifdef rwBIGENDIAN -struct RwSplitFixed -{ - RwInt16 integral; - RwUInt16 fractional; -}; - -#else /* rwBIGENDIAN */ -#ifdef rwLITTLEENDIAN -struct RwSplitFixed -{ - RwUInt16 fractional; - RwInt16 integral; -}; - -#else /* rwLITTLEENDIAN */ -#error "ENDIAN-ness undefined!" -#endif /* rwLITTLEENDIAN */ -#endif /* rwBIGENDIAN */ - -typedef union RwUnionReal RwUnionReal; - -union RwUnionReal /* MSB is sign bit in any circumstance */ -{ - RwReal real; /* 4 bytes interpreted as RwReal */ - float floating; /* 4 bytes interpreted as float */ - RwFixed fixed; /* 4 bytes interpreted as 16:16 fixed */ - RwSplitFixed splitfixed; /* 4 bytes interpreted as 16:16 fixed */ -}; -#endif /* (!defined(DOXYGEN)) */ - -/*****************/ - -/* Complex types */ - -/*****************/ - -typedef struct RwV2d RwV2d; -/** - * \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. - */ -struct RwV2d -{ - RwReal x; /**< X value*/ - RwReal y; /**< Y vlaue */ -}; - -typedef struct RwV3d RwV3d; -/** - * \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 - * 3D vector. - */ -struct RwV3d -{ - RwReal x; /**< X value */ - RwReal y; /**< Y value */ - RwReal z; /**< Z value */ -}; - -#define RWV4DALIGNMENT(_v4d) \ - (! (((rwV4DALIGNMENT)-1) & ((RwUInt32)(_v4d)))) - -#ifndef RWADOXYGENEXTERNAL -/** - * \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 */ - RwReal y; /**< Y value */ - RwReal z; /**< Z value */ - RwReal w; /**< W value */ -}; - -typedef struct RwV4d RWALIGN(RwV4d, rwV4DALIGNMENT); - - -typedef struct RwRect RwRect; - -#ifndef RWADOXYGENEXTERNAL -/** - * \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 */ - RwInt32 y; /**< Y value of the top-left corner */ - RwInt32 w; /**< Width of the rectangle */ - RwInt32 h; /**< Height of the rectangle */ -}; - -typedef struct RwSphere RwSphere; -#ifndef RWADOXYGENEXTERNAL -/** - * \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 */ - RwReal radius; /**< Sphere radius */ -}; - -#if (!defined(RwSphereAssign)) -#define RwSphereAssign(_target, _source) \ - ( *(_target) = *(_source) ) -#endif /* (!defined(RwSphereAssign)) */ - -typedef struct RwLine RwLine; - -#ifndef RWADOXYGENEXTERNAL -/** - * \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 */ - RwV3d end; /**< Line end */ -}; - -#if (!defined(RwLineAssign)) -#define RwLineAssign(_target, _source) \ - ( *(_target) = *(_source) ) -#endif /* (!defined(RwLineAssign)) */ - -/* The maximum number of texture coordinates */ -#define rwMAXTEXTURECOORDS 8 - -#ifndef RWADOXYGENEXTERNAL -/** - * \ingroup fundtypesdatatypes - * RwTextureCoordinateIndex - * This type represents the index for texture coordinates. - */ -#endif /* RWADOXYGENEXTERNAL */ -enum RwTextureCoordinateIndex -{ - rwNARWTEXTURECOORDINATEINDEX = 0, - rwTEXTURECOORDINATEINDEX0, - rwTEXTURECOORDINATEINDEX1, - rwTEXTURECOORDINATEINDEX2, - rwTEXTURECOORDINATEINDEX3, - rwTEXTURECOORDINATEINDEX4, - rwTEXTURECOORDINATEINDEX5, - rwTEXTURECOORDINATEINDEX6, - rwTEXTURECOORDINATEINDEX7, - rwTEXTURECOORDINATEINDEXFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; -typedef enum RwTextureCoordinateIndex RwTextureCoordinateIndex; - -typedef struct RwTexCoords RwTexCoords; - -#ifndef RWADOXYGENEXTERNAL -/** - * \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 */ - RwReal v; /**< V value */ -}; - - -/* 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))) - -#define rwSLLinkGetConstData(link,type,entry) \ - ((const type *)(((const RwUInt8 *)(link))-offsetof(type,entry))) - -#define rwSLLinkInitialize(linkvar) \ - (linkvar)->next = NULL; - -#define rwSLLinkGetNext(linkvar) \ - ((linkvar)->next) - -typedef struct RwSingleList RwSingleList; - -#if (!defined(DOXYGEN)) -struct RwSingleList -{ - RwSLLink link; -}; -#endif /* (!defined(DOXYGEN)) */ - -#define rwSingleListInitialize(list) \ - (list)->link.next= NULL; -#define rwSingleListEmpty(list) \ - (((list)->link.next)==NULL) -#define rwSingleListAddSLLink(list,linkvar) \ - ( (linkvar)->next = (list)->link.next, \ - (list)->link.next = (linkvar) ) -#define rwSingleListGetFirstSLLink(list) \ - ((list)->link.next) -#define rwSingleListGetTerminator(list) (NULL) - -/* 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))) - -#define rwLLLinkGetConstData(linkvar,type,entry) \ - ((const type *)(((const RwUInt8 *)(linkvar))-offsetof(type,entry))) - -#define rwLLLinkGetNext(linkvar) \ - ((linkvar)->next) - -#define rwLLLinkGetPrevious(linkvar) \ - ((linkvar)->prev) - -#define rwLLLinkInitialize(linkvar) \ - ( (linkvar)->prev = (RwLLLink *)NULL, \ - (linkvar)->next = (RwLLLink *)NULL ) - -#define rwLLLinkAttached(linkvar) \ - ((linkvar)->next) - -typedef struct RwLinkList RwLinkList; - -#if (!defined(DOXYGEN)) -struct RwLinkList -{ - RwLLLink link; -}; -#endif /* (!defined(DOXYGEN)) */ - -#define rwLinkListInitialize(list) \ - ( (list)->link.next = ((RwLLLink *)(list)), \ - (list)->link.prev = ((RwLLLink *)(list)) ) -#define rwLinkListEmpty(list) \ - (((list)->link.next) == (&(list)->link)) -#define rwLinkListAddLLLink(list, linkvar) \ - ( (linkvar)->next = (list)->link.next, \ - (linkvar)->prev = (&(list)->link), \ - ((list)->link.next)->prev = (linkvar), \ - (list)->link.next = (linkvar) ) -#define rwLinkListRemoveLLLink(linkvar) \ - ( ((linkvar)->prev)->next = (linkvar)->next, \ - ((linkvar)->next)->prev = (linkvar)->prev ) -#define rwLinkListGetFirstLLLink(list) \ - ((list)->link.next) -#define rwLinkListGetLastLLLink(list) \ - ((list)->link.prev) -#define rwLinkListGetTerminator(list) \ - (&((list)->link)) - -typedef struct RwSurfaceProperties RwSurfaceProperties; - -#ifndef RWADOXYGENEXTERNAL -/** - * \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 */ - RwReal specular; /**< specular reflection coefficient */ - RwReal diffuse; /**< reflection coefficient */ -}; - -#if (!defined(RwSurfacePropertiesAssign)) -#define RwSurfacePropertiesAssign(_target, _source) \ - ( *(_target) = *(_source) ) -#endif /* (!defined(RwSurfacePropertiesAssign)) */ - -/********** - * Macros * - **********/ - -/* ANSI C defines the offsetof(type,member) macro; should be in */ - -/* If not, fall back to this: */ -#ifndef offsetof -#define offsetof(type, member) \ - ((size_t)((RwUInt8 *)&((type *) 0)->member - (RwUInt8 *)((type *) 0))) -#endif /* offsetof */ - -/* - * - * Numeric Macros to handle Fixed/Floating point versions of RenderWare - * - */ -#define RWFIX_MIN (1) -#define RWFIX_MAX (0x7fffffff) -#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))) -#define RwRealMax2(a,b) ((RwReal)( ((a) >= (b)) ? (a) : (b))) -#define RwRealMin3(a,b,c) RwRealMin2(a,RwRealMin2(b,c)) -#define RwRealMax3(a,b,c) RwRealMax2(a,RwRealMax2(b,c)) - -#ifndef NORWREALSHORTCUT -#define RToFixed RwRealToFixed -#define RAbs RwRealAbs -#define FxToInt RwFixedToInt -#define FxToFloat RwFixedToFloat -#define FxToReal RwFixedToFloat - -#endif - -#ifndef rwPI -#define rwPI ((RwReal)(3.1415926535f)) -#define rwPIOVER2 (rwPI / (RwReal)(2.0f)) -#endif -#define RWRGBALONG(r,g,b,a) \ - ((RwUInt32) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b))) - -/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - RwPlane - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - - -/* - * typedef for struct RwPlane - */ -typedef struct RwPlane RwPlane; - -#if (!defined(DOXYGEN)) -/* - * This type represents a plane - */ -struct RwPlane -{ - RwV3d normal; /**< Normal to the plane */ - RwReal distance; /**< Distance to plane from origin in normal direction*/ -}; -#endif /* (!defined(DOXYGEN)) */ - -/**************************************************************************** - Defines - */ - -enum RwPlaneType -{ - rwXPLANE = 0, /* These are deliberately multiples of sizeof(RwReal) */ - rwYPLANE = 4, - rwZPLANE = 8, - rwPLANETYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; -typedef enum RwPlaneType RwPlaneType; - -#define rwSECTORATOMIC -1 -#define rwSECTORBUILD -2 /* Only used when building a world */ - -/* vect is a RwV3d, y is the component */ -#define GETCOORD(vect,y) \ - (*(RwReal *)(((RwUInt8 *)(&((vect).x)))+(RwInt32)(y))) -#define GETCONSTCOORD(vect,y) \ - (*(const RwReal *)(((const RwUInt8 *)(&((vect).x)))+(RwInt32)(y))) -#define SETCOORD(vect,y,value) \ - (((*(RwReal *)(((RwUInt8 *)(&((vect).x)))+(RwInt32)(y))))=(value)) -#define SETCONSTCOORD(vect,y,value) \ - (((*(const RwReal *) \ - (((const RwUInt8 *) \ - (&((vect).x)))+(RwInt32)(y))))=(value)) -#define GETCOORDINT(vect,y) \ - (*(RwInt32 *)(((RwUInt8 *)(&((vect).x)))+(y))) -#define GETCONSTCOORDINT(vect,y) \ - (*(const RwInt32 *)(((const RwUInt8 *)(&((vect).x)))+(y))) - - -/** - * \ingroup integertypes - * \page inttypes Integer Types - * - * RenderWare supports a number of integer types: - * - * RwInt8 8-bit signed integer. - * \li RwUInt8 8-bit unsigned integer. - * \li RwChar Character type. - * \li RwInt16 16-bit signed integer. - * \li RwUInt16 16-bit unsigned integer. - * \li RwInt32 32-bit signed integer. - * \li RwUInt32 32-bit unsigned integer. - * \li RwInt64 64-bit signed integer. - * \li RwUInt64 64-bit unsigned integer. - * \li RwInt128 128-bit signed integer. - * \li RwUInt128 128-bit unsigned integer. - * \li RwBool Boolean type (in 32 bits). - * - * These types should be used in applications in preference to the underlying - * native types. - * - * The following constants indicate the maximum and minimum values possible - * for the various RenderWare integer types: - * - * \li RwInt32MAXVAL Maximum RwInt32 value. - * \li RwInt32MINVAL Minimum RwInt32 value. - * \li RwUInt32MAXVAL Maximum RwUInt32 value. - * \li RwUInt32MINVAL Minimum RwUInt32 value. - * \li RwInt16MAXVAL Maximum RwInt16 value. - * \li RwInt16MINVAL Minimum RwInt16 value. - * \li RwUInt16MAXVAL Maximum RwUInt16 value. - * \li RwUInt16MINVAL Minimum RwUInt16 value. - * - * \see RwReal - */ - -/** - * \ingroup realtypes - * \typedef RwReal - * - * RenderWare supports a single RwReal floating-point type to aid portability - * across platforms. This type should be used in applications in preference to - * the underlying native type. - * - * The constants RwRealMAXVAL and RwRealMINVAL are provided for determining - * the maximum and minimum values possible using the RwReal type. - * - * In addition, the following macros are available for operations on RwReal - * types: - * \li RwRealMin2(a, b) Find the minimum of two RwReal values. - * \li RwRealMax2(a, b) Find the maximum of two RwReal values. - * \li RwRealMin3(a, b, c) Find the minimum of three RwReal values. - * \li RwRealMax3(a, b, c) Find the maximum of three RwReal values. - * \li RwRealAbs(x) Find the absolute value of a RwReal value. - * - * \see \ref inttypes - */ - -/** - * \ingroup realtypes - * \typedef RwFixed - * - * RenderWare supports a single RwFixed fixed-point type. - * - * Although popular in the days when integer mathematics was much faster than - * floating point mathematics, fixed-point math is now rarely used. It is - * provided because it is still useful for some processes. - * - * The maximum and minimum size of an RwFixed value are defined by the constants - * RWFIX_MAX and RWFIX_MIN respectively. - * - * The following macros are provided to help you work with RwFixed datatypes: - * \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 integertypes - * \typedef RwInt8 - * - * Signed 8 bit integer type. - * \see \ref inttypes - */ - -/** - * \ingroup integertypes - * \typedef RwUInt8 - * - * Unsigned 8bit integer type. - * \see \ref inttypes - */ - -/** - * \ingroup integertypes - * \typedef RwChar - * - * Character type. - * \see \ref inttypes - */ - -/** - * \ingroup integertypes - * \typedef RwInt16 - * - * Signed 16 bit integer type. - * \see \ref inttypes - */ - -/** - * \ingroup integertypes - * \typedef RwUInt16 - * - * Unsigned 16 bit integer type. - * \see \ref inttypes - */ - -/** - * \ingroup integertypes - * \typedef RwInt32 - * - * Signed 32 bit integer type. - * \see \ref inttypes - */ - -/** - * \ingroup integertypes - * \typedef RwUInt32 - * - * Unsigned 32 bit integer type. - * \see \ref inttypes - */ - -/** - * \ingroup integertypes - * \typedef RwInt64 - * - * Signed 64 bit integer type. - * \see \ref inttypes - */ - -/** - * \ingroup integertypes - * \typedef RwUInt64 - * - * Unsigned 64 bit integer type. - * \see \ref inttypes - */ - -/** - * \ingroup integertypes - * \typedef RwInt128 - * - * Signed 128 bit integer type. - * \see \ref inttypes - */ - -/** - * \ingroup integertypes - * \typedef RwUInt128 - * - * Unsigned 128 bit integer type. - * \see \ref inttypes - */ - -/** - * \ingroup integertypes - * \typedef RwBool - * - * Boolean type. - * \see \ref inttypes - */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/batype.h ---*/ -/**************************************************************************** - Defines -*/ - -/* - * Object Types - these are used in the binary object - * representations and in the debug library. They must - * be unique. They are the old system. - */ - -#define rwID_DATABASE 0x64617462 /* datb */ - -#define MAKECHUNKID(vendorID, chunkID) (((vendorID & 0xFFFFFF) << 8) | (chunkID & 0xFF)) -#define GETOBJECTID(chunkID) (chunkID & 0xFF) -#define GETVENDORID(chunkID) ((chunkID >> 8) & 0xFFFFFF) - -/*** - *** These are the vendor IDs. A customer must reserve a vendor ID in order - *** to be able to write toolkits (this prevents clashes between toolkits). - *** We reserve some for our own use as shown below. These are all 24 bit. - *** - *** IMPORTANT NOTE: DO NOT UNDER ANY CIRCUMSTANCES CHANGE THESE VALUES. IF - *** YOU ARE ADDING A NEW ONE, APPEND IT! - *** - *** They must all be unique. - ***/ - -enum RwPluginVendor -{ - rwVENDORID_CORE = 0x000000L, - rwVENDORID_CRITERIONTK = 0x000001L, - rwVENDORID_REDLINERACER = 0x000002L, - rwVENDORID_CSLRD = 0x000003L, - rwVENDORID_CRITERIONINT = 0x000004L, - rwVENDORID_CRITERIONWORLD = 0x000005L, - rwVENDORID_BETA = 0x000006L, - rwVENDORID_CRITERIONRM = 0x000007L, - rwVENDORID_CRITERIONRWA = 0x000008L, /* RenderWare Audio */ - rwPLUGINVENDORFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; -typedef enum RwPluginVendor RwPluginVendor; - -/*** - *** These are the core objects (8 bit IDs). They must all be unique. - *** We can get away without using the MAKECHUNKID macro because the - *** vendor ID in all cases will be zero (rwVENDORID_CORE). - *** - *** IMPORTANT NOTE: DO NOT UNDER ANY CIRCUMSTANCES CHANGE THESE VALUES. IF - *** YOU ARE ADDING A NEW ONE, APPEND IT! - ***/ - -/* These are the internal ones. Because the core ID is 0, we can get away without - * using the MAKECHUNKID macro for the CORE chunks. - */ - -enum RwCorePluginID -{ - rwID_NAOBJECT = 0x00, - rwID_STRUCT = 0x01, - rwID_STRING = 0x02, - rwID_EXTENSION = 0x03, - rwID_CAMERA = 0x05, - rwID_TEXTURE = 0x06, - rwID_MATERIAL = 0x07, - rwID_MATLIST = 0x08, - rwID_ATOMICSECT = 0x09, - rwID_PLANESECT = 0x0A, - rwID_WORLD = 0x0B, - rwID_SPLINE = 0x0C, - rwID_MATRIX = 0x0D, - rwID_FRAMELIST = 0x0E, - rwID_GEOMETRY = 0x0F, - rwID_CLUMP = 0x10, - rwID_LIGHT = 0x12, - rwID_UNICODESTRING = 0x13, - rwID_ATOMIC = 0x14, - rwID_TEXTURENATIVE = 0x15, - rwID_TEXDICTIONARY = 0x16, - rwID_ANIMDATABASE = 0x17, - rwID_IMAGE = 0x18, - rwID_SKINANIMATION = 0x19, - rwID_GEOMETRYLIST = 0x1A, - rwID_HANIMANIMATION = 0x1B, - rwID_TEAM = 0x1C, - rwID_CROWD = 0x1D, - rwID_DMORPHANIMATION = 0x1E, - rwID_RIGHTTORENDER = 0x1f, - rwID_MTEFFECTNATIVE = 0x20, - rwID_MTEFFECTDICT = 0x21, - rwID_TEAMDICTIONARY = 0x22, - rwID_PITEXDICTIONARY = 0x23, - rwID_TOC = 0x24, - rwID_PRTSTDGLOBALDATA = 0x25, - rwID_ALTPIPE = 0x26, - rwID_PIPEDS = 0x27, - /* Insert before MAX and increment MAX */ - rwID_COREPLUGINIDMAX = 0x28, - rwCOREPLUGINIDFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; -typedef enum RwCorePluginID RwCorePluginID ; - -/*** - *** These are the Criterion internal plugin extensions. Use with rwVENDORID_CRITERIONINT. - *** - *** IMPORTANT NOTE: DO NOT UNDER ANY CIRCUMSTANCES CHANGE THESE VALUES. IF - *** YOU ARE ADDING A NEW ONE, APPEND IT! - ***/ - -enum RwCriterionPluginID -{ - rwID_COREPLUGIN = 0x01, - rwID_WORLDPLUGIN = 0x02, - rwID_TOOLPLUGIN = 0x03, - rwID_TOOL2PLUGIN = 0x04, - rwCRITERIONPLUGINIDFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; -typedef enum RwCriterionPluginID RwCriterionPluginID; - - -/*** - *** These are the Criterion internal platform identifies. - *** - *** IMPORTANT NOTE: DO NOT UNDER ANY CIRCUMSTANCES CHANGE THESE VALUES. IF - *** YOU ARE ADDING A NEW ONE, APPEND IT! - ***/ -enum RwPlatformID -{ - rwID_PCD3D7 = 1, - rwID_PCOGL, - rwID_MAC, - rwID_PS2, - rwID_XBOX, - rwID_GAMECUBE, - rwID_SOFTRAS, - rwID_PCD3D8, - rwPLATFROMIDFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; -typedef enum RwPlatformID RwPlatformID; - - -/**************************************************************************** - Global Types - */ - -typedef struct RwObject RwObject; -#ifndef RWADOXYGENEXTERNAL -/** - * \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 */ - RwUInt8 subType; /**< Internal Use */ - RwUInt8 flags; /**< Internal Use */ - RwUInt8 privateFlags; /**< Internal Use */ - void *parent; /**< Internal Use */ - /* Often a Frame */ -}; - -#ifndef RWADOXYGENEXTERNAL -/** - * \ingroup rwobject - * \ref RwObjectCallBack - * callback function supplied for object callback functions. - * - * \param object Pointer to the current object, supplied by - * 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); - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* TYPE METHODS */ - -/* Creation/cloning */ - -#define rwObjectCopy(d,s) \ -MACRO_START \ -{ \ - ((RwObject *)(d))->type = \ - ((const RwObject *)(s))->type; \ - ((RwObject *)(d))->subType = \ - ((const RwObject *)(s))->subType; \ - ((RwObject *)(d))->flags = \ - ((const RwObject *)(s))->flags; \ - ((RwObject *)(d))->privateFlags = \ - ((const RwObject *)(s))->privateFlags; \ - ((RwObject *)(d))->parent = \ - NULL; \ -} \ -MACRO_STOP - -#define rwObjectInitialize(o, t, s) \ -MACRO_START \ -{ \ - ((RwObject *)(o))->type = (RwUInt8)(t); \ - ((RwObject *)(o))->subType = (RwUInt8)(s); \ - ((RwObject *)(o))->flags = 0; \ - ((RwObject *)(o))->privateFlags = 0; \ - ((RwObject *)(o))->parent = NULL; \ -} \ -MACRO_STOP - -/* Debug */ -#define RwObjectGetType(o) (((const RwObject *)(o))->type) - -#define rwObjectSetType(o, t) (((RwObject *)(o))->type) = (RwUInt8)(t) - -/* Sub type */ -#define rwObjectGetSubType(o) (((const RwObject *)(o))->subType) -#define rwObjectSetSubType(o, t) (((RwObject *)(o))->subType) = (RwUInt8)(t) - -/* Flags */ -#define rwObjectGetFlags(o) (((const RwObject *)(o))->flags) -#define rwObjectSetFlags(o, f) (((RwObject *)(o))->flags) = (RwUInt8)(f) -#define rwObjectTestFlags(o, f) ((((const RwObject *)(o))->flags) & (RwUInt8)(f)) - -/* Private flags */ -#define rwObjectGetPrivateFlags(c) (((const RwObject *)(c))->privateFlags) -#define rwObjectSetPrivateFlags(c,f) (((RwObject *)(c))->privateFlags) = (RwUInt8)(f) -#define rwObjectTestPrivateFlags(c,flag) ((((const RwObject *)(c))->privateFlags) & (RwUInt8)(flag)) - -/* Hierarchy */ -#define rwObjectGetParent(object) (((const RwObject *)(object))->parent) -#define rwObjectSetParent(c,p) (((RwObject *)(c))->parent) = (void *)(p) - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/os/win/osintf.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/rwstring.h ---*/ - -/**************************************************************************** - Defines - */ - -#define rwsprintf RWSRCGLOBAL(stringFuncs).vecSprintf -#define rwvsprintf RWSRCGLOBAL(stringFuncs).vecVsprintf -#define rwstrcpy RWSRCGLOBAL(stringFuncs).vecStrcpy -#define rwstrncpy RWSRCGLOBAL(stringFuncs).vecStrncpy -#define rwstrcat RWSRCGLOBAL(stringFuncs).vecStrcat -#define rwstrncat RWSRCGLOBAL(stringFuncs).vecStrncat -#define rwstrrchr RWSRCGLOBAL(stringFuncs).vecStrrchr -#define rwstrchr RWSRCGLOBAL(stringFuncs).vecStrchr -#define rwstrstr RWSRCGLOBAL(stringFuncs).vecStrstr -#define rwstrcmp RWSRCGLOBAL(stringFuncs).vecStrcmp -#define rwstricmp RWSRCGLOBAL(stringFuncs).vecStricmp -#define rwstrlen RWSRCGLOBAL(stringFuncs).vecStrlen -#define rwstrupr RWSRCGLOBAL(stringFuncs).vecStrupr -#define rwstrlwr RWSRCGLOBAL(stringFuncs).vecStrlwr -#define rwstrtok RWSRCGLOBAL(stringFuncs).vecStrtok -#define rwsscanf RWSRCGLOBAL(stringFuncs).vecSscanf - -#define rwstrdup(_result, _string) \ -do \ -{ \ - _result = ((RwChar*)NULL); \ - \ - if (((RwChar*)NULL) != (_string)) \ - { \ - _result = (RwChar *) \ - RwMalloc( (rwstrlen(_string) + 1) * \ - sizeof (RwChar) ); \ - \ - if (((RwChar*)NULL) != (_result)) \ - { \ - rwstrcpy(_result, _string); \ - } \ - } \ -} \ -while (0) - - -/**************************************************************************** - Global Types - */ - -typedef int (*vecSprintfFunc)(RwChar *buffer, - const RwChar *format, - ...) /* __RWFORMAT__(printf, 2, 3) */; -typedef int (*vecVsprintfFunc)(RwChar *buffer, - const RwChar *format, - va_list argptr); -typedef RwChar *(*vecStrcpyFunc)(RwChar *dest, - const RwChar *srce); -typedef RwChar *(*vecStrncpyFunc)(RwChar *dest, - const RwChar *srce, - size_t size); -typedef RwChar *(*vecStrcatFunc)(RwChar *dest, - const RwChar *srce); -typedef RwChar *(*vecStrncatFunc)(RwChar *dest, - const RwChar *srce, - size_t size); -typedef RwChar *(*vecStrrchrFunc)(const RwChar *string, - int findThis); -typedef RwChar *(*vecStrchrFunc)(const RwChar *string, - int findThis); -typedef RwChar *(*vecStrstrFunc)(const RwChar *string, - const RwChar *findThis); -typedef int (*vecStrcmpFunc)(const RwChar *string1, - const RwChar *string2); -typedef int (*vecStricmpFunc)(const RwChar *string1, - const RwChar *string2); -typedef size_t (*vecStrlenFunc)(const RwChar *string); -typedef RwChar *(*vecStruprFunc)(RwChar *string); -typedef RwChar *(*vecStrlwrFunc)(RwChar *string); -typedef RwChar *(*vecStrtokFunc)(RwChar *string, const RwChar *delimit); -typedef int (*vecSscanfFunc)(const RwChar *buffer, - const RwChar *format, - ...) /* __RWFORMAT__(scanf, 2, 3) */; - -typedef struct RwStringFunctions RwStringFunctions; - -#if (!defined(DOXYGEN)) -struct RwStringFunctions -{ - vecSprintfFunc vecSprintf ; - vecVsprintfFunc vecVsprintf; - vecStrcpyFunc vecStrcpy; - vecStrncpyFunc vecStrncpy; - vecStrcatFunc vecStrcat; - vecStrncatFunc vecStrncat; - vecStrrchrFunc vecStrrchr; - vecStrchrFunc vecStrchr; - vecStrstrFunc vecStrstr; - vecStrcmpFunc vecStrcmp; - vecStricmpFunc vecStricmp; - vecStrlenFunc vecStrlen; - vecStruprFunc vecStrupr; - vecStrlwrFunc vecStrlwr; - vecStrtokFunc vecStrtok; - vecSscanfFunc vecSscanf; -}; -#endif /* (!defined(DOXYGEN)) */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/rwdbgerr.h ---*/ -#define RWECODE(a,b) a, - -/* Construct an enum type with all the plugin error codes (for the app to use) */ -enum RwErrorCodePlugin_errcore -{ -#include "errcore.def" - rwLASTERROR_errcore = RWFORCEENUMSIZEINT -}; -typedef enum RwErrorCodePlugin_errcore RwErrorCodePlugin_errcore; - - -#undef RWECODE - - -/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/resmem.h ---*/ - -/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/bamemory.h ---*/ -#if (defined(RWMEMDEBUG)) -#ifdef _XBOX -/* Need OutputDebugString macros */ -#include -#endif -#endif - -/**************************************************************************** - Defines - */ - -/* - * Debug fill bytes for compatibility with MSVC/C++ debug heap - * See - * \Program Files\Microsoft Visual Studio\VC98\CRT\SRC\DBGHEAP.C: - * static unsigned char _bNoMansLandFill = 0xFD; - * // fill no-man's land with this - * static unsigned char _bDeadLandFill = 0xDD; - * // fill free objects with this - * static unsigned char _bCleanLandFill = 0xCD; - * // fill new objects with this - */ - -#if (!defined(rwFREELISTNOMANSLANDFILL)) -#define rwFREELISTNOMANSLANDFILL 0xFD -#endif /* (!defined(rwFREELISTNOMANSLANDFILL)) */ - -#if (!defined(rwFREELISTDEADLANDFILL)) -#define rwFREELISTDEADLANDFILL 0xDD -#endif /* (!defined(rwFREELISTDEADLANDFILL)) */ - -#if (!defined(rwFREELISTCLEANLANDFILL)) -#define rwFREELISTCLEANLANDFILL 0xCD -#endif /* (!defined(rwFREELISTCLEANLANDFILL)) */ - -#define RWFREELISTALIGNED(_pData, _freelist) \ - (! (((RwUInt32)(_pData)) & ((_freelist)->alignment - 1)) ) - -/***************************** - * REGULAR MEMORY ALLOCATION * - *****************************/ - -/** - * \ingroup memoryfileinterface - * \def RwMalloc - * RwMalloc(_s) is a macro for malloc(_s). - */ - -/** - * \ingroup memoryfileinterface - * \def RwFree - * RwFree(_p) is a macro for free(_p). - */ - -/** - * \ingroup memoryfileinterface - * \def RwCalloc - * RwCalloc(_n, _s) is a macro for calloc(_n, _s). - */ - -/** - * \ingroup memoryfileinterface - * \def RwRealloc - * RwRealloc(_p, _s) is a macro for realloc(_p, _s). - */ - -#if ( (defined(RWMEMDEBUG)) && defined(RWDEBUG) ) - -#if (!defined(RWNOFREELISTS)) -#define RWNOFREELISTS -#endif /* (!defined(RWNOFREELISTS)) */ - -#if (defined(rwPLUGIN_ID)) -#define _CLIENT_TAG \ - ( 0xFFFF & (rwPLUGIN_ID) ) -#endif /* (defined(rwPLUGIN_ID)) */ - -#if (!defined(_CLIENT_TAG)) -#define _CLIENT_TAG \ - ( 0xFFFF & (MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x00) ) ) -#endif /* (!defined(_CLIENT_TAG)) */ - -# if (defined(_MSC_VER)) -# if ((_MSC_VER>=1000) && defined(_DEBUG)) - -#if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) -#define _CRTDBG_MAP_ALLOC -#endif /* defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) */ -#include - -#define RwMalloc(_s) \ - _malloc_dbg((_s), \ - _CLIENT_BLOCK | ((_CLIENT_TAG)<<16), \ - __FILE__, \ - __LINE__) - -#define RwFree(_p) \ - _free_dbg((_p), \ - _CLIENT_BLOCK | ((_CLIENT_TAG)<<16)) - -#define RwCalloc(_n, _s) \ - _calloc_dbg((_n), (_s), \ - _CLIENT_BLOCK | ((_CLIENT_TAG)<<16), \ - __FILE__, \ - __LINE__) - -#define RwRealloc(_p, _s) \ - _realloc_dbg((_p), \ - (_s), \ - _CLIENT_BLOCK | ((_CLIENT_TAG)<<16), \ - __FILE__, \ - __LINE__) - -#define RWCRTORDBGFLAG(_flag) \ - do \ - { \ - int _DbgFlag; \ - \ - _DbgFlag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); \ - _DbgFlag |= (_flag); \ - _CrtSetDbgFlag(_DbgFlag); \ - } while(0) - -#define VALID_HEAP_STR \ - __FILE__##"("##RW_STRINGIFY_EXPANDED(__LINE__)##"): valid heap\n" - -#define RWCRTCHECKMEMORY() \ - do \ - { \ - int valid_heap; \ - \ - valid_heap = _CrtCheckMemory(); \ - _ASSERTE(valid_heap); \ - } while(0) - -/* - * if (valid_heap) \ - * OutputDebugString(VALID_HEAP_STR); \ - */ - -#define NO_LEAKS_FOUND_STR \ - __FILE__##"("##RW_STRINGIFY_EXPANDED(__LINE__)##"): no heap leaks found\n" - -#define RWCRTDUMPMEMORYLEAKS() \ - do \ - { \ - int leaks_found; \ - \ - leaks_found = _CrtDumpMemoryLeaks(); \ - _ASSERTE(!leaks_found); \ - if (!leaks_found) \ - OutputDebugString(NO_LEAKS_FOUND_STR); \ - } while(0) - -#define HEAP_DIFFERENCES_FOUND_STR \ - __FILE__##"("##RW_STRINGIFY_EXPANDED(__LINE__)##"): heap differences found\n" - -#define NO_DIFFERENCES_FOUND_STR \ - __FILE__##"("##RW_STRINGIFY_EXPANDED(__LINE__)##"): no heap differences found\n" - -#define RWCRTHEAPDIFFERENCESINCE(_Then) \ - do \ - { \ - /* only dump differences when \ - * there are in fact differences */ \ - _CrtMemState _Now; \ - _CrtMemState _Delta; \ - const int _DbgFlag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); \ - int Differences; \ - \ - _CrtMemCheckpoint(&_Now); \ - _CrtMemDifference(&_Delta, _Then, &_Now); \ - \ - (Differences) = ( ( 0 != _Delta.lCounts[_CLIENT_BLOCK] ) || \ - ( 0 != _Delta.lCounts[_NORMAL_BLOCK] ) || \ - ( (_DbgFlag & _CRTDBG_CHECK_CRT_DF) && \ - ( 0 != _Delta.lCounts[_CRT_BLOCK]) ) ); \ - \ - if ( (Differences) ) \ - { \ - /* difference detected: dump objects since _Then. */ \ - OutputDebugString(HEAP_DIFFERENCES_FOUND_STR); \ - _CrtMemDumpAllObjectsSince(_Then); \ - _CrtMemDumpStatistics(&_Delta); \ - } \ - else \ - { \ - OutputDebugString(NO_DIFFERENCES_FOUND_STR); \ - } \ - } while (0) - -#define RWCRTDBGBREAK() \ - _CrtDbgBreak() - -#define RWCRTDOFORALLCLIENTOBJECTS(_f, _c) \ - _CrtDoForAllClientObjects(_f, _c) - -#define RWCRTISMEMORYBLOCK(_p, _t, _r, _f, _l) \ - _CrtIsMemoryBlock(_p, _t, _r, _f, _l) - -#define RWCRTISVALIDHEAPPOINTER(_p) \ - _CrtIsValidHeapPointer(_p) - -#define RWCRTISVALIDPOINTER(_p, _n, _r) \ - _CrtIsValidPointer(_p, _n, _r) - -#define RWCRTMEMCHECKPOINT(_s) \ - _CrtMemCheckpoint(_s) - -#define RWCRTMEMDIFFERENCE(_s1, _s2, _s3) \ - _CrtMemDifference(_s1, _s2, _s3) - -#define RWCRTMEMDUMPALLOBJECTSSINCE(_s) \ - _CrtMemDumpAllObjectsSince(_s) - -#define RWCRTMEMDUMPSTATISTICS(_s) \ - _CrtMemDumpStatistics(_s) - -#define RWCRTSETALLOCHOOK(_f) \ - _CrtSetAllocHook(_f) - -#define RWCRTSETBREAKALLOC(_a) \ - _CrtSetBreakAlloc(_a) - -#define RWCRTSETDBGFLAG(_f) \ - _CrtSetDbgFlag(_f) - -#define RWCRTSETDUMPCLIENT(_f) \ - _CrtSetDumpClient(_f) - -#define RWCRTSETREPORTFILE(_t, _f) \ - _CrtSetReportFile(_t, _f) - -#define RWCRTSETREPORTHOOK(_f) \ - _CrtSetReportHook(_f) - -#define RWCRTSETREPORTMODE(_t, _f) \ - _CrtSetReportMode(_t, _f) - -#if (!defined(_CRTDBG_FLAGS)) -#define _CRTDBG_FLAGS \ - ( (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_DELAY_FREE_MEM_DF | \ - _CRTDBG_CHECK_CRT_DF | _CRTDBG_LEAK_CHECK_DF) & \ - ~(_CRTDBG_CHECK_ALWAYS_DF |_CRTDBG_RESERVED_DF) ) -#endif /* (!defined(_CRTDBG_FLAGS)) */ - -# endif /* ((_MSC_VER>=1000) && defined(_DEBUG)) */ -# endif /* (defined(_MSC_VER)) */ - - - -#if (!defined(rwDEADPTRFILL)) -#define rwDEADPTRFILL ((void *)0xDDDDDDDD) -#endif /* (!defined(rwDEADPTRFILL)) */ - -#endif /* (defined(RWDEBUG) && (defined(RWMEMDEBUG))) */ - -#if (!defined(rwDEADPTRFILL)) -#define rwDEADPTRFILL (NULL) -#endif /* (!defined(rwDEADPTRFILL)) */ - -#if (!defined(RwMalloc)) -#define RwMalloc(_s) ((RWSRCGLOBAL(memoryFuncs).rwmalloc)((_s))) -#endif /* (!defined(RwMalloc)) */ - -#if (!defined(RwFree)) -#define RwFree(_p) ((RWSRCGLOBAL(memoryFuncs).rwfree)((_p))) -#endif /* (!defined(RwFree)) */ - -#if (!defined(RwCalloc)) -#define RwCalloc(_n, _s) ((RWSRCGLOBAL(memoryFuncs).rwcalloc)((_n), (_s))) -#endif /* (!defined(RwCalloc)) */ - -#if (!defined(RwRealloc)) -#define RwRealloc(_p, _s) ((RWSRCGLOBAL(memoryFuncs).rwrealloc)((_p),(_s))) -#endif /* (!defined(RwRealloc)) */ - -#if (!defined(RWCRTORDBGFLAG)) -#define RWCRTORDBGFLAG(_flag) /* No op */ -#endif /* (!defined(RWCRTORDBGFLAG)) */ - -#if (!defined(RWCRTCHECKMEMORY)) -#define RWCRTCHECKMEMORY() /* No Op */ -#endif /* (!defined(RWCRTCHECKMEMORY)) */ - -#if (!defined(RWCRTDBGBREAK)) -#define RWCRTDBGBREAK() /* No Op */ -#endif /* (!defined(RWCRTDBGBREAK)) */ - -#if (!defined(RWCRTDOFORALLCLIENTOBJECTS)) -#define RWCRTDOFORALLCLIENTOBJECTS(_f, _c) /* No Op */ -#endif /* (!defined(RWCRTDOFORALLCLIENTOBJECTS)) */ - -#if (!defined(RWCRTDUMPMEMORYLEAKS)) -#define RWCRTDUMPMEMORYLEAKS() /* No Op */ -#endif /* (!defined(RWCRTDUMPMEMORYLEAKS)) */ - -#if (!defined(RWCRTHEAPDIFFERENCESINCE)) -#define RWCRTHEAPDIFFERENCESINCE(_Then) /* No Op */ -#endif /* (!defined(RWCRTHEAPDIFFERENCESINCE)) */ - -#if (!defined(RWCRTISMEMORYBLOCK)) -#define RWCRTISMEMORYBLOCK(_p, _t, _r, _f, _l) (NULL != (_p)) -#endif /* (!defined(RWCRTISMEMORYBLOCK)) */ - -#if (!defined(RWCRTISVALIDHEAPPOINTER)) -#define RWCRTISVALIDHEAPPOINTER(_p) (NULL != (_p)) -#endif /* (!defined(RWCRTISVALIDHEAPPOINTER)) */ - -#if (!defined(RWCRTISVALIDPOINTER)) -#define RWCRTISVALIDPOINTER(_p, _n, _r) (NULL != (_p)) -#endif /* (!defined(RWCRTISVALIDPOINTER)) */ - -#if (!defined(RWCRTMEMCHECKPOINT)) -#define RWCRTMEMCHECKPOINT(_s) /* No Op */ -#endif /* (!defined(RWCRTMEMCHECKPOINT)) */ - -#if (!defined(RWCRTMEMDIFFERENCE)) -#define RWCRTMEMDIFFERENCE(_s1, _s2, _s3) /* No Op */ -#endif /* (!defined(RWCRTMEMDIFFERENCE)) */ - -#if (!defined(RWCRTMEMDUMPALLOBJECTSSINCE)) -#define RWCRTMEMDUMPALLOBJECTSSINCE(_s) /* No Op */ -#endif /* (!defined(RWCRTMEMDUMPALLOBJECTSSINCE)) */ - -#if (!defined(RWCRTMEMDUMPSTATISTICS)) -#define RWCRTMEMDUMPSTATISTICS(_s) (NULL) -#endif /* (!defined(RWCRTMEMDUMPSTATISTICS)) */ - -#if (!defined(RWCRTSETALLOCHOOK)) -#define RWCRTSETALLOCHOOK(_f) (NULL) -#endif /* (!defined(RWCRTSETALLOCHOOK)) */ - -#if (!defined(RWCRTSETBREAKALLOC)) -#define RWCRTSETBREAKALLOC(_a) (0) -#endif /* (!defined(RWCRTSETBREAKALLOC)) */ - -#if (!defined(RWCRTSETDBGFLAG)) -#define RWCRTSETDBGFLAG(_f) (0) -#endif /* (!defined(RWCRTSETDBGFLAG)) */ - -#if (!defined(RWCRTSETDUMPCLIENT)) -#define RWCRTSETDUMPCLIENT(_f) (NULL) -#endif /* (!defined(RWCRTSETDUMPCLIENT)) */ - -#if (!defined(RWCRTSETREPORTFILE)) -#define RWCRTSETREPORTFILE(_t, _f) (NULL) -#endif /* (!defined(RWCRTSETREPORTFILE)) */ - -#if (!defined(RWCRTSETREPORTHOOK)) -#define RWCRTSETREPORTHOOK(_f) (NULL) -#endif /* (!defined(RWCRTSETREPORTHOOK)) */ - -#if (!defined(RWCRTSETREPORTMODE)) -#define RWCRTSETREPORTMODE(_t, _f) (0) -#endif /* (!defined(RWCRTSETREPORTMODE)) */ - -#if (!defined(RWREGSETBREAKALLOC)) -#define RWREGSETBREAKALLOC(_name) /* No op */ -#endif /* (!defined(RWREGSETBREAKALLOC)) */ - -#if (!defined(RWREGSETASSERTPRINT)) -#define RWREGSETASSERTPRINT(_name) /* No op */ -#endif /* (!defined(RWREGSETASSERTPRINT)) */ - -#if (!defined(RWGETWINREGDWORD)) -#define RWGETWINREGDWORD(_env_var, _match) /* No op */ -#endif /* (!defined(RWGETWINREGDWORD)) */ - -#if (!defined(RWGETWINREGBINARY)) -#define RWGETWINREGBINARY(_env_var, _match) /* No op */ -#endif /* (!defined(RWGETWINREGBINARY)) */ - -#if (!defined(RWGETWINREGSTRING)) -#define RWGETWINREGSTRING(_env_var, _match) /* No op */ -#endif /* (!defined(RWGETWINREGSTRING)) */ - -#if (!defined(_CRTDBG_FLAGS)) -#define _CRTDBG_FLAGS 0x33 -#endif /* (!defined(_CRTDBG_FLAGS)) */ - -/**************************************************************************** - Global Types - */ - -typedef struct RwMemoryFunctions RwMemoryFunctions; -/** - * \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 (in RenderWare Graphics see API function RwEngineInit): - */ -struct RwMemoryFunctions -{ - /* c.f. - * Program Files/Microsoft Visual Studio/VC98/Include/MALLOC.H - */ - void *(*rwmalloc)(size_t size); /**< rwmalloc malloc */ - void (*rwfree)(void *mem); /**< rwfree free */ - void *(*rwrealloc)(void *mem, size_t newSize); /**< rwrealloc realloc */ - void *(*rwcalloc)(size_t numObj, size_t sizeObj); /**< calloc calloc */ -}; - - /** - * \ingroup rwfreelist - * The free list was statically allocated - * - * \see RwFreeListSetFlags - */ -#define rwFREELISTFLAG_STATIC 0x00000001 - -/** - * \ingroup rwfreelist - * \hideinitializer - * Free blocks as soon as they are empty - * - * \see RwFreeListSetFlags - */ -#define rwFREELISTFLAG_FREEBLOCKS 0x00000002 - - -typedef struct RwFreeList RwFreeList; - -/** - * \ingroup rwfreelist - * Holds free list info, should be considered opaque. Use API functions to access. - */ -struct RwFreeList -{ - RwUInt32 entrySize; /** - rwFREELISTFLAG_FREEBLOCKS */ - RwLLLink link; /** - -#define RwFreeListAlloc(_f) \ - memalign(((_f)->alignment), (_f)->entrySize) - -#else /* ((defined(__MWERKS__) || defined(__GNUC__)) && defined(__R5900__)) */ - -#define RwFreeListAlloc(_f) \ - RwMalloc((_f)->entrySize) - -#endif /* ((defined(__MWERKS__) || defined(__GNUC__)) && defined(__R5900__)) */ - -#define RwFreeListFree(_f, _p) \ - RwFree((_p)) - -#endif /* (defined(RWDEBUG) && defined(RWNOFREELISTS) && !defined(RWKEEPFREELISTS)) */ - -#if (!defined(RwFreeListAlloc)) -#define RwFreeListAlloc(_f) \ - RWSRCGLOBAL(memoryAlloc)(_f) -#endif /* (!defined(RwFreeListAlloc)) */ - -#if (!defined(RwFreeListFree)) -#define RwFreeListFree(_f, _p) \ - RWSRCGLOBAL(memoryFree)(_f, _p) -#endif /* (!defined(RwFreeListFree)) */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/bastream.h ---*/ - -/**************************************************************************** - Defines - */ - -#define rwSTREAMSTACKSIZE 512 - -/**************************************************************************** - Global Types - */ - -/** - * \ingroup rwstream - * \ref RwStreamType - * This type represents the different types of stream that - * can be used. - * See API section \ref rwstream - */ -enum RwStreamType -{ - rwNASTREAM = 0, /**=1000) && defined(_DEBUG)) - -typedef char MatrixString[1024]; - -#define RWMATRIXPRINT(_matrix) \ -MACRO_START \ -{ \ - MatrixString message; \ - MatrixString output; \ - \ - if (NULL != (_matrix)) \ - { \ - const RwV3d * const _x = &(_matrix)->right; \ - const RwV3d * const _y = &(_matrix)->up; \ - const RwV3d * const _z = &(_matrix)->at; \ - const RwV3d * const _w = &(_matrix)->pos; \ - \ - _snprintf(message, sizeof(MatrixString), \ - "[ [ %8.4f, %8.4f, %8.4f, %8.4f ]\n" \ - " [ %8.4f, %8.4f, %8.4f, %8.4f ]\n" \ - " [ %8.4f, %8.4f, %8.4f, %8.4f ]\n" \ - " [ %8.4f, %8.4f, %8.4f, %8.4f ] ]\n" \ - " %08x == flags\n", \ - _x->x, _x->y, _x->z, (RwReal) 0, \ - _y->x, _y->y, _y->z, (RwReal) 0, \ - _z->x, _z->y, _z->z, (RwReal) 0, \ - _w->x, _w->y, _w->z, (RwReal) 1, \ - (_matrix)->flags); \ - } \ - else \ - { \ - _snprintf(message, sizeof(MatrixString), \ - "NULL"); \ - } \ - \ - _snprintf(output, sizeof(MatrixString), \ - "%s(%d): %s [%p] ==\n%s\n", \ - __FILE__, __LINE__, \ - #_matrix, _matrix, message); \ - \ - OutputDebugString(RWSTRING(output)); \ -} \ -MACRO_STOP - -# endif /* ((_MSC_VER>=1000) && defined(_DEBUG)) */ -# endif /* (defined(_MSC_VER)) */ -#endif /* (defined(RWMATRIXMONITOR)) */ - -#if (!(defined(RWMATRIXPRINT))) -#define RWMATRIXPRINT(_matrix) /* No op */ -#endif /* (!(defined(RWMATRIXPRINT))) */ - -#ifndef RWADOXYGENEXTERNAL -/** - * \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, /**right.x = (m)->up.y = (m)->at.z = (RwReal)((1.0)); \ - (m)->right.y = (m)->right.z = (m)->up.x = (RwReal)((0.0)); \ - (m)->up.z = (m)->at.x = (m)->at.y = (RwReal)((0.0)); \ - (m)->pos.x = (m)->pos.y = (m)->pos.z = (RwReal)((0.0)); \ - rwMatrixSetFlags((m), \ - rwMatrixGetFlags(m) | \ - (rwMATRIXINTERNALIDENTITY | \ - rwMATRIXTYPEORTHONORMAL)); \ -} \ -MACRO_STOP -#endif /* (!defined(RwMatrixSetIdentityMacro)) */ - -typedef void (RWASMCALL * rwMatrixMultFn) (RwMatrix * dstMat, - const RwMatrix * matA, - const RwMatrix * matB); - -typedef struct RwMatrixTolerance RwMatrixTolerance; - -#ifndef RWADOXYGENEXTERNAL -/** - * \ingroup rwmatrix - * \struct RwMatrixTolerance - * Holds tolerances for matrix optimizations with \ref RwMatrixOptimize - */ -#endif /* RWADOXYGENEXTERNAL */ -struct RwMatrixTolerance -{ - RwReal Normal; - /**< Tolerance within which matrix is deemed to be normal */ - RwReal Orthogonal; - /**< Tolerance within which matrix is deemed to be orthogonal */ - RwReal Identity; - /**< Tolerance within which matrix is deemed to be identity */ -}; - - -/**************************************************************************** - Function prototypes - */ - -/* Matrix operations */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -extern RwBool -RwEngineGetMatrixTolerances(RwMatrixTolerance * const tolerance); - -extern RwBool -RwEngineSetMatrixTolerances(const RwMatrixTolerance * const tolerance); - -/* Update */ -#define rwMatrixSetFlags(m, flagsbit) ((m)->flags = (flagsbit)) -#define rwMatrixGetFlags(m) ((m)->flags) -#define rwMatrixTestFlags(m, flagsbit) ((m)->flags & (RwInt32)(flagsbit)) - -/* Creation/destruction */ -extern void -RwMatrixSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc ); - -extern RwBool -RwMatrixDestroy(RwMatrix * mpMat); - -extern RwMatrix * -RwMatrixCreate(void); - -#ifdef RWDEBUG - -/* Functions for debug */ -extern void -RwMatrixCopy(RwMatrix * dstMatrix, const RwMatrix * srcMatrix); - -extern void -RwMatrixSetIdentity(RwMatrix * matrix); - -#else /* RWDEBUG */ - -#define RwMatrixCopy(dst, src) RwMatrixCopyMacro(dst, src) -#define RwMatrixSetIdentity(m) RwMatrixSetIdentityMacro(m) - -#endif /* RWDEBUG */ - -/* Matrix multiply */ -extern RwMatrix * -RwMatrixMultiply(RwMatrix * matrixOut, - const RwMatrix * MatrixIn1, - const RwMatrix * matrixIn2); - -extern RwMatrix * -RwMatrixTransform(RwMatrix * matrix, - const RwMatrix * transform, - RwOpCombineType combineOp); - -/* Normalise */ -extern RwMatrix * -RwMatrixOrthoNormalize(RwMatrix * matrixOut, - const RwMatrix * matrixIn); - -/* Inversion */ -extern RwMatrix * -RwMatrixInvert(RwMatrix * matrixOut, - const RwMatrix * matrixIn); - -/* Unary matrix operations */ -extern RwMatrix * -RwMatrixScale(RwMatrix * matrix, - const RwV3d * scale, - RwOpCombineType combineOp); - -extern RwMatrix * -RwMatrixTranslate(RwMatrix * matrix, - const RwV3d * translation, - RwOpCombineType combineOp); - -extern RwMatrix * -RwMatrixRotate(RwMatrix * matrix, - const RwV3d * axis, - RwReal angle, - RwOpCombineType combineOp); - -extern RwMatrix * -RwMatrixRotateOneMinusCosineSine(RwMatrix * matrix, - const RwV3d * unitAxis, - RwReal oneMinusCosine, - RwReal sine, - RwOpCombineType combineOp); - -/* Query what the matrix is */ -extern const RwMatrix *RwMatrixQueryRotate(const RwMatrix * matrix, - RwV3d * unitAxis, - RwReal * angle, - RwV3d * center); - -/* Get components */ -#ifndef RWDEBUG - -#define RwMatrixGetRight(m) (&(m)->right) -#define RwMatrixGetUp(m) (&(m)->up) -#define RwMatrixGetAt(m) (&(m)->at) -#define RwMatrixGetPos(m) (&(m)->pos) - -#else /* RWDEBUG */ - -extern RwV3d * -RwMatrixGetRight(RwMatrix * matrix); - -extern RwV3d * -RwMatrixGetUp(RwMatrix * matrix); - -extern RwV3d * -RwMatrixGetAt(RwMatrix * matrix); - -extern RwV3d * -RwMatrixGetPos(RwMatrix * matrix); - -#endif /* RWDEBUG */ - -/* Update the internal matrix state wrt its elements */ -extern RwMatrix * -RwMatrixUpdate(RwMatrix * matrix); - -/* Update the internal matrix flags wrt its elements */ -extern RwMatrix * -RwMatrixOptimize(RwMatrix * matrix, - const RwMatrixTolerance * - tolerance); - -extern RwReal -_rwMatrixDeterminant(const RwMatrix * matrix); - -extern RwReal -_rwMatrixNormalError(const RwMatrix * matrix); - -extern RwReal -_rwMatrixOrthogonalError(const RwMatrix * matrix); - -extern RwReal -_rwMatrixIdentityError(const RwMatrix * matrix); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* Compatibility macros */ - -#define rwMatrixSetOptimizations(optimizeFlags) \ - _rwMatrixSetOptimizations(optimizeFlags) - -#define rwMatrixSetMultFn(multMat) \ - _rwMatrixSetMultFn(multMat) - -#define rwMatrixOpen(instance, offset, size) \ - _rwMatrixOpen(instance, offset, size) - -#define rwMatrixClose(instance, offset, size) \ - _rwMatrixClose(instance, offset, size) - -/* Initialisation/deinitialisation */ -#define rwMatrixInitialize(m, t) \ -MACRO_START \ -{ \ - rwMatrixSetFlags((m), (t)); \ -} \ -MACRO_STOP - -#define rwMatrixIsNormal(_matrix, _epsilon) \ - ( (_epsilon) >= _rwMatrixNormalError(_matrix) ) - -#define rwMatrixIsOrthogonal(_matrix, _epsilon) \ - ( (_epsilon) >= _rwMatrixOrthogonalError(_matrix) ) - -#define rwMatrixIsOrthonormal(_matrix, _epsilon) \ - ( rwMatrixIsNormal(_matrix, _epsilon) && \ - rwMatrixIsOrthogonal(_matrix, _epsilon) ) - -#define rwMatrixIsOrthonormalPositive(_matrix, _epsilon) \ - ( rwMatrixIsOrthonormal(_matrix, _epsilon) && \ -( (((RwReal)1) - (_epsilon)) <= _rwMatrixDeterminant(_matrix) ) ) - -#define rwMatrixIsIdentity(_matrix, _epsilon) \ - ( (_epsilon) >= _rwMatrixIdentityError(_matrix) ) - -#define rwMatrixValidFlags(_matrix, _epsilon) \ - ( (_matrix) && /* valid pointer */ \ - ( ( !( rwMatrixGetFlags(_matrix) & /* not flagged as identity */ \ - rwMATRIXINTERNALIDENTITY) ) || /* .. or actually is */ \ - rwMatrixIsIdentity(_matrix, _epsilon)) && \ - ( ( !( rwMatrixGetFlags(_matrix) & /* not flagged as normal */ \ - rwMATRIXTYPENORMAL) ) || /* ... or actually is */ \ - rwMatrixIsNormal(_matrix, _epsilon)) && \ - ( ( !( rwMatrixGetFlags(_matrix) & /* not flagged as orthogonal */ \ - rwMATRIXTYPEORTHOGONAL) ) || /* ... or actually is */ \ - rwMatrixIsOrthogonal(_matrix, _epsilon)) ) - -#define rwMat01Det(_mAA) \ - ( (_mAA) ) - -#define rwMat02Det(_mAA, _mAB, \ - _mBA, _mBB) \ - ( (_mAA) * rwMat01Det(_mBB) \ - - (_mAB) * rwMat01Det(_mBA) \ - ) - -#define rwMat03Det(_mAA, _mAB, _mAC, \ - _mBA, _mBB, _mBC, \ - _mCA, _mCB, _mCC) \ - ( (_mAA) * rwMat02Det(_mBB, _mBC, \ - _mCB, _mCC) \ - - (_mAB) * rwMat02Det(_mBA, _mBC, \ - _mCA, _mCC) \ - + (_mAC) * rwMat02Det(_mBA, _mBB, \ - _mCA, _mCB) \ - ) - -#define rwMat04Det(_mAA, _mAB, _mAC, _mAD, \ - _mBA, _mBB, _mBC, _mBD, \ - _mCA, _mCB, _mCC, _mCD, \ - _mDA, _mDB, _mDC, _mDD) \ - ( (_mAA) * rwMat03Det(_mBB, _mBC, _mBD, \ - _mCB, _mCC, _mCD, \ - _mDB, _mDC, _mDD) \ - - (_mAB) * rwMat03Det(_mBA, _mBC, _mBD, \ - _mCA, _mCC, _mCD, \ - _mDA, _mDC, _mDD) \ - + (_mAC) * rwMat03Det(_mBA, _mBB, _mBD, \ - _mCA, _mCB, _mCD, \ - _mDA, _mDB, _mDD) \ - - (_mAD) * rwMat03Det(_mBA, _mBB, _mBC, \ - _mCA, _mCB, _mCC, \ - _mDA, _mDB, _mDC) \ - ) - - -#define rwMat02Inv(_rAA, _rAB, \ - _rBA, _rBB) \ - _mAA, _mAB, \ - _mBA, _mBB) \ -MACRO_START \ -{ \ - RwSplitBits determinant; \ - \ - (_rAA) = rwMat01Det(_mBB); \ - (_rAB) = -rwMat01Det(_mAB); \ - \ - determinant.nReal = ( (_rAA) * (_mAA) + \ - (_rAB) * (_mBA) ); \ - \ - \ - { \ - const RwReal normalize = ( (determinant.nInt != 0)? \ - (((RwReal)1)/determinant.nReal): \ - ((RwReal)1) ); \ - \ - (_rAA) *= normalize; \ - (_rAB) *= normalize; \ - \ - (_rBA) = -rwMat01Det(_mBA) * normalize; \ - (_rBB) = rwMat01Det(_mAA) * normalize; \ - } \ -} \ -MACRO_STOP - -#define rwMat03Inv(_rAA, _rAB, _rAC, \ - _rBA, _rBB, _rBC, \ - _rCA, _rCB, _rCC, \ - _mAA, _mAB, _mAC, \ - _mBA, _mBB, _mBC, \ - _mCA, _mCB, _mCC) \ -MACRO_START \ -{ \ - RwSplitBits determinant; \ - \ - (_rAA)= rwMat02Det(_mBB, _mBC, \ - _mCB, _mCC); \ - (_rAB)= -rwMat02Det(_mAB, _mAC, \ - _mCB, _mCC); \ - (_rAC)= rwMat02Det(_mAB, _mAC, \ - _mBB, _mBC); \ - \ - determinant.nReal = ( (_rAA) * (_mAA) + \ - (_rAB) * (_mBA) + \ - (_rAC) * (_mCA) ); \ - \ - { \ - const RwReal normalize = ( (determinant.nInt != 0)? \ - (((RwReal)1)/determinant.nReal): \ - ((RwReal)1) ); \ - (_rAA) *= normalize; \ - (_rAB) *= normalize; \ - (_rAC) *= normalize; \ - \ - (_rBA)= -rwMat02Det(_mBA, _mBC, \ - _mCA, _mCC) * normalize ; \ - (_rBB)= rwMat02Det(_mAA, _mAC, \ - _mCA, _mCC) * normalize ; \ - (_rBC)= -rwMat02Det(_mAA, _mAC, \ - _mBA, _mBC) * normalize ; \ - \ - (_rCA)= rwMat02Det(_mBA, _mBB, \ - _mCA, _mCB) * normalize ; \ - (_rCB)= -rwMat02Det(_mAA, _mAB, \ - _mCA, _mCB) * normalize ; \ - (_rCC)= rwMat02Det(_mAA, _mAB, \ - _mBA, _mBB) * normalize ; \ - } \ - \ -} \ -MACRO_STOP - -#define rwMat04Inv(_rAA, _rAB, _rAC, _rAD, \ - _rBA, _rBB, _rBC, _rBD, \ - _rCA, _rCB, _rCC, _rCD, \ - _rDA, _rDB, _rDC, _rDD, \ - _mAA, _mAB, _mAC, _mAD, \ - _mBA, _mBB, _mBC, _mBD, \ - _mCA, _mCB, _mCC, _mCD, \ - _mDA, _mDB, _mDC, _mDD) \ -MACRO_START \ -{ \ - RwSplitBits determinant; \ - \ - (_rAA)= rwMat03Det(_mBB, _mBC, _mBD, \ - _mCB, _mCC, _mCD, \ - _mDB, _mDC, _mDD); \ - (_rAB)= -rwMat03Det(_mAB, _mAC, _mAD, \ - _mCB, _mCC, _mCD, \ - _mDB, _mDC, _mDD); \ - (_rAC)= rwMat03Det(_mAB, _mAC, _mAD, \ - _mBB, _mBC, _mBD, \ - _mDB, _mDC, _mDD); \ - (_rAD)= -rwMat03Det(_mAB, _mAC, _mAD, \ - _mBB, _mBC, _mBD, \ - _mCB, _mCC, _mCD); \ - \ - determinant.nReal = ( (_rAA) * (_mAA) + \ - (_rAB) * (_mBA) + \ - (_rAC) * (_mCA) + \ - (_rAD) * (_mDA) ); \ - \ - { \ - const RwReal normalize = ( (determinant.nInt != 0)? \ - (((RwReal)1)/determinant.nReal): \ - ((RwReal)1) ); \ - \ - (_rAA) *= normalize; \ - (_rAB) *= normalize; \ - (_rAC) *= normalize; \ - (_rAD) *= normalize; \ - \ - (_rBA)= -rwMat03Det(_mBA, _mBC, _mBD, \ - _mCA, _mCC, _mCD, \ - _mDA, _mDC, _mDD) * normalize ; \ - (_rBB)= rwMat03Det(_mAA, _mAC, _mAD, \ - _mCA, _mCC, _mCD, \ - _mDA, _mDC, _mDD) * normalize ; \ - (_rBC)= -rwMat03Det(_mAA, _mAC, _mAD, \ - _mBA, _mBC, _mBD, \ - _mDA, _mDC, _mDD) * normalize ; \ - (_rBD)= rwMat03Det(_mAA, _mAC, _mAD, \ - _mBA, _mBC, _mBD, \ - _mCA, _mCC, _mCD) * normalize ; \ - \ - (_rCA)= rwMat03Det(_mBA, _mBB, _mBD, \ - _mCA, _mCB, _mCD, \ - _mDA, _mDB, _mDD) * normalize ; \ - (_rCB)= -rwMat03Det(_mAA, _mAB, _mAD, \ - _mCA, _mCB, _mCD, \ - _mDA, _mDB, _mDD) * normalize ; \ - (_rCC)= rwMat03Det(_mAA, _mAB, _mAD, \ - _mBA, _mBB, _mBD, \ - _mDA, _mDB, _mDD) * normalize ; \ - (_rCD)= -rwMat03Det(_mAA, _mAB, _mAD, \ - _mBA, _mBB, _mBD, \ - _mCA, _mCB, _mCD) * normalize ; \ - \ - (_rDA)= -rwMat03Det(_mBA, _mBB, _mBC, \ - _mCA, _mCB, _mCC, \ - _mDA, _mDB, _mDC) * normalize ; \ - (_rDB)= rwMat03Det(_mAA, _mAB, _mAC, \ - _mCA, _mCB, _mCC, \ - _mDA, _mDB, _mDC) * normalize ; \ - (_rDC)= -rwMat03Det(_mAA, _mAB, _mAC, \ - _mBA, _mBB, _mBC, \ - _mDA, _mDB, _mDC) * normalize ; \ - (_rDD)= rwMat03Det(_mAA, _mAB, _mAC, \ - _mBA, _mBB, _mBC, \ - _mCA, _mCB, _mCC) * normalize ; \ - } \ -} \ -MACRO_STOP - - -/*--- Automatically derived from: C:/daily/rwsdk/driver/d3d8/drvmodel.h ---*/ -#ifndef D3D8_DRVMODEL_H -#define D3D8_DRVMODEL_H - -#if (defined(__ICL)) -/* Avoid voluminous - * 'warning #344: typedef name has already been declared (with same type)' - * warnings from MS include files - */ -#pragma warning( disable : 344 ) -#endif /* (defined(__ICL)) */ - - -#if (defined(RWDEBUG)) -#if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) -#define _CRTDBG_MAP_ALLOC -#endif /* defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) */ -#include -#define ERR_WRAP(A) (_rwRePrintErrorDDD3D((A), __FILE__, __LINE__)) -#endif /* (defined(RWDEBUG)) */ - -#if (!defined(ERR_WRAP)) -#define ERR_WRAP(A) (A) -#endif /* (!defined(ERR_WRAP)) */ - -/**************************************************************************** - Defines - */ - -/* Set true depth information (for fogging, eg) */ -#define RwIm2DVertexSetCameraX(vert, camx) /* Nothing */ -#define RwIm2DVertexSetCameraY(vert, camy) /* Nothing */ -#define RwIm2DVertexSetCameraZ(vert, camz) /* Nothing */ - -#define RwIm2DVertexSetRecipCameraZ(vert, recipz) ((vert)->rhw = recipz) - -#define RwIm2DVertexGetCameraX(vert) (cause an error) -#define RwIm2DVertexGetCameraY(vert) (cause an error) -#define RwIm2DVertexGetCameraZ(vert) (cause an error) -#define RwIm2DVertexGetRecipCameraZ(vert) ((vert)->rhw) - -/* Set screen space coordinates in a device vertex */ -#define RwIm2DVertexSetScreenX(vert, scrnx) ((vert)->x = (scrnx)) -#define RwIm2DVertexSetScreenY(vert, scrny) ((vert)->y = (scrny)) -#define RwIm2DVertexSetScreenZ(vert, scrnz) ((vert)->z = (scrnz)) -#define RwIm2DVertexGetScreenX(vert) ((vert)->x) -#define RwIm2DVertexGetScreenY(vert) ((vert)->y) -#define RwIm2DVertexGetScreenZ(vert) ((vert)->z) - -/* Set texture coordinates in a device vertex */ -#define RwIm2DVertexSetU(vert, texU, recipz) ((vert)->u = (texU)) -#define RwIm2DVertexSetV(vert, texV, recipz) ((vert)->v = (texV)) -#define RwIm2DVertexGetU(vert) ((vert)->u) -#define RwIm2DVertexGetV(vert) ((vert)->v) - -/* Modify the luminance stuff */ -#define RwIm2DVertexSetRealRGBA(vert, red, green, blue, alpha) \ - ((vert)->emissiveColor = \ - (((RwFastRealToUInt32(alpha)) << 24) | \ - ((RwFastRealToUInt32(red)) << 16) | \ - ((RwFastRealToUInt32(green)) << 8) | \ - ((RwFastRealToUInt32(blue))))) - -#define RwIm2DVertexSetIntRGBA(vert, red, green, blue, alpha) \ - ((vert)->emissiveColor = \ - ((((RwUInt32)(alpha)) << 24) | \ - (((RwUInt32)(red)) << 16) | \ - (((RwUInt32)(green)) << 8) | \ - (((RwUInt32)(blue))))) - -#define RwIm2DVertexGetRed(vert) \ - (((vert)->emissiveColor >> 16) & 0xFF) - -#define RwIm2DVertexGetGreen(vert) \ - (((vert)->emissiveColor >> 8) & 0xFF) - -#define RwIm2DVertexGetBlue(vert) \ - ((vert)->emissiveColor & 0xFF) - -#define RwIm2DVertexGetAlpha(vert) \ - (((vert)->emissiveColor >> 24) & 0xFF) - -#define RwIm2DVertexCopyRGBA(dst, src) \ - ((dst)->emissiveColor = (src)->emissiveColor) - -/* Clipper stuff */ - -#define RwIm2DVertexClipRGBA(o, i, n, f) \ -MACRO_START \ -{ \ - const RwInt32 _factor = \ - (RwFastRealToUInt32(i * (RwReal)(255))) & 255; \ - \ - (o)->emissiveColor = \ - (((((RwIm2DVertexGetAlpha(f) - RwIm2DVertexGetAlpha(n)) * \ - _factor) >> 8) + RwIm2DVertexGetAlpha(n)) << 24) | \ - (((((RwIm2DVertexGetRed(f) - RwIm2DVertexGetRed(n)) * \ - _factor) >> 8) + RwIm2DVertexGetRed(n)) << 16) | \ - (((((RwIm2DVertexGetGreen(f) - RwIm2DVertexGetGreen(n)) * \ - _factor) >> 8) + RwIm2DVertexGetGreen(n)) << 8) | \ - (((((RwIm2DVertexGetBlue(f) - RwIm2DVertexGetBlue(n)) * \ - _factor) >> 8) + RwIm2DVertexGetBlue(n))); \ -} \ -MACRO_STOP - -/**************************************************************************** - Global Types - */ - -/* We use RwD3D8Vertex to drive the hardware in 2D mode */ - -/* - * D3D8 vertex structure definition for 2D geometry - */ -#if !defined(RWADOXYGENEXTERNAL) -typedef struct RwD3D8Vertex RwD3D8Vertex; -/** - * \ingroup rwcoredriverd3d8 - * \struct RwD3D8Vertex - * D3D8 vertex structure definition for 2D geometry - */ -struct RwD3D8Vertex -{ - RwReal x; /**< Screen X */ - RwReal y; /**< Screen Y */ - RwReal z; /**< Screen Z */ - RwReal rhw; /**< Reciprocal of homogeneous W */ - - RwUInt32 emissiveColor; /**< Vertex color */ - - RwReal u; /**< Texture coordinate U */ - RwReal v; /**< Texture coordinate V */ -}; -#endif /* !defined(RWADOXYGENEXTERNAL) */ - -/* Define types used */ - -#if !defined(RWADOXYGENEXTERNAL) -/** - * \ingroup rwcoredriverd3d8 - * \ref RwIm2DVertex - * Typedef for a RenderWare Graphics Immediate Mode 2D Vertex - */ -typedef RwD3D8Vertex RwIm2DVertex; -#endif /* !defined(RWADOXYGENEXTERNAL) */ - -#if !defined(RWADOXYGENEXTERNAL) -/** - * \ingroup rwcoredriverd3d8 - * \ref RxVertexIndex - * - * Typedef for a RenderWare Graphics PowerPipe Immediate - * Mode Vertex - */ -typedef RwUInt16 RxVertexIndex; -#endif /* !defined(RWADOXYGENEXTERNAL) */ - -#if !defined(RWADOXYGENEXTERNAL) - -/** - * \ingroup rwcoredriverd3d8 - * \ref RwImVertexIndex - * Typedef for a RenderWare Graphics Immediate Mode Vertex. - */ -typedef RxVertexIndex RwImVertexIndex; -#endif /* !defined(RWADOXYGENEXTERNAL) */ - -#if !defined(RWADOXYGENEXTERNAL) - -/** - * \ingroup rwcoredriverd3d8 - * \struct RwD3D8Metrics - * Structure containing metrics counters - */ -typedef struct -{ - RwUInt32 numRenderStateChanges; /**< Number of Render States changed */ - 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 */ - -/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/bavector.h ---*/ - -/* - * Typedef for pointer to Vector multiplication by Matrix function - */ - -typedef RwV3d *(*rwVectorMultFn) (RwV3d * pointsOut, - const RwV3d * pointsIn, - RwInt32 numPoints, - const RwMatrix * matrix); - - -/* If sqrt is overloaded for this platform, we will remove - * all the sqrt table stuff from the build entirely - * 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 - * D3D8, OpenGL or SoftRas] */ -#if (defined(rwSqrtMacro)) -#define RWNOSQRTTABLE -#endif /* (defined(rwSqrtMacro)) */ -#if (defined(rwInvSqrtMacro)) -#define RWNOINVSQRTTABLE -#endif /* (defined(rwSqrtMacro)) */ - -#if (!defined(rwSqrtMacro)) -#define rwSqrtMacro(_root, _input) \ - ( *(_root) = _rwSqrt(_input) ) -#endif /* (!defined(rwSqrtMacro)) */ - -#if (!defined(rwInvSqrtMacro)) -#define rwInvSqrtMacro(_recip, _input) \ - ( *(_recip) = _rwInvSqrt(_input) ) -#endif /* (!defined(rwInvSqrtMacro)) */ - -#if (!defined(rwSqrtInvSqrtMacro)) -#define rwSqrtInvSqrtMacro(_root, _recip, _input) \ -MACRO_START \ -{ \ - RwReal _tmp = _input; \ - rwSqrt((_root), _tmp); \ - rwInvSqrt((_recip), _tmp); \ -} \ -MACRO_STOP -#endif /* (!defined(rwSqrtInvSqrtMacro)) */ - -/* Vector operations Macros */ - -#if (!defined(RwV2dAssignMacro)) -#define RwV2dAssignMacro(_target, _source) \ - ( *(_target) = *(_source) ) -#endif /* (!defined(RwV2dAssignMacro)) */ - -#define RwV2dAddMacro(o, a, b) \ -MACRO_START \ -{ \ - (o)->x = (((a)->x) + ( (b)->x)); \ - (o)->y = (((a)->y) + ( (b)->y)); \ -} \ -MACRO_STOP - -#define RwV2dSubMacro(o, a, b) \ -MACRO_START \ -{ \ - (o)->x = (((a)->x) - ( (b)->x)); \ - (o)->y = (((a)->y) - ( (b)->y)); \ -} \ -MACRO_STOP - -#define RwV2dScaleMacro(o, i, s) \ -MACRO_START \ -{ \ - (o)->x = (((i)->x) * ( (s))); \ - (o)->y = (((i)->y) * ( (s))); \ -} \ -MACRO_STOP - -#define RwV2dDotProductMacro(a,b) \ - (( ((((a)->x) * ( (b)->x))) + \ - ( (((a)->y) * ( (b)->y))))) - -#define _rwV2dNormalizeMacro(_result, _out, _in) \ -MACRO_START \ -{ \ - RwReal length2 = RwV2dDotProductMacro((_in), (_in)); \ - rwInvSqrtMacro(&(_result), length2); \ - RwV2dScaleMacro((_out), (_in), (_result)); \ -} \ -MACRO_STOP - -#define RwV2dNormalizeMacro(_result, _out, _in) \ -MACRO_START \ -{ \ - RwReal length2 = RwV2dDotProductMacro((_in), (_in)); \ - RwReal recip; \ - \ - rwSqrtInvSqrtMacro(&(_result), &recip, length2); \ - RwV2dScaleMacro((_out), (_in), recip); \ -} \ -MACRO_STOP - -#define RwV2dLengthMacro(_result, _in) \ -MACRO_START \ -{ \ - (_result) = RwV2dDotProductMacro(_in, _in); \ - rwSqrtMacro(&(_result), (_result)); \ -} \ -MACRO_STOP - -#define RwV2dLineNormalMacro(_o, _a, _b) \ -MACRO_START \ -{ \ - RwReal recip; \ - \ - (_o)->y = (((_b)->x) - ( (_a)->x)); \ - (_o)->x = (((_a)->y) - ( (_b)->y)); \ - _rwV2dNormalizeMacro(recip, _o,_o); \ -} \ -MACRO_STOP - -#define RwV2dPerpMacro(o, a) \ -MACRO_START \ -{ \ - (o)->x = -(a)->y; \ - (o)->y = (a)->x; \ -} \ -MACRO_STOP - -/* RwV3d */ - -#if (!defined(RwV3dAssignMacro)) -#define RwV3dAssignMacro(_target, _source) \ - ( *(_target) = *(_source) ) -#endif /* (!defined(RwV3dAssignMacro)) */ - - -#define RwV3dAddMacro(o, a, b) \ -MACRO_START \ -{ \ - (o)->x = (((a)->x) + ( (b)->x)); \ - (o)->y = (((a)->y) + ( (b)->y)); \ - (o)->z = (((a)->z) + ( (b)->z)); \ -} \ -MACRO_STOP - -#define RwV3dSubMacro(o, a, b) \ -MACRO_START \ -{ \ - (o)->x = (((a)->x) - ( (b)->x)); \ - (o)->y = (((a)->y) - ( (b)->y)); \ - (o)->z = (((a)->z) - ( (b)->z)); \ -} \ -MACRO_STOP - -#define RwV3dScaleMacro(o, a, s) \ -MACRO_START \ -{ \ - (o)->x = (((a)->x) * ( (s))); \ - (o)->y = (((a)->y) * ( (s))); \ - (o)->z = (((a)->z) * ( (s))); \ -} \ -MACRO_STOP - -#define RwV3dIncrementScaledMacro(o, a, s) \ -MACRO_START \ -{ \ - (o)->x += (((a)->x) * ( (s))); \ - (o)->y += (((a)->y) * ( (s))); \ - (o)->z += (((a)->z) * ( (s))); \ -} \ -MACRO_STOP - -#define RwV3dNegateMacro(o, a) \ -MACRO_START \ -{ \ - (o)->x = -(a)->x; \ - (o)->y = -(a)->y; \ - (o)->z = -(a)->z; \ -} \ -MACRO_STOP - -#define RwV3dDotProductMacro(a, b) \ - ((((( (((a)->x) * ((b)->x))) + \ - ( (((a)->y) * ((b)->y))))) + \ - ( (((a)->z) * ((b)->z))))) - -#define RwV3dCrossProductMacro(o, a, b) \ -MACRO_START \ -{ \ - (o)->x = \ - (( (((a)->y) * ( (b)->z))) - \ - ( (((a)->z) * ( (b)->y)))); \ - (o)->y = \ - (( (((a)->z) * ( (b)->x))) - \ - ( (((a)->x) * ( (b)->z)))); \ - (o)->z = \ - (( (((a)->x) * ( (b)->y))) - \ - ( (((a)->y) * ( (b)->x)))); \ -} \ -MACRO_STOP - -#define _rwV3dNormalizeMacro(_result, _out, _in) \ -MACRO_START \ -{ \ - RwReal length2 = RwV3dDotProductMacro(_in, _in); \ - rwInvSqrtMacro(&(_result), length2); \ - RwV3dScaleMacro(_out, _in, _result); \ -} \ -MACRO_STOP - -#define RwV3dNormalizeMacro(_result, _out, _in) \ -MACRO_START \ -{ \ - RwReal length2 = RwV3dDotProductMacro((_in), (_in)); \ - RwReal recip; \ - \ - rwSqrtInvSqrtMacro(&(_result), &recip, length2); \ - RwV3dScaleMacro((_out), (_in), recip); \ -} \ -MACRO_STOP - -#define RwV3dLengthMacro(_result, _in) \ -MACRO_START \ -{ \ - (_result) = RwV3dDotProductMacro(_in, _in); \ - rwSqrtMacro(&(_result), _result); \ -} \ -MACRO_STOP - -#if (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) )) - -#define RwV2dAssign(o, a) RwV2dAssignMacro(o, a) -#define RwV2dAdd(o, a, b) RwV2dAddMacro(o, a, b) -#define RwV2dSub(o, a, b) RwV2dSubMacro(o, a, b) -#define RwV2dLineNormal(_o, _a, _b) RwV2dLineNormalMacro(_o, _a, _b) -#define RwV2dScale(o, i, s) RwV2dScaleMacro(o, i, s) -#define RwV2dDotProduct(a,b) RwV2dDotProductMacro(a,b) -#define RwV2dPerp(o, a) RwV2dPerpMacro(o, a) -#define RwV3dAssign(o, a) RwV3dAssignMacro(o, a) -#define RwV3dAdd(o, a, b) RwV3dAddMacro(o, a, b) -#define RwV3dSub(o, a, b) RwV3dSubMacro(o, a, b) -#define RwV3dScale(o, a, s) RwV3dScaleMacro(o, a, s) -#define RwV3dIncrementScaled(o, a, s) RwV3dIncrementScaledMacro(o, a, s) -#define RwV3dNegate(o, a) RwV3dNegateMacro(o, a) -#define RwV3dDotProduct(a, b) RwV3dDotProductMacro(a, b) -#define RwV3dCrossProduct(o, a, b) RwV3dCrossProductMacro(o, a, b) - -#endif /* (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) )) */ - -#define RWRAD2DEG(_x) ((_x) * (((RwReal)180)/(rwPI))) - -#if (!defined(rw4OVERPISQ)) -#define rw4OVERPISQ ( ((RwReal)4) / ( rwPI * rwPI )) -#endif /* (!defined(rw4OVERPISQ)) */ - -#if (!defined(rwPI3)) -#define rwPI3 (rwPI * (RwReal)3) -#endif /* (!defined(rwPI3)) */ - -#if (!defined(rwPI3OVER2)) -#define rwPI3OVER2 ( rwPI3 / (RwReal)2 ) -#endif /* (!defined(rwPI3OVER2)) */ - -#if (!defined(rwPI3OVER8)) -#define rwPI3OVER8 (rwPI3 / (RwReal)8 ) -#endif /* (!defined(rwPI3OVER8)) */ - -#define RwQuadSin(_x) \ - ( rw4OVERPISQ * \ - ( ( (_x) < 0 ) ? \ - ( ( rwPI + (_x) ) * (_x) ) : \ - ( ( rwPI - (_x) ) * (_x) ) ) ) - -#define RwQuadASin(_result, _s) \ - ( rwPIOVER2 * ( ((_s)<0) ? \ - ( rwSqrtMacro((_result), 1.0f + (_s)) - 1 ) : \ - ( 1 - rwSqrtMacro((_result), 1.0f - (_s)) ) ) ) - -#define RwQuadCos(_x) \ - ( rw4OVERPISQ * \ - ( ( (_x) < -rwPIOVER2 ) ? \ - ( ( -rwPI3OVER2 - (_x) ) * ( -rwPIOVER2 - (_x) ) ) : \ - ( ( (_x) < rwPIOVER2) ? \ - ( ( rwPIOVER2 + (_x) ) * ( rwPIOVER2 - (_x) ) ) : \ - ( ( rwPIOVER2 - (_x) ) * ( rwPI3OVER2 - (_x) ) ) ) ) ) - -#define RwQuadACos(_result, _c) \ - ( rwPIOVER2 * ( ((_c)<0) ? \ - (2.0f - rwSqrtMacro((_result), 1.0f + (_c))): \ - rwSqrtMacro((_result), 1.0f - (_c))) ) - -#define RwQuadTan(_x) \ - ( rwPI3 * (_x) / ( rwPI * rwPI - (_x) * (_x) * 4.0f ) ) - -#define RwQuadATan(_result, _t) \ - ( ( rwSqrtMacro((_result), (rwPI3OVER8 * rwPI3OVER8) + \ - (_t) * (_t) * (rwPIOVER2 * rwPIOVER2) ) - rwPI3OVER8 ) \ - / ( _t) ) - -#define RwQuadATan2(_result, _s, _c) \ - ( ( rwSqrtMacro((_result), (_c) * (_c) * (rwPI3OVER8 * rwPI3OVER8) + \ - (_s) * (_s) * (rwPIOVER2 * rwPIOVER2) ) \ - - (_c) * rwPI3OVER8 ) / ( _s) ) - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Other useful stuff */ - -extern RwReal RwV3dNormalize(RwV3d * out, const RwV3d * in); -extern RwReal RwV3dLength(const RwV3d * in); - -extern RwReal RwV2dLength(const RwV2d * in); -extern RwReal RwV2dNormalize(RwV2d * out, const RwV2d * in); - -#if ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) - -extern void RwV2dAssign(RwV2d * out, - const RwV2d * ina); -extern void RwV2dAdd(RwV2d * out, - const RwV2d * ina, const RwV2d * inb); -extern void RwV2dLineNormal(RwV2d * out, - const RwV2d * ina, const RwV2d * inb); -extern void RwV2dSub(RwV2d * out, - const RwV2d * ina, const RwV2d * inb); -extern void RwV2dPerp(RwV2d * out, const RwV2d * in); -extern void RwV2dScale(RwV2d * out, - const RwV2d * in, RwReal scalar); -extern RwReal RwV2dDotProduct(const RwV2d * ina, const RwV2d * inb); - -extern void RwV3dAssign(RwV3d * out, - const RwV3d * ina); -extern void RwV3dAdd(RwV3d * out, - const RwV3d * ina, const RwV3d * inb); -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, - const RwV3d * in, RwReal scalar); -extern void RwV3dNegate(RwV3d * out, const RwV3d * in); -extern RwReal RwV3dDotProduct(const RwV3d * ina, const RwV3d * inb); -extern void RwV3dCrossProduct(RwV3d * out, - const RwV3d * ina, const RwV3d * inb); - -#endif /* ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) */ - -/* Transform points/vectors */ -extern RwV3d *RwV3dTransformPoints(RwV3d * pointsOut, - const RwV3d * pointsIn, - RwInt32 numPoints, - const RwMatrix * matrix); -extern RwV3d *RwV3dTransformVectors(RwV3d * vectorsOut, - const RwV3d * vectorsIn, - RwInt32 numPoints, - const RwMatrix * matrix); - -/* SPI */ - -#if (!defined(RWNOSQRTTABLE)) -extern RwReal _rwSqrt(const RwReal num); -#endif /* (!defined(RWNOSQRTTABLE)) */ -#if (!defined(RWNOINVSQRTTABLE)) -extern RwReal _rwInvSqrt(const RwReal num); -#endif /* (!defined(RWNOINVSQRTTABLE)) */ - -extern RwReal _rwV3dNormalize(RwV3d * out, const RwV3d * in); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#define rwVectorOpen(instance, offset, size) \ - _rwVectorOpen(instance, offset, size) - -#define rwVectorClose(instance, offset, size) \ - _rwVectorClose(instance, offset, size) - -#define rwVectorSetMultFn(multPoint,multVector) \ - _rwVectorSetMultFn(multPoint,multVector) - - -/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/balist.h ---*/ -/**************************************************************************** - Global Types - */ - -typedef struct RwSList RwSList; - -#if (!defined(DOXYGEN)) -struct RwSList -{ - RwUInt8 *listElements; - RwInt32 numElementsFilled; - RwInt32 numElementsAlloced; - RwInt32 entrySize; -}; -#endif /* (!defined(DOXYGEN) */ - - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* SList functions */ -extern RwSList *_rwSListCreate(RwInt32 size); -extern RwBool _rwSListDestroy(RwSList *sList); -extern RwBool _rwSListDestroyArray(RwUInt8 *array); -extern void _rwSListDestroyEndEntries(RwSList *sList, RwInt32 amount); -extern RwBool _rwSListDestroyEntry(RwSList *sList, RwInt32 entry); -extern void _rwSListEmpty(RwSList *sList); -extern void *_rwSListGetArray(RwSList *sList); -extern void *_rwSListGetEntry(RwSList *sList, RwInt32 entry); -extern void *_rwSListGetNewEntry(RwSList *sList); -extern void *_rwSListGetNewEntries(RwSList *sList, RwInt32 entry); -extern RwInt32 _rwSListGetNumEntries(const RwSList *sList); -extern RwBool _rwSListReleaseArray(RwSList *sList); -extern void *_rwSListToArray(RwSList *sList); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* Comparibility macros */ - -#define rwSListCreate(size) \ - _rwSListCreate(size) -#define rwSListDestroy(sList) \ - _rwSListDestroy(sList) -#define rwSListDestroyArray(array) \ - _rwSListDestroyArray(array) -#define rwSListDestroyEndEntries(sList, amount) \ - _rwSListDestroyEndEntries(sList, amount) -#define rwSListDestroyEntry(sList, entry) \ - _rwSListDestroyEntry(sList, entry) -#define rwSListEmpty(sList) \ - _rwSListEmpty(sList) -#define rwSListGetArray(sList) \ - _rwSListGetArray(sList) -#define rwSListGetEntry(sList, entry) \ - _rwSListGetEntry(sList, entry) -#define rwSListGetNewEntry(sList) \ - _rwSListGetNewEntry(sList) -#define rwSListGetNewEntries(sList, entry) \ - _rwSListGetNewEntries(sList, entry) -#define rwSListGetNumEntries(sList) \ - _rwSListGetNumEntries(sList) -#define rwSListReleaseArray(sList) \ - _rwSListReleaseArray(sList) -#define rwSListToArray(sList) \ - _rwSListToArray(sList) - - -/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/baimmedi.h ---*/ - -/**************************************************************************** - Defines - */ - - -/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - Immediate mode interface V2.0 - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - -#ifndef RWADOXYGENEXTERNAL -/** - * \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 The texture render states (raster, address & filter modes) would - * normally just be used when rendering in immediate mode and should be - * specificied completely every time a texture is used. Retained mode - * pipelines will frequently set theses states internally, usually based on - * \ref RwTexture objects. - */ -#endif /* RWADOXYGENEXTERNAL */ -enum RwRenderState -{ - rwRENDERSTATENARENDERSTATE = 0, - - rwRENDERSTATETEXTURERASTER, - /** Supported on Xbox, D3D8, and OpenGL only. - */ - rwRENDERSTATESTENCILFAIL, - /**<\ref RwStencilOperation used when the stencil test passes. - * Supported on Xbox, D3D8, and OpenGL only. - */ - rwRENDERSTATESTENCILZFAIL, - /**<\ref RwStencilOperation used when the stencil test passes and - * the depth test (z-test) fails. - * Supported on Xbox, D3D8, and OpenGL only. - */ - rwRENDERSTATESTENCILPASS, - /** Supported on Xbox, D3D8, and OpenGL only. - */ - rwRENDERSTATESTENCILFUNCTION, - /**<\ref RwStencilFunction for the stencil test. - * Supported on Xbox, D3D8, and OpenGL only. - */ - rwRENDERSTATESTENCILFUNCTIONREF, - /** Supported on Xbox, D3D8, and OpenGL only. - */ - rwRENDERSTATESTENCILFUNCTIONMASK, - /** Supported on Xbox, D3D8, and OpenGL only. - */ - rwRENDERSTATESTENCILFUNCTIONWRITEMASK, - /** Supported on Xbox, D3D8, and OpenGL only. - */ - - rwRENDERSTATEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; -typedef enum RwRenderState RwRenderState; - -#ifndef RWADOXYGENEXTERNAL -/** - * \ingroup rwrenderstate - * RwShadeMode represents the available shading modes that may be - * set using the \ref RwRenderState \ref rwRENDERSTATESHADEMODE. - */ -#endif /* RWADOXYGENEXTERNAL */ -enum RwShadeMode -{ - rwSHADEMODENASHADEMODE = 0, - rwSHADEMODEFLAT, /**>8)+8: RWBYTEFINDMSB(a)) - -#define RWLONGFINDMSB(a) \ - (((a)&0xffff0000UL)?RWWORDFINDMSB((a)>>16)+16: RWWORDFINDMSB(a)) - -/**************************************************************************** - Defines - */ - -/* macros used to access plugin data in objects */ -#define RWPLUGINOFFSET(_type, _base, _offset) \ - ((_type *)((RwUInt8 *)(_base) + (_offset))) - -#define RWPLUGINOFFSETCONST(_type, _base, _offset) \ - ((const _type *)((const RwUInt8 *)(_base) + (_offset))) - -/* macro used to access global data structure (the root type is RwGlobals) */ -#define RWSRCGLOBAL(variable) \ - (((RwGlobals *)RwEngineInstance)->variable) - -#define RWASSERTISTYPE(_f, _t) \ - RWASSERT((((const RwObject *)(_f))->type)==(_t)) - -/**************************************************************************** - Global Types - */ - -enum RwEngineStatus -{ - rwENGINESTATUSIDLE = 0, /* This needs to be zero */ - rwENGINESTATUSINITED = 1, - rwENGINESTATUSOPENED = 2, - rwENGINESTATUSSTARTED = 3, - rwENGINESTATUSFORCEENUMSIZEINT = RWFORCEENUMSIZEINT -}; -typedef enum RwEngineStatus RwEngineStatus; - -typedef struct RwGlobals RwGlobals; - -#if (!defined(DOXYGEN)) -struct RwGlobals -{ -#ifdef RWDEBUG - RwDebugHandler debugFunction; /* debug string handler */ - void *debugFile; /* debug output file */ - RwInt32 debugStackDepth; /* current depth of function stack */ - RwBool debugTrace; /* is function tracing enabled */ -#endif - - /* Current entities */ - void *curCamera; /* Current camera */ - void *curWorld; /* Current World */ - - /* Checking counters */ - RwUInt16 renderFrame; /* Camera display count */ - RwUInt16 lightFrame; /* Used to ensure each light is applied only once. */ - RwUInt16 pad[2]; /* Longword align it again */ - - /* For the currently accessed device */ - RwDevice dOpenDevice; - - /* Standard renderers and functions */ - RwStandardFunc stdFunc[rwSTANDARDNUMOFSTANDARD]; - - /* All of the frames which have been updated */ - RwLinkList dirtyFrameList; - - /* The file functions */ - RwFileFunctions fileFuncs; - - /* The string functions */ - RwStringFunctions stringFuncs; - - /* The memory allocation functions */ - RwMemoryFunctions memoryFuncs; -#ifdef RWDEBUG - RwBool freeListExtraDebug; -#endif /* RWDEBUG */ - - /* virtual memory alloc/free functions */ - RwMemoryAllocFn memoryAlloc; - RwMemoryFreeFn memoryFree; - - RwMetrics *metrics; - - /* Current engine status */ - RwEngineStatus engineStatus; - - /* Resource arena init size. */ - RwUInt32 resArenaInitSize; -}; - -typedef struct RwModuleInfo RwModuleInfo; -struct RwModuleInfo -{ - RwInt32 globalsOffset; - RwInt32 numInstances; -}; -#endif /* (!defined(DOXYGEN)) */ - - - -/**************************************************************************** - Program wide globals - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#ifdef RWGLOBALSIZE -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[]; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/baresour.h ---*/ - -#define RWRESOURCESGLOBAL(var) (RWPLUGINOFFSET(rwResourcesGlobals, \ - RwEngineInstance, resourcesModule.globalsOffset)->var) - -#ifndef RWADOXYGENEXTERNAL -/** - * \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 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 */ -}; -#endif /* (!defined(DOXYGEN)) */ - -typedef struct rwResources rwResources; - -#if (!defined(DOXYGEN)) -struct rwResources -{ - RwInt32 maxSize; - RwInt32 currentSize; - RwInt32 reusageSize; - - void *memHeap; - - RwLinkList entriesA; - RwLinkList entriesB; - - RwLinkList *freeEntries; - RwLinkList *usedEntries; -}; - - -typedef struct rwResourcesGlobals rwResourcesGlobals; -struct rwResourcesGlobals -{ - rwResources res; -}; -#endif /* (!defined(DOXYGEN)) */ - - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Setting the resources arena size */ -extern RwBool RwResourcesSetArenaSize(RwUInt32 size); -extern RwInt32 RwResourcesGetArenaSize(void); -extern RwInt32 RwResourcesGetArenaUsage(void); -extern RwBool RwResourcesEmptyArena(void); - -/* Allocate */ -extern RwResEntry *RwResourcesAllocateResEntry(void *owner, - RwResEntry **ownerRef, - RwInt32 size, - RwResEntryDestroyNotify - destroyNotify); -/* Deallocate */ -extern RwBool RwResourcesFreeResEntry(RwResEntry * entry); -/* Mark all as unused */ -extern void _rwResourcesPurge(void); -#if ((defined(RWDEBUG)) || (defined(RWSUPPRESSINLINE))) -/* Mark as used */ -extern RwResEntry *RwResourcesUseResEntry(RwResEntry * entry); -#endif /* ((defined(RWDEBUG)) || (defined(RWSUPPRESSINLINE))) */ - -extern RwModuleInfo resourcesModule; - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#if ((!defined(RWDEBUG)) && (!defined(RWSUPPRESSINLINE))) -#define RwResourcesUseResEntry(_ntry) \ - ((((_ntry)->link.next)? \ - (rwLinkListRemoveLLLink(&((_ntry)->link)), \ - rwLinkListAddLLLink(RWRESOURCESGLOBAL(res.usedEntries), \ - &((_ntry)->link))): \ - NULL), \ - (_ntry)) -#endif /* ((!defined(RWDEBUG)) && (!defined(RWSUPPRESSINLINE))) */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/bacolor.h ---*/ -/**************************************************************************** - Global Types - */ - -typedef struct RwRGBAReal RwRGBAReal; -#ifndef RWADOXYGENEXTERNAL -/** - * \ingroup rwrgba - * \struct RwRGBAReal - * This structure represents a RGBA color which has - * components specified as real values. - * - * A color component of an RwRGBA with the value 255 generally corresponds - * to the associated component in an RwRGBAReal with the value 1.0f. - * However, any values can be substituted to denormalize/normalize - * RwRGBAReal and create different effects. For example, while light colors - * are expressed as normalized RGBA, interesting effects can be gained using - * larger values. - * - * It should also be noted that a color component of an RwRGBA with the - * value 0 generally corresponds to the associcated component in an - * RwRGBAReal with the value 0.0. - */ -#endif /* RWADOXYGENEXTERNAL */ -struct RwRGBAReal -{ - RwReal red; /**< red component */ - RwReal green; /**< green component */ - RwReal blue; /**< blue component */ - RwReal alpha; /**< alpha component */ -}; - -#if (!defined(RwRGBARealAssign)) -#define RwRGBARealAssign(_target, _source) \ - ( *(_target) = *(_source) ) -#endif /* (!defined(RwRGBARealAssign)) */ - -typedef struct RwRGBA RwRGBA; -#ifndef RWADOXYGENEXTERNAL -/** - * \ingroup rwrgba - * \struct RwRGBA - * This structure represents a RGBA color - * which has integer components specified in the range 0 to 255. - */ -#endif /* RWADOXYGENEXTERNAL */ -struct RwRGBA -{ - RwUInt8 red; /**< red component */ - RwUInt8 green; /**< green component */ - RwUInt8 blue; /**< blue component */ - RwUInt8 alpha; /**< alpha component */ -}; - -#if (!defined(RwRGBAAssign)) -#define RwRGBAAssign(_target, _source) \ - ( *(_target) = *(_source) ) -#endif /* (!defined(RwRGBAAssign)) */ - -#define RwRGBARealAddMacro(o,a,b) \ -MACRO_START \ -{ \ - (o)->red = (((a)->red) + ( (b)->red)); \ - (o)->green = (((a)->green) + ( (b)->green)); \ - (o)->blue = (((a)->blue) + ( (b)->blue)); \ - (o)->alpha = (((a)->alpha) + ( (b)->alpha)); \ -} \ -MACRO_STOP - -#define RwRGBARealSubMacro(o,a,b) \ -MACRO_START \ -{ \ - (o)->red = (((a)->red) - ( (b)->red)); \ - (o)->green = (((a)->green) - ( (b)->green)); \ - (o)->blue = (((a)->blue) - ( (b)->blue)); \ - (o)->alpha = (((a)->alpha) - ( (b)->alpha)); \ -} \ -MACRO_STOP - -#define RwRGBARealScaleMacro(o,a,scale) \ -MACRO_START \ -{ \ - (o)->red = (((a)->red) * ( scale)); \ - (o)->green = (((a)->green) * ( scale)); \ - (o)->blue = (((a)->blue) * ( scale)); \ - (o)->alpha = (((a)->alpha) * ( scale)); \ -} \ -MACRO_STOP - -/* Conversion macros */ -#define RwRGBAFromRwRGBARealMacro(o, i) \ -MACRO_START \ -{ \ - RwInt32 quantize; \ - \ - quantize = RwInt32FromRealMacro( ((i)->red * (RwReal)255.0) \ - + (RwReal)0.5 ); \ - (o)->red = (RwUInt8) quantize; \ - quantize = RwInt32FromRealMacro( ((i)->green * (RwReal)255.0) \ - + (RwReal)0.5 ); \ - (o)->green = (RwUInt8) quantize; \ - quantize = RwInt32FromRealMacro( ((i)->blue * (RwReal)255.0) \ - + (RwReal)0.5 ); \ - (o)->blue = (RwUInt8) quantize; \ - quantize = RwInt32FromRealMacro( ((i)->alpha * (RwReal)255.0) \ - + (RwReal)0.5 ); \ - (o)->alpha = (RwUInt8) quantize; \ - \ -} \ -MACRO_STOP - -#define RwRGBARealFromRwRGBAMacro(o, i) \ -MACRO_START \ -{ \ - (o)->red = \ - (((RwReal)(((i)->red))) * ( (RwReal)((1.0/255.0)))); \ - (o)->green = \ - (((RwReal)(((i)->green))) * ( (RwReal)((1.0/255.0)))); \ - (o)->blue = \ - (((RwReal)(((i)->blue))) * ( (RwReal)((1.0/255.0)))); \ - (o)->alpha = \ - (((RwReal)(((i)->alpha))) * ( (RwReal)((1.0/255.0)))); \ -} \ -MACRO_STOP - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -#if (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) )) - -#define RwRGBARealAdd(o,a,b) \ - RwRGBARealAddMacro(o,a,b) - -#define RwRGBARealSub(o,a,b) \ - RwRGBARealSubMacro(o,a,b) - -#define RwRGBARealScale(o,a,scale) \ - RwRGBARealScaleMacro(o,a,scale) - -#define RwRGBAFromRwRGBAReal(o, i) \ - RwRGBAFromRwRGBARealMacro(o, i) - -#define RwRGBARealFromRwRGBA(o, i) \ - RwRGBARealFromRwRGBAMacro(o, i) - -#else /* (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) )) */ - -/* Function versions for debug */ -extern void RwRGBARealAdd(RwRGBAReal *result, - const RwRGBAReal *source1, - const RwRGBAReal *source2); - -extern void RwRGBARealSub(RwRGBAReal *result, - const RwRGBAReal *source1, - const RwRGBAReal *source2); - -extern void RwRGBARealScale(RwRGBAReal *result, - const RwRGBAReal *source, - RwReal scalar); - -extern void RwRGBAFromRwRGBAReal(RwRGBA *result, - const RwRGBAReal *source); - -extern void RwRGBARealFromRwRGBA(RwRGBAReal *result, - RwRGBA *source); - -#endif /* (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) )) */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/babinmtx.h ---*/ - -/**************************************************************************** - Global types - */ - -/* Matrix stream format */ -typedef struct rwStreamMatrix RwMatrixChunkInfo; -typedef struct rwStreamMatrix rwStreamMatrix; -#if (!defined(DOXYGEN)) -struct rwStreamMatrix -{ - RwV3d right; - RwV3d up; - RwV3d at; - RwV3d pos; - RwInt32 type; -}; -#endif /* (!defined(DOXYGEN)) */ - - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Matrix binary format */ -extern RwUInt32 RwMatrixStreamGetSize(const RwMatrix * matrix); -extern RwMatrix *RwMatrixStreamRead(RwStream * stream, - RwMatrix * matrix); -extern const RwMatrix *RwMatrixStreamWrite(const RwMatrix * matrix, - RwStream * stream); -extern RwMatrixChunkInfo *RwMatrixChunkInfoRead(RwStream * stream, - RwMatrixChunkInfo * - matrixChunkInfo, - RwInt32 * bytesRead); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/babinary.h ---*/ -/**************************************************************************** - Defines - */ - -#ifndef rwCHUNKHEADERSIZE -#define rwCHUNKHEADERSIZE (sizeof(RwUInt32)*3) -#endif /* rwCHUNKHEADERSIZE */ - -/* Compatibility macro */ -#define RwStreamWriteInt(_stream, _ints, _numBytes) \ - RwStreamWriteInt32(_stream, _ints, _numBytes) - -#define RwStreamReadInt(_stream, _ints, _numBytes) \ - RwStreamReadInt32(_stream, _ints, _numBytes) - -#define RwMemLittleEndian(_mem, _size) \ - RwMemLittleEndian32(_mem, _size) - -#define RwMemNative(_mem, _size) \ - RwMemNative32(_mem, _size) - -/**************************************************************************** - Global Types - */ - -typedef struct RwChunkHeaderInfo RwChunkHeaderInfo; -#ifndef RWADOXYGENEXTERNAL -/** - * \ingroup rwstream - * \struct RwChunkHeaderInfo - * Holds data for a chunk header read from a - * stream with \ref RwStreamReadChunkHeaderInfo. - */ -#endif /* RWADOXYGENEXTERNAL */ -struct RwChunkHeaderInfo -{ - RwUInt32 type; /**< chunk ID - see \ref RwStreamFindChunk */ - RwUInt32 length; /**< length of the chunk data in bytes */ - RwUInt32 version; /**< version of the chunk data. - * See \ref RwEngineGetVersion. */ - RwUInt32 buildNum; /**< build number of the RenderWare libraries - * previously used to stream out the data */ - RwBool isComplex; /**< Internal Use */ -}; - -/**************************************************************************** - Function prototypes - */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Chunk header stuff */ -extern RwBool RwStreamFindChunk(RwStream *stream, RwUInt32 type, - RwUInt32 *lengthOut, RwUInt32 *versionOut); - -#define RwStreamWriteChunkHeader(stream, type, size) \ - _rwStreamWriteVersionedChunkHeader( \ - stream, type, size, rwLIBRARYCURRENTVERSION, RWBUILDNUMBER) - -extern RwStream *_rwStreamWriteVersionedChunkHeader(RwStream *stream, - RwInt32 type, - RwInt32 size, - RwUInt32 version, - RwUInt32 buildNum); - -extern RwStream *RwStreamWriteReal(RwStream *stream, const RwReal *reals, - RwUInt32 numBytes); -extern RwStream *RwStreamWriteInt32(RwStream *stream, const RwInt32 *ints, - RwUInt32 numBytes); -extern RwStream *RwStreamWriteInt16(RwStream *stream, const RwInt16 *ints, - RwUInt32 numBytes); - -extern RwStream *RwStreamReadReal(RwStream *stream, RwReal *reals, - RwUInt32 numBytes); -extern RwStream *RwStreamReadInt32(RwStream *stream, RwInt32 *ints, - RwUInt32 numBytes); -extern RwStream *RwStreamReadInt16(RwStream *stream, RwInt16 *ints, - RwUInt32 numBytes); - -/* Binary Portability Functions */ -extern void *RwMemLittleEndian16(void *mem, RwUInt32 size); -extern void *RwMemLittleEndian32(void *mem, RwUInt32 size); -extern void *RwMemNative16(void *mem, RwUInt32 size); -extern void *RwMemNative32(void *mem, RwUInt32 size); -extern void *RwMemRealToFloat32(void *mem, RwUInt32 size); -extern void *RwMemFloat32ToReal(void *mem, RwUInt32 size); - -extern RwStream * -RwStreamReadChunkHeaderInfo(RwStream *stream, RwChunkHeaderInfo *chunkHeaderInfo); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* RWPLCORE_H */ -- cgit v1.2.3