From da7389d9a287499b7319c189da7a80b8557fe796 Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Mon, 9 Oct 2023 12:27:37 -0700 Subject: [PATCH] add alias for -basedir for consistency with the engine parameters --- README.md | 4 ++-- src/help.c | 2 +- src/path_init.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 751a2e5..f79c528 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,9 @@ BSP: `./vmap [options] dm_foobar` VIS: `./vmap [options] -vis dm_foobar` LIGHT: `./vmap [options] -light dm_foobar` -You want to pass `-fs_basepath /path/to/game/root` and `-game` arguments to specify where to read textures from. If you wanted to, for example, compile a map included within Nuclide's 'base' directory you'd end up with a command-line like this: +You want to pass `-basedir /path/to/game/root` and `-game` arguments to specify where to read textures from. If you wanted to, for example, compile a map included within Nuclide's 'base' directory you'd end up with a command-line like this: -`./vmap -fs_basepath /home/user/nuclide-sdk/ -game base test_sun` +`./vmap -basedir "/home/user/nuclide-sdk/" -game "base" test_sun` ## Compiling To compile on a standard GNU/Linux system: diff --git a/src/help.c b/src/help.c index c2561fa..200b7d9 100644 --- a/src/help.c +++ b/src/help.c @@ -322,7 +322,7 @@ void HelpCommon() {"-game ", "Sets a different game directory name (can be used more than once)"}, {"-connect
", "Talk to a WorldSpawn instance using a specific XML based protocol"}, {"-force", "Allow reading some broken/unsupported BSP files e.g. when decompiling, may also crash"}, - {"-fs_basepath ", "Sets the given path as main directory of the game (can be used more than once to look in multiple paths)"}, + {"-basedir ", "Sets the given path as main directory of the game (can be used more than once to look in multiple paths)"}, {"-fs_homebase ", "Specifies where the user home directory name is on Linux (default for Q3A: .q3a)"}, {"-fs_homepath ", "Sets the given path as home directory name"}, {"-fs_nobasepath", "Do not load base paths in VFS, imply -fs_nomagicpath"}, diff --git a/src/path_init.c b/src/path_init.c index 220492f..4f32d10 100644 --- a/src/path_init.c +++ b/src/path_init.c @@ -472,7 +472,7 @@ void InitPaths( int *argc, char **argv ){ } /* -fs_basepath */ - else if ( strcmp( argv[ i ], "-fs_basepath" ) == 0 ) { + else if ( strcmp( argv[ i ], "-fs_basepath" ) == 0 || strcmp( argv[ i ], "-basedir" ) == 0 ) { if ( ++i >= *argc ) { Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] ); }