Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

PlayStation 2
[RpPTank]


Enumerations

enum   RpPTankSkyRenderState { rpPTANKSKYRENDERSTATENARENDERSTATE = 0, rpPTANKSKYRENDERSTATEALPHA, rpPTANKSKYRENDERSTATEATEST, rpPTANKSKYRENDERSATEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }
enum   RpPTankSkyFlags {
  rpPTANKSKYFLAGDMAREFILL = 0x00000001, rpPTANKSKYFLAGINSTANCEBUFFER = 0x00000002, rpPTANKSKYFLAGUSEGENERIC = 0x00000004, rpPTANKSKYFLAGDONTALLOCATE = 0x00000008,
  rpPTANKSKYFLAGUSECLONEPIPELINE = 0x00000010, rpPTANKSKYFLAGUSESTOPFLAG = 0x00000020, RPPTANKSKYFLAGSFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}

Functions

RwBool  RpPTankAtomicSkyRenderStateSet (RpAtomic *ptank, RwUInt32 nState, void *pParam)
RwBool  RpPTankAtomicSkyRenderStateGet (RpAtomic *ptank, RwUInt32 nState, void *pParam)
void *  RpPTankAtomicSkyLock (RpAtomic *atomic, RwUInt32 dataFlags)
void *  RpPTankAtomicSkyGetPreviousBuffer (RpAtomic *atomic, RwUInt32 dataFlags)
void  RpPTankAtomicSkySwapFrames (RpAtomic *ptank)
RpAtomic RpPTankAtomicSkyCloneSetAmbientLight (RpAtomic *ptank, RpLight *light)
RpLight RpPTankAtomicSkyCloneGetAmbientLight (RpAtomic *ptank)
RpAtomic RpPTankAtomicSkyCloneSetDirectionalLight (RpAtomic *ptank, RpLight *dirLight)
RpLight RpPTankAtomicSkyCloneGetDirectionalLight (RpAtomic *ptank)
RpAtomic RpPTankAtomicSkyCloneSetReferenceAtomic (RpAtomic *ptank, RpAtomic *refAtomic)
RpAtomic RpPTankAtomicSkyCloneGetReferenceAtomic (RpAtomic *ptank)

Detailed Description

PlayStation 2 specific documentation.

PlayStation 2 RpPTank Overview

When creating particles using the rpPTANKDFLAG2DROTATE or rpPTANKDFLAGCNS2DROTATE, the angle provided need to be between -PI and +PI as the pipeline use optimized Sine and Cosine functions.

PlayStation 2 Specific Features :
A series of platform specific flags and functions allow access to PlayStation 2 specific features.

The following flags can be passed to RpPTankAtomicCreate :

Warning:
Notes that the usage of those functions requires a good knowledge of the PlayStation 2 architecture and of RenderWare.

Enumeration Type Documentation

enum RpPTankSkyFlags
 

RpPTankSkyFlags

Enumeration values:
rpPTANKSKYFLAGDMAREFILL  The DMA tags will be rewritten based on the current state of the PTank object. Adjusting the size of the data transferred can save DMA bandwith but involves some CPU side operations. By default, the complete array of PTank data is sent to VU1 and only the active part of it, is rendered. This is CPU efficient but can limit the free DMA bandwith. The choice between the two solutions should be done depending on PTank behavior and the Application context.
rpPTANKSKYFLAGINSTANCEBUFFER  RenderWare for PlayStation 2 buffers frames to be rendered. This can cause timelapse glitches, depending on the behavior applied to the PTank object. To prevent these glitches appearing, a PTank object can be requested through this flag to buffer the instanced data according to the number of buffered frames used by RenderWare.
rpPTANKSKYFLAGDONTALLOCATE  This flag prevents RenderWare from allocating memory for the particle data and the DMA chains when the PTank is created. The memory can be provided to RenderWare using _rpPTankSkySetData.
rpPTANKSKYFLAGUSECLONEPIPELINE  This flag sets the PTank object to use a cloning pipeline, letting it render geometry, in place, of 2d sprites at a low CPU cost.

The clone mode implies that the data flag rpPTANKDFLAGMATRIX is used when calling RpPTankAtomicCreate. If the data flag rpPTANKDFLAGCOLOR is not set, The PTank object will use an ambient light and a directional light, setup using RpPTankAtomicSkyCloneSetAmbientLight and RpPTankAtomicSkyCloneSetDirectionalLight, to light each clone according to their respective positions and orientations.

The reference RpAtomic is provided through the function RpPTankAtomicSkyCloneSetReferenceAtomic and should not be used to perform any other rendering.

Note:
the cloning pipelines used by this flag need the RpPDS plugin to be attached and the following pipes attached through the functions:
rpPTANKSKYFLAGUSESTOPFLAG  If this flag is set the w component of particle positions is interpreted as a stop flag; if non-zero this prevents any subsequent particles being drawn.
enum RpPTankSkyRenderState
 

RpPTankSkyRenderState

Enumeration values:
rpPTANKSKYRENDERSTATEALPHA  Direct access to the alpha register used by the PTank object with bits 32-39 moved down to 24-31 to allow a single 32 bit value.
rpPTANKSKYRENDERSTATEATEST  Direct access to the bottom 16 bits of to the alpha register used by the PTank object.

Function Documentation

RpLight* RpPTankAtomicSkyCloneGetAmbientLight RpAtomic   ptank
 

RpPTankAtomicSkyCloneGetAmbientLight returns the current ambient light used when using the cloning pipeline, or NULL if none had been set.

See rpPTANKSKYFLAGUSECLONEPIPELINE for more information about the cloning pipelines.

Parameters:
ptank  A pointer to the PTank object to access.
Returns:
A pointer to the current ambient light.
See also:
RpPTankAtomicSkyCloneSetReferenceAtomic , RpPTankAtomicSkyCloneGetReferenceAtomic , RpPTankAtomicSkyCloneSetAmbientLight , RpPTankAtomicSkyCloneSetDirectionalLight , RpPTankAtomicSkyCloneGetDirectionalLight
RpLight* RpPTankAtomicSkyCloneGetDirectionalLight RpAtomic   ptank
 

RpPTankAtomicSkyCloneGetDirectionalLight returns the current directional light used when using the cloning pipeline, or NULL if none had been set.

See rpPTANKSKYFLAGUSECLONEPIPELINE for more information about the cloning pipelines.

Parameters:
ptank  A pointer to the PTank object to access.
Returns:
A pointer to the current directional light.
See also:
RpPTankAtomicSkyCloneSetReferenceAtomic , RpPTankAtomicSkyCloneGetReferenceAtomic , RpPTankAtomicSkyCloneSetAmbientLight , RpPTankAtomicSkyCloneGetAmbientLight , RpPTankAtomicSkyCloneSetDirectionalLight
RpAtomic* RpPTankAtomicSkyCloneGetReferenceAtomic RpAtomic   ptank
 

RpPTankAtomicSkyCloneGetReferenceAtomic returns the reference atomic that will be rendered multiple times by the cloning pipeline.

See rpPTANKSKYFLAGUSECLONEPIPELINE for more information about the cloning pipelines.

Warning:
Using this atomic to perform any other kind of task might result in unpredictible behavior.
Parameters:
ptank  A pointer to the PTank object to access.
Returns:
A pointer to the orignal object.
See also:
RpPTankAtomicSkyCloneSetReferenceAtomic , RpPTankAtomicSkyCloneSetAmbientLight , RpPTankAtomicSkyCloneGetAmbientLight , RpPTankAtomicSkyCloneSetDirectionalLight , RpPTankAtomicSkyCloneGetDirectionalLight
RpAtomic* RpPTankAtomicSkyCloneSetAmbientLight RpAtomic   ptank,
RpLight   light
 

RpPTankAtomicSkyCloneSetAmbientLight sets the ambient light used when rendering using the cloning pipelines.

The directional and the ambient light set are used only when a PTank has been created with the platform flag rpPTANKSKYFLAGUSECLONEPIPELINE, and with the data flag rpPTANKDFLAGMATRIX, but without rpPTANKDFLAGCOLOR.

See rpPTANKSKYFLAGUSECLONEPIPELINE for more information about the cloning pipelines.

Parameters:
ptank  A pointer to the PTank object to access.
light  A pointer to the ambient light.
Returns:
A pointer on the PTank on success. NULL otherwise.
See also:
RpPTankAtomicSkyCloneSetReferenceAtomic , RpPTankAtomicSkyCloneGetReferenceAtomic , RpPTankAtomicSkyCloneGetAmbientLight , RpPTankAtomicSkyCloneSetDirectionalLight , RpPTankAtomicSkyCloneGetDirectionalLight
RpAtomic* RpPTankAtomicSkyCloneSetDirectionalLight RpAtomic   ptank,
RpLight   light
 

RpPTankAtomicSkyCloneSetDirectionalLight is used to set the directional light used when rendering using the cloning pipelines.

The directional and the ambient light set are used only when a PTank has been created with the platform flag rpPTANKSKYFLAGUSECLONEPIPELINE, and with the data flag rpPTANKDFLAGMATRIX, but without rpPTANKDFLAGCOLOR.

See rpPTANKSKYFLAGUSECLONEPIPELINE for more information about the cloning pipelines.

Parameters:
ptank  A pointer to the PTank object to access.
light  A pointer to the directional light.
Returns:
A pointer on the PTank on success. NULL otherwise.
See also:
RpPTankAtomicSkyCloneSetReferenceAtomic , RpPTankAtomicSkyCloneGetReferenceAtomic , RpPTankAtomicSkyCloneSetAmbientLight , RpPTankAtomicSkyCloneGetAmbientLight , RpPTankAtomicSkyCloneGetDirectionalLight
RpAtomic* RpPTankAtomicSkyCloneSetReferenceAtomic RpAtomic   ptank,
RpAtomic   refAtomic
 

RpPTankAtomicSkyCloneSetReferenceAtomic sets the reference atomic that will be rendered multiple time by the cloning pipeline.

See rpPTANKSKYFLAGUSECLONEPIPELINE for more information about the cloning pipelines.

Warning:
Using this atomic to perform any other kind of task might result in unpredictible behavior.
Parameters:
ptank  A pointer to the PTank object to access.
refAtomic  A pointer to the original atomic.
Returns:
A pointer on the PTank on success. NULL otherwise.
See also:
RpPTankAtomicSkyCloneGetReferenceAtomic , RpPTankAtomicSkyCloneSetAmbientLight , RpPTankAtomicSkyCloneGetAmbientLight , RpPTankAtomicSkyCloneSetDirectionalLight , RpPTankAtomicSkyCloneGetDirectionalLight
void* RpPTankAtomicSkyGetPreviousBuffer RpAtomic   atomic,
RwUInt32    dataFlags
 

RpPTankAtomicSkyGetPreviousBuffer is used to access the PTank data used to render the previous frame.

The data is always in an array organization as this function gives direct access to the instanced forms of the data.

Note:
This function is for advanced users. It assumes a good understanding of PlayStation 2 architecture, RenderWare for PlayStation 2 and RpPTank.
Parameters:
atomic  A pointer to the PTank object to access.
dataFlags  The data needed (see RpPTankDataFlags ).
Returns:
A pointer to the requested data.
See also:
RpPTankAtomicSkyLock , RpPTankAtomicLock , RpPTankAtomicUnlock , RpPTankAtomicGetDataFormat
void* RpPTankAtomicSkyLock RpAtomic   atomic,
RwUInt32    dataFlags
 

RpPTankAtomicSkyLock is used to lock and access the data held by the PTank object. As the data accessed is already instanced, there is no need for an unlock function.

The data is always in an array organization as this function gives direct access to the instanced forms of the data.

The PTank object needs to be created using a combination of the following flags :

A later version will introduce full support for the RpPTankAtomicSkyLock function.
Note:
This function is for advanced users. It assumes a good understanding of PlayStation 2 architecture, RenderWare for PlayStation 2 and RpPTank.
Parameters:
atomic  A pointer to the PTank object to access.
dataFlags  The data needed (see RpPTankDataFlags ).
Returns:
A pointer to the requested data.
See also:
RpPTankAtomicLock , RpPTankAtomicUnlock , RpPTankAtomicGetDataFormat
RwBool RpPTankAtomicSkyRenderStateGet RpAtomic   ptank,
RwUInt32    nState,
void *    pParam
 

RpPTankAtomicSkyRenderStateGet is used to get device specific renderstate for which there is, as yet, no generic equivalent. Because in many cases setting these values changes the default behavior of a PTank object it is recommended that you contact the Support team through your customer account on https://support.renderware.com to discuss any implications that might arise from their use.

Parameters:
ptank  A Pointer to the PTank object to be accessed.
nState  The state to get :
  • rpPTANKSKYRENDERSTATEALPHA - direct access to the alpha register used by the PTank object with bits 32-39 moved down to 24-31 to allow a single 32 bit value.
  • rpPTANKSKYRENDERSTATEATEST - direct access to the bottom 16 bits of the test register used by the PTank object.
pParam  A state specific argument. A pointer to a RwInt32. The value read is written to the location pointed to.
Returns:
Returns TRUE if successful or FALSE if there is an error
See also:
RpPTankAtomicSkyRenderStateSet , RpSkyRenderStateSet , RpSkyRenderStateGet
RwBool RpPTankAtomicSkyRenderStateSet RpAtomic   ptank,
RwUInt32    nState,
void *    pParam
 

RpPTankAtomicSkyRenderStateSet is used to set device specific renderstate for which there is, as yet, no generic equivalent.

Parameters:
ptank  A Pointer to the PTank object to be accessed.
nState  The state to set :
  • rpPTANKSKYRENDERSTATEALPHA - direct access to the alpha register used by the PTank object with bits 32-39 moved down to 24-31 to allow a single 32 bit value.
  • rpPTANKSKYRENDERSTATEATEST - direct access to the bottom 16 bits of to the test register used by the PTank object. Note that the bit 0 (ATE) will be reseted according to the RwTexture used.
pParam  A state specific. A RwInt32 cast to void*.
Returns:
Returns TRUE if successful or FALSE if there is an error
See also:
RpPTankAtomicSkyRenderStateGet , RpSkyRenderStateSet , RpSkyRenderStateGet
void RpPTankAtomicSkySwapFrames RpAtomic   ptank
 

RpPTankAtomicSkySwapFrames is called to swap the buffers when using rpPTANKSKYFLAGINSTANCEBUFFER.

When this flag is passed as a platform flag in RpPTankAtomicCreate, the ptank will double buffer the particles data to reduce time syncronisation problems.

When not using multi-buffering, the function will directly return.

See also:
RpPTankAtomicCreate , rpPTANKSKYFLAGINSTANCEBUFFER , RpPTankSkyFlags

Criterion Software © 1993-2003 Criterion Software Limited. All rights reserved. Built Tue Apr 22 12:46:31 2003. Send Feedback
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)