diff --git a/Misc/fs_search_order.patch b/Misc/fs_search_order.patch index 121fdf6a..a7317f8e 100644 --- a/Misc/fs_search_order.patch +++ b/Misc/fs_search_order.patch @@ -1,10 +1,10 @@ allow plain files to override files inside a PAK file -- Sander van Dijk. -Index: Quake/common.c -=================================================================== ---- Quake/common.c (revision 1476) -+++ Quake/common.c (working copy) -@@ -2036,13 +2036,6 @@ static void COM_AddGameDirectory (const +diff --git a/Quake/common.c b/Quake/common.c +index 6206c3f..27833b8 100644 +--- a/Quake/common.c ++++ b/Quake/common.c +@@ -2037,13 +2037,6 @@ static void COM_AddGameDirectory (const char *base, const char *dir) else path_id = 1U; _add_path: @@ -18,7 +18,7 @@ Index: Quake/common.c // add any pak files in the format pak0.pak pak1.pak, ... for (i = 0; ; i++) { -@@ -2074,6 +2067,13 @@ _add_path: +@@ -2075,6 +2068,13 @@ _add_path: if (!pak) break; } diff --git a/Misc/quake_retexturing_project.patch b/Misc/quake_retexturing_project.patch index 39e8efe7..dba25cc3 100644 --- a/Misc/quake_retexturing_project.patch +++ b/Misc/quake_retexturing_project.patch @@ -1,41 +1,39 @@ - -Index: Quake/gl_model.c -=================================================================== ---- Quake/gl_model.c (revision 1463) -+++ Quake/gl_model.c (working copy) -@@ -429,6 +429,8 @@ void Mod_LoadTextures (lump_t *l) - extern byte *hunk_base; - //johnfitz +diff --git a/Quake/gl_model.c b/Quake/gl_model.c +index 2b15080..07ff6fd 100644 +--- a/Quake/gl_model.c ++++ b/Quake/gl_model.c +@@ -37,6 +37,8 @@ qmodel_t *Mod_LoadModel (qmodel_t *mod, qboolean crash); + cvar_t external_ents = {"external_ents", "1", CVAR_ARCHIVE}; + cvar_t external_vis = {"external_vis", "1", CVAR_ARCHIVE}; -+ extern cvar_t r_externaltexture_fix; //mk ++extern cvar_t r_externaltexture_fix; //mk + - //johnfitz -- don't return early if no textures; still need to create dummy texture - if (!l->filelen) - { -@@ -490,7 +492,17 @@ void Mod_LoadTextures (lump_t *l) + static byte *mod_novis; + static int mod_novis_capacity; + +@@ -498,7 +500,16 @@ void Mod_LoadTextures (lump_t *l) if (!isDedicated) //no texture uploading for dedicated server { if (!q_strncasecmp(tx->name,"sky",3)) //sky texture //also note -- was Q_strncmp, changed to match qbsp + { -+ //mk -- begin -+ if (r_externaltexture_fix.value) { ++ if (r_externaltexture_fix.value) { //mk + if (strstr(tx->name,"sky4")) { + if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==13039) + q_strlcpy(tx->name, "sky1", sizeof(tx->name)); + Con_Printf(" using %s\n", tx->name); + } -+ } //mk -- end ++ } Sky_LoadTexture (tx); + } else if (tx->name[0] == '*') //warping texture { //external textures -- first look in "textures/mapname/" then look in "textures/" -@@ -540,6 +552,52 @@ void Mod_LoadTextures (lump_t *l) +@@ -548,6 +559,50 @@ void Mod_LoadTextures (lump_t *l) //external textures -- first look in "textures/mapname/" then look in "textures/" mark = Hunk_LowMark (); COM_StripExtension (loadmodel->name + 5, mapname, sizeof(mapname)); -+ //mk begin -+ if (r_externaltexture_fix.value) { ++ ++ if (r_externaltexture_fix.value) { //mk + if (strstr(tx->name,"plat_top1")) { + if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==24428) + q_strlcpy(tx->name, "plat_top1_cable", sizeof(tx->name)); @@ -43,7 +41,6 @@ Index: Quake/gl_model.c + q_strlcpy(tx->name, "plat_top1_bolt", sizeof(tx->name)); + Con_Printf(" using %s\n", tx->name); + } -+ + if (strstr(tx->name,"metal5_2")) { + if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==49173) + q_strlcpy(tx->name, "metal5_2_x", sizeof(tx->name)); @@ -51,7 +48,6 @@ Index: Quake/gl_model.c + q_strlcpy(tx->name, "metal5_2_arc", sizeof(tx->name)); + Con_Printf(" using %s\n", tx->name); + } -+ + if (strstr(tx->name,"metal5_4")) { + if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==20977) + q_strlcpy(tx->name, "metal5_4_double", sizeof(tx->name)); @@ -78,29 +74,29 @@ Index: Quake/gl_model.c + q_strlcpy(tx->name, "window03_e4m2", sizeof(tx->name)); + Con_Printf(" using %s\n", tx->name); + } -+ } //mk end ++ } + q_snprintf (filename, sizeof(filename), "textures/%s/%s", mapname, tx->name); data = Image_LoadImage (filename, &fwidth, &fheight); if (!data) -Index: Quake/gl_rmain.c -=================================================================== ---- Quake/gl_rmain.c (revision 1406) -+++ Quake/gl_rmain.c (working copy) -@@ -101,6 +101,8 @@ - +diff --git a/Quake/gl_rmain.c b/Quake/gl_rmain.c +index a41d8b1..b0020c5 100644 +--- a/Quake/gl_rmain.c ++++ b/Quake/gl_rmain.c +@@ -102,6 +102,8 @@ cvar_t r_noshadow_list = {"r_noshadow_list", "progs/flame2.mdl,progs/flame.mdl,p extern cvar_t r_vfog; //johnfitz -+ -+cvar_t r_externaltexture_fix = {"r_externaltexture_fix","0", CVAR_ARCHIVE}; //mk ++cvar_t r_externaltexture_fix = {"r_externaltexture_fix", "0", CVAR_ARCHIVE}; //mk ++ cvar_t gl_zfix = {"gl_zfix", "0", CVAR_NONE}; // QuakeSpasm z-fighting fix -Index: Quake/gl_rmisc.c -=================================================================== ---- Quake/gl_rmisc.c (revision 1406) -+++ Quake/gl_rmisc.c (working copy) -@@ -47,6 +47,7 @@ + cvar_t r_lavaalpha = {"r_lavaalpha","0",CVAR_NONE}; +diff --git a/Quake/gl_rmisc.c b/Quake/gl_rmisc.c +index dfdb84d..9c441bd 100644 +--- a/Quake/gl_rmisc.c ++++ b/Quake/gl_rmisc.c +@@ -47,6 +47,7 @@ extern cvar_t r_nolerp_list; extern cvar_t r_noshadow_list; //johnfitz extern cvar_t gl_zfix; // QuakeSpasm z-fighting fix @@ -108,7 +104,7 @@ Index: Quake/gl_rmisc.c extern gltexture_t *playertextures[MAX_SCOREBOARD]; //johnfitz -@@ -231,6 +232,7 @@ void R_Init (void) +@@ -218,6 +219,7 @@ void R_Init (void) Cvar_RegisterVariable (&r_noshadow_list); Cvar_SetCallback (&r_noshadow_list, R_Model_ExtraFlags_List_f); //johnfitz