mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-02-02 02:04:25 +00:00
ref: add size argument to COM_FileBase calls
This commit is contained in:
parent
1603b8028c
commit
8b96e7ca87
@ -443,7 +443,7 @@ rgbdata_t *Mod_CreateSkinData( model_t *mod, byte *data, int width, int height )
|
||||
}
|
||||
}
|
||||
|
||||
COM_FileBase( loadmodel->name, name );
|
||||
COM_FileBase( loadmodel->name, name, sizeof( name ));
|
||||
|
||||
// for alias models only player can have remap textures
|
||||
if( mod != NULL && !Q_stricmp( name, "player" ))
|
||||
|
@ -689,7 +689,7 @@ rebuild_page:
|
||||
if( FBitSet( image->flags, TF_DEPTHMAP ) && !FBitSet( image->flags, TF_NOCOMPARE ))
|
||||
pglTexParameteri( image->target, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB );
|
||||
|
||||
COM_FileBase( image->name, shortname );
|
||||
COM_FileBase( image->name, shortname, sizeof( shortname ));
|
||||
if( Q_strlen( shortname ) > 18 )
|
||||
{
|
||||
// cutoff too long names, it looks ugly
|
||||
|
@ -1188,7 +1188,7 @@ int R_CreateDecalList( decallist_t *pList )
|
||||
pList[total].scale = decal->scale;
|
||||
|
||||
R_DecalUnProject( decal, &pList[total] );
|
||||
COM_FileBase( R_GetTexture( decal->texture )->name, pList[total].name );
|
||||
COM_FileBase( R_GetTexture( decal->texture )->name, pList[total].name, sizeof( pList[total].name ));
|
||||
|
||||
// check to see if the decal should be added
|
||||
total = DecalListAdd( pList, total );
|
||||
|
@ -1587,7 +1587,7 @@ int GL_LoadTextureArray( const char **names, int flags )
|
||||
// create complexname from layer names
|
||||
for( i = 0; i < numLayers - 1; i++ )
|
||||
{
|
||||
COM_FileBase( names[i], basename );
|
||||
COM_FileBase( names[i], basename, sizeof( basename ));
|
||||
ret = Q_snprintf( &name[len], sizeof( name ) - len, "%s|", basename );
|
||||
|
||||
if( ret == -1 )
|
||||
@ -1596,7 +1596,7 @@ int GL_LoadTextureArray( const char **names, int flags )
|
||||
len += ret;
|
||||
}
|
||||
|
||||
COM_FileBase( names[i], basename );
|
||||
COM_FileBase( names[i], basename, sizeof( basename ));
|
||||
ret = Q_snprintf( &name[len], sizeof( name ) - len, "%s[%i]", basename, numLayers );
|
||||
|
||||
if( ret == -1 )
|
||||
|
@ -3757,7 +3757,7 @@ static void R_StudioLoadTexture( model_t *mod, studiohdr_t *phdr, mstudiotexture
|
||||
}
|
||||
|
||||
Q_strncpy( mdlname, mod->name, sizeof( mdlname ));
|
||||
COM_FileBase( ptexture->name, name );
|
||||
COM_FileBase( ptexture->name, name, sizeof( name ));
|
||||
COM_StripExtension( mdlname );
|
||||
|
||||
if( FBitSet( ptexture->flags, STUDIO_NF_NOMIPS ))
|
||||
|
@ -1200,7 +1200,7 @@ int GAME_EXPORT R_CreateDecalList( decallist_t *pList )
|
||||
pList[total].scale = decal->scale;
|
||||
|
||||
R_DecalUnProject( decal, &pList[total] );
|
||||
COM_FileBase( R_GetTexture( decal->texture )->name, pList[total].name );
|
||||
COM_FileBase( R_GetTexture( decal->texture )->name, pList[total].name, sizeof( pList[total].name ));
|
||||
|
||||
// check to see if the decal should be added
|
||||
total = DecalListAdd( pList, total );
|
||||
|
@ -3537,7 +3537,7 @@ static void R_StudioLoadTexture( model_t *mod, studiohdr_t *phdr, mstudiotexture
|
||||
}
|
||||
|
||||
Q_strncpy( mdlname, mod->name, sizeof( mdlname ));
|
||||
COM_FileBase( ptexture->name, name );
|
||||
COM_FileBase( ptexture->name, name, sizeof( name ));
|
||||
COM_StripExtension( mdlname );
|
||||
|
||||
if( FBitSet( ptexture->flags, STUDIO_NF_NOMIPS ))
|
||||
|
Loading…
x
Reference in New Issue
Block a user