| 879 | } |
| 880 | |
| 881 | S32 xEntBoulderEventCB(xBase* from, xBase* to, U32 toEvent, const F32* toParam, |
| 882 | xBase* toParamWidget) |
| 883 | { |
| 884 | xEntBoulder* s = (xEntBoulder*)to; |
| 885 | |
| 886 | switch (toEvent) |
| 887 | { |
| 888 | case eEventVisible: |
| 889 | case eEventFastVisible: |
| 890 | xEntShow(s); |
| 891 | if (toParam && (S32)(0.5f + toParam[0]) == 77) |
| 892 | { |
| 893 | zFXPopOn(*s, toParam[1], toParam[2]); |
| 894 | } |
| 895 | break; |
| 896 | case eEventInvisible: |
| 897 | case eEventFastInvisible: |
| 898 | xEntHide(s); |
| 899 | if (toParam && (S32)(0.5f + toParam[0]) == 77) |
| 900 | { |
| 901 | zFXPopOff(*s, toParam[1], toParam[2]); |
| 902 | } |
| 903 | break; |
| 904 | case eEventCollisionOn: |
| 905 | s->chkby |= XENT_COLLTYPE_PLYR; |
| 906 | break; |
| 907 | case eEventCollisionOff: |
| 908 | s->chkby &= (U8)~XENT_COLLTYPE_PLYR; |
| 909 | break; |
| 910 | case eEventCollision_Visible_On: |
| 911 | s->chkby |= XENT_COLLTYPE_PLYR; |
| 912 | xEntShow(s); |
| 913 | if (toParam && (S32)(0.5f + toParam[0]) == 77) |
| 914 | { |
| 915 | zFXPopOn(*s, toParam[1], toParam[2]); |
| 916 | } |
| 917 | break; |
| 918 | case eEventCollision_Visible_Off: |
| 919 | s->chkby &= (U8)~XENT_COLLTYPE_PLYR; |
| 920 | xEntHide(s); |
| 921 | if (toParam && (S32)(0.5f + toParam[0]) == 77) |
| 922 | { |
| 923 | zFXPopOff(*s, toParam[1], toParam[2]); |
| 924 | } |
| 925 | break; |
| 926 | case eEventCameraCollideOn: |
| 927 | zCollGeom_CamEnable(s); |
| 928 | break; |
| 929 | case eEventCameraCollideOff: |
| 930 | zCollGeom_CamDisable(s); |
| 931 | break; |
| 932 | case eEventReset: |
| 933 | xEntBoulder_Reset(s, globals.sceneCur); |
| 934 | if (xEntIsVisible(s)) |
| 935 | { |
| 936 | s->update = (xEntUpdateCallback)xEntBoulder_Update; |
| 937 | } |
| 938 | break; |
no test coverage detected