1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-06-29 07:37:06 +00:00

fixed record

This commit is contained in:
Nikolay Korolev 2020-04-13 22:12:41 +03:00 committed by GitHub
parent 0e056a8e01
commit 12d36d8710
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,7 @@ void CRecordDataForGame::Init(void)
if (RecordingState == STATE_PLAYBACK) { if (RecordingState == STATE_PLAYBACK) {
pDataBufferPointer = new uint8[MEMORY_FOR_GAME_RECORD]; pDataBufferPointer = new uint8[MEMORY_FOR_GAME_RECORD];
pDataBuffer = pDataBufferPointer; pDataBuffer = pDataBufferPointer;
pDataBuffer[CFileMgr::Read(FId, (char*)pDataBufferPointer, MEMORY_FOR_GAME_RECORD) + 8] = -1; pDataBuffer[CFileMgr::Read(FId, (char*)pDataBufferPointer, MEMORY_FOR_GAME_RECORD) + 8] = (uint8)-1;
CFileMgr::CloseFile(FId); CFileMgr::CloseFile(FId);
} }
#else #else
@ -71,7 +71,7 @@ void CRecordDataForGame::SaveOrRetrieveDataForThisFrame(void)
break; break;
} }
case STATE_PLAYBACK: case STATE_PLAYBACK:
if (pDataBufferPointer[8] == -1) if (pDataBufferPointer[8] == (uint8)-1)
CPad::GetPad(0)->NewState.Clear(); CPad::GetPad(0)->NewState.Clear();
else { else {
tGameBuffer* pData = (tGameBuffer*)pDataBufferPointer; tGameBuffer* pData = (tGameBuffer*)pDataBufferPointer;
@ -92,7 +92,7 @@ void CRecordDataForGame::SaveOrRetrieveDataForThisFrame(void)
#define PROCESS_BUTTON_STATE_STORE(buf, os, ns, field, id) \ #define PROCESS_BUTTON_STATE_STORE(buf, os, ns, field, id) \
do { \ do { \
if (os->field != os->field){ \ if (os->field != ns->field){ \
*buf++ = id; \ *buf++ = id; \
*buf++ = ns->field; \ *buf++ = ns->field; \
} \ } \