Skip to content

Commit

Permalink
[SP] rit.Malloc -> rit.Z_Malloc
Browse files Browse the repository at this point in the history
To match MP
  • Loading branch information
SomaZ committed Oct 3, 2023
1 parent a3ef151 commit 6654638
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
7 changes: 1 addition & 6 deletions code/client/cl_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1053,11 +1053,6 @@ int get_com_frameTime( void )
return com_frameTime;
}

void *CL_Malloc(int iSize, memtag_t eTag, qboolean bZeroit, int iAlign)
{
return Z_Malloc(iSize, eTag, bZeroit);
}

/*
============
CL_InitRef
Expand Down Expand Up @@ -1151,7 +1146,7 @@ void CL_InitRef( void ) {
RIT(SV_Trace);
RIT(S_RestartMusic);
RIT(Z_Free);
rit.Malloc=CL_Malloc;
RIT(Z_Malloc);
RIT(Z_MemSize);
RIT(Z_MorphMallocTag);

Expand Down
2 changes: 1 addition & 1 deletion code/rd-common/tr_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ typedef struct {
int (*Milliseconds) ( void );

void (*Hunk_ClearToMark) ( void );
void* (*Malloc) ( int iSize, memtag_t eTag, qboolean zeroIt, int iAlign );
void* (*Z_Malloc) ( int iSize, memtag_t eTag, qboolean zeroIt, int iAlign );
int (*Z_Free) ( void *memory );
int (*Z_MemSize) ( memtag_t eTag );
void (*Z_MorphMallocTag) ( void *pvBuffer, memtag_t eDesiredTag );
Expand Down
4 changes: 2 additions & 2 deletions code/rd-vanilla/tr_subs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void Com_DPrintf(const char *format, ...)
// ZONE

void *R_Malloc( int iSize, memtag_t eTag, qboolean bZeroit ) {
return ri.Malloc( iSize, eTag, bZeroit, 4 );
return ri.Z_Malloc( iSize, eTag, bZeroit, 4 );
}

void R_Free( void *ptr ) {
Expand All @@ -95,5 +95,5 @@ void R_MorphMallocTag( void *pvBuffer, memtag_t eDesiredTag ) {
}

void *R_Hunk_Alloc( int iSize, qboolean bZeroit ) {
return ri.Malloc( iSize, TAG_HUNKALLOC, bZeroit, 4 );
return ri.Z_Malloc( iSize, TAG_HUNKALLOC, bZeroit, 4 );
}

0 comments on commit 6654638

Please sign in to comment.