mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[server] Add CMenuPool ctor/dtor
This commit is contained in:
parent
a9834084b4
commit
fe3f39d3a7
@ -8,7 +8,9 @@
|
|||||||
|
|
||||||
#define MAX_PLAYERS 1000
|
#define MAX_PLAYERS 1000
|
||||||
#define MAX_VEHICLES 2000
|
#define MAX_VEHICLES 2000
|
||||||
|
#define MAX_MENUS 128
|
||||||
#define MAX_TEXT_DRAWS 2048
|
#define MAX_TEXT_DRAWS 2048
|
||||||
|
#define MAX_GANG_ZONES 1024
|
||||||
|
|
||||||
#define DEFAULT_MAX_PLAYERS 50
|
#define DEFAULT_MAX_PLAYERS 50
|
||||||
#define DEFAULT_LISTEN_PORT 8192
|
#define DEFAULT_LISTEN_PORT 8192
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
CMenuPool::CMenuPool()
|
||||||
|
{
|
||||||
|
for (BYTE byteMenuID = 0; byteMenuID < MAX_MENUS; byteMenuID++)
|
||||||
|
{
|
||||||
|
field_200[byteMenuID] = 0;
|
||||||
|
field_0[byteMenuID] = 0;
|
||||||
|
}
|
||||||
|
for (PLAYERID Player = 0; Player < MAX_PLAYERS; Player++)
|
||||||
|
{
|
||||||
|
field_400[Player] = 255;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CMenuPool::~CMenuPool()
|
||||||
|
{
|
||||||
|
for (BYTE byteMenuID = 0; byteMenuID < MAX_MENUS; byteMenuID++)
|
||||||
|
{
|
||||||
|
if (field_0[byteMenuID])
|
||||||
|
{
|
||||||
|
delete field_0[byteMenuID];
|
||||||
|
field_0[byteMenuID] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,13 @@
|
|||||||
class CMenuPool // size: WL 2024
|
class CMenuPool // size: WL 2024
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
char _gap0[2024];
|
int* field_0[128];
|
||||||
|
int field_200[128];
|
||||||
|
char field_400[1000];
|
||||||
|
|
||||||
|
public:
|
||||||
|
CMenuPool();
|
||||||
|
~CMenuPool();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user