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

Function Model_Read

src/SB/Game/zAssetTypes.cpp:136–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134 { 0xED21A1C6U, 50.0f } };
135
136static void* Model_Read(void* param_1, U32 param_2, void* indata, U32 insize, U32* outsize)
137{
138 RpAtomic* model = (RpAtomic*)iModelFileNew(indata, insize);
139
140 *outsize = 0x70;
141
142 for (int i = 0; i < 3; i++)
143 {
144 if (param_2 != hackRadiusTable[i].assetid)
145 {
146 continue;
147 }
148 for (RpAtomic* tmpModel = model; tmpModel != NULL;
149 tmpModel = (RpAtomic*)iModelFile_RWMultiAtomic(tmpModel))
150 {
151 tmpModel->boundingSphere.radius = hackRadiusTable[i].radius;
152
153 tmpModel->boundingSphere.center.x = 0.0f;
154 tmpModel->boundingSphere.center.y = 0.0f;
155 tmpModel->boundingSphere.center.z = 0.0f;
156
157 tmpModel->interpolator.flags &= ~2;
158 }
159 break;
160 }
161
162 return model;
163}
164static void* Curve_Read(void* param_1, U32 param_2, void* indata, U32 insize, U32* outsize)
165{
166 *outsize = insize;

Callers

nothing calls this directly

Calls 2

iModelFileNewFunction · 0.50
iModelFile_RWMultiAtomicFunction · 0.50

Tested by

no test coverage detected