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

Function zPendulumEventCB

src/SB/Game/zPendulum.cpp:122–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122S32 zPendulumEventCB(xBase* from, xBase* to, U32 toEvent, const F32* toParam, xBase* b3)
123{
124 _zPendulum* pend = (_zPendulum*)to;
125
126 switch (toEvent)
127 {
128 case eEventRun:
129 xEntMotionRun(&pend->motion);
130 break;
131 case eEventStop:
132 xEntMotionStop(&pend->motion);
133 break;
134 case eEventReset:
135 zPendulum_Reset(pend, globals.sceneCur);
136 break;
137 case eEventVisible:
138 case eEventFastVisible:
139 xEntShow((xEnt*)pend);
140 break;
141 case eEventInvisible:
142 case eEventFastInvisible:
143 xEntHide((xEnt*)pend);
144 break;
145 case eEventCollision_Visible_On:
146 xEntShow((xEnt*)pend);
147 case eEventCollisionOn:
148 pend->chkby = XENT_COLLTYPE_PLYR | XENT_COLLTYPE_NPC;
149 pend->bupdate(pend, (xVec3*)&pend->model->Mat->pos);
150 break;
151 case eEventCollision_Visible_Off:
152 xEntHide((xEnt*)pend);
153 case eEventCollisionOff:
154 pend->chkby = XENT_COLLTYPE_NONE;
155 break;
156 case eEventCameraCollideOn:
157 zCollGeom_CamEnable((xEnt*)pend);
158 break;
159 case eEventCameraCollideOff:
160 zCollGeom_CamDisable((xEnt*)pend);
161 break;
162 case eEventAnimPlay:
163 case eEventAnimPlayLoop:
164 case eEventAnimStop:
165 case eEventAnimPause:
166 case eEventAnimResume:
167 case eEventAnimTogglePause:
168 case eEventAnimPlayRandom:
169 case eEventAnimPlayMaybe:
170 zEntAnimEvent((zEnt*)pend, toEvent, toParam);
171 break;
172 case eEventSetUpdateDistance:
173 {
174 if (globals.updateMgr == NULL)
175 {
176 break;
177 }
178
179 if (*toParam <= 0.0f)

Callers

nothing calls this directly

Calls 9

xEntMotionRunFunction · 0.85
xEntMotionStopFunction · 0.85
xEntShowFunction · 0.85
xEntHideFunction · 0.85
zCollGeom_CamEnableFunction · 0.85
zCollGeom_CamDisableFunction · 0.85
zPendulum_ResetFunction · 0.70
zEntAnimEventFunction · 0.70
xUpdateCull_SetCBFunction · 0.50

Tested by

no test coverage detected