2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-26 03:39:16 +01:00

filesystem: expose archive mount generic function for Xar

This commit is contained in:
Alibek Omarov 2023-07-05 05:00:16 +03:00
parent 28a4b51939
commit 6f7b1695d7
2 changed files with 5 additions and 6 deletions

View File

@ -348,7 +348,7 @@ searchpath_t *FS_AddArchive_Fullpath( const fs_archive_t *archive, const char *f
FS_AddArchive_Fullpath
================
*/
static searchpath_t *FS_AddExtras_Fullpath( const char *file, int flags )
static searchpath_t *FS_MountArchive_Fullpath( const char *file, int flags )
{
const fs_archive_t *archive;
const char *ext = COM_FileExtension( file );
@ -1176,11 +1176,11 @@ void FS_Rescan( void )
str = getenv( "XASH3D_EXTRAS_PAK1" );
if( COM_CheckString( str ))
FS_AddExtras_Fullpath( str, extrasFlags );
FS_MountArchive_Fullpath( str, extrasFlags );
str = getenv( "XASH3D_EXTRAS_PAK2" );
if( COM_CheckString( str ))
FS_AddExtras_Fullpath( str, extrasFlags );
FS_MountArchive_Fullpath( str, extrasFlags );
if( Q_stricmp( GI->basedir, GI->gamefolder ))
FS_AddGameHierarchy( GI->basedir, 0 );
@ -2939,7 +2939,7 @@ fs_api_t g_api =
FS_GetDiskPath,
NULL,
NULL,
(void *)FS_MountArchive_Fullpath,
FS_GetFullDiskPath,
};

View File

@ -129,7 +129,6 @@ typedef struct fs_globals_t
typedef void (*fs_event_callback_t)( const char *path );
typedef struct fs_api_t
{
qboolean (*InitStdio)( qboolean unused_set_to_true, const char *rootdir, const char *basedir, const char *gamedir, const char *rodir );
@ -187,7 +186,7 @@ typedef struct fs_api_t
// reserved
void (*Unused0)( void );
void (*Unused1)( void );
void *(*MountArchive_Fullpath)( const char *path, int flags );
qboolean (*GetFullDiskPath)( char *buffer, size_t size, const char *name, qboolean gamedironly );
} fs_api_t;