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

Function iModelRender

src/SB/Core/gc/iModel.cpp:392–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390 hierarchy = (RpHAnimHierarchy*)GetHierarchy(model);
391
392 static S32 draw_all = 1;
393
394 if (hierarchy != NULL)
395 {
396 pAnimOldMatrix = hierarchy->pMatrixArray;
397 hierarchy->pMatrixArray = mat + 1;
398 }
399 frame = (RwFrame*)model->object.object.parent;
400 frame->ltm = *mat;
401 RwMatrixUpdate(&frame->ltm);
402 if (iModelHack_DisablePrelight != 0)
403 {
404 model->geometry->flags &= 0xfffffff7;
405 }
406 iModelCacheAtomic(model)->renderCallBack(iModelCacheAtomic(model));
407 if ((iModelHack_DisablePrelight != 0) && (model->geometry->preLitLum != NULL))
408 {
409 model->geometry->flags |= 8;
410 }
411 if (hierarchy != NULL)
412 {
413 hierarchy->pMatrixArray = pAnimOldMatrix;
414 }
415}
416
417S32 iModelCull(RpAtomic* model, RwMatrix* mat)
418{
419 RwCamera* cam = RwCameraGetCurrentCamera();
420 RwSphere sph;
421
422 RwV3dTransformPoints(&sph.center, &model->boundingSphere.center, 1, mat);
423
424 // FPR hell
425 RwReal f3 = RwV3dDotProductMacro(&mat->up, &mat->up);
426 RwReal f4 = RwV3dDotProductMacro(&mat->at, &mat->at);
427 RwReal f1 = RwV3dDotProductMacro(&mat->right, &mat->right);

Callers 10

MorphCommonFunction · 0.70
render_ghostFunction · 0.50
updateMethod · 0.50
RenderGlobsMethod · 0.50
RenderFrozenPlayerMethod · 0.50
xMorphRenderFunction · 0.50
xSkyDome_RenderFunction · 0.50
xModelRenderSingleFunction · 0.50
xModelRender2DFunction · 0.50
CutsceneShadowRenderFunction · 0.50

Calls 2

GetHierarchyFunction · 0.85
iModelCacheAtomicFunction · 0.85

Tested by

no test coverage detected