MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / GetNextSound

Function GetNextSound

sndlib/soundload.cpp:516–534  ·  view source on GitHub ↗

Gets next sound from n that has actually been alloced

Source from the content-addressed store, hash-verified

514
515// Gets next sound from n that has actually been alloced
516int GetNextSound(int n) {
517 int i;
518
519 ASSERT(n >= 0 && n < MAX_SOUNDS);
520
521 if (Num_sounds == 0)
522 return -1;
523
524 for (i = n + 1; i < MAX_SOUNDS; i++)
525 if (Sounds[i].used)
526 return i;
527 for (i = 0; i < n; i++)
528 if (Sounds[i].used)
529 return i;
530
531 // this is the only one
532
533 return n;
534}
535
536// Gets previous sound from n that has actually been alloced
537int GetPrevSound(int n) {

Callers 3

OnDeleteSoundMethod · 0.85
OnNextSoundMethod · 0.85
UpdateDialogMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected