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

Function ReadGroupObject

editor/Group.cpp:726–743  ·  view source on GitHub ↗

Reads an object for a group

Source from the content-addressed store, hash-verified

724
725// Reads an object for a group
726void ReadGroupObject(CFILE *ifile, object *objp) {
727 objp->type = cf_ReadByte(ifile);
728 objp->id = cf_ReadShort(ifile);
729 objp->flags = cf_ReadInt(ifile);
730
731 if (objp->type == OBJ_DOOR)
732 objp->shields = cf_ReadShort(ifile);
733
734 objp->roomnum = cf_ReadInt(ifile);
735 cf_ReadVector(ifile, &objp->pos);
736 cf_ReadMatrix(ifile, &objp->orient);
737
738 objp->contains_type = cf_ReadByte(ifile);
739 objp->contains_id = cf_ReadByte(ifile);
740 objp->contains_count = cf_ReadByte(ifile);
741
742 objp->lifeleft = cf_ReadFloat(ifile);
743}
744
745void ReadGroupTrigger(CFILE *ifile, trigger *tp) {
746 tp->roomnum = cf_ReadShort(ifile);

Callers 1

LoadGroupFunction · 0.85

Calls 4

cf_ReadByteFunction · 0.85
cf_ReadShortFunction · 0.85
cf_ReadIntFunction · 0.85
cf_ReadFloatFunction · 0.85

Tested by

no test coverage detected