mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-09-19 20:26:14 +08:00
[saco] Implement CMenuPool ctor
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
#define MAX_ACTORS 1000
|
||||
#define MAX_VEHICLES 2000
|
||||
#define MAX_OBJECTS 1000
|
||||
#define MAX_MENUS 128
|
||||
#define MAX_LABELS 2048
|
||||
#define PLAYER_PED_SLOTS 210
|
||||
|
||||
|
@ -34,6 +34,7 @@ typedef struct _GAME_SETTINGS {
|
||||
#include "net/vehiclepool.h"
|
||||
#include "net/pickuppool.h"
|
||||
#include "net/objectpool.h"
|
||||
#include "net/menupool.h"
|
||||
#include "net/labelpool.h"
|
||||
#include "net/netgame.h"
|
||||
#include "net/scriptrpc.h"
|
||||
|
17
saco/net/menupool.cpp
Normal file
17
saco/net/menupool.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
#include "../main.h"
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
CMenuPool::CMenuPool()
|
||||
{
|
||||
// loop through and initialize all net players to null and slot states to false
|
||||
for (BYTE byteMenuID = 0; byteMenuID < MAX_MENUS; byteMenuID++)
|
||||
{
|
||||
field_200[byteMenuID] = 0;
|
||||
field_0[byteMenuID] = 0;
|
||||
}
|
||||
field_400 = -128;
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
18
saco/net/menupool.h
Normal file
18
saco/net/menupool.h
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
class CMenuPool
|
||||
{
|
||||
private:
|
||||
int field_0[MAX_MENUS];
|
||||
int field_200[MAX_MENUS];
|
||||
char field_400;
|
||||
char field_401;
|
||||
public:
|
||||
CMenuPool();
|
||||
|
||||
};
|
||||
|
||||
//----------------------------------------------------
|
@ -34,6 +34,7 @@ void CNetGame::InitPools()
|
||||
m_pPools = (NETGAME_POOLS *)calloc(1, sizeof(NETGAME_POOLS));
|
||||
|
||||
m_pPools->pObjectPool = new CObjectPool();
|
||||
m_pPools->pMenuPool = new CMenuPool();
|
||||
m_pPools->pLabelPool = new CLabelPool();
|
||||
m_pPools->pPlayerPool = new CPlayerPool();
|
||||
m_pPools->pVehiclePool = new CVehiclePool();
|
||||
|
@ -33,7 +33,8 @@ typedef struct _NETGAME_POOLS {
|
||||
CActorPool *pActorPool;
|
||||
char _gap0[4];
|
||||
CLabelPool *pLabelPool;
|
||||
char _gap1[8];
|
||||
char _gap1[4];
|
||||
CMenuPool *pMenuPool;
|
||||
} NETGAME_POOLS;
|
||||
|
||||
class CNetGame // size: 994
|
||||
|
@ -258,6 +258,12 @@
|
||||
<File
|
||||
RelativePath=".\net\labelpool.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\net\menupool.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\net\menupool.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\net\netgame.cpp">
|
||||
</File>
|
||||
|
Reference in New Issue
Block a user