|
16 | 16 | #include <TFE_DarkForces/GameUI/agentMenu.h>
|
17 | 17 | #include <TFE_DarkForces/GameUI/pda.h>
|
18 | 18 | #include <TFE_DarkForces/mission.h>
|
| 19 | +#include <TFE_DarkForces/time.h> |
19 | 20 | #include <TFE_FileSystem/fileutil.h>
|
20 | 21 | #include <TFE_FileSystem/filestream.h>
|
21 | 22 | #include <TFE_FrontEndUI/frontEndUi.h>
|
22 | 23 | #include <TFE_FrontEndUI/modLoader.h>
|
23 | 24 | #include <TFE_Game/saveSystem.h>
|
24 | 25 | #include <TFE_Input/inputMapping.h>
|
| 26 | +#include <TFE_Jedi/Renderer/rcommon.h> |
25 | 27 | #include <TFE_Jedi/Serialization/serialization.h>
|
26 | 28 | #include <TFE_System/frameLimiter.h>
|
27 | 29 | #include <TFE_System/system.h>
|
@@ -60,6 +62,7 @@ namespace TFE_Input
|
60 | 62 | bool cutscenesEnabled = true;
|
61 | 63 | bool pauseReplay = false;
|
62 | 64 | bool showReplayMsgFrame = false;
|
| 65 | + bool alwaysRecord = false; |
63 | 66 |
|
64 | 67 | extern f64 gameFrameLimit = 0;
|
65 | 68 | extern f64 replayFrameLimit = 0;
|
@@ -578,12 +581,12 @@ namespace TFE_Input
|
578 | 581 | SERIALIZE(ReplayVersionInit, gameSettings->df_solidWallFlagFix, 0);
|
579 | 582 | SERIALIZE(ReplayVersionInit, gameSettings->df_jsonAiLogics, 0);
|
580 | 583 | SERIALIZE(ReplayVersionInit, gameSettings->df_bobaFettFacePlayer, 0);
|
581 |
| - SERIALIZE(ReplayVersionInit, gameSettings->df_recordFrameRate, 0); |
| 584 | + SERIALIZE(ReplayVersionInit, gameSettings->df_recordFrameRate, 0); |
582 | 585 | int pitchLimit = gameSettings->df_pitchLimit;
|
583 | 586 | SERIALIZE(ReplayVersionInit, pitchLimit, 0);
|
584 | 587 |
|
585 | 588 | SERIALIZE(ReplayVersionInit, allySettings->enableHeadwave, 0);
|
586 |
| - |
| 589 | + |
587 | 590 | SERIALIZE(ReplayVersionInit, inputConfig->mouseFlags, 0);
|
588 | 591 | SERIALIZE(ReplayVersionInit, mouseMode, 0);
|
589 | 592 | SERIALIZE(ReplayVersionInit, inputConfig->mouseSensitivity[0], 0);
|
@@ -686,6 +689,7 @@ namespace TFE_Input
|
686 | 689 | TFE_DarkForces::s_oneHitKillEnabled = JFALSE;
|
687 | 690 | TFE_DarkForces::s_instaDeathEnabled = JFALSE;
|
688 | 691 | TFE_DarkForces::s_limitStepHeight = JTRUE;
|
| 692 | + TFE_Jedi::s_fullBright = JFALSE; |
689 | 693 | }
|
690 | 694 |
|
691 | 695 | void setStartHudMessage(bool notify)
|
@@ -887,8 +891,8 @@ namespace TFE_Input
|
887 | 891 | angle14_16 yaw = s_playerEye->yaw;
|
888 | 892 | angle14_16 pitch = s_playerEye->pitch;
|
889 | 893 |
|
890 |
| - string logMsg = "Update %d: X:%04d Y:%04d Z:%04d, yaw: %d, pitch: %d, keysDown: %s, keysPressed: %s, mouse: %s"; |
891 |
| - TFE_System::logWrite(LOG_MSG, "Replay", logMsg.c_str(), counter, xPos, yPos, zPos, yaw, pitch, |
| 894 | + string logMsg = "Update %d: Tick = %d X:%04d Y:%04d Z:%04d, yaw: %d, pitch: %d, keysDown: %s, keysPressed: %s, mouse: %s"; |
| 895 | + TFE_System::logWrite(LOG_MSG, "Replay", logMsg.c_str(), counter, s_curTick, xPos, yPos, zPos, yaw, pitch, |
892 | 896 | keys.c_str(), keysPressed.c_str(), mouse.c_str());
|
893 | 897 | }
|
894 | 898 | }
|
@@ -975,6 +979,10 @@ namespace TFE_Input
|
975 | 979 | return;
|
976 | 980 | }
|
977 | 981 |
|
| 982 | + // Always set this to false as we are loading a replay from path |
| 983 | + alwaysRecord = TFE_Settings::getGameSettings()->df_enableRecordingAll; |
| 984 | + TFE_Settings::getGameSettings()->df_enableRecordingAll = false; |
| 985 | + |
978 | 986 | TFE_SaveSystem::SaveHeader header;
|
979 | 987 | loadReplayHeader(replayPath, &header);
|
980 | 988 |
|
@@ -1053,7 +1061,7 @@ namespace TFE_Input
|
1053 | 1061 |
|
1054 | 1062 | // Start replaying with the first event
|
1055 | 1063 | inputMapping_setReplayCounter(1);
|
1056 |
| - |
| 1064 | + |
1057 | 1065 | serializeDemo(&s_replayFile, false);
|
1058 | 1066 |
|
1059 | 1067 | // Setup frame rate for replay playback
|
@@ -1082,12 +1090,12 @@ namespace TFE_Input
|
1082 | 1090 | else
|
1083 | 1091 | {
|
1084 | 1092 | char logPath[256];
|
1085 |
| - replayLogCounter++; |
1086 | 1093 | sprintf(logPath, "replay_%d.log", replayLogCounter);
|
1087 | 1094 | TFE_System::logOpen(logPath);
|
1088 | 1095 | }
|
| 1096 | + replayLogCounter++; |
1089 | 1097 | TFE_System::logTimeToggle();
|
1090 |
| - } |
| 1098 | + } |
1091 | 1099 | }
|
1092 | 1100 |
|
1093 | 1101 | void restoreAgent()
|
@@ -1133,6 +1141,8 @@ namespace TFE_Input
|
1133 | 1141 |
|
1134 | 1142 | if (TFE_Settings::getTempSettings()->exit_after_replay)
|
1135 | 1143 | {
|
| 1144 | + // Reset the recording settings |
| 1145 | + TFE_Settings::getGameSettings()->df_enableRecordingAll = alwaysRecord; |
1136 | 1146 | TFE_FrontEndUI::setState(APP_STATE_QUIT);
|
1137 | 1147 | }
|
1138 | 1148 | else
|
|
0 commit comments