MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / xUpdateCull_Swap

Function xUpdateCull_Swap

src/SB/Core/x/xUpdateCull.cpp:5–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include "xGroup.h"
4
5static 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
39static void xUpdateCull_MakeActive(xUpdateCullMgr* m, xUpdateCullEnt* e)
40{

Callers 2

xUpdateCull_MakeActiveFunction · 0.70
xUpdateCull_MakeInactiveFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected