mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-02-01 20:30:57 +00:00
s/fs_basedir/fs_userdir/g
This commit is contained in:
parent
dedb64fc98
commit
c40d97b99c
3 changed files with 28 additions and 28 deletions
|
@ -68,12 +68,12 @@ typedef struct cvar_alias_s
|
||||||
#define CVAR_NORESTART 1024 // do not clear when a cvar_restart is issued
|
#define CVAR_NORESTART 1024 // do not clear when a cvar_restart is issued
|
||||||
#define CVAR_LATCH 2048 // will only change when C code next does
|
#define CVAR_LATCH 2048 // will only change when C code next does
|
||||||
// a Cvar_Get(), so it can't be changed
|
// a Cvar_Get(), so it can't be changed
|
||||||
#define CVAR_TEMP 4906 // can be set even when cheats are
|
#define CVAR_TEMP 4096 // can be set even when cheats are
|
||||||
// disabled, but is not archived
|
// disabled, but is not archived
|
||||||
|
|
||||||
// Zoid| A good CVAR_ROM example is basepath. The code should read "cvar_t
|
// Zoid| A good CVAR_ROM example is userpath. The code should read "cvar_t
|
||||||
// *fs_basepath = CvarGet("fs_basepath", ".", CVAR_ROM); The user can
|
// *fs_userpath = CvarGet("fs_userpath", ".", CVAR_ROM); The user can
|
||||||
// override that with +set fs_basepath <blah> since the command line +set gets
|
// override that with +set fs_userpath <blah> since the command line +set gets
|
||||||
// created _before_ the C code for fs_basepath setup is called. The code goes
|
// created _before_ the C code for fs_basepath setup is called. The code goes
|
||||||
// "look, the user made fs_basepath already", uses the users value, but sets
|
// "look, the user made fs_basepath already", uses the users value, but sets
|
||||||
// CVAR_ROM as per the call.
|
// CVAR_ROM as per the call.
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include <cl_slist.h>
|
#include <cl_slist.h>
|
||||||
|
|
||||||
extern cvar_t *fs_basepath;
|
extern cvar_t *fs_userpath;
|
||||||
extern cvar_t *fs_sharepath;
|
extern cvar_t *fs_sharepath;
|
||||||
// we need to declare some mouse variables here, because the menu system
|
// we need to declare some mouse variables here, because the menu system
|
||||||
// references them even when on a unix system.
|
// references them even when on a unix system.
|
||||||
|
|
|
@ -74,27 +74,27 @@ extern qboolean is_server;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
All of Quake's data access is through a hierchal file system, but the
|
All of Quake's data access is through a hierchical file system, but the
|
||||||
contents of the file system can be transparently merged from several
|
contents of the file system can be transparently merged from several
|
||||||
sources.
|
sources.
|
||||||
|
|
||||||
The "base directory" is the path to the directory holding the quake.exe
|
The "user directory" is the path to the directory holding the quake.exe
|
||||||
and all game directories. The sys_* files pass this to host_init in
|
and all game directories. The sys_* files pass this to host_init in
|
||||||
quakeparms_t->basedir. This can be overridden with the "-basedir"
|
quakeparms_t->basedir. This can be overridden with the "-basedir"
|
||||||
command line parm to allow code debugging in a different directory.
|
command line parm to allow code debugging in a different directory.
|
||||||
The base directory is only used during filesystem initialization.
|
The base directory is only used during filesystem initialization.
|
||||||
|
|
||||||
The "game directory" is the first tree on the search path and directory
|
The "game directory" is the first tree on the search path and directory
|
||||||
that all generated files (savegames, screenshots, demos, config files)
|
that all generated files (savegames, screenshots, demos, config files)
|
||||||
will be saved to. This can be overridden with the "-game" command line
|
will be saved to. This can be overridden with the "-game" command line
|
||||||
parameter. The game directory can never be changed while quake is
|
parameter. The game directory can never be changed while quake is
|
||||||
executing. This is a precacution against having a malicious server
|
executing. This is a precacution against having a malicious server
|
||||||
instruct clients to write files over areas they shouldn't.
|
instruct clients to write files over areas they shouldn't.
|
||||||
|
|
||||||
The "cache directory" is only used during development to save network
|
The "cache directory" is only used during development to save network
|
||||||
bandwidth, especially over ISDN / T1 lines. If there is a cache directory
|
bandwidth, especially over ISDN / T1 lines. If there is a cache directory
|
||||||
specified, when a file is found by the normal search path, it will be
|
specified, when a file is found by the normal search path, it will be
|
||||||
mirrored into the cache directory, then opened there.
|
mirrored into the cache directory, then opened there.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -107,7 +107,7 @@ QUAKE FILESYSTEM
|
||||||
|
|
||||||
char gamedirfile[MAX_OSPATH];
|
char gamedirfile[MAX_OSPATH];
|
||||||
|
|
||||||
cvar_t *fs_basepath;
|
cvar_t *fs_userpath;
|
||||||
cvar_t *fs_sharepath;
|
cvar_t *fs_sharepath;
|
||||||
|
|
||||||
#ifdef GENERATIONS
|
#ifdef GENERATIONS
|
||||||
|
@ -930,7 +930,7 @@ COM_AddDirectory (char *dir)
|
||||||
strcpy (com_gamedir, dir);
|
strcpy (com_gamedir, dir);
|
||||||
} else {
|
} else {
|
||||||
strcpy (gamedirfile, dir);
|
strcpy (gamedirfile, dir);
|
||||||
strcpy (com_gamedir, va("%s/%s", fs_basepath->string, dir));
|
strcpy (com_gamedir, va("%s/%s", fs_userpath->string, dir));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -962,9 +962,9 @@ COM_AddGameDirectory (char *dir)
|
||||||
Con_DPrintf ("COM_AddGameDirectory (\"%s/%s\")\n",
|
Con_DPrintf ("COM_AddGameDirectory (\"%s/%s\")\n",
|
||||||
fs_sharepath->string, dir);
|
fs_sharepath->string, dir);
|
||||||
|
|
||||||
if (strcmp (fs_sharepath->string, fs_basepath->string) != 0)
|
if (strcmp (fs_sharepath->string, fs_userpath->string) != 0)
|
||||||
COM_AddDirectory (va("%s/%s", fs_sharepath->string, dir));
|
COM_AddDirectory (va("%s/%s", fs_sharepath->string, dir));
|
||||||
COM_AddDirectory (va("%s/%s", fs_basepath->string, dir));
|
COM_AddDirectory (va("%s/%s", fs_userpath->string, dir));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1064,7 +1064,7 @@ void COM_Gamedir_f (void)
|
||||||
void
|
void
|
||||||
COM_InitFilesystem ( void )
|
COM_InitFilesystem ( void )
|
||||||
{
|
{
|
||||||
fs_basepath = Cvar_Get ("fs_basepath", FS_USERPATH, CVAR_ROM,
|
fs_userpath = Cvar_Get ("fs_userpath", FS_USERPATH, CVAR_ROM,
|
||||||
"the location of your game directories");
|
"the location of your game directories");
|
||||||
fs_sharepath = Cvar_Get ("fs_sharepath", FS_SHAREPATH,
|
fs_sharepath = Cvar_Get ("fs_sharepath", FS_SHAREPATH,
|
||||||
CVAR_ROM, "read-only game directories");
|
CVAR_ROM, "read-only game directories");
|
||||||
|
|
Loading…
Reference in a new issue