platform: p5 allocator fix; ref_gu: using vram for palettes

This commit is contained in:
Crow-bar
2022-09-21 15:31:26 +03:00
parent b567531cdb
commit b517019750
8 changed files with 49 additions and 25 deletions

View File

@@ -292,7 +292,7 @@ static void InitEntityTable( SAVERESTOREDATA *pSaveData, int entityCount )
int i;
#if XASH_PSP
pSaveData->pTable = P5Ram_Alloc( sizeof( ENTITYTABLE ) * entityCount );
pSaveData->pTable = P5Ram_Alloc( sizeof( ENTITYTABLE ) * entityCount, 1 );
#else
pSaveData->pTable = Mem_Calloc( host.mempool, sizeof( ENTITYTABLE ) * entityCount );
#endif
@@ -612,8 +612,8 @@ static SAVERESTOREDATA *SaveInit( int size, int tokenCount )
SAVERESTOREDATA *pSaveData;
#if XASH_PSP
pSaveData = P5Ram_Alloc( sizeof( SAVERESTOREDATA ) + size );
pSaveData->pTokens = (char **)P5Ram_Alloc( tokenCount * sizeof( char* ));
pSaveData = P5Ram_Alloc( sizeof( SAVERESTOREDATA ) + size, 1 );
pSaveData->pTokens = (char **)P5Ram_Alloc( tokenCount * sizeof( char* ), 1 );
#else
pSaveData = Mem_Calloc( host.mempool, sizeof( SAVERESTOREDATA ) + size );
pSaveData->pTokens = (char **)Mem_Calloc( host.mempool, tokenCount * sizeof( char* ));
@@ -2268,7 +2268,7 @@ int GAME_EXPORT SV_GetSaveComment( const char *savename, char *comment )
if( tokenSize > 0 )
{
#if XASH_PSP
pTokenList = P5Ram_Alloc( tokenCount * sizeof( char* ));
pTokenList = P5Ram_Alloc( tokenCount * sizeof( char* ), 1 );
#else
pTokenList = Mem_Calloc( host.mempool, tokenCount * sizeof( char* ));
#endif