mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 15:31:39 +00:00
revert r903 and the old conback hack commits. change the engine
to load id1/quakespasm.pak for content customizations. git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@904 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
c29bc2e814
commit
a40adf1e46
21 changed files with 264 additions and 20782 deletions
|
@ -33,7 +33,6 @@
|
||||||
<Compiler>
|
<Compiler>
|
||||||
<Add option="-Wall" />
|
<Add option="-Wall" />
|
||||||
<Add option="`sdl-config --cflags`" />
|
<Add option="`sdl-config --cflags`" />
|
||||||
<Add option="-DUSE_QS_CONBACK" />
|
|
||||||
<Add option="-DUSE_CODEC_MP3" />
|
<Add option="-DUSE_CODEC_MP3" />
|
||||||
<Add option="-DUSE_CODEC_VORBIS" />
|
<Add option="-DUSE_CODEC_VORBIS" />
|
||||||
<Add option="-DUSE_CODEC_WAVE" />
|
<Add option="-DUSE_CODEC_WAVE" />
|
||||||
|
@ -89,10 +88,6 @@
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
<Unit filename="../../Quake/common.h" />
|
<Unit filename="../../Quake/common.h" />
|
||||||
<Unit filename="../../Quake/conback.c">
|
|
||||||
<Option compilerVar="CC" />
|
|
||||||
</Unit>
|
|
||||||
<Unit filename="../../Quake/conback.h" />
|
|
||||||
<Unit filename="../../Quake/console.c">
|
<Unit filename="../../Quake/console.c">
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
|
|
|
@ -64,7 +64,6 @@
|
||||||
483A78750D2EEAF000CB2E4C /* gl_rmisc.c in Sources */ = {isa = PBXBuildFile; fileRef = 483A78610D2EEAF000CB2E4C /* gl_rmisc.c */; };
|
483A78750D2EEAF000CB2E4C /* gl_rmisc.c in Sources */ = {isa = PBXBuildFile; fileRef = 483A78610D2EEAF000CB2E4C /* gl_rmisc.c */; };
|
||||||
483A78760D2EEAF000CB2E4C /* gl_screen.c in Sources */ = {isa = PBXBuildFile; fileRef = 483A78620D2EEAF000CB2E4C /* gl_screen.c */; };
|
483A78760D2EEAF000CB2E4C /* gl_screen.c in Sources */ = {isa = PBXBuildFile; fileRef = 483A78620D2EEAF000CB2E4C /* gl_screen.c */; };
|
||||||
483A78770D2EEAF000CB2E4C /* gl_sky.c in Sources */ = {isa = PBXBuildFile; fileRef = 483A78630D2EEAF000CB2E4C /* gl_sky.c */; };
|
483A78770D2EEAF000CB2E4C /* gl_sky.c in Sources */ = {isa = PBXBuildFile; fileRef = 483A78630D2EEAF000CB2E4C /* gl_sky.c */; };
|
||||||
483A78780D2EEAF000CB2E4C /* conback.c in Sources */ = {isa = PBXBuildFile; fileRef = 483A78640D2EEAF000CB2E4C /* conback.c */; };
|
|
||||||
483A78790D2EEAF000CB2E4C /* gl_texmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 483A78650D2EEAF000CB2E4C /* gl_texmgr.c */; };
|
483A78790D2EEAF000CB2E4C /* gl_texmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 483A78650D2EEAF000CB2E4C /* gl_texmgr.c */; };
|
||||||
483A787A0D2EEAF000CB2E4C /* gl_vidsdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 483A78660D2EEAF000CB2E4C /* gl_vidsdl.c */; };
|
483A787A0D2EEAF000CB2E4C /* gl_vidsdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 483A78660D2EEAF000CB2E4C /* gl_vidsdl.c */; };
|
||||||
483A787B0D2EEAF000CB2E4C /* gl_warp.c in Sources */ = {isa = PBXBuildFile; fileRef = 483A78670D2EEAF000CB2E4C /* gl_warp.c */; };
|
483A787B0D2EEAF000CB2E4C /* gl_warp.c in Sources */ = {isa = PBXBuildFile; fileRef = 483A78670D2EEAF000CB2E4C /* gl_warp.c */; };
|
||||||
|
@ -177,7 +176,6 @@
|
||||||
482812FC179C3EF4004E1D61 /* libFLAC.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libFLAC.dylib; path = codecs/lib/libFLAC.dylib; sourceTree = "<group>"; };
|
482812FC179C3EF4004E1D61 /* libFLAC.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libFLAC.dylib; path = codecs/lib/libFLAC.dylib; sourceTree = "<group>"; };
|
||||||
482812FF179C3F13004E1D61 /* snd_flac.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = snd_flac.c; path = ../Quake/snd_flac.c; sourceTree = "<group>"; };
|
482812FF179C3F13004E1D61 /* snd_flac.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = snd_flac.c; path = ../Quake/snd_flac.c; sourceTree = "<group>"; };
|
||||||
48281300179C3F13004E1D61 /* snd_flac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = snd_flac.h; path = ../Quake/snd_flac.h; sourceTree = "<group>"; };
|
48281300179C3F13004E1D61 /* snd_flac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = snd_flac.h; path = ../Quake/snd_flac.h; sourceTree = "<group>"; };
|
||||||
48305B530D8AF8EC00A29C24 /* conback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = conback.h; path = ../Quake/conback.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
483A77E60D2EE97700CB2E4C /* cmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cmd.h; path = ../Quake/cmd.h; sourceTree = SOURCE_ROOT; };
|
483A77E60D2EE97700CB2E4C /* cmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cmd.h; path = ../Quake/cmd.h; sourceTree = SOURCE_ROOT; };
|
||||||
483A77E70D2EE97700CB2E4C /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../Quake/common.h; sourceTree = SOURCE_ROOT; };
|
483A77E70D2EE97700CB2E4C /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../Quake/common.h; sourceTree = SOURCE_ROOT; };
|
||||||
483A77E80D2EE97700CB2E4C /* console.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = console.h; path = ../Quake/console.h; sourceTree = SOURCE_ROOT; };
|
483A77E80D2EE97700CB2E4C /* console.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = console.h; path = ../Quake/console.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
@ -261,7 +259,6 @@
|
||||||
483A78610D2EEAF000CB2E4C /* gl_rmisc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_rmisc.c; path = ../Quake/gl_rmisc.c; sourceTree = SOURCE_ROOT; };
|
483A78610D2EEAF000CB2E4C /* gl_rmisc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_rmisc.c; path = ../Quake/gl_rmisc.c; sourceTree = SOURCE_ROOT; };
|
||||||
483A78620D2EEAF000CB2E4C /* gl_screen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_screen.c; path = ../Quake/gl_screen.c; sourceTree = SOURCE_ROOT; };
|
483A78620D2EEAF000CB2E4C /* gl_screen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_screen.c; path = ../Quake/gl_screen.c; sourceTree = SOURCE_ROOT; };
|
||||||
483A78630D2EEAF000CB2E4C /* gl_sky.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_sky.c; path = ../Quake/gl_sky.c; sourceTree = SOURCE_ROOT; };
|
483A78630D2EEAF000CB2E4C /* gl_sky.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_sky.c; path = ../Quake/gl_sky.c; sourceTree = SOURCE_ROOT; };
|
||||||
483A78640D2EEAF000CB2E4C /* conback.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = conback.c; path = ../Quake/conback.c; sourceTree = SOURCE_ROOT; };
|
|
||||||
483A78650D2EEAF000CB2E4C /* gl_texmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_texmgr.c; path = ../Quake/gl_texmgr.c; sourceTree = SOURCE_ROOT; };
|
483A78650D2EEAF000CB2E4C /* gl_texmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_texmgr.c; path = ../Quake/gl_texmgr.c; sourceTree = SOURCE_ROOT; };
|
||||||
483A78660D2EEAF000CB2E4C /* gl_vidsdl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_vidsdl.c; path = ../Quake/gl_vidsdl.c; sourceTree = SOURCE_ROOT; };
|
483A78660D2EEAF000CB2E4C /* gl_vidsdl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_vidsdl.c; path = ../Quake/gl_vidsdl.c; sourceTree = SOURCE_ROOT; };
|
||||||
483A78670D2EEAF000CB2E4C /* gl_warp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_warp.c; path = ../Quake/gl_warp.c; sourceTree = SOURCE_ROOT; };
|
483A78670D2EEAF000CB2E4C /* gl_warp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gl_warp.c; path = ../Quake/gl_warp.c; sourceTree = SOURCE_ROOT; };
|
||||||
|
@ -492,7 +489,6 @@
|
||||||
483A78610D2EEAF000CB2E4C /* gl_rmisc.c */,
|
483A78610D2EEAF000CB2E4C /* gl_rmisc.c */,
|
||||||
483A78620D2EEAF000CB2E4C /* gl_screen.c */,
|
483A78620D2EEAF000CB2E4C /* gl_screen.c */,
|
||||||
483A78630D2EEAF000CB2E4C /* gl_sky.c */,
|
483A78630D2EEAF000CB2E4C /* gl_sky.c */,
|
||||||
483A78640D2EEAF000CB2E4C /* conback.c */,
|
|
||||||
483A78650D2EEAF000CB2E4C /* gl_texmgr.c */,
|
483A78650D2EEAF000CB2E4C /* gl_texmgr.c */,
|
||||||
483A78660D2EEAF000CB2E4C /* gl_vidsdl.c */,
|
483A78660D2EEAF000CB2E4C /* gl_vidsdl.c */,
|
||||||
483A78670D2EEAF000CB2E4C /* gl_warp.c */,
|
483A78670D2EEAF000CB2E4C /* gl_warp.c */,
|
||||||
|
@ -587,7 +583,6 @@
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
483A77F90D2EE9A900CB2E4C /* client.h */,
|
483A77F90D2EE9A900CB2E4C /* client.h */,
|
||||||
48305B530D8AF8EC00A29C24 /* conback.h */,
|
|
||||||
483A77FA0D2EE9A900CB2E4C /* net.h */,
|
483A77FA0D2EE9A900CB2E4C /* net.h */,
|
||||||
48134A1512102F400015BF15 /* net_defs.h */,
|
48134A1512102F400015BF15 /* net_defs.h */,
|
||||||
48728D290D3004A80004D61B /* net_dgrm.h */,
|
48728D290D3004A80004D61B /* net_dgrm.h */,
|
||||||
|
@ -750,7 +745,6 @@
|
||||||
483A78750D2EEAF000CB2E4C /* gl_rmisc.c in Sources */,
|
483A78750D2EEAF000CB2E4C /* gl_rmisc.c in Sources */,
|
||||||
483A78760D2EEAF000CB2E4C /* gl_screen.c in Sources */,
|
483A78760D2EEAF000CB2E4C /* gl_screen.c in Sources */,
|
||||||
483A78770D2EEAF000CB2E4C /* gl_sky.c in Sources */,
|
483A78770D2EEAF000CB2E4C /* gl_sky.c in Sources */,
|
||||||
483A78780D2EEAF000CB2E4C /* conback.c in Sources */,
|
|
||||||
483A78790D2EEAF000CB2E4C /* gl_texmgr.c in Sources */,
|
483A78790D2EEAF000CB2E4C /* gl_texmgr.c in Sources */,
|
||||||
483A787A0D2EEAF000CB2E4C /* gl_vidsdl.c in Sources */,
|
483A787A0D2EEAF000CB2E4C /* gl_vidsdl.c in Sources */,
|
||||||
483A787B0D2EEAF000CB2E4C /* gl_warp.c in Sources */,
|
483A787B0D2EEAF000CB2E4C /* gl_warp.c in Sources */,
|
||||||
|
@ -828,7 +822,6 @@
|
||||||
GCC_MODEL_TUNING = G5;
|
GCC_MODEL_TUNING = G5;
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
USE_QS_CONBACK,
|
|
||||||
SDL_FRAMEWORK,
|
SDL_FRAMEWORK,
|
||||||
);
|
);
|
||||||
GCC_VERSION = com.apple.compilers.llvmgcc42;
|
GCC_VERSION = com.apple.compilers.llvmgcc42;
|
||||||
|
@ -871,7 +864,6 @@
|
||||||
USE_CODEC_WAVE,
|
USE_CODEC_WAVE,
|
||||||
USE_CODEC_FLAC,
|
USE_CODEC_FLAC,
|
||||||
USE_CODEC_OPUS,
|
USE_CODEC_OPUS,
|
||||||
USE_QS_CONBACK,
|
|
||||||
SDL_FRAMEWORK,
|
SDL_FRAMEWORK,
|
||||||
);
|
);
|
||||||
GCC_VERSION = com.apple.compilers.llvmgcc42;
|
GCC_VERSION = com.apple.compilers.llvmgcc42;
|
||||||
|
@ -919,7 +911,6 @@
|
||||||
);
|
);
|
||||||
GCC_MODEL_TUNING = G3;
|
GCC_MODEL_TUNING = G3;
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
USE_QS_CONBACK,
|
|
||||||
SDL_FRAMEWORK,
|
SDL_FRAMEWORK,
|
||||||
);
|
);
|
||||||
GCC_VERSION = 4.0;
|
GCC_VERSION = 4.0;
|
||||||
|
@ -962,7 +953,6 @@
|
||||||
USE_CODEC_WAVE,
|
USE_CODEC_WAVE,
|
||||||
USE_CODEC_FLAC,
|
USE_CODEC_FLAC,
|
||||||
USE_CODEC_OPUS,
|
USE_CODEC_OPUS,
|
||||||
USE_QS_CONBACK,
|
|
||||||
SDL_FRAMEWORK,
|
SDL_FRAMEWORK,
|
||||||
);
|
);
|
||||||
GCC_VERSION = 4.0;
|
GCC_VERSION = 4.0;
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 960 KiB |
|
@ -1,11 +1,11 @@
|
||||||
support for user directories, based on uhexen2 and tyrquake:
|
support for user directories, based on uhexen2 and tyrquake:
|
||||||
** against quakespasm svn revision 725.
|
** against quakespasm svn revision 904.
|
||||||
** on-the-fly game directory switching not supported yet.
|
** on-the-fly game directory switching not supported yet.
|
||||||
** minimally tested, needs more work.
|
** minimally tested, needs more work.
|
||||||
|
|
||||||
Index: Quake/sys_sdl_unix.c
|
Index: Quake/sys_sdl_unix.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- Quake/sys_sdl_unix.c (revision 699)
|
--- Quake/sys_sdl_unix.c (revision 904)
|
||||||
+++ Quake/sys_sdl_unix.c (working copy)
|
+++ Quake/sys_sdl_unix.c (working copy)
|
||||||
@@ -20,6 +20,8 @@
|
@@ -20,6 +20,8 @@
|
||||||
|
|
||||||
|
@ -73,27 +73,17 @@ Index: Quake/sys_sdl_unix.c
|
||||||
void Sys_mkdir (const char *path)
|
void Sys_mkdir (const char *path)
|
||||||
Index: Quake/common.c
|
Index: Quake/common.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- Quake/common.c (revision 658)
|
--- Quake/common.c (revision 904)
|
||||||
+++ Quake/common.c (working copy)
|
+++ Quake/common.c (working copy)
|
||||||
@@ -1854,32 +1854,34 @@ pack_t *COM_LoadPackFile (const char *pa
|
@@ -1917,6 +1917,7 @@ static void COM_AddGameDirectory (const
|
||||||
COM_AddGameDirectory -- johnfitz -- modified based on topaz's tutorial
|
|
||||||
=================
|
|
||||||
*/
|
|
||||||
-static void COM_AddGameDirectory (const char *dir)
|
|
||||||
+static void COM_AddGameDirectory (const char *base, const char *dir)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
unsigned int path_id;
|
|
||||||
searchpath_t *search;
|
searchpath_t *search;
|
||||||
pack_t *pak;
|
pack_t *pak, *qspak;
|
||||||
char pakfile[MAX_OSPATH];
|
char pakfile[MAX_OSPATH];
|
||||||
+ qboolean been_here = false;
|
+ qboolean been_here = false;
|
||||||
|
|
||||||
- q_strlcpy (com_gamedir, dir, sizeof(com_gamedir));
|
q_strlcpy (com_gamedir, va("%s/%s", base, dir), sizeof(com_gamedir));
|
||||||
+ q_strlcpy (com_gamedir, va("%s/%s", base, dir), sizeof(com_gamedir));
|
|
||||||
|
|
||||||
// assign a path_id to this game directory
|
@@ -1925,6 +1926,7 @@ static void COM_AddGameDirectory (const
|
||||||
if (com_searchpaths)
|
|
||||||
path_id = com_searchpaths->path_id << 1;
|
path_id = com_searchpaths->path_id << 1;
|
||||||
else path_id = 1U;
|
else path_id = 1U;
|
||||||
|
|
||||||
|
@ -101,22 +91,9 @@ Index: Quake/common.c
|
||||||
// add the directory to the search path
|
// add the directory to the search path
|
||||||
search = (searchpath_t *) Z_Malloc(sizeof(searchpath_t));
|
search = (searchpath_t *) Z_Malloc(sizeof(searchpath_t));
|
||||||
search->path_id = path_id;
|
search->path_id = path_id;
|
||||||
- q_strlcpy (search->filename, dir, sizeof(search->filename));
|
@@ -1961,6 +1963,14 @@ static void COM_AddGameDirectory (const
|
||||||
+ q_strlcpy (search->filename, com_gamedir, sizeof(search->filename));
|
}
|
||||||
search->next = com_searchpaths;
|
if (!pak) break;
|
||||||
com_searchpaths = search;
|
|
||||||
|
|
||||||
// add any pak files in the format pak0.pak pak1.pak, ...
|
|
||||||
for (i = 0; ; i++)
|
|
||||||
{
|
|
||||||
- q_snprintf (pakfile, sizeof(pakfile), "%s/pak%i.pak", dir, i);
|
|
||||||
+ q_snprintf (pakfile, sizeof(pakfile), "%s/pak%i.pak", com_gamedir, i);
|
|
||||||
pak = COM_LoadPackFile (pakfile);
|
|
||||||
if (!pak)
|
|
||||||
break;
|
|
||||||
@@ -1889,6 +1891,14 @@ static void COM_AddGameDirectory (const
|
|
||||||
search->next = com_searchpaths;
|
|
||||||
com_searchpaths = search;
|
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ if (!been_here && host_parms->userdir != host_parms->basedir)
|
+ if (!been_here && host_parms->userdir != host_parms->basedir)
|
||||||
|
@ -128,44 +105,4 @@ Index: Quake/common.c
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USE_QS_CONBACK)
|
/*
|
||||||
@@ -1943,8 +1953,7 @@ void COM_InitFilesystem (void) //johnfit
|
|
||||||
}
|
|
||||||
|
|
||||||
// start up with GAMENAME by default (id1)
|
|
||||||
- COM_AddGameDirectory (va("%s/"GAMENAME, com_basedir));
|
|
||||||
- q_strlcpy (com_gamedir, va("%s/"GAMENAME, com_basedir), sizeof(com_gamedir));
|
|
||||||
+ COM_AddGameDirectory (com_basedir, GAMENAME);
|
|
||||||
|
|
||||||
#if defined(USE_QS_CONBACK)
|
|
||||||
if (!fitzmode)
|
|
||||||
@@ -1958,17 +1967,17 @@ void COM_InitFilesystem (void) //johnfit
|
|
||||||
com_nummissionpacks = 0;
|
|
||||||
if (COM_CheckParm ("-rogue"))
|
|
||||||
{
|
|
||||||
- COM_AddGameDirectory (va("%s/rogue", com_basedir));
|
|
||||||
+ COM_AddGameDirectory (com_basedir, "rogue");
|
|
||||||
com_nummissionpacks++;
|
|
||||||
}
|
|
||||||
if (COM_CheckParm ("-hipnotic"))
|
|
||||||
{
|
|
||||||
- COM_AddGameDirectory (va("%s/hipnotic", com_basedir));
|
|
||||||
+ COM_AddGameDirectory (com_basedir, "hipnotic");
|
|
||||||
com_nummissionpacks++;
|
|
||||||
}
|
|
||||||
if (COM_CheckParm ("-quoth"))
|
|
||||||
{
|
|
||||||
- COM_AddGameDirectory (va("%s/quoth", com_basedir));
|
|
||||||
+ COM_AddGameDirectory (com_basedir, "quoth");
|
|
||||||
com_nummissionpacks++;
|
|
||||||
}
|
|
||||||
//johnfitz
|
|
||||||
@@ -1977,7 +1986,7 @@ void COM_InitFilesystem (void) //johnfit
|
|
||||||
if (i && i < com_argc-1)
|
|
||||||
{
|
|
||||||
com_modified = true;
|
|
||||||
- COM_AddGameDirectory (va("%s/%s", com_basedir, com_argv[i + 1]));
|
|
||||||
+ COM_AddGameDirectory (com_basedir, com_argv[i + 1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
COM_CheckRegistered ();
|
|
||||||
|
|
110
quakespasm/Misc/qs_pak/default.cfg
Normal file
110
quakespasm/Misc/qs_pak/default.cfg
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
//
|
||||||
|
// load keybindings
|
||||||
|
//
|
||||||
|
// commands with a leading + will also be called for key up events with
|
||||||
|
// the + changed to a -
|
||||||
|
unbindall
|
||||||
|
|
||||||
|
//
|
||||||
|
// character controls
|
||||||
|
//
|
||||||
|
|
||||||
|
bind ALT +strafe
|
||||||
|
|
||||||
|
bind , +moveleft
|
||||||
|
bind a +moveleft
|
||||||
|
bind . +moveright
|
||||||
|
bind d +moveright
|
||||||
|
bind DEL +lookdown
|
||||||
|
bind PGDN +lookup
|
||||||
|
bind END centerview
|
||||||
|
|
||||||
|
bind e +moveup
|
||||||
|
bind c +movedown
|
||||||
|
bind SHIFT +speed
|
||||||
|
bind CTRL +attack
|
||||||
|
bind UPARROW +forward
|
||||||
|
bind w +forward
|
||||||
|
bind DOWNARROW +back
|
||||||
|
bind s +back
|
||||||
|
bind LEFTARROW +left
|
||||||
|
bind RIGHTARROW +right
|
||||||
|
|
||||||
|
bind SPACE +jump
|
||||||
|
//bind ENTER +jump
|
||||||
|
|
||||||
|
bind TAB +showscores
|
||||||
|
|
||||||
|
bind 1 "impulse 1"
|
||||||
|
bind 2 "impulse 2"
|
||||||
|
bind 3 "impulse 3"
|
||||||
|
bind 4 "impulse 4"
|
||||||
|
bind 5 "impulse 5"
|
||||||
|
bind 6 "impulse 6"
|
||||||
|
bind 7 "impulse 7"
|
||||||
|
bind 8 "impulse 8"
|
||||||
|
|
||||||
|
bind 0 "impulse 0"
|
||||||
|
|
||||||
|
bind / "impulse 10" // change weapon
|
||||||
|
bind MWHEELDOWN "impulse 10"
|
||||||
|
bind MWHEELUP "impulse 12"
|
||||||
|
|
||||||
|
// zoom
|
||||||
|
alias zoom_in "sensitivity 2;fov 90;wait;fov 70;wait;fov 50;wait;fov 30;wait;fov 10;wait;fov 5;bind F11 zoom_out"
|
||||||
|
alias zoom_out "sensitivity 4;fov 5;wait;fov 10;wait;fov 30;wait;fov 50;wait;fov 70;wait;fov 90;bind F11 zoom_in; sensitivity 3"
|
||||||
|
bind F11 zoom_in
|
||||||
|
|
||||||
|
// Function keys
|
||||||
|
bind F1 "help"
|
||||||
|
bind F2 "menu_save"
|
||||||
|
bind F3 "menu_load"
|
||||||
|
bind F4 "menu_options"
|
||||||
|
bind F5 "menu_multiplayer"
|
||||||
|
bind F6 "echo Quicksaving...; wait; save quick"
|
||||||
|
bind F9 "echo Quickloading...; wait; load quick"
|
||||||
|
bind F10 "quit"
|
||||||
|
bind F12 "screenshot"
|
||||||
|
|
||||||
|
// mouse options
|
||||||
|
bind \ +mlook
|
||||||
|
|
||||||
|
//
|
||||||
|
// client environment commands
|
||||||
|
//
|
||||||
|
bind PAUSE "pause"
|
||||||
|
bind ESCAPE "togglemenu"
|
||||||
|
bind ~ "toggleconsole"
|
||||||
|
bind ` "toggleconsole"
|
||||||
|
|
||||||
|
bind t "messagemode"
|
||||||
|
|
||||||
|
bind + "sizeup"
|
||||||
|
bind = "sizeup"
|
||||||
|
bind - "sizedown"
|
||||||
|
|
||||||
|
bind INS +klook
|
||||||
|
|
||||||
|
//
|
||||||
|
// mouse buttons
|
||||||
|
//
|
||||||
|
bind MOUSE1 +attack
|
||||||
|
//bind MOUSE2 +forward
|
||||||
|
bind MOUSE2 +jump
|
||||||
|
//bind MOUSE3 +mlook
|
||||||
|
|
||||||
|
//
|
||||||
|
// default cvars
|
||||||
|
//
|
||||||
|
gamma 1.0
|
||||||
|
volume 0.7
|
||||||
|
sensitivity 3
|
||||||
|
|
||||||
|
//viewsize 100
|
||||||
|
viewsize 110
|
||||||
|
scr_conscale 1.6
|
||||||
|
scr_menuscale 1.6
|
||||||
|
scr_sbarscale 1.6
|
||||||
|
|
||||||
|
// default to mouse-look enabled
|
||||||
|
+mlook
|
98
quakespasm/Misc/qs_pak/default.cfg.orig
Normal file
98
quakespasm/Misc/qs_pak/default.cfg.orig
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
//
|
||||||
|
// load keybindings
|
||||||
|
//
|
||||||
|
// commands with a leading + will also be called for key up events with
|
||||||
|
// the + changed to a -
|
||||||
|
unbindall
|
||||||
|
|
||||||
|
//
|
||||||
|
// character controls
|
||||||
|
//
|
||||||
|
|
||||||
|
bind ALT +strafe
|
||||||
|
|
||||||
|
bind , +moveleft
|
||||||
|
bind . +moveright
|
||||||
|
bind DEL +lookdown
|
||||||
|
bind PGDN +lookup
|
||||||
|
bind END centerview
|
||||||
|
bind z +lookdown
|
||||||
|
bind a +lookup
|
||||||
|
|
||||||
|
bind d +moveup
|
||||||
|
bind c +movedown
|
||||||
|
bind SHIFT +speed
|
||||||
|
bind CTRL +attack
|
||||||
|
bind UPARROW +forward
|
||||||
|
bind DOWNARROW +back
|
||||||
|
bind LEFTARROW +left
|
||||||
|
bind RIGHTARROW +right
|
||||||
|
|
||||||
|
bind SPACE +jump
|
||||||
|
bind ENTER +jump
|
||||||
|
|
||||||
|
bind TAB +showscores
|
||||||
|
|
||||||
|
bind 1 "impulse 1"
|
||||||
|
bind 2 "impulse 2"
|
||||||
|
bind 3 "impulse 3"
|
||||||
|
bind 4 "impulse 4"
|
||||||
|
bind 5 "impulse 5"
|
||||||
|
bind 6 "impulse 6"
|
||||||
|
bind 7 "impulse 7"
|
||||||
|
bind 8 "impulse 8"
|
||||||
|
|
||||||
|
bind 0 "impulse 0"
|
||||||
|
|
||||||
|
bind / "impulse 10" // change weapon
|
||||||
|
|
||||||
|
// zoom
|
||||||
|
alias zoom_in "sensitivity 2;fov 90;wait;fov 70;wait;fov 50;wait;fov 30;wait;fov 10;wait;fov 5;bind F11 zoom_out"
|
||||||
|
alias zoom_out "sensitivity 4;fov 5;wait;fov 10;wait;fov 30;wait;fov 50;wait;fov 70;wait;fov 90;bind F11 zoom_in; sensitivity 3"
|
||||||
|
bind F11 zoom_in
|
||||||
|
|
||||||
|
// Function keys
|
||||||
|
bind F1 "help"
|
||||||
|
bind F2 "menu_save"
|
||||||
|
bind F3 "menu_load"
|
||||||
|
bind F4 "menu_options"
|
||||||
|
bind F5 "menu_multiplayer"
|
||||||
|
bind F6 "echo Quicksaving...; wait; save quick"
|
||||||
|
bind F9 "echo Quickloading...; wait; load quick"
|
||||||
|
bind F10 "quit"
|
||||||
|
bind F12 "screenshot"
|
||||||
|
|
||||||
|
// mouse options
|
||||||
|
bind \ +mlook
|
||||||
|
|
||||||
|
//
|
||||||
|
// client environment commands
|
||||||
|
//
|
||||||
|
bind PAUSE "pause"
|
||||||
|
bind ESCAPE "togglemenu"
|
||||||
|
bind ~ "toggleconsole"
|
||||||
|
bind ` "toggleconsole"
|
||||||
|
|
||||||
|
bind t "messagemode"
|
||||||
|
|
||||||
|
bind + "sizeup"
|
||||||
|
bind = "sizeup"
|
||||||
|
bind - "sizedown"
|
||||||
|
|
||||||
|
bind INS +klook
|
||||||
|
|
||||||
|
//
|
||||||
|
// mouse buttons
|
||||||
|
//
|
||||||
|
bind MOUSE1 +attack
|
||||||
|
bind MOUSE2 +forward
|
||||||
|
bind MOUSE3 +mlook
|
||||||
|
|
||||||
|
//
|
||||||
|
// default cvars
|
||||||
|
//
|
||||||
|
viewsize 100
|
||||||
|
gamma 1.0
|
||||||
|
volume 0.7
|
||||||
|
sensitivity 3
|
||||||
|
|
7
quakespasm/Misc/qs_pak/mkpak.sh
Normal file
7
quakespasm/Misc/qs_pak/mkpak.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
input_files="gfx/conback.lmp default.cfg"
|
||||||
|
output_pak="quakespasm.pak"
|
||||||
|
|
||||||
|
#can use qpakman to generate
|
||||||
|
qpakman $input_files -o $output_pak
|
|
@ -5,9 +5,6 @@
|
||||||
# "make SDLNET=1" to use SDL_net (NOT recommended) instead of platform
|
# "make SDLNET=1" to use SDL_net (NOT recommended) instead of platform
|
||||||
# specific code.
|
# specific code.
|
||||||
|
|
||||||
### Embed custom Quakespasm console background picture
|
|
||||||
USE_QS_CONBACK=1
|
|
||||||
|
|
||||||
### Enable/Disable codecs for streaming music support
|
### Enable/Disable codecs for streaming music support
|
||||||
USE_CODEC_WAVE=1
|
USE_CODEC_WAVE=1
|
||||||
USE_CODEC_FLAC=0
|
USE_CODEC_FLAC=0
|
||||||
|
@ -106,10 +103,6 @@ NET_LIBS :=
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_QS_CONBACK),1)
|
|
||||||
CFLAGS+= -DUSE_QS_CONBACK
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(VORBISLIB),vorbis)
|
ifneq ($(VORBISLIB),vorbis)
|
||||||
ifneq ($(VORBISLIB),tremor)
|
ifneq ($(VORBISLIB),tremor)
|
||||||
$(error Invalid VORBISLIB setting)
|
$(error Invalid VORBISLIB setting)
|
||||||
|
@ -280,7 +273,6 @@ OBJS := strlcat.o \
|
||||||
sv_phys.o \
|
sv_phys.o \
|
||||||
sv_user.o \
|
sv_user.o \
|
||||||
world.o \
|
world.o \
|
||||||
conback.o \
|
|
||||||
zone.o \
|
zone.o \
|
||||||
$(SYSOBJ_SYS) $(SYSOBJ_MAIN) $(SYSOBJ_RES)
|
$(SYSOBJ_SYS) $(SYSOBJ_MAIN) $(SYSOBJ_RES)
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,6 @@
|
||||||
# "make SDLNET=1" to use SDL_net (NOT recommended) instead of platform
|
# "make SDLNET=1" to use SDL_net (NOT recommended) instead of platform
|
||||||
# specific code.
|
# specific code.
|
||||||
|
|
||||||
### Embed custom Quakespasm console background picture
|
|
||||||
USE_QS_CONBACK=1
|
|
||||||
|
|
||||||
### Enable/Disable codecs for streaming music support
|
### Enable/Disable codecs for streaming music support
|
||||||
USE_CODEC_WAVE=1
|
USE_CODEC_WAVE=1
|
||||||
USE_CODEC_FLAC=1
|
USE_CODEC_FLAC=1
|
||||||
|
@ -94,10 +91,6 @@ else
|
||||||
NET_LIBS :=
|
NET_LIBS :=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_QS_CONBACK),1)
|
|
||||||
CFLAGS+= -DUSE_QS_CONBACK
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(VORBISLIB),vorbis)
|
ifneq ($(VORBISLIB),vorbis)
|
||||||
ifneq ($(VORBISLIB),tremor)
|
ifneq ($(VORBISLIB),tremor)
|
||||||
$(error Invalid VORBISLIB setting)
|
$(error Invalid VORBISLIB setting)
|
||||||
|
@ -281,7 +274,6 @@ OBJS := strlcat.o \
|
||||||
sv_phys.o \
|
sv_phys.o \
|
||||||
sv_user.o \
|
sv_user.o \
|
||||||
world.o \
|
world.o \
|
||||||
conback.o \
|
|
||||||
zone.o \
|
zone.o \
|
||||||
$(SYSOBJ_SYS) $(SYSOBJ_LAUNCHER) $(SYSOBJ_MAIN)
|
$(SYSOBJ_SYS) $(SYSOBJ_LAUNCHER) $(SYSOBJ_MAIN)
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,6 @@
|
||||||
# "make SDLNET=1" to use SDL_net (NOT recommended) instead of platform
|
# "make SDLNET=1" to use SDL_net (NOT recommended) instead of platform
|
||||||
# specific code.
|
# specific code.
|
||||||
|
|
||||||
### Embed custom Quakespasm console background picture
|
|
||||||
USE_QS_CONBACK=1
|
|
||||||
|
|
||||||
### Enable/disable codecs for streaming music support
|
### Enable/disable codecs for streaming music support
|
||||||
USE_CODEC_WAVE=1
|
USE_CODEC_WAVE=1
|
||||||
USE_CODEC_FLAC=0
|
USE_CODEC_FLAC=0
|
||||||
|
@ -100,10 +97,6 @@ CFLAGS += $(DEFWINSOCK)
|
||||||
NET_LIBS := $(LIBWINSOCK)
|
NET_LIBS := $(LIBWINSOCK)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_QS_CONBACK),1)
|
|
||||||
CFLAGS+= -DUSE_QS_CONBACK
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(VORBISLIB),vorbis)
|
ifneq ($(VORBISLIB),vorbis)
|
||||||
ifneq ($(VORBISLIB),tremor)
|
ifneq ($(VORBISLIB),tremor)
|
||||||
$(error Invalid VORBISLIB setting)
|
$(error Invalid VORBISLIB setting)
|
||||||
|
@ -285,7 +278,6 @@ OBJS := strlcat.o \
|
||||||
sv_phys.o \
|
sv_phys.o \
|
||||||
sv_user.o \
|
sv_user.o \
|
||||||
world.o \
|
world.o \
|
||||||
conback.o \
|
|
||||||
zone.o \
|
zone.o \
|
||||||
$(SYSOBJ_SYS) $(SYSOBJ_MAIN) $(SYSOBJ_RES)
|
$(SYSOBJ_SYS) $(SYSOBJ_MAIN) $(SYSOBJ_RES)
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,6 @@
|
||||||
# "make SDLNET=1" to use SDL_net (NOT recommended) instead of platform
|
# "make SDLNET=1" to use SDL_net (NOT recommended) instead of platform
|
||||||
# specific code.
|
# specific code.
|
||||||
|
|
||||||
### Embed custom Quakespasm console background picture
|
|
||||||
USE_QS_CONBACK=1
|
|
||||||
|
|
||||||
### Enable/disable codecs for streaming music support
|
### Enable/disable codecs for streaming music support
|
||||||
USE_CODEC_WAVE=1
|
USE_CODEC_WAVE=1
|
||||||
USE_CODEC_FLAC=0
|
USE_CODEC_FLAC=0
|
||||||
|
@ -100,10 +97,6 @@ CFLAGS += $(DEFWINSOCK)
|
||||||
NET_LIBS := $(LIBWINSOCK)
|
NET_LIBS := $(LIBWINSOCK)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_QS_CONBACK),1)
|
|
||||||
CFLAGS+= -DUSE_QS_CONBACK
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(VORBISLIB),vorbis)
|
ifneq ($(VORBISLIB),vorbis)
|
||||||
ifneq ($(VORBISLIB),tremor)
|
ifneq ($(VORBISLIB),tremor)
|
||||||
$(error Invalid VORBISLIB setting)
|
$(error Invalid VORBISLIB setting)
|
||||||
|
@ -285,7 +278,6 @@ OBJS := strlcat.o \
|
||||||
sv_phys.o \
|
sv_phys.o \
|
||||||
sv_user.o \
|
sv_user.o \
|
||||||
world.o \
|
world.o \
|
||||||
conback.o \
|
|
||||||
zone.o \
|
zone.o \
|
||||||
$(SYSOBJ_SYS) $(SYSOBJ_MAIN) $(SYSOBJ_RES)
|
$(SYSOBJ_SYS) $(SYSOBJ_MAIN) $(SYSOBJ_RES)
|
||||||
|
|
||||||
|
|
|
@ -267,20 +267,6 @@ void Cmd_Exec_f (void)
|
||||||
}
|
}
|
||||||
Con_Printf ("execing %s\n",Cmd_Argv(1));
|
Con_Printf ("execing %s\n",Cmd_Argv(1));
|
||||||
|
|
||||||
// Override some key bindings in id1/pak0.pak/default.cfg
|
|
||||||
if (com_pakfile != NULL
|
|
||||||
&& strstr (com_pakfile, "id1/pak0.pak") != NULL // FIXME: Case-sensitive
|
|
||||||
&& strcmp (Cmd_Argv(1), "default.cfg") == 0)
|
|
||||||
{
|
|
||||||
Cbuf_InsertText ("bind w +forward\n");
|
|
||||||
Cbuf_InsertText ("bind a +moveleft\n");
|
|
||||||
Cbuf_InsertText ("bind s +back\n");
|
|
||||||
Cbuf_InsertText ("bind d +moveright\n");
|
|
||||||
Cbuf_InsertText ("bind MWHEELUP \"impulse 12\"\n");
|
|
||||||
Cbuf_InsertText ("bind MWHEELDOWN \"impulse 10\"\n");
|
|
||||||
Cbuf_InsertText ("+mlook\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
Cbuf_InsertText (f);
|
Cbuf_InsertText (f);
|
||||||
Hunk_FreeToLowMark (mark);
|
Hunk_FreeToLowMark (mark);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1452,7 +1452,6 @@ typedef struct
|
||||||
char com_gamedir[MAX_OSPATH];
|
char com_gamedir[MAX_OSPATH];
|
||||||
char com_basedir[MAX_OSPATH];
|
char com_basedir[MAX_OSPATH];
|
||||||
int file_from_pak; // ZOID: global indicating that file came from a pak
|
int file_from_pak; // ZOID: global indicating that file came from a pak
|
||||||
const char *com_pakfile; // if file_from_pak is 1, the filename of the pak
|
|
||||||
|
|
||||||
typedef struct searchpath_s
|
typedef struct searchpath_s
|
||||||
{
|
{
|
||||||
|
@ -1574,8 +1573,7 @@ static int COM_FindFile (const char *filename, int *handle, FILE **file,
|
||||||
Sys_Error ("COM_FindFile: both handle and file set");
|
Sys_Error ("COM_FindFile: both handle and file set");
|
||||||
|
|
||||||
file_from_pak = 0;
|
file_from_pak = 0;
|
||||||
com_pakfile = NULL;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// search through the path, one element at a time
|
// search through the path, one element at a time
|
||||||
//
|
//
|
||||||
|
@ -1591,7 +1589,6 @@ static int COM_FindFile (const char *filename, int *handle, FILE **file,
|
||||||
// found it!
|
// found it!
|
||||||
com_filesize = pak->files[i].filelen;
|
com_filesize = pak->files[i].filelen;
|
||||||
file_from_pak = 1;
|
file_from_pak = 1;
|
||||||
com_pakfile = pak->filename;
|
|
||||||
if (path_id)
|
if (path_id)
|
||||||
*path_id = search->path_id;
|
*path_id = search->path_id;
|
||||||
if (handle)
|
if (handle)
|
||||||
|
@ -1913,15 +1910,15 @@ pack_t *COM_LoadPackFile (const char *packfile)
|
||||||
COM_AddGameDirectory -- johnfitz -- modified based on topaz's tutorial
|
COM_AddGameDirectory -- johnfitz -- modified based on topaz's tutorial
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
static void COM_AddGameDirectory (const char *dir)
|
static void COM_AddGameDirectory (const char *base, const char *dir)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
unsigned int path_id;
|
unsigned int path_id;
|
||||||
searchpath_t *search;
|
searchpath_t *search;
|
||||||
pack_t *pak;
|
pack_t *pak, *qspak;
|
||||||
char pakfile[MAX_OSPATH];
|
char pakfile[MAX_OSPATH];
|
||||||
|
|
||||||
q_strlcpy (com_gamedir, dir, sizeof(com_gamedir));
|
q_strlcpy (com_gamedir, va("%s/%s", base, dir), sizeof(com_gamedir));
|
||||||
|
|
||||||
// assign a path_id to this game directory
|
// assign a path_id to this game directory
|
||||||
if (com_searchpaths)
|
if (com_searchpaths)
|
||||||
|
@ -1931,49 +1928,40 @@ static void COM_AddGameDirectory (const char *dir)
|
||||||
// add the directory to the search path
|
// add the directory to the search path
|
||||||
search = (searchpath_t *) Z_Malloc(sizeof(searchpath_t));
|
search = (searchpath_t *) Z_Malloc(sizeof(searchpath_t));
|
||||||
search->path_id = path_id;
|
search->path_id = path_id;
|
||||||
q_strlcpy (search->filename, dir, sizeof(search->filename));
|
q_strlcpy (search->filename, com_gamedir, sizeof(search->filename));
|
||||||
search->next = com_searchpaths;
|
search->next = com_searchpaths;
|
||||||
com_searchpaths = search;
|
com_searchpaths = search;
|
||||||
|
|
||||||
// add any pak files in the format pak0.pak pak1.pak, ...
|
// add any pak files in the format pak0.pak pak1.pak, ...
|
||||||
for (i = 0; ; i++)
|
for (i = 0; ; i++)
|
||||||
{
|
{
|
||||||
q_snprintf (pakfile, sizeof(pakfile), "%s/pak%i.pak", dir, i);
|
q_snprintf (pakfile, sizeof(pakfile), "%s/pak%i.pak", com_gamedir, i);
|
||||||
pak = COM_LoadPackFile (pakfile);
|
pak = COM_LoadPackFile (pakfile);
|
||||||
if (!pak)
|
if (i != 0 || path_id != 1 || fitzmode)
|
||||||
break;
|
qspak = NULL;
|
||||||
search = (searchpath_t *) Z_Malloc(sizeof(searchpath_t));
|
else {
|
||||||
search->path_id = path_id;
|
qboolean old = com_modified;
|
||||||
search->pack = pak;
|
q_snprintf (pakfile, sizeof(pakfile), "%s/quakespasm.pak", com_gamedir);
|
||||||
search->next = com_searchpaths;
|
qspak = COM_LoadPackFile (pakfile);
|
||||||
com_searchpaths = search;
|
com_modified = old;/* make quakespasm customization pak to not set com_modified. */
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(USE_QS_CONBACK)
|
|
||||||
static void kill_id1_conback (void) /* QuakeSpasm customization: */
|
|
||||||
{
|
|
||||||
searchpath_t *search;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (search = com_searchpaths; search; search = search->next)
|
|
||||||
{
|
|
||||||
if (!search->pack)
|
|
||||||
continue;
|
|
||||||
if (!strstr(search->pack->filename, "/id1/pak0.pak"))
|
|
||||||
continue;
|
|
||||||
for (i = 0 ; i < search->pack->numfiles ; i++)
|
|
||||||
{
|
|
||||||
if (strcmp(search->pack->files[i].name,
|
|
||||||
"gfx/conback.lmp") == 0)
|
|
||||||
{
|
|
||||||
search->pack->files[i].name[0] = '$';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (pak) {
|
||||||
|
search = (searchpath_t *) Z_Malloc(sizeof(searchpath_t));
|
||||||
|
search->path_id = path_id;
|
||||||
|
search->pack = pak;
|
||||||
|
search->next = com_searchpaths;
|
||||||
|
com_searchpaths = search;
|
||||||
|
}
|
||||||
|
if (qspak) {
|
||||||
|
search = (searchpath_t *) Z_Malloc(sizeof(searchpath_t));
|
||||||
|
search->path_id = path_id;
|
||||||
|
search->pack = qspak;
|
||||||
|
search->next = com_searchpaths;
|
||||||
|
com_searchpaths = search;
|
||||||
|
}
|
||||||
|
if (!pak) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* USE_QS_CONBACK */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=================
|
=================
|
||||||
|
@ -2002,32 +1990,24 @@ void COM_InitFilesystem (void) //johnfitz -- modified based on topaz's tutorial
|
||||||
}
|
}
|
||||||
|
|
||||||
// start up with GAMENAME by default (id1)
|
// start up with GAMENAME by default (id1)
|
||||||
COM_AddGameDirectory (va("%s/"GAMENAME, com_basedir));
|
COM_AddGameDirectory (com_basedir, GAMENAME);
|
||||||
q_strlcpy (com_gamedir, va("%s/"GAMENAME, com_basedir), sizeof(com_gamedir));
|
|
||||||
|
|
||||||
#if defined(USE_QS_CONBACK)
|
|
||||||
if (!fitzmode)
|
|
||||||
{ /* QuakeSpasm customization: */
|
|
||||||
kill_id1_conback ();
|
|
||||||
}
|
|
||||||
#endif /* USE_QS_CONBACK */
|
|
||||||
|
|
||||||
//johnfitz -- track number of mission packs added
|
//johnfitz -- track number of mission packs added
|
||||||
//since we don't want to allow the "game" command to strip them away
|
//since we don't want to allow the "game" command to strip them away
|
||||||
com_nummissionpacks = 0;
|
com_nummissionpacks = 0;
|
||||||
if (COM_CheckParm ("-rogue"))
|
if (COM_CheckParm ("-rogue"))
|
||||||
{
|
{
|
||||||
COM_AddGameDirectory (va("%s/rogue", com_basedir));
|
COM_AddGameDirectory (com_basedir, "rogue");
|
||||||
com_nummissionpacks++;
|
com_nummissionpacks++;
|
||||||
}
|
}
|
||||||
if (COM_CheckParm ("-hipnotic"))
|
if (COM_CheckParm ("-hipnotic"))
|
||||||
{
|
{
|
||||||
COM_AddGameDirectory (va("%s/hipnotic", com_basedir));
|
COM_AddGameDirectory (com_basedir, "hipnotic");
|
||||||
com_nummissionpacks++;
|
com_nummissionpacks++;
|
||||||
}
|
}
|
||||||
if (COM_CheckParm ("-quoth"))
|
if (COM_CheckParm ("-quoth"))
|
||||||
{
|
{
|
||||||
COM_AddGameDirectory (va("%s/quoth", com_basedir));
|
COM_AddGameDirectory (com_basedir, "quoth");
|
||||||
com_nummissionpacks++;
|
com_nummissionpacks++;
|
||||||
}
|
}
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
@ -2036,7 +2016,7 @@ void COM_InitFilesystem (void) //johnfitz -- modified based on topaz's tutorial
|
||||||
if (i && i < com_argc-1)
|
if (i && i < com_argc-1)
|
||||||
{
|
{
|
||||||
com_modified = true;
|
com_modified = true;
|
||||||
COM_AddGameDirectory (va("%s/%s", com_basedir, com_argv[i + 1]));
|
COM_AddGameDirectory (com_basedir, com_argv[i + 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
COM_CheckRegistered ();
|
COM_CheckRegistered ();
|
||||||
|
|
|
@ -197,7 +197,6 @@ struct cache_user_s;
|
||||||
extern char com_basedir[MAX_OSPATH];
|
extern char com_basedir[MAX_OSPATH];
|
||||||
extern char com_gamedir[MAX_OSPATH];
|
extern char com_gamedir[MAX_OSPATH];
|
||||||
extern int file_from_pak; // global indicating that file came from a pak
|
extern int file_from_pak; // global indicating that file came from a pak
|
||||||
extern const char *com_pakfile; // global indicating the filename of the pak if file_from_pak is 1
|
|
||||||
|
|
||||||
void COM_WriteFile (const char *filename, const void *data, int len);
|
void COM_WriteFile (const char *filename, const void *data, int len);
|
||||||
int COM_OpenFile (const char *filename, int *handle, unsigned int *path_id);
|
int COM_OpenFile (const char *filename, int *handle, unsigned int *path_id);
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
// Embed a custom conback.lmp into the binary
|
|
||||||
//
|
|
||||||
// S.A. 6 Feb 2010, Ozkan 18 Feb 2010
|
|
||||||
|
|
||||||
#include "quakedef.h"
|
|
||||||
|
|
||||||
#if defined(USE_QS_CONBACK)
|
|
||||||
static const byte conback_byte[] =
|
|
||||||
{
|
|
||||||
# include "conback.h"
|
|
||||||
};
|
|
||||||
|
|
||||||
static char *custom_conback = NULL;
|
|
||||||
static char size_data[2 * sizeof(int)];
|
|
||||||
|
|
||||||
char *get_conback (void)
|
|
||||||
{
|
|
||||||
if (custom_conback) {
|
|
||||||
memcpy(custom_conback, size_data, 2 * sizeof(int));
|
|
||||||
return custom_conback;
|
|
||||||
}
|
|
||||||
/* sanity check */
|
|
||||||
if (sizeof(conback_byte) < sizeof(qpic_t))
|
|
||||||
Sys_Error ("Bad conback image.");
|
|
||||||
/* make a copy of the conback_byte[] array */
|
|
||||||
custom_conback = (char *)malloc (sizeof(conback_byte));
|
|
||||||
memcpy (custom_conback, conback_byte, sizeof(conback_byte));
|
|
||||||
/* backup the original size fields */
|
|
||||||
memcpy (size_data, custom_conback, 2 * sizeof(int));
|
|
||||||
return custom_conback;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* USE_QS_CONBACK */
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -340,66 +340,6 @@ qpic_t *Draw_CachePic (const char *path)
|
||||||
return &pic->pic;
|
return &pic->pic;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
================
|
|
||||||
Draw_ConbackPic -- QuakeSpasm custom conback drawing.
|
|
||||||
================
|
|
||||||
*/
|
|
||||||
#if !defined(USE_QS_CONBACK)
|
|
||||||
static inline qpic_t *Draw_ConbackPic (void)
|
|
||||||
{
|
|
||||||
return Draw_CachePic ("gfx/conback.lmp");
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
extern char *get_conback(void);
|
|
||||||
static qboolean have_mod_conback;
|
|
||||||
void Draw_CheckConback (void)
|
|
||||||
{
|
|
||||||
have_mod_conback = (COM_LoadTempFile("gfx/conback.lmp", NULL) != NULL);
|
|
||||||
}
|
|
||||||
qpic_t *Draw_ConbackPic (void)
|
|
||||||
{
|
|
||||||
if (fitzmode) {
|
|
||||||
return Draw_CachePic ("gfx/conback.lmp");
|
|
||||||
} else if (have_mod_conback) {
|
|
||||||
/* even if we are running in custom mode
|
|
||||||
allow for mod-provided conback images */
|
|
||||||
return Draw_CachePic ("gfx/conback.lmp");
|
|
||||||
} else {
|
|
||||||
/* QuakeSpasm customization: */
|
|
||||||
cachepic_t *pic;
|
|
||||||
int i;
|
|
||||||
qpic_t *dat;
|
|
||||||
glpic_t gl;
|
|
||||||
|
|
||||||
for (pic=menu_cachepics, i=0 ; i<menu_numcachepics ; pic++, i++)
|
|
||||||
{
|
|
||||||
if (!strcmp ("gfx/conback.lmp", pic->name))
|
|
||||||
return &pic->pic;
|
|
||||||
}
|
|
||||||
if (menu_numcachepics == MAX_CACHED_PICS)
|
|
||||||
Sys_Error ("menu_numcachepics == MAX_CACHED_PICS");
|
|
||||||
menu_numcachepics++;
|
|
||||||
strcpy (pic->name, "gfx/conback.lmp");
|
|
||||||
/* load custom conback, image in memory */
|
|
||||||
dat = (qpic_t *)get_conback ();
|
|
||||||
SwapPic (dat);
|
|
||||||
pic->pic.width = dat->width;
|
|
||||||
pic->pic.height = dat->height;
|
|
||||||
gl.gltexture = TexMgr_LoadImage (NULL, "gfx/conback.lmp", dat->width, dat->height, SRC_INDEXED, dat->data,
|
|
||||||
"", (src_offset_t)dat->data,
|
|
||||||
TEXPREF_ALPHA | TEXPREF_PAD | TEXPREF_NOPICMIP); //johnfitz -- TexMgr
|
|
||||||
gl.sl = 0;
|
|
||||||
gl.sh = (float)dat->width/(float)TexMgr_PadConditional(dat->width); //johnfitz
|
|
||||||
gl.tl = 0;
|
|
||||||
gl.th = (float)dat->height/(float)TexMgr_PadConditional(dat->height); //johnfitz
|
|
||||||
memcpy (pic->pic.data, &gl, sizeof(glpic_t));
|
|
||||||
|
|
||||||
return &pic->pic;
|
|
||||||
} /* -- QuakeSpasm */
|
|
||||||
}
|
|
||||||
#endif /* USE_QS_CONBACK */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
Draw_MakePic -- johnfitz -- generate pics from internal data
|
Draw_MakePic -- johnfitz -- generate pics from internal data
|
||||||
|
@ -646,7 +586,7 @@ void Draw_ConsoleBackground (void)
|
||||||
qpic_t *pic;
|
qpic_t *pic;
|
||||||
float alpha;
|
float alpha;
|
||||||
|
|
||||||
pic = Draw_ConbackPic ();
|
pic = Draw_CachePic ("gfx/conback.lmp");
|
||||||
pic->width = vid.conwidth;
|
pic->width = vid.conwidth;
|
||||||
pic->height = vid.conheight;
|
pic->height = vid.conheight;
|
||||||
|
|
||||||
|
|
BIN
quakespasm/Quake/id1/quakespasm.pak
Normal file
BIN
quakespasm/Quake/id1/quakespasm.pak
Normal file
Binary file not shown.
|
@ -32,7 +32,6 @@
|
||||||
</Build>
|
</Build>
|
||||||
<Compiler>
|
<Compiler>
|
||||||
<Add option="-Wall" />
|
<Add option="-Wall" />
|
||||||
<Add option="-DUSE_QS_CONBACK" />
|
|
||||||
<Add option="-DUSE_CODEC_MP3" />
|
<Add option="-DUSE_CODEC_MP3" />
|
||||||
<Add option="-DUSE_CODEC_VORBIS" />
|
<Add option="-DUSE_CODEC_VORBIS" />
|
||||||
<Add option="-DUSE_CODEC_WAVE" />
|
<Add option="-DUSE_CODEC_WAVE" />
|
||||||
|
@ -100,10 +99,6 @@
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
<Unit filename="..\..\Quake\common.h" />
|
<Unit filename="..\..\Quake\common.h" />
|
||||||
<Unit filename="..\..\Quake\conback.c">
|
|
||||||
<Option compilerVar="CC" />
|
|
||||||
</Unit>
|
|
||||||
<Unit filename="..\..\Quake\conback.h" />
|
|
||||||
<Unit filename="..\..\Quake\console.c">
|
<Unit filename="..\..\Quake\console.c">
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="C:\SDL\include;..\codecs\include;..\..\Quake;.;.."
|
AdditionalIncludeDirectories="C:\SDL\include;..\codecs\include;..\..\Quake;.;.."
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;USE_QS_CONBACK;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS"
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
AdditionalIncludeDirectories="C:\SDL\include;..\codecs\include;..\..\Quake;.;.."
|
AdditionalIncludeDirectories="C:\SDL\include;..\codecs\include;..\..\Quake;.;.."
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;USE_QS_CONBACK;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS"
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
EnableFunctionLevelLinking="true"
|
EnableFunctionLevelLinking="true"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
|
@ -190,7 +190,7 @@
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="C:\SDL\include;..\codecs\include;..\..\Quake;.;.."
|
AdditionalIncludeDirectories="C:\SDL\include;..\codecs\include;..\..\Quake;.;.."
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USE_WINSOCK2;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;USE_QS_CONBACK;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS"
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USE_WINSOCK2;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
|
@ -266,7 +266,7 @@
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
AdditionalIncludeDirectories="C:\SDL\include;..\codecs\include;..\..\Quake;.;.."
|
AdditionalIncludeDirectories="C:\SDL\include;..\codecs\include;..\..\Quake;.;.."
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USE_WINSOCK2;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;USE_QS_CONBACK;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS"
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USE_WINSOCK2;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
EnableFunctionLevelLinking="true"
|
EnableFunctionLevelLinking="true"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
|
@ -369,10 +369,6 @@
|
||||||
RelativePath="..\..\Quake\common.c"
|
RelativePath="..\..\Quake\common.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\Quake\conback.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\Quake\console.c"
|
RelativePath="..\..\Quake\console.c"
|
||||||
>
|
>
|
||||||
|
@ -675,10 +671,6 @@
|
||||||
RelativePath="..\..\Quake\common.h"
|
RelativePath="..\..\Quake\common.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\Quake\conback.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\Quake\console.h"
|
RelativePath="..\..\Quake\console.h"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in a new issue