Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define RpMeshPS2AllClipInfoUploadMacro(_ps2AllPipeData) \
- MACRO_START \
- { \
- RxPS2AllPipeData *_p2apd = (_ps2AllPipeData); \
- \
- u_long128 __ltmp = 0; \
- RwUInt64 __tmp1; \
- RwUInt32 __skySwitchFlag; \
- \
- __skySwitchFlag = _p2apd->transType & (rxSKYTRANSTYPEFOG|rxSKYTRANSTYPECLIP|rxSKYTRANSTYPELIST); \
- \
- /* A VIFTag to transfer the Clip Vectors and SwitchQW to VU1 memory */ \
- __tmp1 = (((0x6CL << 24) | /* VIF unpack 4-32 */ \
- (0x03L << 16) | /* Transfer 3 QWs */ \
- /* vuSDClipvec1 = 0x03FD, Destination address in VU1 memory (in QWs) */ \
- /* [vuSDClipvec2 and vuSDVUSwitch follow directly] */ \
- (vuSDClipvec1) ) << 32) | \
- ((1L << 24) | (4 << 8) | (4)); /* How to unpack, length 4W, stride 4W */ \
- MAKE128(__ltmp, __tmp1, 0L); \
- RWDMA_ADD_TO_PKT(__ltmp); \
- \
- /* Upload camera clipping info */ \
- if((skyTSClipperMode && (!(__skySwitchFlag & rxSKYTRANSTYPELIST))) || \
- (skyTLClipperMode && (__skySwitchFlag & rxSKYTRANSTYPELIST) ) ) \
- { \
- /* True clipping. Use small frustum */ \
- __skySwitchFlag |= 8; \
- RWDMA_ADD_TO_PKT(skyCClipVect1); \
- RWDMA_ADD_TO_PKT(skyCClipVect2); \
- } \
- else \
- { \
- /* Fast-culling. Use large frustum */ \
- RWDMA_ADD_TO_PKT(skyClipVect1); \
- RWDMA_ADD_TO_PKT(skyClipVect2); \
- } \
- \
- /* Back/front-face culling flag */ \
- skyUserSwitch1 = 0; \
- if (gSkyCullState == rwCULLMODECULLFRONT) \
- { \
- skyUserSwitch1 = 0x20; \
- } \
- \
- /* Combine skyUserSwitch1 and skyUserSwitch2 (skyUserSwitch2 ignored */ \
- /* if VUCONTINUE is defined) and upload with __skySwitchFlag */ \
- RpPS2AllClipTmp1Setup(__tmp1); \
- MAKE128(__ltmp, __tmp1, __skySwitchFlag); \
- RWDMA_ADD_TO_PKT(__ltmp); \
- } \
- MACRO_STOP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement