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

Function DemoWriteHeader

Descent3/demofile.cpp:385–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385void DemoWriteHeader() {
386 char szsig[10];
387 strcpy(szsig, D3_DEMO_SIG_NEW);
388 ASSERT(Demo_flags == DF_RECORDING);
389
390 // Start off with the signature
391 cf_WriteString(Demo_cfp, (const char *)szsig);
392 // Next is the version
393 cf_WriteShort(Demo_cfp, GAMESAVE_VERSION);
394 // Write the mission filename
395 if (Current_mission.filename && (stricmp("d3_2.mn3", Current_mission.filename) == 0)) {
396 cf_WriteString(Demo_cfp, "d3.mn3");
397 } else {
398 cf_WriteString(Demo_cfp, Current_mission.filename ? Current_mission.filename : "");
399 }
400
401 // Level number
402 cf_WriteInt(Demo_cfp, Current_mission.cur_level);
403 // Gametime
404 cf_WriteFloat(Demo_cfp, Gametime);
405
406 // Frame count
407 cf_WriteInt(Demo_cfp, FrameCount);
408
409 // Now store the world state (borrowing save game code)
410
411 // Load translation tables
412 SGSXlateTables(Demo_cfp);
413
414 // save out room information.
415 SGSRooms(Demo_cfp);
416
417 // save out triggers
418 SGSTriggers(Demo_cfp);
419
420 // save out object information.
421 SGSObjects(Demo_cfp);
422
423 // players
424 SGSPlayers(Demo_cfp);
425
426 // save out viseffects
427 SGSVisEffects(Demo_cfp);
428
429 // save out spew
430 SGSSpew(Demo_cfp);
431
432 Osiris_SaveSystemState(Demo_cfp);
433
434 cf_WriteShort(Demo_cfp, Player_num);
435}
436
437void DemoStartNewFrame() {
438 if (Demo_flags != DF_RECORDING) {

Callers 1

DemoToggleRecordingFunction · 0.85

Calls 12

cf_WriteStringFunction · 0.85
cf_WriteShortFunction · 0.85
cf_WriteIntFunction · 0.85
cf_WriteFloatFunction · 0.85
SGSXlateTablesFunction · 0.85
SGSRoomsFunction · 0.85
SGSTriggersFunction · 0.85
SGSObjectsFunction · 0.85
SGSPlayersFunction · 0.85
SGSVisEffectsFunction · 0.85
SGSSpewFunction · 0.85
Osiris_SaveSystemStateFunction · 0.85

Tested by

no test coverage detected