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

Function zVolumeEventCB

src/SB/Game/zVolume.cpp:188–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186S32 zVolumeEventCB(xBase*, xBase* to, U32 toEvent, const F32*, xBase*)
187{
188 zVolume* vol = (zVolume*)to;
189 S32 i;
190
191 switch (toEvent)
192 {
193 case eEventReset:
194 {
195 vol->Reset();
196 break;
197 }
198 case eEventOccludeOn:
199 {
200 if (gOccludeCount == 10)
201 {
202 return 1;
203 }
204
205 for (i = 0; i < gOccludeCount; i++)
206 {
207 if (gOccludeList[i] == vol)
208 {
209 return 1;
210 }
211 }
212
213 gOccludeList[gOccludeCount] = vol;
214 gOccludeCount++;
215
216 break;
217 }
218 case eEventOccludeOff:
219 {
220 for (i = 0; i < gOccludeCount; i++)
221 {
222 if (gOccludeList[i] == vol)
223 {
224 gOccludeList[gOccludeCount] = gOccludeList[gOccludeCount - 1];
225 gOccludeCount--;
226
227 return 1;
228 }
229 }
230
231 break;
232 }
233 }
234
235 return 1;
236}

Callers

nothing calls this directly

Calls 1

ResetMethod · 0.45

Tested by

no test coverage detected