1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 00:50:00 +00:00

more securom fixes

This commit is contained in:
withmorten 2021-01-13 00:28:07 +01:00
parent 005ddf26c1
commit 6103677914
4 changed files with 13 additions and 17 deletions

View file

@ -1457,7 +1457,7 @@ void CReplay::SaveReplayToHD(void)
CFileMgr::SetDir(""); CFileMgr::SetDir("");
} }
void PlayReplayFromHD(void) void CReplay::PlayReplayFromHD(void)
{ {
CFileMgr::SetDirMyDocuments(); CFileMgr::SetDirMyDocuments();
int fr = CFileMgr::OpenFile("replay.rep", "rb"); int fr = CFileMgr::OpenFile("replay.rep", "rb");
@ -1476,17 +1476,17 @@ void PlayReplayFromHD(void)
return; return;
} }
int slot; int slot;
for (slot = 0; CFileMgr::Read(fr, (char*)CReplay::Buffers[slot], sizeof(CReplay::Buffers[slot])); slot++) for (slot = 0; CFileMgr::Read(fr, (char*)Buffers[slot], sizeof(Buffers[slot])); slot++)
CReplay::BufferStatus[slot] = CReplay::REPLAYBUFFER_PLAYBACK; BufferStatus[slot] = REPLAYBUFFER_PLAYBACK;
CReplay::BufferStatus[slot - 1] = CReplay::REPLAYBUFFER_RECORD; BufferStatus[slot - 1] = REPLAYBUFFER_RECORD;
while (slot < CReplay::NUM_REPLAYBUFFERS) while (slot < NUM_REPLAYBUFFERS)
CReplay::BufferStatus[slot++] = CReplay::REPLAYBUFFER_UNUSED; BufferStatus[slot++] = REPLAYBUFFER_UNUSED;
CFileMgr::CloseFile(fr); CFileMgr::CloseFile(fr);
CFileMgr::SetDir(""); CFileMgr::SetDir("");
CReplay::TriggerPlayback(CReplay::REPLAYCAMMODE_ASSTORED, 0.0f, 0.0f, 0.0f, false); TriggerPlayback(REPLAYCAMMODE_ASSTORED, 0.0f, 0.0f, 0.0f, false);
CReplay::bPlayingBackFromFile = true; bPlayingBackFromFile = true;
CReplay::bAllowLookAroundCam = true; bAllowLookAroundCam = true;
CReplay::StreamAllNecessaryCarsAndPeds(); StreamAllNecessaryCarsAndPeds();
} }
void CReplay::StreamAllNecessaryCarsAndPeds(void) void CReplay::StreamAllNecessaryCarsAndPeds(void)

View file

@ -61,8 +61,6 @@ struct CStoredDetailedAnimationState
uint16 aFlags2[NUM_PARTIAL_ANIMS_IN_REPLAY]; uint16 aFlags2[NUM_PARTIAL_ANIMS_IN_REPLAY];
}; };
void PlayReplayFromHD(void);
#ifdef GTA_REPLAY #ifdef GTA_REPLAY
#define REPLAY_STUB #define REPLAY_STUB
#else #else
@ -323,11 +321,9 @@ private:
static void EmptyAllPools(void); static void EmptyAllPools(void);
static void MarkEverythingAsNew(void); static void MarkEverythingAsNew(void);
static void SaveReplayToHD(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 FindFirstFocusCoordinate(CVector *coord);
static void ProcessLookAroundCam(void); static void ProcessLookAroundCam(void);
static size_t FindSizeOfPacket(uint8); static size_t FindSizeOfPacket(uint8);
/* Absolute nonsense, but how could this function end up being outside of class? */
friend void PlayReplayFromHD(void);
#endif #endif
}; };

View file

@ -89,7 +89,7 @@ public:
static bool IsThisCarBeingCarriedByAnyCrane(CVehicle* pVehicle); static bool IsThisCarBeingCarriedByAnyCrane(CVehicle* pVehicle);
static bool IsThisCarBeingTargettedByAnyCrane(CVehicle* pVehicle); static bool IsThisCarBeingTargettedByAnyCrane(CVehicle* pVehicle);
static void Save(uint8* buf, uint32* size); static void Save(uint8* buf, uint32* size);
static void Load(uint8* buf, uint32 size); // on mobile it's CranesLoad outside of the class static void Load(uint8* buf, uint32 size); // out of class in III PC and later because of SecuROM
static uint32 CarsCollectedMilitaryCrane; static uint32 CarsCollectedMilitaryCrane;
static int32 NumCranes; static int32 NumCranes;

View file

@ -830,7 +830,7 @@ CHeli::GenerateHeli(bool catalina)
id++; id++;
found = true; found = true;
for(i = 0; i < 4; i++) for(i = 0; i < 4; i++)
if(CHeli::pHelis[i] && CHeli::pHelis[i]->m_nHeliId == id) if(pHelis[i] && pHelis[i]->m_nHeliId == id)
found = false; found = false;
} }
heli->m_nHeliId = id; heli->m_nHeliId = id;