mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
merge and move quakefs.c into libQFutil where it belongs. at long last
This commit is contained in:
parent
b432d0ea17
commit
4f2e22bfb8
8 changed files with 23 additions and 4 deletions
|
@ -3,7 +3,7 @@ lib_LTLIBRARIES = libQFutil.la
|
|||
libQFutil_la_LDFLAGS = -version-info 1:0:0
|
||||
libQFutil_la_SOURCES = \
|
||||
checksum.c cmd.c crc.c cvar.c hash.c info.c link.c math.S mathlib.c \
|
||||
mdfour.c msg.c qargs.c qendian.c qfplist.c quakeio.c sizebuf.c va.c \
|
||||
ver_check.c zone.c
|
||||
mdfour.c msg.c qargs.c qendian.c qfplist.c quakefs.c quakeio.c \
|
||||
sizebuf.c va.c ver_check.c zone.c
|
||||
|
||||
LIBLIST = libQFutil.la @LIBRARY_SEARCH_PATH@
|
||||
|
|
|
@ -112,6 +112,7 @@ char gamedirfile[MAX_OSPATH];
|
|||
cvar_t *fs_userpath;
|
||||
cvar_t *fs_sharepath;
|
||||
cvar_t *fs_basegame;
|
||||
cvar_t *fs_skinbase;
|
||||
|
||||
int com_filesize;
|
||||
|
||||
|
@ -984,6 +985,9 @@ COM_Gamedir (char *dir)
|
|||
//
|
||||
Cache_Flush ();
|
||||
|
||||
if (fs_skinbase && strcmp (dir, fs_skinbase->string) == 0)
|
||||
return;
|
||||
|
||||
COM_AddGameDirectory (dir);
|
||||
}
|
||||
|
||||
|
@ -1009,6 +1013,11 @@ COM_Filesystem_Init (void)
|
|||
// start up with basegame->string by default
|
||||
COM_CreateGameDirectory (fs_basegame->string);
|
||||
|
||||
// If we're dealing with id1, use qw too
|
||||
if (fs_skinbase && !strequal (fs_basegame->string, fs_skinbase->string)) {
|
||||
COM_CreateGameDirectory (fs_skinbase->string);
|
||||
}
|
||||
|
||||
if ((i = COM_CheckParm ("-game")) && i < com_argc - 1) {
|
||||
char *gamedirs = NULL;
|
||||
char *where;
|
|
@ -51,7 +51,6 @@ common_ASM= sys_ia32.S worlda.S $(math_ASM)
|
|||
|
||||
common_SOURCES= game.c wad.c world.c \
|
||||
model.c model_alias.c model_brush.c model_sprite.c \
|
||||
quakefs.c \
|
||||
com.c \
|
||||
$(common_ASM)
|
||||
|
||||
|
|
|
@ -38,5 +38,6 @@
|
|||
extern cvar_t *registered;
|
||||
|
||||
void Game_Init (void);
|
||||
void Game_Init_Cvars (void);
|
||||
|
||||
#endif // __game_h
|
||||
|
|
|
@ -51,7 +51,7 @@ math_ASM = sys_x86.S
|
|||
endif
|
||||
common_SOURCES= buildnum.c com.c \
|
||||
game.c model.c model_brush.c msg_ucmd.c \
|
||||
pmove.c pmovetst.c quakefs.c \
|
||||
pmove.c pmovetst.c \
|
||||
$(math_ASM) $(packetlogger)
|
||||
|
||||
#
|
||||
|
|
|
@ -1589,6 +1589,7 @@ Host_Init (void)
|
|||
Con_Init_Cvars ();
|
||||
Draw_Init_Cvars ();
|
||||
COM_Filesystem_Init_Cvars ();
|
||||
Game_Init_Cvars ();
|
||||
IN_Init_Cvars ();
|
||||
Key_Init_Cvars ();
|
||||
Mod_Init_Cvars ();
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
#include "QF/cmd.h"
|
||||
#include "QF/console.h"
|
||||
#include "QF/cvar.h"
|
||||
#include "QF/info.h"
|
||||
#include "QF/qargs.h"
|
||||
#include "QF/quakefs.h"
|
||||
|
@ -94,3 +95,10 @@ Game_Init (void)
|
|||
Cmd_AddCommand ("gamedir", SV_Gamedir_f,
|
||||
"Specifies the directory to be used while playing.");
|
||||
}
|
||||
|
||||
void
|
||||
Game_Init_Cvars (void)
|
||||
{
|
||||
fs_skinbase = Cvar_Get ("fs_skinbase", "qw", CVAR_ROM,
|
||||
"location of skins dir for downloads");
|
||||
}
|
||||
|
|
|
@ -1916,6 +1916,7 @@ SV_Init (void)
|
|||
|
||||
|
||||
COM_Filesystem_Init_Cvars ();
|
||||
Game_Init_Cvars ();
|
||||
COM_Init_Cvars ();
|
||||
Mod_Init_Cvars ();
|
||||
Netchan_Init_Cvars ();
|
||||
|
|
Loading…
Reference in a new issue