SA-MP/saco/net/netgame.h

86 lines
1.7 KiB
C
Raw Permalink Normal View History

2023-11-23 23:56:11 +08:00
#pragma once
2024-10-21 22:46:54 +08:00
#define GAMESTATE_CONNECTED 5
2023-11-23 23:56:11 +08:00
#define GAMESTATE_WAIT_CONNECT 1
struct struc_41
{
bool bUseCJWalk;
int field_1;
char _gap5[17];
float field_16;
char field_1A;
char _gap1B[4];
char field_1F;
char field_20;
char field_21;
char field_22;
int field_23;
float field_27;
char _gap2B;
char field_2C;
char field_2D;
char field_2E;
char field_2F;
char _gap30[10];
};
2024-02-06 22:01:20 +08:00
typedef struct _NETGAME_POOLS {
2024-02-06 22:08:24 +08:00
CVehiclePool *pVehiclePool;
2024-02-06 22:20:05 +08:00
CPlayerPool *pPlayerPool;
CPickupPool *pPickupPool;
2024-02-12 20:10:26 +08:00
CObjectPool *pObjectPool;
2024-02-12 20:12:15 +08:00
CActorPool *pActorPool;
2024-02-18 21:21:09 +08:00
CGangZonePool *pGangZonePool;
2024-02-12 20:16:37 +08:00
CLabelPool *pLabelPool;
CTextDrawPool *pTextDrawPool;
2024-02-12 20:22:51 +08:00
CMenuPool *pMenuPool;
2024-02-06 22:01:20 +08:00
} NETGAME_POOLS;
class CNetGame // size: 994
{
private:
2024-01-31 23:57:40 +08:00
RakClientInterface *m_pRakClient;
void UpdateNetwork();
char _gap4[44];
2023-11-23 23:56:11 +08:00
char m_szHostOrIp[257];
char m_szHostName[257];
char field_232;
char field_233;
char field_234;
2023-11-23 23:56:11 +08:00
int m_iPort;
int field_239;
DWORD m_dwMapIcon[100];
2023-11-23 23:56:11 +08:00
int m_iGameState;
int field_3D1;
struc_41 *field_3D5;
char field_3D9;
2024-02-06 22:01:20 +08:00
char _gap3DA[4];
NETGAME_POOLS* m_pPools;
public:
2024-07-19 23:15:22 +08:00
CNetGame(PCHAR szHostOrIp,int iPort,PCHAR szPlayerName,PCHAR szPass);
2024-01-06 23:39:04 +08:00
void Process();
2024-02-06 22:01:20 +08:00
void InitPools();
2024-01-06 23:39:04 +08:00
DWORD GetTime();
2024-10-21 22:46:54 +08:00
int GetGameState() { return m_iGameState; };
BOOL GetWalkStyle() { return field_3D5->bUseCJWalk; };
2024-01-06 23:39:04 +08:00
CPlayerPool * GetPlayerPool() { return m_pPools->pPlayerPool; };
2024-10-28 00:00:41 +08:00
CGangZonePool * GetGangZonePool() { return m_pPools->pGangZonePool; };
RakClientInterface * GetRakClient() { return m_pRakClient; };
void ResetMapIcons();
void SetMapIcon(BYTE byteIndex, float fX, float fY, float fZ, BYTE byteIcon, DWORD dwColor, int iStyle);
void DisableMapIcon(BYTE byteIndex);
};