| 136 | } |
| 137 | |
| 138 | static RpAtomic* create_ptank(U32 flags) |
| 139 | { |
| 140 | U32 dataFlags = flags | rpPTANKDFLAGSTRUCTURE; |
| 141 | RpAtomic* ptank = RpPTankAtomicCreate(MAX_PARTICLES, dataFlags, rpPTANKDFLAGNONE); |
| 142 | if (ptank == NULL) |
| 143 | { |
| 144 | return NULL; |
| 145 | } |
| 146 | |
| 147 | RwFrame* frame = RwFrameCreate(); |
| 148 | if (frame == NULL) |
| 149 | { |
| 150 | RpPTankAtomicDestroy(ptank); |
| 151 | return NULL; |
| 152 | } |
| 153 | |
| 154 | const F32 f1 = 1.0f; |
| 155 | frame->modelling.right.x = frame->modelling.up.y = frame->modelling.at.z = f1; |
| 156 | |
| 157 | const F32 f0 = 0.0f; |
| 158 | frame->modelling.right.y = frame->modelling.right.z = frame->modelling.up.x = f0; |
| 159 | |
| 160 | frame->modelling.up.z = frame->modelling.at.x = frame->modelling.at.y = f0; |
| 161 | |
| 162 | frame->modelling.pos.x = frame->modelling.pos.y = frame->modelling.pos.z = f0; |
| 163 | |
| 164 | frame->modelling.flags = frame->modelling.flags | rpPTANKDFLAGCNS2DROTATE | |
| 165 | rpPTANKDFLAGCOLOR | rpPTANKDFLAGPOSITION; |
| 166 | |
| 167 | RpAtomicSetFrame(ptank, frame); |
| 168 | |
| 169 | RpPTankAtomicExtPrv* ext = RPATOMICPTANKPLUGINDATA(ptank); |
| 170 | ext->publicData.vertexAlphaBlend = 1; |
| 171 | |
| 172 | return ptank; |
| 173 | } |
| 174 | |
| 175 | void destroy_ptank(RpAtomic* ptank) |
| 176 | { |
no outgoing calls
no test coverage detected