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

Function DemoReadAttachObj

Descent3/demofile.cpp:1496–1511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1494}
1495
1496void DemoReadAttachObj(void) {
1497 int16_t old_objnum;
1498 int16_t parent_num;
1499 int16_t child_num;
1500 char parent_ap;
1501 char child_ap;
1502 bool f_aligned;
1503 old_objnum = cf_ReadShort(Demo_cfp);
1504 parent_num = Demo_obj_map[old_objnum];
1505 parent_ap = cf_ReadByte(Demo_cfp);
1506 old_objnum = cf_ReadShort(Demo_cfp);
1507 child_num = Demo_obj_map[old_objnum];
1508 child_ap = cf_ReadByte(Demo_cfp);
1509 f_aligned = cf_ReadByte(Demo_cfp) ? true : false;
1510 AttachObject(&Objects[parent_num], parent_ap, &Objects[child_num], child_ap, f_aligned);
1511}
1512
1513void DemoWriteUnattachObj(object *child) {
1514 cf_WriteByte(Demo_cfp, DT_UNATTACH);

Callers 1

DemoFrameFunction · 0.85

Calls 3

cf_ReadShortFunction · 0.85
cf_ReadByteFunction · 0.85
AttachObjectFunction · 0.85

Tested by

no test coverage detected