| 466 | } |
| 467 | |
| 468 | S32 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 | } |
nothing calls this directly
no test coverage detected