mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-10 03:51:18 +00:00
[q3map2] import pk3dir/dpk/dpkdir support from netradiant
- load every pk3dir/dpkdir as VFS - increase VFS_MAXDIR - dpk/dpkdir is not versionned yet
This commit is contained in:
parent
ba300b1751
commit
c99c1abd9b
2 changed files with 15 additions and 2 deletions
|
@ -197,8 +197,21 @@ void vfsInitDirectory( const char *path ){
|
|||
dirlist = g_strdup( name );
|
||||
|
||||
{
|
||||
|
||||
char *ext = strrchr( dirlist, '.' );
|
||||
if ( ( ext == NULL ) || ( Q_stricmp( ext, ".pk3" ) != 0 ) ) {
|
||||
|
||||
if ( ext && ( !Q_stricmp( ext, ".pk3dir" ) || !Q_stricmp( ext, ".dpkdir" ) ) ) {
|
||||
if ( g_numDirs == VFS_MAXDIRS ) {
|
||||
continue;
|
||||
}
|
||||
snprintf( g_strDirs[g_numDirs], PATH_MAX, "%s/%s", path, name );
|
||||
g_strDirs[g_numDirs][PATH_MAX] = '\0';
|
||||
vfsFixDOSName( g_strDirs[g_numDirs] );
|
||||
vfsAddSlash( g_strDirs[g_numDirs] );
|
||||
++g_numDirs;
|
||||
}
|
||||
|
||||
if ( ( ext == NULL ) || ( Q_stricmp( ext, ".pk3" ) != 0 || !Q_stricmp( ext, ".dpk" ) != 0 ) ) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#ifndef _VFS_H_
|
||||
#define _VFS_H_
|
||||
|
||||
#define VFS_MAXDIRS 8
|
||||
#define VFS_MAXDIRS 64
|
||||
|
||||
void vfsInitDirectory( const char *path );
|
||||
void vfsShutdown();
|
||||
|
|
Loading…
Reference in a new issue