mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-26 23:04:21 +00:00
filesystem: expose archive mount generic function for Xar
This commit is contained in:
parent
28a4b51939
commit
6f7b1695d7
@ -348,7 +348,7 @@ searchpath_t *FS_AddArchive_Fullpath( const fs_archive_t *archive, const char *f
|
|||||||
FS_AddArchive_Fullpath
|
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 fs_archive_t *archive;
|
||||||
const char *ext = COM_FileExtension( file );
|
const char *ext = COM_FileExtension( file );
|
||||||
@ -1176,11 +1176,11 @@ void FS_Rescan( void )
|
|||||||
|
|
||||||
str = getenv( "XASH3D_EXTRAS_PAK1" );
|
str = getenv( "XASH3D_EXTRAS_PAK1" );
|
||||||
if( COM_CheckString( str ))
|
if( COM_CheckString( str ))
|
||||||
FS_AddExtras_Fullpath( str, extrasFlags );
|
FS_MountArchive_Fullpath( str, extrasFlags );
|
||||||
|
|
||||||
str = getenv( "XASH3D_EXTRAS_PAK2" );
|
str = getenv( "XASH3D_EXTRAS_PAK2" );
|
||||||
if( COM_CheckString( str ))
|
if( COM_CheckString( str ))
|
||||||
FS_AddExtras_Fullpath( str, extrasFlags );
|
FS_MountArchive_Fullpath( str, extrasFlags );
|
||||||
|
|
||||||
if( Q_stricmp( GI->basedir, GI->gamefolder ))
|
if( Q_stricmp( GI->basedir, GI->gamefolder ))
|
||||||
FS_AddGameHierarchy( GI->basedir, 0 );
|
FS_AddGameHierarchy( GI->basedir, 0 );
|
||||||
@ -2939,7 +2939,7 @@ fs_api_t g_api =
|
|||||||
FS_GetDiskPath,
|
FS_GetDiskPath,
|
||||||
|
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
(void *)FS_MountArchive_Fullpath,
|
||||||
|
|
||||||
FS_GetFullDiskPath,
|
FS_GetFullDiskPath,
|
||||||
};
|
};
|
||||||
|
@ -129,7 +129,6 @@ typedef struct fs_globals_t
|
|||||||
|
|
||||||
typedef void (*fs_event_callback_t)( const char *path );
|
typedef void (*fs_event_callback_t)( const char *path );
|
||||||
|
|
||||||
|
|
||||||
typedef struct fs_api_t
|
typedef struct fs_api_t
|
||||||
{
|
{
|
||||||
qboolean (*InitStdio)( qboolean unused_set_to_true, const char *rootdir, const char *basedir, const char *gamedir, const char *rodir );
|
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
|
// reserved
|
||||||
void (*Unused0)( void );
|
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 );
|
qboolean (*GetFullDiskPath)( char *buffer, size_t size, const char *name, qboolean gamedironly );
|
||||||
} fs_api_t;
|
} fs_api_t;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user