Browse Source

ref: soft: replace va function calls.

pull/2/head
Andrey Akhmichin 2 years ago committed by Alibek Omarov
parent
commit
af5c74981b
  1. 4
      ref/soft/r_sprite.c

4
ref/soft/r_sprite.c

@ -242,6 +242,7 @@ void Mod_LoadMapSprite( model_t *mod, const void *buffer, size_t size, qboolean @@ -242,6 +242,7 @@ void Mod_LoadMapSprite( model_t *mod, const void *buffer, size_t size, qboolean
int linedelta, numframes;
mspriteframe_t *pspriteframe;
msprite_t *psprite;
char poolname[MAX_VA_STRING];
if( loaded ) *loaded = false;
Q_snprintf( texname, sizeof( texname ), "#%s", mod->name );
@ -275,7 +276,8 @@ void Mod_LoadMapSprite( model_t *mod, const void *buffer, size_t size, qboolean @@ -275,7 +276,8 @@ void Mod_LoadMapSprite( model_t *mod, const void *buffer, size_t size, qboolean
// determine how many frames we needs
numframes = (pix->width * pix->height) / (w * h);
mod->mempool = Mem_AllocPool( va( "^2%s^7", mod->name ));
Q_snprintf( poolname, sizeof( poolname ), "^2%s^7", mod->name );
mod->mempool = Mem_AllocPool( poolname );
psprite = Mem_Calloc( mod->mempool, sizeof( msprite_t ) + ( numframes - 1 ) * sizeof( psprite->frames ));
mod->cache.data = psprite; // make link to extradata

Loading…
Cancel
Save