This is named JspPS2_ClumpRender on PS2
| 126 | |
| 127 | // This is named JspPS2_ClumpRender on PS2 |
| 128 | static void Jsp_ClumpRender(RpClump* clump, xJSPNodeInfo* nodeInfo) |
| 129 | { |
| 130 | S32 backcullon = 1; |
| 131 | S32 zbufferon = 1; |
| 132 | RwLLLink* cur = rwLinkListGetFirstLLLink(&clump->atomicList); |
| 133 | RwLLLink* end = rwLinkListGetTerminator(&clump->atomicList); |
| 134 | |
| 135 | while (cur != end) |
| 136 | { |
| 137 | RpAtomic* apAtom = rwLLLinkGetData(cur, RpAtomic, inClumpLink); |
| 138 | |
| 139 | if (RpAtomicGetFlags(apAtom) & rpATOMICRENDER) |
| 140 | { |
| 141 | RwFrame* frame = RpAtomicGetFrame(apAtom); |
| 142 | |
| 143 | if (!iModelCull(apAtom, &frame->ltm)) |
| 144 | { |
| 145 | if (backcullon) |
| 146 | { |
| 147 | if (nodeInfo->nodeFlags & 0x4) |
| 148 | { |
| 149 | backcullon = 0; |
| 150 | RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLNONE); |
| 151 | } |
| 152 | } |
| 153 | else |
| 154 | { |
| 155 | if (!(nodeInfo->nodeFlags & 0x4)) |
| 156 | { |
| 157 | backcullon = 1; |
| 158 | RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLBACK); |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | if (zbufferon) |
| 163 | { |
| 164 | if (nodeInfo->nodeFlags & 0x2) |
| 165 | { |
| 166 | zbufferon = 0; |
| 167 | RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE); |
| 168 | } |
| 169 | } |
| 170 | else |
| 171 | { |
| 172 | if (!(nodeInfo->nodeFlags & 0x2)) |
| 173 | { |
| 174 | zbufferon = 1; |
| 175 | RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE); |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | RpAtomicRender(apAtom); |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | cur = rwLLLinkGetNext(cur); |
| 184 | nodeInfo++; |
| 185 | } |
no test coverage detected