summaryrefslogtreecommitdiffstats
path: root/src/control/Phones.h
blob: 7ac34c3a231d28dcc8a2e3710d797d324f0cec84 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#pragma once

#include "Physical.h"
#include "AnimBlendAssociation.h"

struct CPhone
{
	CVector m_vecPos;
	uint16 *m_apMessages[6];
	int32 field_24;
	CEntity *m_pEntity;
	int32 m_nState;
	uint8 field_30;
};

static_assert(sizeof(CPhone) == 0x34, "CPhone: error");

class CPhoneInfo {
public:
	int32 m_nMax;
	int32 m_nNum;
	CPhone m_aPhones[50];

	CPhoneInfo() { }
	~CPhoneInfo() { }

	int FindNearestFreePhone(CVector*);
	bool PhoneAtThisPosition(CVector);
};

extern CPhoneInfo &gPhoneInfo;

void PhonePutDownCB(CAnimBlendAssociation *assoc, void *arg);
void PhonePickUpCB(CAnimBlendAssociation *assoc, void *arg);