From dad7782ff0be00775f99ad54c656e58b39190b47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Mon, 2 Dec 2019 23:02:32 +0300 Subject: CPhone, CPlayerInfo, CFire, CWorld --- src/control/Phones.h | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'src/control/Phones.h') diff --git a/src/control/Phones.h b/src/control/Phones.h index 62ea6f50..e7e3c9a7 100644 --- a/src/control/Phones.h +++ b/src/control/Phones.h @@ -5,7 +5,7 @@ class CPed; class CAnimBlendAssociation; -enum { +enum PhoneState { PHONE_STATE_FREE, PHONE_STATE_REPORTING_CRIME, // CCivilianPed::ProcessControl sets it but unused PHONE_STATE_2, @@ -13,9 +13,9 @@ enum { PHONE_STATE_ONETIME_MESSAGE_SET, PHONE_STATE_REPEATED_MESSAGE_SET, PHONE_STATE_REPEATED_MESSAGE_SHOWN_ONCE, - PHONE_STATE_ONETIME_MESSAGE_SHOWN, - PHONE_STATE_REPEATED_MESSAGE_SHOWN, - PHONE_STATE_9 + PHONE_STATE_ONETIME_MESSAGE_STARTED, + PHONE_STATE_REPEATED_MESSAGE_STARTED, + PHONE_STATE_9 // just rings, picking being handled via script. most of the time game uses this }; class CPhone @@ -23,10 +23,10 @@ class CPhone public: CVector m_vecPos; wchar *m_apMessages[6]; - uint32 m_lastTimeRepeatedMsgShown; + uint32 m_repeatedMessagePickupStart; CEntity *m_pEntity; // stored as building pool index in save files - int32 m_nState; - uint8 field_30; + PhoneState m_nState; + bool m_visibleToCam; CPhone() { } ~CPhone() { } @@ -36,14 +36,14 @@ static_assert(sizeof(CPhone) == 0x34, "CPhone: error"); class CPhoneInfo { public: - static bool &isPhonePickedUp; - static uint32 &phoneMessagesTimer; - static CPhone *&pickedUpPhone; - static bool &isPhoneBeingPickedUp; - static CPed *&pedWhoPickingUpPhone; + static bool &bDisplayingPhoneMessage; + static uint32 &PhoneEnableControlsTimer; + static CPhone *&pPhoneDisplayingMessages; + static bool &bPickingUpPhone; + static CPed *&pCallBackPed; int32 m_nMax; - int32 m_nNum; + int32 m_nScriptPhonesMax; CPhone m_aPhones[NUMPHONES]; CPhoneInfo() { } @@ -66,4 +66,9 @@ public: extern CPhoneInfo &gPhoneInfo; void PhonePutDownCB(CAnimBlendAssociation *assoc, void *arg); -void PhonePickUpCB(CAnimBlendAssociation *assoc, void *arg); \ No newline at end of file +void PhonePickUpCB(CAnimBlendAssociation *assoc, void *arg); + +#ifdef TOGGLEABLE_BETA_FEATURES +extern CPed *crimeReporters[NUMPHONES]; +bool isPhoneAvailable(int); +#endif \ No newline at end of file -- cgit v1.2.3