summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-11-01 16:21:05 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-11-01 16:21:05 +0100
commit5edd9e75da54534fe48c779d4f6c6cd17535be10 (patch)
tree5505f214854be20adf4fb71354be7129713078c2 /src/control
parentfixed KYFC (diff)
downloadre3-5edd9e75da54534fe48c779d4f6c6cd17535be10.tar
re3-5edd9e75da54534fe48c779d4f6c6cd17535be10.tar.gz
re3-5edd9e75da54534fe48c779d4f6c6cd17535be10.tar.bz2
re3-5edd9e75da54534fe48c779d4f6c6cd17535be10.tar.lz
re3-5edd9e75da54534fe48c779d4f6c6cd17535be10.tar.xz
re3-5edd9e75da54534fe48c779d4f6c6cd17535be10.tar.zst
re3-5edd9e75da54534fe48c779d4f6c6cd17535be10.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/Replay.cpp10
-rw-r--r--src/control/Replay.h3
-rw-r--r--src/control/Script.cpp16
3 files changed, 17 insertions, 12 deletions
diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp
index 4fdd3439..e28bbf35 100644
--- a/src/control/Replay.cpp
+++ b/src/control/Replay.cpp
@@ -53,7 +53,7 @@
#include "Fluff.h"
#include "WaterCreatures.h"
-//--MIAMI: file done except TODO
+//--MIAMI: file done
uint8 CReplay::Mode;
CAddressInReplayBuffer CReplay::Record;
@@ -158,7 +158,7 @@ static void(*CBArray[])(CAnimBlendAssociation*, void*) =
&CPed::FinishedAttackCB,
&CPed::FinishFightMoveCB, &PhonePutDownCB, &PhonePickUpCB, &CPed::PedAnimDoorCloseRollingCB, &CPed::FinishJumpCB,
&CPed::PedLandCB, &CPed::RestoreHeadingRateCB, &CPed::PedSetQuickDraggedOutCarPositionCB, &CPed::PedSetDraggedOutCarPositionCB,
- &CPed::PedSetPreviousStateCB, &CPed::FinishedReloadCB, /*&CPed::PedSetGetInCarPositionCB, TODO(MIAMI)*/
+ &CPed::PedSetPreviousStateCB, &CPed::FinishedReloadCB, &CPed::PedSetGetInCarPositionCB,
&CPed::PedAnimShuffleCB, &CPed::DeleteSunbatheIdleAnimCB, &StartTalkingOnMobileCB, &FinishTalkingOnMobileCB
};
@@ -396,7 +396,8 @@ void CReplay::RecordThisFrame(void)
misc->cam_shake_start = TheCamera.m_uiCamShakeStart;
misc->cam_shake_strength = TheCamera.m_fCamShakeForce;
misc->cur_area = CGame::currArea;
- //misc->special_fx_flags; // TODO(MIAMI)!!!
+ misc->video_cam = CSpecialFX::bVideoCam;
+ misc->lift_cam = CSpecialFX::bLiftCam;
Record.m_nOffset += sizeof(*misc);
tEndOfFramePacket* eof = (tEndOfFramePacket*)&Record.m_pBase[Record.m_nOffset];
eof->type = REPLAYPACKET_ENDOFFRAME;
@@ -1139,7 +1140,8 @@ bool CReplay::PlayBackThisFrameInterpolation(CAddressInReplayBuffer *buffer, flo
tMiscPacket* pm = (tMiscPacket*)&ptr[offset];
TheCamera.m_uiCamShakeStart = pm->cam_shake_start;
TheCamera.m_fCamShakeForce = pm->cam_shake_strength;
- // TODO(MIAMI): SpecialFX
+ CSpecialFX::bVideoCam = pm->video_cam;
+ CSpecialFX::bLiftCam = pm->lift_cam;
CGame::currArea = pm->cur_area;
buffer->m_nOffset += sizeof(tMiscPacket);
break;
diff --git a/src/control/Replay.h b/src/control/Replay.h
index 42d6ad1a..319d8bd4 100644
--- a/src/control/Replay.h
+++ b/src/control/Replay.h
@@ -263,7 +263,8 @@ class CReplay
uint32 cam_shake_start;
float cam_shake_strength;
uint8 cur_area;
- uint8 special_fx_flags;
+ uint8 video_cam : 1;
+ uint8 lift_cam : 1;
};
VALIDATE_SIZE(tMiscPacket, 16);
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index f85fc076..7c6082c8 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -88,6 +88,8 @@
#include <stdarg.h>
#endif
+//--MIAMI: file done
+
#define PICKUP_PLACEMENT_OFFSET 0.5f
#define PED_FIND_Z_OFFSET 5.0f
#define COP_PED_FIND_Z_OFFSET 10.0f
@@ -15751,7 +15753,7 @@ INITSAVEBUF
uint32 script_data_size = SCRIPT_DATA_SIZE;
WriteSaveBuf(buf, script_data_size);
WriteSaveBuf(buf, OnAMissionFlag);
- WriteSaveBuf(buf, NextFreeCollectiveIndex);
+ WriteSaveBuf(buf, LastMissionPassedTime);
for (uint32 i = 0; i < MAX_NUM_BUILDING_SWAPS; i++) {
CBuilding* pBuilding = BuildingSwapArray[i].m_pBuilding;
uint32 type, handle;
@@ -15801,12 +15803,12 @@ INITSAVEBUF
WriteSaveBuf(buf, handle);
}
WriteSaveBuf(buf, bUsingAMultiScriptFile);
- WriteSaveBuf(buf, (uint8)0);
+ WriteSaveBuf(buf, bPlayerHasMetDebbieHarry);
WriteSaveBuf(buf, (uint16)0);
WriteSaveBuf(buf, MainScriptSize);
WriteSaveBuf(buf, LargestMissionScriptSize);
WriteSaveBuf(buf, NumberOfMissionScripts);
- WriteSaveBuf(buf, (uint16)0);
+ WriteSaveBuf(buf, NumberOfExclusiveMissionScripts);
WriteSaveBuf(buf, runningScripts);
for (CRunningScript* pScript = pActiveScripts; pScript; pScript = pScript->GetNext())
pScript->Save(buf);
@@ -15823,7 +15825,7 @@ INITSAVEBUF
ScriptSpace[i] = ReadSaveBuf<uint8>(buf);
script_assert(ReadSaveBuf<uint32>(buf) == SCRIPT_DATA_SIZE);
OnAMissionFlag = ReadSaveBuf<uint32>(buf);
- NextFreeCollectiveIndex = ReadSaveBuf<uint32>(buf);
+ LastMissionPassedTime = ReadSaveBuf<uint32>(buf);
for (uint32 i = 0; i < MAX_NUM_BUILDING_SWAPS; i++) {
uint32 type = ReadSaveBuf<uint32>(buf);
uint32 handle = ReadSaveBuf<uint32>(buf);
@@ -15871,12 +15873,12 @@ INITSAVEBUF
InvisibilitySettingArray[i]->bIsVisible = false;
}
script_assert(ReadSaveBuf<bool>(buf) == bUsingAMultiScriptFile);
- ReadSaveBuf<uint8>(buf);
+ bPlayerHasMetDebbieHarry = ReadSaveBuf<uint8>(buf);
ReadSaveBuf<uint16>(buf);
script_assert(ReadSaveBuf<uint32>(buf) == MainScriptSize);
script_assert(ReadSaveBuf<uint32>(buf) == LargestMissionScriptSize);
script_assert(ReadSaveBuf<uint16>(buf) == NumberOfMissionScripts);
- ReadSaveBuf<uint16>(buf);
+ script_assert(ReadSaveBuf<uint16>(buf) == NumberOfExclusiveMissionScripts);
uint32 runningScripts = ReadSaveBuf<uint32>(buf);
for (uint32 i = 0; i < runningScripts; i++)
StartNewScript(0)->Load(buf);
@@ -16103,7 +16105,7 @@ void CTheScripts::CleanUpThisObject(CObject* pObject)
if (pObject->ObjectCreatedBy != MISSION_OBJECT)
return;
pObject->ObjectCreatedBy = TEMP_OBJECT;
- pObject->m_nEndOfLifeTime = CTimer::GetTimeInMilliseconds() + 20000;
+ pObject->m_nEndOfLifeTime = CTimer::GetTimeInMilliseconds() + 20000000;
pObject->m_nRefModelIndex = -1;
pObject->bUseVehicleColours = false;
++CObject::nNoTempObjects;