mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[saco] Implement CLabelPool ctor
This commit is contained in:
parent
864ab50d1e
commit
2da4d86441
@ -7,6 +7,7 @@
|
||||
#define MAX_ACTORS 1000
|
||||
#define MAX_VEHICLES 2000
|
||||
#define MAX_OBJECTS 1000
|
||||
#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/labelpool.h"
|
||||
#include "net/netgame.h"
|
||||
#include "net/scriptrpc.h"
|
||||
|
||||
|
11
saco/net/labelpool.cpp
Normal file
11
saco/net/labelpool.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
#include "../main.h"
|
||||
|
||||
CLabelPool::CLabelPool()
|
||||
{
|
||||
for(WORD wLabel = 0; wLabel < MAX_LABELS; wLabel++)
|
||||
{
|
||||
memset(&field_0[wLabel], 0, sizeof(struc_92));
|
||||
field_E800[wLabel] = 0;
|
||||
}
|
||||
}
|
17
saco/net/labelpool.h
Normal file
17
saco/net/labelpool.h
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
struct struc_92
|
||||
{
|
||||
char _gap[29];
|
||||
};
|
||||
|
||||
class CLabelPool
|
||||
{
|
||||
private:
|
||||
struc_92 field_0[MAX_LABELS];
|
||||
int field_E800[MAX_LABELS];
|
||||
public:
|
||||
CLabelPool();
|
||||
|
||||
};
|
@ -34,6 +34,7 @@ void CNetGame::InitPools()
|
||||
m_pPools = (NETGAME_POOLS *)calloc(1, sizeof(NETGAME_POOLS));
|
||||
|
||||
m_pPools->pObjectPool = new CObjectPool();
|
||||
m_pPools->pLabelPool = new CLabelPool();
|
||||
m_pPools->pPlayerPool = new CPlayerPool();
|
||||
m_pPools->pVehiclePool = new CVehiclePool();
|
||||
m_pPools->pPickupPool = new CPickupPool();
|
||||
|
@ -31,7 +31,9 @@ typedef struct _NETGAME_POOLS {
|
||||
CPickupPool *pPickupPool;
|
||||
CObjectPool *pObjectPool;
|
||||
CActorPool *pActorPool;
|
||||
char _gap0[16];
|
||||
char _gap0[4];
|
||||
CLabelPool *pLabelPool;
|
||||
char _gap1[8];
|
||||
} NETGAME_POOLS;
|
||||
|
||||
class CNetGame // size: 994
|
||||
|
@ -252,6 +252,12 @@
|
||||
<File
|
||||
RelativePath=".\net\actorpool.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\net\labelpool.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\net\labelpool.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\net\netgame.cpp">
|
||||
</File>
|
||||
|
Loading…
Reference in New Issue
Block a user