[RFC] quake2.spec

lobo w chello.pl lobo w chello.pl
Sob, 28 Paź 2006, 15:03:18 CEST


On Fri, Oct 27, 2006 at 11:18:32AM +0200, lobo w chello.pl wrote:
> > Dlaczego? Nie widzę w quake2 zależności od gcc-c++, a standardowe ABI C
> > dla IA32 nie zmieniło się od gcc 2.
> > 
> Nie sprawdzałem tego, tylko gdzieś wyczytałem i przyjąłem za pewnik :).
> Sprawdzę w takim razie jak te mody działają na własnym kompilacie i dam
> znać.
Ładować się ładują na wersji GPL, ale szybciutko sigsegv wyskakuje, a
jestem za cienki, aby namierzyć dlaczego. W wersji 1.16 są w tej chwili
dwa problemy. Pierwszy to brak pliku quake2-scripts.tgz, a drugi to
błędy kompilacji. Na to drugie załączam patcha.

-- 
Pozdrawiam
Przemysław Białek
-------------- następna część ---------
diff -ru quake2-3.21.orig/ref_gl/gl_image.c quake2-3.21/ref_gl/gl_image.c
--- quake2-3.21.orig/ref_gl/gl_image.c	2001-12-22 16:32:28.000000000 +0100
+++ quake2-3.21/ref_gl/gl_image.c	2006-10-27 19:12:52.000000000 +0200
@@ -74,17 +74,17 @@
 
 	if ( enable )
 	{
-		GL_SelectTexture( GL_TEXTURE1 );
+		GL_SelectTexture( QGL_TEXTURE1 );
 		qglEnable( GL_TEXTURE_2D );
 		GL_TexEnv( GL_REPLACE );
 	}
 	else
 	{
-		GL_SelectTexture( GL_TEXTURE1 );
+		GL_SelectTexture( QGL_TEXTURE1 );
 		qglDisable( GL_TEXTURE_2D );
 		GL_TexEnv( GL_REPLACE );
 	}
-	GL_SelectTexture( GL_TEXTURE0 );
+	GL_SelectTexture( QGL_TEXTURE0 );
 	GL_TexEnv( GL_REPLACE );
 }
 
@@ -95,7 +95,7 @@
 	if ( !qglSelectTextureSGIS && !qglActiveTextureARB )
 		return;
 
-	if ( texture == GL_TEXTURE0 )
+	if ( texture == QGL_TEXTURE0 )
 	{
 		tmu = 0;
 	}
@@ -148,7 +148,7 @@
 void GL_MBind( GLenum target, int texnum )
 {
 	GL_SelectTexture( target );
-	if ( target == GL_TEXTURE0 )
+	if ( target == QGL_TEXTURE0 )
 	{
 		if ( gl_state.currenttextures[0] == texnum )
 			return;
diff -ru quake2-3.21.orig/ref_gl/gl_rmain.c quake2-3.21/ref_gl/gl_rmain.c
--- quake2-3.21.orig/ref_gl/gl_rmain.c	2001-12-22 16:32:28.000000000 +0100
+++ quake2-3.21/ref_gl/gl_rmain.c	2006-10-27 19:14:03.000000000 +0200
@@ -26,7 +26,7 @@
 
 refimport_t	ri;
 
-int GL_TEXTURE0, GL_TEXTURE1;
+int QGL_TEXTURE0, QGL_TEXTURE1;
 
 model_t		*r_worldmodel;
 
@@ -1338,8 +1338,8 @@
 			qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMultiTexCoord2fARB" );
 			qglActiveTextureARB = ( void * ) qwglGetProcAddress( "glActiveTextureARB" );
 			qglClientActiveTextureARB = ( void * ) qwglGetProcAddress( "glClientActiveTextureARB" );
-			GL_TEXTURE0 = GL_TEXTURE0_ARB;
-			GL_TEXTURE1 = GL_TEXTURE1_ARB;
+			QGL_TEXTURE0 = GL_TEXTURE0_ARB;
+			QGL_TEXTURE1 = GL_TEXTURE1_ARB;
 		}
 		else
 		{
@@ -1362,8 +1362,8 @@
 			ri.Con_Printf( PRINT_ALL, "...using GL_SGIS_multitexture\n" );
 			qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMTexCoord2fSGIS" );
 			qglSelectTextureSGIS = ( void * ) qwglGetProcAddress( "glSelectTextureSGIS" );
-			GL_TEXTURE0 = GL_TEXTURE0_SGIS;
-			GL_TEXTURE1 = GL_TEXTURE1_SGIS;
+			QGL_TEXTURE0 = GL_TEXTURE0_SGIS;
+			QGL_TEXTURE1 = GL_TEXTURE1_SGIS;
 		}
 		else
 		{
diff -ru quake2-3.21.orig/ref_gl/gl_rsurf.c quake2-3.21/ref_gl/gl_rsurf.c
--- quake2-3.21.orig/ref_gl/gl_rsurf.c	2001-12-22 16:32:28.000000000 +0100
+++ quake2-3.21/ref_gl/gl_rsurf.c	2006-10-27 19:15:36.000000000 +0200
@@ -741,7 +741,7 @@
 			R_BuildLightMap( surf, (void *)temp, smax*4 );
 			R_SetCacheState( surf );
 
-			GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + surf->lightmaptexturenum );
+			GL_MBind( QGL_TEXTURE1, gl_state.lightmap_textures + surf->lightmaptexturenum );
 
 			lmtex = surf->lightmaptexturenum;
 
@@ -759,7 +759,7 @@
 
 			R_BuildLightMap( surf, (void *)temp, smax*4 );
 
-			GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + 0 );
+			GL_MBind( QGL_TEXTURE1, gl_state.lightmap_textures + 0 );
 
 			lmtex = 0;
 
@@ -773,8 +773,8 @@
 
 		c_brush_polys++;
 
-		GL_MBind( GL_TEXTURE0, image->texnum );
-		GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + lmtex );
+		GL_MBind( QGL_TEXTURE0, image->texnum );
+		GL_MBind( QGL_TEXTURE1, gl_state.lightmap_textures + lmtex );
 
 //==========
 //PGM
@@ -792,8 +792,8 @@
 				qglBegin (GL_POLYGON);
 				for (i=0 ; i< nv; i++, v+= VERTEXSIZE)
 				{
-					qglMTexCoord2fSGIS( GL_TEXTURE0, (v[3]+scroll), v[4]);
-					qglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]);
+					qglMTexCoord2fSGIS( QGL_TEXTURE0, (v[3]+scroll), v[4]);
+					qglMTexCoord2fSGIS( QGL_TEXTURE1, v[5], v[6]);
 					qglVertex3fv (v);
 				}
 				qglEnd ();
@@ -807,8 +807,8 @@
 				qglBegin (GL_POLYGON);
 				for (i=0 ; i< nv; i++, v+= VERTEXSIZE)
 				{
-					qglMTexCoord2fSGIS( GL_TEXTURE0, v[3], v[4]);
-					qglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]);
+					qglMTexCoord2fSGIS( QGL_TEXTURE0, v[3], v[4]);
+					qglMTexCoord2fSGIS( QGL_TEXTURE1, v[5], v[6]);
 					qglVertex3fv (v);
 				}
 				qglEnd ();
@@ -821,8 +821,8 @@
 	{
 		c_brush_polys++;
 
-		GL_MBind( GL_TEXTURE0, image->texnum );
-		GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + lmtex );
+		GL_MBind( QGL_TEXTURE0, image->texnum );
+		GL_MBind( QGL_TEXTURE1, gl_state.lightmap_textures + lmtex );
 
 //==========
 //PGM
@@ -840,8 +840,8 @@
 				qglBegin (GL_POLYGON);
 				for (i=0 ; i< nv; i++, v+= VERTEXSIZE)
 				{
-					qglMTexCoord2fSGIS( GL_TEXTURE0, (v[3]+scroll), v[4]);
-					qglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]);
+					qglMTexCoord2fSGIS( QGL_TEXTURE0, (v[3]+scroll), v[4]);
+					qglMTexCoord2fSGIS( QGL_TEXTURE1, v[5], v[6]);
 					qglVertex3fv (v);
 				}
 				qglEnd ();
@@ -857,8 +857,8 @@
 				qglBegin (GL_POLYGON);
 				for (i=0 ; i< nv; i++, v+= VERTEXSIZE)
 				{
-					qglMTexCoord2fSGIS( GL_TEXTURE0, v[3], v[4]);
-					qglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]);
+					qglMTexCoord2fSGIS( QGL_TEXTURE0, v[3], v[4]);
+					qglMTexCoord2fSGIS( QGL_TEXTURE1, v[5], v[6]);
 					qglVertex3fv (v);
 				}
 				qglEnd ();
@@ -1008,9 +1008,9 @@
 e->angles[2] = -e->angles[2];	// stupid quake bug
 
 	GL_EnableMultitexture( true );
-	GL_SelectTexture( GL_TEXTURE0);
+	GL_SelectTexture( QGL_TEXTURE0);
 	GL_TexEnv( GL_REPLACE );
-	GL_SelectTexture( GL_TEXTURE1);
+	GL_SelectTexture( QGL_TEXTURE1);
 	GL_TexEnv( GL_MODULATE );
 
 	R_DrawInlineBModel ();
@@ -1222,9 +1222,9 @@
 	{
 		GL_EnableMultitexture( true );
 
-		GL_SelectTexture( GL_TEXTURE0);
+		GL_SelectTexture( QGL_TEXTURE0);
 		GL_TexEnv( GL_REPLACE );
-		GL_SelectTexture( GL_TEXTURE1);
+		GL_SelectTexture( QGL_TEXTURE1);
 
 		if ( gl_lightmap->value )
 			GL_TexEnv( GL_REPLACE );
@@ -1572,7 +1572,7 @@
 	r_framecount = 1;		// no dlightcache
 
 	GL_EnableMultitexture( true );
-	GL_SelectTexture( GL_TEXTURE1);
+	GL_SelectTexture( QGL_TEXTURE1);
 
 	/*
 	** setup the base lightstyles so the lightmaps won't have to be regenerated
diff -ru quake2-3.21.orig/ref_gl/qgl.h quake2-3.21/ref_gl/qgl.h
--- quake2-3.21.orig/ref_gl/qgl.h	2006-10-27 19:16:22.000000000 +0200
+++ quake2-3.21/ref_gl/qgl.h	2006-10-27 19:09:06.000000000 +0200
@@ -481,6 +481,6 @@
 #define GL_TEXTURE0_ARB						0x84C0
 #define GL_TEXTURE1_ARB						0x84C1
 
-extern int GL_TEXTURE0, GL_TEXTURE1;
+extern int QGL_TEXTURE0, QGL_TEXTURE1;
 
 #endif


Więcej informacji o liście dyskusyjnej pld-devel-pl