summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-01-13 01:08:13 +0100
committerSergeanur <s.anureev@yandex.ua>2021-01-13 01:08:13 +0100
commit94f25a429fb29eeaf6e7ccd21906ffcff45ebc38 (patch)
treef5096eee4142233ec6450b68fbd99483c954592c /src/control
parentsync with lcs-dev (diff)
parentMerge pull request #956 from withmorten/miami (diff)
downloadre3-94f25a429fb29eeaf6e7ccd21906ffcff45ebc38.tar
re3-94f25a429fb29eeaf6e7ccd21906ffcff45ebc38.tar.gz
re3-94f25a429fb29eeaf6e7ccd21906ffcff45ebc38.tar.bz2
re3-94f25a429fb29eeaf6e7ccd21906ffcff45ebc38.tar.lz
re3-94f25a429fb29eeaf6e7ccd21906ffcff45ebc38.tar.xz
re3-94f25a429fb29eeaf6e7ccd21906ffcff45ebc38.tar.zst
re3-94f25a429fb29eeaf6e7ccd21906ffcff45ebc38.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/Replay.cpp20
-rw-r--r--src/control/Replay.h6
2 files changed, 11 insertions, 15 deletions
diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp
index 7adb4999..aef48217 100644
--- a/src/control/Replay.cpp
+++ b/src/control/Replay.cpp
@@ -1729,7 +1729,7 @@ void CReplay::SaveReplayToHD(void)
CFileMgr::SetDir("");
}
-void PlayReplayFromHD(void)
+void CReplay::PlayReplayFromHD(void)
{
CFileMgr::SetDirMyDocuments();
int fr = CFileMgr::OpenFile("replay.rep", "rb");
@@ -1748,17 +1748,17 @@ void PlayReplayFromHD(void)
return;
}
int slot;
- for (slot = 0; CFileMgr::Read(fr, (char*)CReplay::Buffers[slot], sizeof(CReplay::Buffers[slot])); slot++)
- CReplay::BufferStatus[slot] = CReplay::REPLAYBUFFER_PLAYBACK;
- CReplay::BufferStatus[slot - 1] = CReplay::REPLAYBUFFER_RECORD;
- while (slot < CReplay::NUM_REPLAYBUFFERS)
- CReplay::BufferStatus[slot++] = CReplay::REPLAYBUFFER_UNUSED;
+ for (slot = 0; CFileMgr::Read(fr, (char*)Buffers[slot], sizeof(Buffers[slot])); slot++)
+ BufferStatus[slot] = REPLAYBUFFER_PLAYBACK;
+ BufferStatus[slot - 1] = REPLAYBUFFER_RECORD;
+ while (slot < NUM_REPLAYBUFFERS)
+ BufferStatus[slot++] = REPLAYBUFFER_UNUSED;
CFileMgr::CloseFile(fr);
CFileMgr::SetDir("");
- CReplay::TriggerPlayback(CReplay::REPLAYCAMMODE_ASSTORED, 0.0f, 0.0f, 0.0f, false);
- CReplay::bPlayingBackFromFile = true;
- CReplay::bAllowLookAroundCam = true;
- CReplay::StreamAllNecessaryCarsAndPeds();
+ TriggerPlayback(REPLAYCAMMODE_ASSTORED, 0.0f, 0.0f, 0.0f, false);
+ bPlayingBackFromFile = true;
+ bAllowLookAroundCam = true;
+ StreamAllNecessaryCarsAndPeds();
}
void CReplay::StreamAllNecessaryCarsAndPeds(void)
diff --git a/src/control/Replay.h b/src/control/Replay.h
index 84a6bef0..5dd8b651 100644
--- a/src/control/Replay.h
+++ b/src/control/Replay.h
@@ -64,8 +64,6 @@ struct CStoredDetailedAnimationState
uint8 aGroupId2[NUM_PARTIAL_ANIMS_IN_REPLAY];
};
-void PlayReplayFromHD(void);
-
#ifdef GTA_REPLAY
#define REPLAY_STUB
#else
@@ -410,12 +408,10 @@ private:
static void EmptyAllPools(void);
static void MarkEverythingAsNew(void);
static void SaveReplayToHD(void);
+ static void PlayReplayFromHD(void); // out of class in III PC and later because of SecuROM
static void FindFirstFocusCoordinate(CVector *coord);
static void ProcessLookAroundCam(void);
static size_t FindSizeOfPacket(uint8);
static void GoToNextBlock(void);
-
- /* Absolute nonsense, but how could this function end up being outside of class? */
- friend void PlayReplayFromHD(void);
#endif
};