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

Function DemoWriteObjCreate

Descent3/demofile.cpp:521–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521void DemoWriteObjCreate(uint8_t type, uint16_t id, int roomnum, vector *pos, const matrix *orient, int parent_handle,
522 object *obj) {
523
524 if (Demo_flags == DF_RECORDING) {
525
526 if ((type == OBJ_ROBOT) || (type == OBJ_POWERUP) || (type == OBJ_CLUTTER) || (type == OBJ_BUILDING) ||
527 (type == OBJ_CAMERA)) {
528 cf_WriteByte(Demo_cfp, DT_OBJ_CREATE);
529 // cf_WriteFloat(Demo_cfp,Gametime);
530 cf_WriteByte(Demo_cfp, type);
531 cf_WriteByte(Demo_cfp, orient ? 1 : 0);
532 cf_WriteShort(Demo_cfp, id);
533 cf_WriteInt(Demo_cfp, roomnum);
534 gs_WriteVector(Demo_cfp, *pos);
535 cf_WriteInt(Demo_cfp, parent_handle);
536 if (orient)
537 gs_WriteMatrix(Demo_cfp, *orient);
538
539 // Add the script name if there is one
540 // Start with the name len (minus the null)
541
542 cf_WriteShort(Demo_cfp, OBJNUM(obj));
543 }
544 }
545}
546
547#define MAX_COOP_TURRETS 400
548extern float turret_holder[MAX_COOP_TURRETS];

Callers 2

ObjCreateFunction · 0.85
Cinematics_CreateCameraFunction · 0.85

Calls 3

cf_WriteByteFunction · 0.85
cf_WriteShortFunction · 0.85
cf_WriteIntFunction · 0.85

Tested by

no test coverage detected