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

Function xEntBoulderEventCB

src/SB/Core/x/xEntBoulder.cpp:881–987  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

879}
880
881S32 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;

Callers 1

BoulderVEventCBFunction · 0.50

Calls 13

xEntShowFunction · 0.85
zFXPopOnFunction · 0.85
xEntHideFunction · 0.85
zFXPopOffFunction · 0.85
zCollGeom_CamEnableFunction · 0.85
zCollGeom_CamDisableFunction · 0.85
xEntBoulder_ResetFunction · 0.85
xEntIsVisibleFunction · 0.85
xEntBoulder_KillFunction · 0.85
xrandFunction · 0.85
zEntEventFunction · 0.70
xUpdateCull_SetCBFunction · 0.70

Tested by

no test coverage detected