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

Function zEntSimpleObj_MgrUpdateRender

src/SB/Game/zEntSimpleObj.cpp:296–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296void zEntSimpleObj_MgrUpdateRender(RpWorld* world, F32 dt)
297{
298 s32 sp1C;
299 s32 sp18;
300 s32 sp14;
301 f32 spC = 0.0f;
302 xVec3 sp8;
303 f32 temp_f0;
304 f32 temp_f1;
305 f32 temp_f2;
306 f32 temp_f30;
307 f32 temp_f3;
308 f32 temp_f4;
309 u32 var_r30;
310 u8 var_r27;
311 xModelInstance* var_r3;
312 xModelInstance* var_r3_2;
313 xEnt* temp_r28;
314 xModelInstance* temp_r3;
315 xModelInstance* temp_r5;
316 xQuat* temp_r26;
317 xSphere* var_r29;
318 xVec3* temp_r25;
319
320 var_r29 = sMgrList;
321 for (var_r30 = 0; var_r30 < (u32)sMgrCount; var_r30++)
322 {
323 temp_r28 = (xEnt*)&var_r29[3].center.z;
324 if (xEntIsVisible(temp_r28) != 0U)
325 {
326 temp_f2 = globals.camera.mat.at.x - *((F32*)var_r29 + 0x0);
327 temp_f4 = globals.camera.mat.at.y - *((F32*)var_r29 + 0x1);
328 temp_f3 = globals.camera.mat.at.z - *((F32*)var_r29 + 0x2);
329 temp_f30 = (temp_f3 * temp_f3) + ((temp_f2 * temp_f2) + (temp_f4 * temp_f4));
330 if (!(temp_f30 > *((F32*)var_r29 + 0x7)) && (iModelSphereCull((xSphere*)var_r29) == 0))
331 {
332 var_r27 = 0;
333 if (temp_f30 > *((F32*)var_r29 + 0x4))
334 {
335 var_r27 = 1;
336 if (temp_f30 > *((F32*)var_r29 + 0x5))
337 {
338 var_r27 = 2;
339 if (temp_f30 > *((F32*)var_r29 + 0x6))
340 {
341 var_r27 = 3;
342 }
343 }
344 }
345 temp_r5 = temp_r28->model;
346 temp_r5->Flags &= 0xFBFF;
347 *((U8*)var_r29 + 0x22) = var_r27;
348 temp_r5->Bucket = (xModelBucket**)var_r29 + (((var_r27 * 4) & 0x3FC) + 0x24);
349 temp_r5->Data = (*temp_r5->Bucket)->OriginalData;
350 if (var_r27 == 0)
351 {
352 var_r3 = temp_r5->Next;
353 while (var_r3 != NULL)

Callers 1

zSceneRenderPreFXFunction · 0.70

Calls 12

xEntIsVisibleFunction · 0.85
iModelSphereCullFunction · 0.85
zGameIsPausedFunction · 0.85
iAnimDurationFunction · 0.85
iAnimEvalFunction · 0.85
zEntSimpleObj_RenderFunction · 0.85
xrandFunction · 0.85
xVec3CopyFunction · 0.85
xurandFunction · 0.85
zFX_SpawnBubbleTrailFunction · 0.70
iModelAnimMatricesFunction · 0.50
xLightKit_EnableFunction · 0.50

Tested by

no test coverage detected