From a786dd45a4ebc6b91936b5e46d0ef0a9befc05af Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sun, 2 Aug 2020 19:36:50 +0300 Subject: Move sdk and eax --- sdk/rwsdk/include/d3d8/rpptank.h | 781 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 781 insertions(+) create mode 100644 sdk/rwsdk/include/d3d8/rpptank.h (limited to 'sdk/rwsdk/include/d3d8/rpptank.h') diff --git a/sdk/rwsdk/include/d3d8/rpptank.h b/sdk/rwsdk/include/d3d8/rpptank.h new file mode 100644 index 00000000..20931f21 --- /dev/null +++ b/sdk/rwsdk/include/d3d8/rpptank.h @@ -0,0 +1,781 @@ + +#ifndef RPPTANK_H +#define RPPTANK_H + +/*===========================================================================* + *--- Include files ---------------------------------------------------------* + *===========================================================================*/ + +#include "rwcore.h" +#include "rpworld.h" + +/*---- start: ./ptank.h----*/ + +/** + * \defgroup rpptank RpPTank + * \ingroup rpplugin + * + * PTank Plugin for RenderWare. + */ + +/*--- Include files ---*/ +#include + +#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) )\ + {\ + 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); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +/*---- end: ./ptank.h----*/ + +/*---- start: c:/daily/rwsdk/plugin/ptank/d3d8/ptankplatform.h----*/ + +enum RpPTankD3D8Flags +{ + rpPTANKD3D8FLAGSUSEPOINTSPRITES = 0x00000001, + + rpPTANKD3D8FLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT +}; + +/*---- end: c:/daily/rwsdk/plugin/ptank/d3d8/ptankplatform.h----*/ + +#endif /* RPPTANK_H */ + + -- cgit v1.2.3