diff options
author | aap <aap@papnet.eu> | 2019-07-10 23:10:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-10 23:10:10 +0200 |
commit | f35b053684501805f90529f0d2426ee8d7c593fe (patch) | |
tree | 53f2ab5a50aaac9126da6145487e388fb3af2f26 /src/control/Phones.h | |
parent | tried to fix CMenuManager::Process but still issues (diff) | |
parent | Fix CPhone crash, more functions (diff) | |
download | re3-f35b053684501805f90529f0d2426ee8d7c593fe.tar re3-f35b053684501805f90529f0d2426ee8d7c593fe.tar.gz re3-f35b053684501805f90529f0d2426ee8d7c593fe.tar.bz2 re3-f35b053684501805f90529f0d2426ee8d7c593fe.tar.lz re3-f35b053684501805f90529f0d2426ee8d7c593fe.tar.xz re3-f35b053684501805f90529f0d2426ee8d7c593fe.tar.zst re3-f35b053684501805f90529f0d2426ee8d7c593fe.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/Phones.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/control/Phones.h b/src/control/Phones.h index 7ac34c3a..74f24d25 100644 --- a/src/control/Phones.h +++ b/src/control/Phones.h @@ -3,12 +3,25 @@ #include "Physical.h" #include "AnimBlendAssociation.h" +enum { + PHONE_STATE_FREE, + PHONE_STATE_1, + PHONE_STATE_2, + PHONE_STATE_MESSAGE_REMOVED, + 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 +}; + struct CPhone { CVector m_vecPos; uint16 *m_apMessages[6]; - int32 field_24; - CEntity *m_pEntity; + uint32 m_lastTimeRepeatedMsgShown; + CEntity *m_pEntity; // it's building pool index in save files int32 m_nState; uint8 field_30; }; @@ -16,6 +29,9 @@ struct CPhone static_assert(sizeof(CPhone) == 0x34, "CPhone: error"); class CPhoneInfo { + static bool &isPhonePickedUp; + static bool &isPhoneBeingPickedUp; + static CPhone *&pickedUpPhone; public: int32 m_nMax; int32 m_nNum; @@ -26,6 +42,11 @@ public: int FindNearestFreePhone(CVector*); bool PhoneAtThisPosition(CVector); + bool HasMessageBeenDisplayed(int); + bool IsMessageBeingDisplayed(int); + void Load(CPhoneInfo *source, uint8 buffer); + void SetPhoneMessage_JustOnce(int phoneId, uint16 *msg1, uint16 *msg2, uint16 *msg3, uint16 *msg4, uint16 *msg5, uint16 *msg6); + void SetPhoneMessage_Repeatedly(int phoneId, uint16 *msg1, uint16 *msg2, uint16 *msg3, uint16 *msg4, uint16 *msg5, uint16 *msg6); }; extern CPhoneInfo &gPhoneInfo; |