[saco] Implement CTextDrawPool constructor

This commit is contained in:
RD42 2024-02-16 22:32:25 +08:00
parent f854edac06
commit 96cd12248f
7 changed files with 44 additions and 1 deletions

View File

@ -8,6 +8,7 @@
#define MAX_VEHICLES 2000
#define MAX_OBJECTS 1000
#define MAX_MENUS 128
#define MAX_TEXT_DRAWS 2304
#define MAX_LABELS 2048
#define PLAYER_PED_SLOTS 210

View File

@ -37,6 +37,7 @@ typedef struct _GAME_SETTINGS {
#include "net/pickuppool.h"
#include "net/objectpool.h"
#include "net/menupool.h"
#include "net/textdrawpool.h"
#include "net/labelpool.h"
#include "net/netgame.h"
#include "net/scriptrpc.h"

View File

@ -36,6 +36,7 @@ void CNetGame::InitPools()
m_pPools->pObjectPool = new CObjectPool();
m_pPools->pMenuPool = new CMenuPool();
m_pPools->pLabelPool = new CLabelPool();
m_pPools->pTextDrawPool = new CTextDrawPool();
m_pPools->pPlayerPool = new CPlayerPool();
m_pPools->pVehiclePool = new CVehiclePool();
m_pPools->pPickupPool = new CPickupPool();

View File

@ -33,7 +33,7 @@ typedef struct _NETGAME_POOLS {
CActorPool *pActorPool;
char _gap0[4];
CLabelPool *pLabelPool;
char _gap1[4];
CTextDrawPool *pTextDrawPool;
CMenuPool *pMenuPool;
} NETGAME_POOLS;

19
saco/net/textdrawpool.cpp Normal file
View File

@ -0,0 +1,19 @@
#include "../main.h"
BOOL unnamed_100B2AF0();
//----------------------------------------------------
CTextDrawPool::CTextDrawPool()
{
int x=0;
while(x!=MAX_TEXT_DRAWS) {
field_2400[x] = 0;
field_0[x] = 0;
x++;
}
unnamed_100B2AF0();
}
//----------------------------------------------------

15
saco/net/textdrawpool.h Normal file
View File

@ -0,0 +1,15 @@
#pragma once
//----------------------------------------------------
class CTextDrawPool
{
private:
int field_0[MAX_TEXT_DRAWS];
int field_2400[MAX_TEXT_DRAWS];
public:
CTextDrawPool();
};
//----------------------------------------------------

View File

@ -315,6 +315,12 @@
<File
RelativePath=".\net\scriptrpc.h">
</File>
<File
RelativePath=".\net\textdrawpool.cpp">
</File>
<File
RelativePath=".\net\textdrawpool.h">
</File>
<File
RelativePath=".\net\vehiclepool.cpp">
</File>