diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-06-30 23:18:10 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-06-30 23:18:10 +0200 |
commit | be808bed539f866c72059aa61751144ce5bdb3a4 (patch) | |
tree | 2b629178b15fc7c46f3128efeb815ac05c65d044 /src/control | |
parent | Completed CReplay (diff) | |
parent | little cleanup (diff) | |
download | re3-be808bed539f866c72059aa61751144ce5bdb3a4.tar re3-be808bed539f866c72059aa61751144ce5bdb3a4.tar.gz re3-be808bed539f866c72059aa61751144ce5bdb3a4.tar.bz2 re3-be808bed539f866c72059aa61751144ce5bdb3a4.tar.lz re3-be808bed539f866c72059aa61751144ce5bdb3a4.tar.xz re3-be808bed539f866c72059aa61751144ce5bdb3a4.tar.zst re3-be808bed539f866c72059aa61751144ce5bdb3a4.zip |
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/Bridge.cpp | 5 | ||||
-rw-r--r-- | src/control/Bridge.h | 7 | ||||
-rw-r--r-- | src/control/Pickups.cpp | 4 | ||||
-rw-r--r-- | src/control/Pickups.h | 40 | ||||
-rw-r--r-- | src/control/Replay.cpp | 10 | ||||
-rw-r--r-- | src/control/Replay.h | 1 | ||||
-rw-r--r-- | src/control/TrafficLights.cpp | 5 | ||||
-rw-r--r-- | src/control/TrafficLights.h | 9 |
8 files changed, 72 insertions, 9 deletions
diff --git a/src/control/Bridge.cpp b/src/control/Bridge.cpp new file mode 100644 index 00000000..91f3c788 --- /dev/null +++ b/src/control/Bridge.cpp @@ -0,0 +1,5 @@ +#include "common.h" +#include "patcher.h" +#include "Bridge.h" + +WRAPPER bool CBridge::ShouldLightsBeFlashing(void) { EAXJMP(0x413D10); } diff --git a/src/control/Bridge.h b/src/control/Bridge.h new file mode 100644 index 00000000..64b85c1d --- /dev/null +++ b/src/control/Bridge.h @@ -0,0 +1,7 @@ +#pragma once + +class CBridge +{ +public: + static bool ShouldLightsBeFlashing(void); +}; diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index cec13c8a..56254d56 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -5,5 +5,9 @@ CPickup(&CPickups::aPickUps)[NUMPICKUPS] = *(CPickup(*)[NUMPICKUPS])*(uintptr*)0x878C98; WRAPPER void CPickups::RenderPickUpText(void) { EAXJMP(0x432440); } +WRAPPER void CPickups::DoCollectableEffects(CEntity *ent) { EAXJMP(0x431C30); } +WRAPPER void CPickups::DoMoneyEffects(CEntity *ent) { EAXJMP(0x431F40); } +WRAPPER void CPickups::DoMineEffects(CEntity *ent) { EAXJMP(0x4321C0); } +WRAPPER void CPickups::DoPickUpEffects(CEntity *ent) { EAXJMP(0x431520); } WRAPPER void CPacManPickups::Render(void) { EAXJMP(0x432F60); } diff --git a/src/control/Pickups.h b/src/control/Pickups.h index 3ae2764c..9cf485d0 100644 --- a/src/control/Pickups.h +++ b/src/control/Pickups.h @@ -1,14 +1,48 @@ #pragma once -#include "config.h" -#include "Pickup.h" +enum ePickupType +{ + PICKUP_NONE = 0, + PICKUP_IN_SHOP = 1, + PICKUP_ON_STREET = 2, + PICKUP_ONCE = 3, + PICKUP_ONCE_TIMEOUT = 4, + PICKUP_COLLECTABLE1 = 5, + PICKUP_IN_SHOP_OUT_OF_STOCK = 6, + PICKUP_MONEY = 7, + PICKUP_MINE_INACTIVE = 8, + PICKUP_MINE_ARMED = 9, + PICKUP_NAUTICAL_MINE_INACTIVE = 10, + PICKUP_NAUTICAL_MINE_ARMED = 11, + PICKUP_FLOATINGPACKAGE = 12, + PICKUP_FLOATINGPACKAGE_FLOATING = 13, + PICKUP_ON_STREET_SLOW = 14, +}; + +class CEntity; +class CObject; + +class CPickup +{ + ePickupType m_eType; + uint16 m_wQuantity; + CObject *m_pObject; + uint32 m_nTimer; + int16 m_eModelIndex; + int16 m_wIndex; + CVector m_vecPos; +}; class CPickups { public: static void RenderPickUpText(void); + static void DoCollectableEffects(CEntity *ent); + static void DoMoneyEffects(CEntity *ent); + static void DoMineEffects(CEntity *ent); + static void DoPickUpEffects(CEntity *ent); - static CPickup(&aPickUps)[NUMPICKUPS]; + static CPickup (&aPickUps)[NUMPICKUPS]; }; class CPacManPickups diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp index e49e10bc..b80b04ba 100644 --- a/src/control/Replay.cpp +++ b/src/control/Replay.cpp @@ -2,7 +2,7 @@ #include "patcher.h" #include "AnimBlendAssociation.h" #include "Boat.h" -#include "BulletTraces.h" +#include "SpecialFX.h" #include "CarCtrl.h" #include "CivilianPed.h" #include "Clock.h" @@ -308,8 +308,8 @@ void CReplay::RecordThisFrame(void) tBulletTracePacket* bt = (tBulletTracePacket*)&Record.m_pBase[Record.m_nOffset]; bt->type = REPLAYPACKET_BULLET_TRACES; bt->index = i; - bt->frames = CBulletTraces::aTraces[i].m_bFramesInUse; - bt->lifetime = CBulletTraces::aTraces[i].m_bLifeTime; + bt->frames = CBulletTraces::aTraces[i].m_framesInUse; + bt->lifetime = CBulletTraces::aTraces[i].m_lifeTime; bt->inf = CBulletTraces::aTraces[i].m_vecInf; bt->sup = CBulletTraces::aTraces[i].m_vecSup; Record.m_nOffset += sizeof(*bt); @@ -897,8 +897,8 @@ bool CReplay::PlayBackThisFrameInterpolation(CAddressInReplayBuffer *buffer, flo { tBulletTracePacket* pb = (tBulletTracePacket*)&ptr[offset]; CBulletTraces::aTraces[pb->index].m_bInUse = true; - CBulletTraces::aTraces[pb->index].m_bFramesInUse = pb->frames; - CBulletTraces::aTraces[pb->index].m_bLifeTime = pb->lifetime; + CBulletTraces::aTraces[pb->index].m_framesInUse = pb->frames; + CBulletTraces::aTraces[pb->index].m_lifeTime = pb->lifetime; CBulletTraces::aTraces[pb->index].m_vecInf = pb->inf; CBulletTraces::aTraces[pb->index].m_vecSup = pb->sup; buffer->m_nOffset += sizeof(tBulletTracePacket); diff --git a/src/control/Replay.h b/src/control/Replay.h index d622ce9c..e6885f59 100644 --- a/src/control/Replay.h +++ b/src/control/Replay.h @@ -3,7 +3,6 @@ #include "Camera.h" #include "Ped.h" #include "Pools.h" -#include "Pickup.h" #include "Radar.h" #include "References.h" #include "Vehicle.h" diff --git a/src/control/TrafficLights.cpp b/src/control/TrafficLights.cpp new file mode 100644 index 00000000..73ff6118 --- /dev/null +++ b/src/control/TrafficLights.cpp @@ -0,0 +1,5 @@ +#include "common.h" +#include "patcher.h" +#include "TrafficLights.h" + +WRAPPER void CTrafficLights::DisplayActualLight(CEntity *ent) { EAXJMP(0x455800); } diff --git a/src/control/TrafficLights.h b/src/control/TrafficLights.h new file mode 100644 index 00000000..eec3e1e3 --- /dev/null +++ b/src/control/TrafficLights.h @@ -0,0 +1,9 @@ +#pragma once + +class CEntity; + +class CTrafficLights +{ +public: + static void DisplayActualLight(CEntity *ent); +}; |