MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / loadReplay

Function loadReplay

TheForceEngine/TFE_Input/replay.cpp:1073–1114  ·  view source on GitHub ↗

This is called from the DarkForcesMain

Source from the content-addressed store, hash-verified

1071
1072 // This is called from the DarkForcesMain
1073 void loadReplay()
1074 {
1075 startCommonReplayStates();
1076
1077 // Start replaying with the first event
1078 inputMapping_setReplayCounter(1);
1079
1080 serializeDemo(&s_replayFile, false);
1081
1082 // Setup frame rate for replay playback
1083 handleFrameRate();
1084
1085 // Load the timing and seeds
1086 loadInitTime();
1087 restoreReplaySeed();
1088
1089 // Initialize Demo Playback
1090 setDemoPlayback(true);
1091
1092 // Reset the eye
1093 TFE_DarkForces::player_clearEyeObject();
1094
1095 // Ensure you always load the first agent.
1096 s_agentId = 0;
1097
1098 if (shouldLogReplay())
1099 {
1100 TFE_System::logClose();
1101 if (replayLogCounter == 0)
1102 {
1103 TFE_System::logOpen("replay.log");
1104 }
1105 else
1106 {
1107 char logPath[256];
1108 sprintf(logPath, "replay_%d.log", replayLogCounter);
1109 TFE_System::logOpen(logPath);
1110 }
1111 replayLogCounter++;
1112 TFE_System::logTimeToggle();
1113 }
1114 }
1115
1116 void restoreAgent()
1117 {

Callers 1

startNextModeFunction · 0.85

Calls 12

startCommonReplayStatesFunction · 0.85
serializeDemoFunction · 0.85
handleFrameRateFunction · 0.85
loadInitTimeFunction · 0.85
restoreReplaySeedFunction · 0.85
setDemoPlaybackFunction · 0.85
player_clearEyeObjectFunction · 0.85
shouldLogReplayFunction · 0.85
logCloseFunction · 0.85
logOpenFunction · 0.85
logTimeToggleFunction · 0.85

Tested by

no test coverage detected