From 4d32042d715116cd56461548a9011021614500f2 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Mon, 28 Apr 2014 05:40:28 +0000 Subject: [PATCH] load custom quakespasm.pak from instead of id1/ git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@906 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Misc/homedir_0.patch | 23 ++++++++++++++++------- Quake/common.c | 4 ++-- Quake/{id1 => }/quakespasm.pak | Bin 3 files changed, 18 insertions(+), 9 deletions(-) rename Quake/{id1 => }/quakespasm.pak (100%) diff --git a/Misc/homedir_0.patch b/Misc/homedir_0.patch index 55f2bc27..8e448021 100644 --- a/Misc/homedir_0.patch +++ b/Misc/homedir_0.patch @@ -1,11 +1,12 @@ -support for user directories, based on uhexen2 and tyrquake: -** against quakespasm svn revision 905. +initial experimental support for user directories, based on uhexen2 +and tyrquake: +** against quakespasm svn revision 906. ** on-the-fly game directory switching not supported yet. ** minimally tested, needs more work. Index: Quake/sys_sdl_unix.c =================================================================== ---- Quake/sys_sdl_unix.c (revision 905) +--- Quake/sys_sdl_unix.c (revision 906) +++ Quake/sys_sdl_unix.c (working copy) @@ -20,6 +20,8 @@ @@ -73,9 +74,9 @@ Index: Quake/sys_sdl_unix.c void Sys_mkdir (const char *path) Index: Quake/common.c =================================================================== ---- Quake/common.c (revision 905) +--- Quake/common.c (revision 906) +++ Quake/common.c (working copy) -@@ -1919,6 +1919,7 @@ static void COM_AddGameDirectory (const +@@ -1919,6 +1919,7 @@ static void COM_AddGameDirectory (const searchpath_t *search; pack_t *pak, *qspak; char pakfile[MAX_OSPATH]; @@ -83,7 +84,7 @@ Index: Quake/common.c q_strlcpy (com_gamedir, va("%s/%s", base, dir), sizeof(com_gamedir)); -@@ -1927,6 +1928,7 @@ static void COM_AddGameDirectory (const +@@ -1927,6 +1928,7 @@ static void COM_AddGameDirectory (const path_id = com_searchpaths->path_id << 1; else path_id = 1U; @@ -91,7 +92,15 @@ Index: Quake/common.c // add the directory to the search path search = (searchpath_t *) Z_Malloc(sizeof(searchpath_t)); search->path_id = path_id; -@@ -1963,6 +1965,14 @@ static void COM_AddGameDirectory (const +@@ -1943,6 +1945,7 @@ static void COM_AddGameDirectory (const + qspak = NULL; + else { + qboolean old = com_modified; ++ if (been_here) base = host_parms->basedir; + q_snprintf (pakfile, sizeof(pakfile), "%s/quakespasm.pak", base); + qspak = COM_LoadPackFile (pakfile); + com_modified = old; +@@ -1963,6 +1966,14 @@ static void COM_AddGameDirectory (const } if (!pak) break; } diff --git a/Quake/common.c b/Quake/common.c index 71aa3fa3..d42495ea 100644 --- a/Quake/common.c +++ b/Quake/common.c @@ -1943,9 +1943,9 @@ static void COM_AddGameDirectory (const char *base, const char *dir) qspak = NULL; else { qboolean old = com_modified; - q_snprintf (pakfile, sizeof(pakfile), "%s/quakespasm.pak", com_gamedir); + q_snprintf (pakfile, sizeof(pakfile), "%s/quakespasm.pak", base); qspak = COM_LoadPackFile (pakfile); - com_modified = old;/* make quakespasm customization pak to not set com_modified. */ + com_modified = old; } if (pak) { search = (searchpath_t *) Z_Malloc(sizeof(searchpath_t)); diff --git a/Quake/id1/quakespasm.pak b/Quake/quakespasm.pak similarity index 100% rename from Quake/id1/quakespasm.pak rename to Quake/quakespasm.pak