Saves an object for a group
| 655 | |
| 656 | // Saves an object for a group |
| 657 | void WriteGroupObject(CFILE *ofile, object *objp) { |
| 658 | cf_WriteByte(ofile, objp->type); |
| 659 | cf_WriteShort(ofile, objp->id); |
| 660 | cf_WriteInt(ofile, objp->flags); |
| 661 | |
| 662 | if (objp->type == OBJ_DOOR) |
| 663 | cf_WriteShort(ofile, objp->shields); |
| 664 | |
| 665 | cf_WriteInt(ofile, objp->roomnum); |
| 666 | cf_WriteVector(ofile, &objp->pos); |
| 667 | cf_WriteMatrix(ofile, &objp->orient); |
| 668 | |
| 669 | cf_WriteByte(ofile, objp->contains_type); |
| 670 | cf_WriteByte(ofile, objp->contains_id); |
| 671 | cf_WriteByte(ofile, objp->contains_count); |
| 672 | |
| 673 | cf_WriteFloat(ofile, objp->lifeleft); |
| 674 | } |
| 675 | |
| 676 | void WriteGroupTrigger(CFILE *ofile, trigger *tp) { |
| 677 | cf_WriteShort(ofile, tp->roomnum); |
no test coverage detected