| 3 | #include "xGroup.h" |
| 4 | |
| 5 | static void xUpdateCull_Swap(xUpdateCullMgr* mgr, U32 a, U32 b) |
| 6 | { |
| 7 | xUpdateCullEnt* pMgrAIndex; |
| 8 | |
| 9 | xUpdateCullEnt* pMgrBIndex = mgr->mgr[b]; |
| 10 | xUpdateCullEnt* pMgrIndex = pMgrAIndex = mgr->mgr[a]; |
| 11 | |
| 12 | do |
| 13 | { |
| 14 | pMgrIndex->index = (U16)b; |
| 15 | pMgrIndex = pMgrIndex->nextInGroup; |
| 16 | if (pMgrIndex == NULL) |
| 17 | break; |
| 18 | } while (pMgrIndex != pMgrAIndex); |
| 19 | |
| 20 | pMgrIndex = pMgrBIndex; |
| 21 | do |
| 22 | { |
| 23 | pMgrIndex->index = (U16)a; |
| 24 | pMgrIndex = pMgrIndex->nextInGroup; |
| 25 | if (pMgrIndex == NULL) |
| 26 | break; |
| 27 | } while (pMgrIndex != pMgrBIndex); |
| 28 | |
| 29 | // Set index and groupIndex together. |
| 30 | S32 uVar6 = *(S32*)(&mgr->ent[a]); |
| 31 | *(S32*)(&mgr->ent[a]) = *(S32*)(&mgr->ent[b]); |
| 32 | *(S32*)(&mgr->ent[b]) = uVar6; |
| 33 | |
| 34 | uVar6 = *(S32*)(&mgr->mgr[a]); |
| 35 | *(S32*)(&mgr->mgr[a]) = *(S32*)(&mgr->mgr[b]); |
| 36 | *(S32*)(&mgr->mgr[b]) = uVar6; |
| 37 | } |
| 38 | |
| 39 | static void xUpdateCull_MakeActive(xUpdateCullMgr* m, xUpdateCullEnt* e) |
| 40 | { |
no outgoing calls
no test coverage detected