Browse Source

filesystem: expose archive mount generic function for Xar

pull/2/head
Alibek Omarov 1 year ago
parent
commit
6f7b1695d7
  1. 8
      filesystem/filesystem.c
  2. 3
      filesystem/filesystem.h

8
filesystem/filesystem.c

@ -348,7 +348,7 @@ searchpath_t *FS_AddArchive_Fullpath( const fs_archive_t *archive, const char *f @@ -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 ) @@ -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 = @@ -2939,7 +2939,7 @@ fs_api_t g_api =
FS_GetDiskPath,
NULL,
NULL,
(void *)FS_MountArchive_Fullpath,
FS_GetFullDiskPath,
};

3
filesystem/filesystem.h

@ -129,7 +129,6 @@ typedef struct fs_globals_t @@ -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 @@ -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;

Loading…
Cancel
Save