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

Function xModelBucket_PreCountBucket

src/SB/Core/x/xModelBucket.cpp:55–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void xModelBucket_PreCountBucket(RpAtomic* data, U32 pipeFlags, U32 subObjects)
56{
57 pipeFlags = (pipeFlags & ~0x3) | 0x2;
58
59 S32 numbuckets;
60 switch (pipeFlags & 0x3)
61 {
62 case 1:
63 numbuckets = 1;
64 break;
65 case 2:
66 numbuckets = 1;
67 break;
68 case 3:
69 numbuckets = 2;
70 break;
71 case 0:
72 default:
73 if (iModelNumBones(data) != 0)
74 {
75 numbuckets = 1;
76 }
77 else
78 {
79 numbuckets = 2;
80 }
81 break;
82 }
83
84 S32 modelcount = 0;
85 do
86 {
87 if (subObjects & 0x1)
88 {
89 modelcount++;
90 }
91 subObjects >>= 1;
92 } while ((data = iModelFile_RWMultiAtomic(data)));
93
94 sBucketClipCullCount += modelcount * 2;
95 sBucketCount += modelcount * numbuckets;
96}
97
98void xModelBucket_PreCountAlloc(S32 maxAlphaModels)
99{

Callers

nothing calls this directly

Calls 2

iModelNumBonesFunction · 0.85
iModelFile_RWMultiAtomicFunction · 0.50

Tested by

no test coverage detected