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

Function GetNextPath

editor/EPath.cpp:309–327  ·  view source on GitHub ↗

Gets next path from n that has actually been alloced

Source from the content-addressed store, hash-verified

307
308// Gets next path from n that has actually been alloced
309int GetNextPath(int n) {
310 int i;
311
312 ASSERT(n >= 0 && n < MAX_GAME_PATHS);
313
314 if (Num_game_paths == 0)
315 return -1;
316
317 for (i = n + 1; i < MAX_GAME_PATHS; i++)
318 if (GamePaths[i].used)
319 return i;
320 for (i = 0; i < n; i++)
321 if (GamePaths[i].used)
322 return i;
323
324 // this is the only one
325
326 return n;
327}
328
329// Gets previous path from n that has actually been alloced
330int GetPrevPath(int n) {

Callers 2

DrawAllPathsFunction · 0.85
OnDeletePathMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected