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

Function iMorphOptimize

src/SB/Core/gc/iMorph.cpp:244–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244void iMorphOptimize(RpAtomic* model, S32 normals)
245{
246 S32 hasNormals = (normals != 0);
247 RpGeometry* geom = model->geometry;
248
249 if (RpGeometryGetUserDataArrayCount(geom) == 0)
250 {
251 S32 numElements = ((hasNormals + 1) * geom->numVertices) * sizeof(RwV3d) + 56;
252
253 S32 usridx = RpGeometryAddUserDataArray(geom, "MORPHSTATE", rpINTUSERDATA, numElements);
254 RpUserDataArray* usr = RpGeometryGetUserDataArray(geom, usridx);
255
256 memset(usr->data, 0, 0x20);
257 }
258}
259
260void iMorphRender(RpAtomic* model, RwMatrix* mat, S16** v_array, S16* weight, U32 normals,
261 F32 scale)

Callers 1

xMorphSeqSetupFunction · 0.50

Calls 1

memsetFunction · 0.85

Tested by

no test coverage detected