summaryrefslogtreecommitdiffstats
path: root/src/control/Phones.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-16 18:31:29 +0200
committerGitHub <noreply@github.com>2019-07-16 18:31:29 +0200
commit3fee2bef9888e188b07e011067652388a5585f96 (patch)
treeb80e8bc8569fbdda5929123a8f47d0c62aea0ab0 /src/control/Phones.h
parentMerge pull request #136 from Nick007J/master (diff)
parentMerge branch 'master' into erorcun (diff)
downloadre3-3fee2bef9888e188b07e011067652388a5585f96.tar
re3-3fee2bef9888e188b07e011067652388a5585f96.tar.gz
re3-3fee2bef9888e188b07e011067652388a5585f96.tar.bz2
re3-3fee2bef9888e188b07e011067652388a5585f96.tar.lz
re3-3fee2bef9888e188b07e011067652388a5585f96.tar.xz
re3-3fee2bef9888e188b07e011067652388a5585f96.tar.zst
re3-3fee2bef9888e188b07e011067652388a5585f96.zip
Diffstat (limited to 'src/control/Phones.h')
-rw-r--r--src/control/Phones.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/control/Phones.h b/src/control/Phones.h
index 74f24d25..35389f3f 100644
--- a/src/control/Phones.h
+++ b/src/control/Phones.h
@@ -1,7 +1,9 @@
#pragma once
#include "Physical.h"
-#include "AnimBlendAssociation.h"
+
+class CPed;
+class CAnimBlendAssociation;
enum {
PHONE_STATE_FREE,
@@ -19,7 +21,7 @@ enum {
struct CPhone
{
CVector m_vecPos;
- uint16 *m_apMessages[6];
+ wchar *m_apMessages[6];
uint32 m_lastTimeRepeatedMsgShown;
CEntity *m_pEntity; // it's building pool index in save files
int32 m_nState;
@@ -29,10 +31,13 @@ struct CPhone
static_assert(sizeof(CPhone) == 0x34, "CPhone: error");
class CPhoneInfo {
+public:
static bool &isPhonePickedUp;
- static bool &isPhoneBeingPickedUp;
+ static uint32 &phoneMessagesTimer;
static CPhone *&pickedUpPhone;
-public:
+ static bool &isPhoneBeingPickedUp;
+ static CPed *&pedWhoPickingUpPhone;
+
int32 m_nMax;
int32 m_nNum;
CPhone m_aPhones[50];
@@ -45,8 +50,12 @@ public:
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);
+ void SetPhoneMessage_JustOnce(int phoneId, wchar *msg1, wchar *msg2, wchar *msg3, wchar *msg4, wchar *msg5, wchar *msg6);
+ void SetPhoneMessage_Repeatedly(int phoneId, wchar *msg1, wchar *msg2, wchar *msg3, wchar *msg4, wchar *msg5, wchar *msg6);
+ int GrabPhone(float, float);
+ void Initialise(void);
+ void Save(CPhoneInfo*, uint32*);
+ void Shutdown(void);
};
extern CPhoneInfo &gPhoneInfo;