r9615 - in packages/trunk/desmume/debian: . patches

Evgeni Golov sargentd-guest at alioth.debian.org
Sat Apr 18 09:08:09 UTC 2009


Author: sargentd-guest
Date: 2009-04-18 09:08:08 +0000 (Sat, 18 Apr 2009)
New Revision: 9615

Added:
   packages/trunk/desmume/debian/patches/01_gfx3d.h_64bit_fix.patch
Modified:
   packages/trunk/desmume/debian/changelog
   packages/trunk/desmume/debian/patches/series
Log:
New patch from upstream SVN, fixes function definitions in gfx3d.h
and makes desmume build again on 64bit arches.



Modified: packages/trunk/desmume/debian/changelog
===================================================================
--- packages/trunk/desmume/debian/changelog	2009-04-17 19:25:02 UTC (rev 9614)
+++ packages/trunk/desmume/debian/changelog	2009-04-18 09:08:08 UTC (rev 9615)
@@ -10,8 +10,11 @@
   * debian/copyright:
     + Add my copyright.
     + Wrap some very long lines.
+  * debian/patches/01_gfx3d.h_64bit_fix.patch:
+    + New patch from upstream SVN, fixes function definitions in gfx3d.h
+      and makes desmume build again on 64bit arches.
 
- -- Evgeni Golov <sargentd at die-welt.net>  Fri, 17 Apr 2009 21:23:44 +0200
+ -- Evgeni Golov <sargentd at die-welt.net>  Sat, 18 Apr 2009 10:31:00 +0200
 
 desmume (0.9.1-1) unstable; urgency=low
 

Added: packages/trunk/desmume/debian/patches/01_gfx3d.h_64bit_fix.patch
===================================================================
--- packages/trunk/desmume/debian/patches/01_gfx3d.h_64bit_fix.patch	                        (rev 0)
+++ packages/trunk/desmume/debian/patches/01_gfx3d.h_64bit_fix.patch	2009-04-18 09:08:08 UTC (rev 9615)
@@ -0,0 +1,213 @@
+In 0.9.2 gfx3d.h and gfx3d.cpp differer in terms of function definitons.
+Mostly unsigned long vs u32 and signed long vs s32, which is no problem
+on 32bit arches, but terribly fails on 64bit ones.
+
+This patch is from upstream SVN (r1894 and r1896).
+
+--- desmume/src/gfx3d.h	2009/04/08 05:17:36	1849
++++ desmume/src/gfx3d.h	2009/04/11 17:14:19	1896
+@@ -187,58 +187,58 @@
+ extern CACHE_ALIGN const u8 alpha_5bit_to_4bit[32];
+ 
+ //GE commands:
+-void gfx3d_glViewPort(unsigned long v);
+-void gfx3d_glClearColor(unsigned long v);
+-void gfx3d_glFogColor(unsigned long v);
+-void gfx3d_glFogOffset (unsigned long v);
+-void gfx3d_glClearDepth(unsigned long v);
+-void gfx3d_glMatrixMode(unsigned long v);
++void gfx3d_glViewPort(u32 v);
++void gfx3d_glClearColor(u32 v);
++void gfx3d_glFogColor(u32 v);
++void gfx3d_glFogOffset (u32 v);
++void gfx3d_glClearDepth(u32 v);
++void gfx3d_glMatrixMode(u32 v);
+ void gfx3d_glLoadIdentity();
+-BOOL gfx3d_glLoadMatrix4x4(signed long v);
+-BOOL gfx3d_glLoadMatrix4x3(signed long v);
+-void gfx3d_glStoreMatrix(unsigned long v);
+-void gfx3d_glRestoreMatrix(unsigned long v);
++BOOL gfx3d_glLoadMatrix4x4(s32 v);
++BOOL gfx3d_glLoadMatrix4x3(s32 v);
++void gfx3d_glStoreMatrix(u32 v);
++void gfx3d_glRestoreMatrix(u32 v);
+ void gfx3d_glPushMatrix(void);
+-void gfx3d_glPopMatrix(signed long i);
+-BOOL gfx3d_glTranslate(signed long v);
+-BOOL gfx3d_glScale(signed long v);
+-BOOL gfx3d_glMultMatrix3x3(signed long v);
+-BOOL gfx3d_glMultMatrix4x3(signed long v);
+-BOOL gfx3d_glMultMatrix4x4(signed long v);
+-void gfx3d_glBegin(unsigned long v);
++void gfx3d_glPopMatrix(s32 i);
++BOOL gfx3d_glTranslate(s32 v);
++BOOL gfx3d_glScale(s32 v);
++BOOL gfx3d_glMultMatrix3x3(s32 v);
++BOOL gfx3d_glMultMatrix4x3(s32 v);
++BOOL gfx3d_glMultMatrix4x4(s32 v);
++void gfx3d_glBegin(u32 v);
+ void gfx3d_glEnd(void);
+-void gfx3d_glColor3b(unsigned long v);
++void gfx3d_glColor3b(u32 v);
+ BOOL gfx3d_glVertex16b(unsigned int v);
+-void gfx3d_glVertex10b(unsigned long v);
++void gfx3d_glVertex10b(u32 v);
+ void gfx3d_glVertex3_cord(unsigned int one, unsigned int two, unsigned int v);
+-void gfx3d_glVertex_rel(unsigned long v);
++void gfx3d_glVertex_rel(u32 v);
+ void gfx3d_glSwapScreen(unsigned int screen);
+ int gfx3d_GetNumPolys();
+ int gfx3d_GetNumVertex();
+-void gfx3d_glPolygonAttrib (unsigned long val);
+-void gfx3d_glMaterial0(unsigned long val);
+-void gfx3d_glMaterial1(unsigned long val);
+-BOOL gfx3d_glShininess (unsigned long val);
++void gfx3d_glPolygonAttrib (u32 val);
++void gfx3d_glMaterial0(u32 val);
++void gfx3d_glMaterial1(u32 val);
++BOOL gfx3d_glShininess (u32 val);
+ void gfx3d_UpdateToonTable(u8 offset, u16 val);
+ void gfx3d_UpdateToonTable(u8 offset, u32 val);
+-void gfx3d_glTexImage(unsigned long val);
+-void gfx3d_glTexPalette(unsigned long val);
+-void gfx3d_glTexCoord(unsigned long val);
+-void gfx3d_glNormal(unsigned long v);
+-signed long gfx3d_GetClipMatrix (unsigned int index);
+-signed long gfx3d_GetDirectionalMatrix (unsigned int index);
+-void gfx3d_glLightDirection (unsigned long v);
+-void gfx3d_glLightColor (unsigned long v);
+-void gfx3d_glAlphaFunc(unsigned long v);
+-BOOL gfx3d_glBoxTest(unsigned long v);
+-BOOL gfx3d_glPosTest(unsigned long v);
+-void gfx3d_glVecTest(unsigned long v);
++void gfx3d_glTexImage(u32 val);
++void gfx3d_glTexPalette(u32 val);
++void gfx3d_glTexCoord(u32 val);
++void gfx3d_glNormal(u32 v);
++s32 gfx3d_GetClipMatrix (unsigned int index);
++s32 gfx3d_GetDirectionalMatrix (unsigned int index);
++void gfx3d_glLightDirection (u32 v);
++void gfx3d_glLightColor (u32 v);
++void gfx3d_glAlphaFunc(u32 v);
++BOOL gfx3d_glBoxTest(u32 v);
++BOOL gfx3d_glPosTest(u32 v);
++void gfx3d_glVecTest(u32 v);
+ unsigned int gfx3d_glGetPosRes(unsigned int index);
+ unsigned short gfx3d_glGetVecRes(unsigned int index);
+-void gfx3d_glFlush(unsigned long v);
++void gfx3d_glFlush(u32 v);
+ void gfx3d_VBlankSignal();
+ void gfx3d_VBlankEndSignal(bool skipFrame);
+-void gfx3d_Control(unsigned long v);
++void gfx3d_Control(u32 v);
+ u32 gfx3d_GetGXstatus();
+ void gfx3d_sendCommandToFIFO(u32 val);
+ void gfx3d_sendCommand(u32 cmd, u32 param);
+--- desmume/src/gfx3d.cpp	2009/04/08 05:17:36	1849
++++ desmume/src/gfx3d.cpp	2009/04/11 17:14:19	1896
+@@ -355,7 +355,7 @@
+ 		MatrixIdentity (mtxCurrent[1]);
+ }
+ 
+-BOOL gfx3d_glLoadMatrix4x4(signed long v)
++BOOL gfx3d_glLoadMatrix4x4(s32 v)
+ {
+ 	mtxCurrent[mode][ML4x4ind] = fix2float(v);
+ 
+@@ -369,7 +369,7 @@
+ 	return TRUE;
+ }
+ 
+-BOOL gfx3d_glLoadMatrix4x3(signed long v)
++BOOL gfx3d_glLoadMatrix4x3(s32 v)
+ {
+ 	mtxCurrent[mode][ML4x3ind] = fix2float(v);
+ 
+@@ -438,7 +438,7 @@
+ 	T1WriteLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x600, gxstat);
+ }
+ 
+-void gfx3d_glPopMatrix(signed long i)
++void gfx3d_glPopMatrix(s32 i)
+ {
+ 	u32 gxstat = T1ReadLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x600);
+ 
+@@ -464,7 +464,7 @@
+ 	T1WriteLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x600, gxstat);
+ }
+ 
+-BOOL gfx3d_glTranslate(signed long v)
++BOOL gfx3d_glTranslate(s32 v)
+ {
+ 	trans[transind] = fix2float(v);
+ 
+@@ -480,7 +480,7 @@
+ 	return TRUE;
+ }
+ 
+-BOOL gfx3d_glScale(signed long v)
++BOOL gfx3d_glScale(s32 v)
+ {
+ 	short mymode = (mode==2?1:mode);
+ 
+@@ -501,7 +501,7 @@
+ 	return TRUE;
+ }
+ 
+-BOOL gfx3d_glMultMatrix3x3(signed long v)
++BOOL gfx3d_glMultMatrix3x3(s32 v)
+ {
+ 	mtxTemporal[MM3x3ind] = fix2float(v);
+ 
+@@ -525,7 +525,7 @@
+ 	return TRUE;
+ }
+ 
+-BOOL gfx3d_glMultMatrix4x3(signed long v)
++BOOL gfx3d_glMultMatrix4x3(s32 v)
+ {
+ 	mtxTemporal[MM4x3ind] = fix2float(v);
+ 
+@@ -547,7 +547,7 @@
+ 	return TRUE;
+ }
+ 
+-BOOL gfx3d_glMultMatrix4x4(signed long v)
++BOOL gfx3d_glMultMatrix4x4(s32 v)
+ {
+ 	mtxTemporal[MM4x4ind] = fix2float(v);
+ 
+@@ -971,7 +971,7 @@
+ 
+ 				for(c = 0; c < 3; c++)
+ 				{
+-					vertexColor[c] += (((specular[c] * _lightColor[c] * shininessLevel)
++                                  vertexColor[c] += (int)(((specular[c] * _lightColor[c] * shininessLevel)
+ 						+ (diffuse[c] * _lightColor[c] * diffuseLevel)
+ 						+ (ambient[c] * _lightColor[c])) / 31.0f);
+ 				}
+@@ -984,20 +984,20 @@
+ }
+ 
+ 
+-signed long gfx3d_GetClipMatrix (unsigned int index)
++s32 gfx3d_GetClipMatrix (unsigned int index)
+ {
+ 	float val = MatrixGetMultipliedIndex (index, mtxCurrent[0], mtxCurrent[1]);
+ 
+ 	val *= (1<<12);
+ 
+-	return (signed long)val;
++	return (s32)val;
+ }
+ 
+-signed long gfx3d_GetDirectionalMatrix (unsigned int index)
++s32 gfx3d_GetDirectionalMatrix (unsigned int index)
+ {
+ 	int _index = (((index / 3) * 4) + (index % 3));
+ 
+-	return (signed long)(mtxCurrent[2][_index]*(1<<12));
++	return (s32)(mtxCurrent[2][_index]*(1<<12));
+ }
+ 
+ static void gfx3d_glLightDirection_cache(int index)

Modified: packages/trunk/desmume/debian/patches/series
===================================================================
--- packages/trunk/desmume/debian/patches/series	2009-04-17 19:25:02 UTC (rev 9614)
+++ packages/trunk/desmume/debian/patches/series	2009-04-18 09:08:08 UTC (rev 9615)
@@ -1 +1 @@
-#
+01_gfx3d.h_64bit_fix.patch




More information about the Pkg-games-commits mailing list