re-diff'ed the quake_retexturing_project.patch so that it applies cleanly

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@509 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2011-12-12 12:44:17 +00:00
parent cccff603e4
commit 791d3e8d61
1 changed files with 33 additions and 35 deletions

View File

@ -1,7 +1,8 @@
diff -rupN ../quakespasm-svn-clean/Quake/gl_model.c ./Quake/gl_model.c Index: Quake/gl_model.c
--- ../quakespasm-svn-clean/Quake/gl_model.c 2010-09-21 17:58:12.000000000 +0200 ===================================================================
+++ ./Quake/gl_model.c 2010-09-21 18:02:42.000000000 +0200 --- Quake/gl_model.c (revision 508)
@@ -382,6 +382,8 @@ void Mod_LoadTextures (lump_t *l) +++ Quake/gl_model.c (working copy)
@@ -386,6 +386,8 @@ void Mod_LoadTextures (lump_t *l)
extern byte *hunk_base; extern byte *hunk_base;
//johnfitz //johnfitz
@ -10,26 +11,25 @@ diff -rupN ../quakespasm-svn-clean/Quake/gl_model.c ./Quake/gl_model.c
//johnfitz -- don't return early if no textures; still need to create dummy texture //johnfitz -- don't return early if no textures; still need to create dummy texture
if (!l->filelen) if (!l->filelen)
{ {
@@ -433,7 +435,18 @@ void Mod_LoadTextures (lump_t *l) @@ -437,7 +439,17 @@ void Mod_LoadTextures (lump_t *l)
if (!isDedicated) //no texture uploading for dedicated server 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 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) { + //mk -- begin
+ if (r_externaltexture_fix.value) {
+ if (strstr(tx->name,"sky4")) { + if (strstr(tx->name,"sky4")) {
+ if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==13039) + if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==13039)
+ sprintf(tx->name,"sky1"); + sprintf(tx->name,"sky1");
+ Con_Printf(" using %s\n", tx->name); + Con_Printf(" using %s\n", tx->name);
+ } + }
+ } + } //mk -- end
+ //mk -- end
Sky_LoadTexture (tx); Sky_LoadTexture (tx);
+ } // mk + }
else if (tx->name[0] == '*') //warping texture else if (tx->name[0] == '*') //warping texture
{ {
//external textures -- first look in "textures/mapname/" then look in "textures/" //external textures -- first look in "textures/mapname/" then look in "textures/"
@@ -475,6 +488,53 @@ void Mod_LoadTextures (lump_t *l) @@ -479,6 +491,52 @@ void Mod_LoadTextures (lump_t *l)
//external textures -- first look in "textures/mapname/" then look in "textures/" //external textures -- first look in "textures/mapname/" then look in "textures/"
mark = Hunk_LowMark (); mark = Hunk_LowMark ();
COM_StripExtension (loadmodel->name + 5, mapname); COM_StripExtension (loadmodel->name + 5, mapname);
@ -77,43 +77,41 @@ diff -rupN ../quakespasm-svn-clean/Quake/gl_model.c ./Quake/gl_model.c
+ sprintf(tx->name,"window03_e4m2"); + sprintf(tx->name,"window03_e4m2");
+ Con_Printf(" using %s\n", tx->name); + Con_Printf(" using %s\n", tx->name);
+ } + }
+ } + } //mk end
+ //mk end
+ +
sprintf (filename, "textures/%s/%s", mapname, tx->name); sprintf (filename, "textures/%s/%s", mapname, tx->name);
data = Image_LoadImage (filename, &fwidth, &fheight); data = Image_LoadImage (filename, &fwidth, &fheight);
if (!data) if (!data)
diff -rupN ../quakespasm-svn-clean/Quake/gl_rmain.c ./Quake/gl_rmain.c Index: Quake/gl_rmain.c
--- ../quakespasm-svn-clean/Quake/gl_rmain.c 2010-09-21 17:58:12.000000000 +0200 ===================================================================
+++ ./Quake/gl_rmain.c 2010-09-21 17:59:44.000000000 +0200 --- Quake/gl_rmain.c (revision 508)
@@ -103,6 +103,8 @@ cvar_t r_nolerp_list = {"r_nolerp_list", +++ Quake/gl_rmain.c (working copy)
@@ -102,6 +102,7 @@
cvar_t r_nolerp_list = {"r_nolerp_list", "progs/flame.mdl,progs/flame2.mdl,progs/braztall.mdl,progs/brazshrt.mdl,progs/longtrch.mdl,progs/flame_pyre.mdl,progs/v_saw.mdl,progs/v_xfist.mdl,progs/h2stuff/newfire.mdl"};
extern cvar_t r_vfog; extern cvar_t r_vfog;
//johnfitz //johnfitz
+cvar_t r_externaltexture_fix = {"r_externaltexture_fix","0", true}; //mk
+cvar_t r_externaltexture_fix = {"r_externaltexture_fix","0", true}; //mk cvar_t gl_zfix = {"gl_zfix", "1", true}; // QuakeSpasm z-fighting fix
+
qboolean r_drawflat_cheatsafe, r_fullbright_cheatsafe, r_lightmap_cheatsafe, r_drawworld_cheatsafe; //johnfitz
/* Index: Quake/gl_rmisc.c
Binärdateien ../quakespasm-svn-clean/Quake/gl_rmain.o and ./Quake/gl_rmain.o sind verschieden. ===================================================================
diff -rupN ../quakespasm-svn-clean/Quake/gl_rmisc.c ./Quake/gl_rmisc.c --- Quake/gl_rmisc.c (revision 508)
--- ../quakespasm-svn-clean/Quake/gl_rmisc.c 2010-09-21 17:58:12.000000000 +0200 +++ Quake/gl_rmisc.c (working copy)
+++ ./Quake/gl_rmisc.c 2010-09-21 17:59:54.000000000 +0200 @@ -44,6 +44,7 @@
@@ -45,6 +45,8 @@ extern cvar_t r_lerpmove; extern cvar_t r_lerpmove;
extern cvar_t r_nolerp_list; extern cvar_t r_nolerp_list;
//johnfitz //johnfitz
+extern cvar_t r_externaltexture_fix; //mk +extern cvar_t r_externaltexture_fix; //mk
+
extern float load_subdivide_size; //johnfitz -- remember what subdivide_size value was when this map was loaded
extern cvar_t gl_subdivide_size; //johnfitz -- moved here from gl_model.c extern cvar_t gl_zfix; // QuakeSpasm z-fighting fix
@@ -240,6 +242,8 @@ void R_Init (void)
@@ -241,6 +242,7 @@ void R_Init (void)
Cvar_RegisterVariable (&r_lerpmove, NULL);
Cvar_RegisterVariable (&r_nolerp_list, R_NoLerpList_f); Cvar_RegisterVariable (&r_nolerp_list, R_NoLerpList_f);
//johnfitz //johnfitz
+ Cvar_RegisterVariable (&r_externaltexture_fix, NULL); //mk
+ Cvar_RegisterVariable (&r_externaltexture_fix, NULL);//mk Cvar_RegisterVariable (&gl_zfix, NULL); // QuakeSpasm z-fighting fix
+
Cvar_RegisterVariable (&gl_subdivide_size, NULL); //johnfitz -- moved here from gl_model.c
R_InitParticles ();