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

Function WriteBOAChunk

Descent3/LoadLevel.cpp:4622–4658  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4620}
4621
4622void WriteBOAChunk(CFILE *fp) {
4623 int start_pos;
4624 int i, j;
4625
4626 start_pos = StartChunk(fp, CHUNK_BOA);
4627
4628 cf_WriteInt(fp, BOA_mine_checksum);
4629 cf_WriteInt(fp, BOA_vis_checksum);
4630 cf_WriteInt(fp, Highest_room_index + 8);
4631 cf_WriteInt(fp, MAX_PATH_PORTALS);
4632
4633 for (i = 0; i <= Highest_room_index + 8; i++) {
4634 for (j = 0; j <= Highest_room_index + 8; j++) {
4635 cf_WriteShort(fp, BOA_Array[i][j]);
4636 }
4637 }
4638
4639 for (i = 0; i <= Highest_room_index + 8; i++) {
4640 for (j = 0; j < MAX_PATH_PORTALS; j++) {
4641 cf_WriteFloat(fp, BOA_cost_array[i][j]);
4642 }
4643 }
4644
4645 cf_WriteInt(fp, BOA_num_mines);
4646 cf_WriteInt(fp, BOA_num_terrain_regions);
4647
4648 for (i = 0; i < BOA_num_terrain_regions; i++) {
4649 cf_WriteInt(fp, BOA_num_connect[i]);
4650
4651 for (j = 0; j < BOA_num_connect[i]; j++) {
4652 cf_WriteInt(fp, BOA_connect[i][j].roomnum);
4653 cf_WriteInt(fp, BOA_connect[i][j].portal);
4654 }
4655 }
4656
4657 EndChunk(fp, start_pos);
4658}
4659
4660void WriteRoomAABBChunk(CFILE *fp) {
4661 int start_pos;

Callers 1

SaveLevelFunction · 0.85

Calls 5

StartChunkFunction · 0.85
cf_WriteIntFunction · 0.85
cf_WriteShortFunction · 0.85
cf_WriteFloatFunction · 0.85
EndChunkFunction · 0.85

Tested by

no test coverage detected