mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[server] Add CTextDrawPool ctor/dtor
This commit is contained in:
parent
98a560e360
commit
ce2fc48592
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#define MAX_PLAYERS 1000
|
#define MAX_PLAYERS 1000
|
||||||
#define MAX_VEHICLES 2000
|
#define MAX_VEHICLES 2000
|
||||||
|
#define MAX_TEXT_DRAWS 2048
|
||||||
|
|
||||||
#define DEFAULT_MAX_PLAYERS 50
|
#define DEFAULT_MAX_PLAYERS 50
|
||||||
#define DEFAULT_LISTEN_PORT 8192
|
#define DEFAULT_LISTEN_PORT 8192
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
CTextDrawPool::CTextDrawPool()
|
||||||
|
{
|
||||||
|
for (WORD wText = 0; wText < MAX_TEXT_DRAWS; wText++)
|
||||||
|
{
|
||||||
|
field_0[wText] = 0;
|
||||||
|
field_2000[wText] = 0;
|
||||||
|
field_4000[wText] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CTextDrawPool::~CTextDrawPool()
|
||||||
|
{
|
||||||
|
for (WORD wText = 0; wText < MAX_TEXT_DRAWS; wText++)
|
||||||
|
{
|
||||||
|
if(field_2000[wText])
|
||||||
|
{
|
||||||
|
free(field_2000[wText]);
|
||||||
|
field_2000[wText] = NULL;
|
||||||
|
}
|
||||||
|
if(field_4000[wText])
|
||||||
|
{
|
||||||
|
free(field_4000[wText]);
|
||||||
|
field_4000[wText] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,15 @@
|
|||||||
class CTextDrawPool // size: WL 2072576
|
class CTextDrawPool // size: WL 2072576
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
char _gap0[2072576];
|
|
||||||
|
int field_0[2048];
|
||||||
|
int field_2000[2048];
|
||||||
|
int field_4000[2048];
|
||||||
|
char gap6000[2048000];
|
||||||
|
|
||||||
|
public:
|
||||||
|
CTextDrawPool();
|
||||||
|
~CTextDrawPool();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user