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

Function zEntPickupEventCB

src/SB/Game/zEntPickup.cpp:468–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466}
467
468S32 zEntPickupEventCB(xBase*, xBase* to, U32 toEvent, const F32* toParam, xBase* toParamWidget)
469{
470 zEntPickup* p = (zEntPickup*)to;
471 xEntFrame frame;
472
473 switch (toEvent)
474 {
475 case eEventVisible:
476 {
477 if (!(p->state & 0x8))
478 {
479 xEntShow(p);
480
481 if (toParam && (S32)(0.5f + toParam[0]) == 77)
482 {
483 zFXPopOn(*p, toParam[1], toParam[2]);
484 }
485 }
486
487 break;
488 }
489 case eEventInvisible:
490 {
491 xEntHide(p);
492
493 if (toParam && (S32)(0.5f + toParam[0]) == 77)
494 {
495 zFXPopOff(*p, toParam[1], toParam[2]);
496 }
497
498 break;
499 }
500 case eEventCollision_Visible_On:
501 {
502 if (!(p->state & 0x8))
503 {
504 p->pickupFlags |= 0x2;
505
506 xEntShow(p);
507
508 if (toParam && toParam && (S32)(0.5f + toParam[0]) == 77)
509 {
510 zFXPopOn(*p, toParam[1], toParam[2]);
511 }
512 }
513
514 break;
515 }
516 case eEventCollision_Visible_Off:
517 {
518 p->pickupFlags &= (U8)~0x2;
519
520 xEntHide(p);
521
522 if (toParam && (S32)(0.5f + toParam[0]) == 77)
523 {
524 zFXPopOff(*p, toParam[1], toParam[2]);
525 }

Callers

nothing calls this directly

Calls 9

xEntShowFunction · 0.85
zFXPopOnFunction · 0.85
xEntHideFunction · 0.85
zFXPopOffFunction · 0.85
zEntPickup_ResetFunction · 0.85
zEntPickup_DoPickupFunction · 0.85
xEntDriveDismountFunction · 0.85
zEntPickup_DropFunction · 0.70
xEntDriveMountFunction · 0.50

Tested by

no test coverage detected