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

View file

@ -1,7 +1,8 @@
diff -rupN ../quakespasm-svn-clean/Quake/gl_model.c ./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
@@ -382,6 +382,8 @@ void Mod_LoadTextures (lump_t *l)
Index: Quake/gl_model.c
===================================================================
--- Quake/gl_model.c (revision 508)
+++ Quake/gl_model.c (working copy)
@@ -386,6 +386,8 @@ void Mod_LoadTextures (lump_t *l)
extern byte *hunk_base;
//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
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 (!Q_strncasecmp(tx->name,"sky",3)) //sky texture //also note -- was Q_strncmp, changed to match qbsp
+ //mk -- begin
+ {
+ //mk -- begin
+ if (r_externaltexture_fix.value) {
+ if (strstr(tx->name,"sky4")) {
+ if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==13039)
+ sprintf(tx->name,"sky1");
+ Con_Printf(" using %s\n", tx->name);
+ }
+ }
+ //mk -- end
+ } //mk -- end
Sky_LoadTexture (tx);
+ } // mk
+ }
else if (tx->name[0] == '*') //warping texture
{
//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/"
mark = Hunk_LowMark ();
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");
+ Con_Printf(" using %s\n", tx->name);
+ }
+ }
+ //mk end
+ } //mk end
+
sprintf (filename, "textures/%s/%s", mapname, tx->name);
data = Image_LoadImage (filename, &fwidth, &fheight);
if (!data)
diff -rupN ../quakespasm-svn-clean/Quake/gl_rmain.c ./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
@@ -103,6 +103,8 @@ cvar_t r_nolerp_list = {"r_nolerp_list",
Index: Quake/gl_rmain.c
===================================================================
--- Quake/gl_rmain.c (revision 508)
+++ 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;
//johnfitz
+cvar_t r_externaltexture_fix = {"r_externaltexture_fix","0", true}; //mk
+
qboolean r_drawflat_cheatsafe, r_fullbright_cheatsafe, r_lightmap_cheatsafe, r_drawworld_cheatsafe; //johnfitz
/*
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
--- ../quakespasm-svn-clean/Quake/gl_rmisc.c 2010-09-21 17:58:12.000000000 +0200
+++ ./Quake/gl_rmisc.c 2010-09-21 17:59:54.000000000 +0200
@@ -45,6 +45,8 @@ extern cvar_t r_lerpmove;
cvar_t gl_zfix = {"gl_zfix", "1", true}; // QuakeSpasm z-fighting fix
Index: Quake/gl_rmisc.c
===================================================================
--- Quake/gl_rmisc.c (revision 508)
+++ Quake/gl_rmisc.c (working copy)
@@ -44,6 +44,7 @@
extern cvar_t r_lerpmove;
extern cvar_t r_nolerp_list;
//johnfitz
+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
@@ -240,6 +242,8 @@ void R_Init (void)
extern cvar_t gl_zfix; // QuakeSpasm z-fighting fix
@@ -241,6 +242,7 @@ void R_Init (void)
Cvar_RegisterVariable (&r_lerpmove, NULL);
Cvar_RegisterVariable (&r_nolerp_list, R_NoLerpList_f);
//johnfitz
+ Cvar_RegisterVariable (&r_externaltexture_fix, NULL); //mk
+
Cvar_RegisterVariable (&gl_subdivide_size, NULL); //johnfitz -- moved here from gl_model.c
R_InitParticles ();
Cvar_RegisterVariable (&gl_zfix, NULL); // QuakeSpasm z-fighting fix