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

Function WriteGamePathsChunk

Descent3/LoadLevel.cpp:4511–4538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4509}
4510
4511void WriteGamePathsChunk(CFILE *fp) {
4512 int start_pos;
4513 int i, j;
4514
4515 start_pos = StartChunk(fp, CHUNK_GAME_PATHS);
4516
4517 // Get the number of paths
4518 cf_WriteShort(fp, Num_game_paths);
4519
4520 for (i = 0; i < MAX_GAME_PATHS; i++) {
4521 if (GamePaths[i].used) {
4522 // Write out the path's info
4523 cf_WriteString(fp, GamePaths[i].name);
4524 cf_WriteInt(fp, GamePaths[i].num_nodes);
4525 cf_WriteByte(fp, GamePaths[i].flags);
4526
4527 for (j = 0; j < GamePaths[i].num_nodes; j++) {
4528 cf_WriteVector(fp, &GamePaths[i].pathnodes[j].pos);
4529 cf_WriteInt(fp, GamePaths[i].pathnodes[j].roomnum);
4530 cf_WriteInt(fp, GamePaths[i].pathnodes[j].flags);
4531 cf_WriteVector(fp, &GamePaths[i].pathnodes[j].fvec);
4532 cf_WriteVector(fp, &GamePaths[i].pathnodes[j].uvec);
4533 }
4534 }
4535 }
4536
4537 EndChunk(fp, start_pos);
4538}
4539
4540void WriteOverrideSoundChunk(CFILE *fp) {
4541 int start_pos;

Callers 1

SaveLevelFunction · 0.85

Calls 6

StartChunkFunction · 0.85
cf_WriteShortFunction · 0.85
cf_WriteStringFunction · 0.85
cf_WriteIntFunction · 0.85
cf_WriteByteFunction · 0.85
EndChunkFunction · 0.85

Tested by

no test coverage detected