| 89 | }; |
| 90 | |
| 91 | void initReplays() |
| 92 | { |
| 93 | // TO DO - combine replays from both sources. |
| 94 | |
| 95 | sprintf(s_replayDir, "%sReplays/", TFE_Paths::getPath(PATH_PROGRAM)); |
| 96 | TFE_Paths::fixupPathAsDirectory(s_replayDir); |
| 97 | |
| 98 | // Check TFE/Replays first |
| 99 | if (!FileUtil::directoryExits(s_replayDir)) |
| 100 | { |
| 101 | sprintf(s_replayDir, "%sReplays/", TFE_Paths::getPath(PATH_USER_DOCUMENTS)); |
| 102 | TFE_Paths::fixupPathAsDirectory(s_replayDir); |
| 103 | // Otherwise check <USER>/TheForceEngine/Replays |
| 104 | if (!FileUtil::directoryExits(s_replayDir)) |
| 105 | { |
| 106 | FileUtil::makeDirectory(s_replayDir); |
| 107 | } |
| 108 | } |
| 109 | else |
| 110 | { |
| 111 | sprintf(s_replayAgentPath, "%sreplay.agent", TFE_Paths::getPath(PATH_USER_DOCUMENTS)); |
| 112 | } |
| 113 | TFE_System::logWrite(LOG_MSG, "Replay", "Loading Replays from %s ...", s_replayDir); |
| 114 | |
| 115 | if (TFE_Settings::getGameSettings()->df_enableRecordingAll) |
| 116 | { |
| 117 | TFE_Settings::getGameSettings()->df_enableRecording = true; |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | bool shouldLogReplay() |
| 122 | { |
no test coverage detected