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

Function WritePortal

Descent3/LoadLevel.cpp:4366–4380  ·  view source on GitHub ↗

Writes a portal to a disk file Parameters: ofile - file to write to pp - portal to write Returns: 1 if written ok, else 0

Source from the content-addressed store, hash-verified

4364// pp - portal to write
4365// Returns: 1 if written ok, else 0
4366int WritePortal(CFILE *ofile, portal *pp) {
4367 cf_WriteInt(ofile, pp->flags);
4368
4369 cf_WriteShort(ofile, pp->portal_face);
4370
4371 cf_WriteInt(ofile, pp->croom);
4372 cf_WriteInt(ofile, pp->cportal);
4373 cf_WriteShort(ofile, pp->bnode_index);
4374
4375 cf_WriteVector(ofile, &pp->path_pnt);
4376
4377 cf_WriteInt(ofile, pp->combine_master);
4378
4379 return 1;
4380}
4381
4382// Writes a room to a disk file
4383// Parameters: ofile - file to write to

Callers 1

WriteRoomFunction · 0.85

Calls 2

cf_WriteIntFunction · 0.85
cf_WriteShortFunction · 0.85

Tested by

no test coverage detected