r7625 - in people/brad-guest/unstable/trunk/plib/debian: . patches
Bradley Smith
brad-guest at alioth.debian.org
Mon Jun 30 14:53:36 UTC 2008
Author: brad-guest
Date: 2008-06-30 14:53:36 +0000 (Mon, 30 Jun 2008)
New Revision: 7625
Added:
people/brad-guest/unstable/trunk/plib/debian/patches/ssgLoadMD2.cxx.diff
Modified:
people/brad-guest/unstable/trunk/plib/debian/changelog
people/brad-guest/unstable/trunk/plib/debian/patches/series
Log:
* Add patch to fix powerpc endianness problems.
- ssgLoadMD2.cxx.diff - Thanks to
+ Gerfried Fuchs <rhonda at deb.at>
+ <harald at the-develop.net>
Modified: people/brad-guest/unstable/trunk/plib/debian/changelog
===================================================================
--- people/brad-guest/unstable/trunk/plib/debian/changelog 2008-06-30 12:39:51 UTC (rev 7624)
+++ people/brad-guest/unstable/trunk/plib/debian/changelog 2008-06-30 14:53:36 UTC (rev 7625)
@@ -3,6 +3,10 @@
* Bump shilbs version to 1.8.4-9. Closes: #487367
* Update Standards-Version to 3.8.0. (No changes)
* Reorder dh_* rules into correct order.
+ * Add patch to fix powerpc endianness problems.
+ - ssgLoadMD2.cxx.diff - Thanks to
+ + Gerfried Fuchs <rhonda at deb.at>
+ + <harald at the-develop.net>
-- Bradley Smith <brad at brad-smith.co.uk> Sat, 21 Jun 2008 11:15:00 +0100
Modified: people/brad-guest/unstable/trunk/plib/debian/patches/series
===================================================================
--- people/brad-guest/unstable/trunk/plib/debian/patches/series 2008-06-30 12:39:51 UTC (rev 7624)
+++ people/brad-guest/unstable/trunk/plib/debian/patches/series 2008-06-30 14:53:36 UTC (rev 7625)
@@ -1,3 +1,4 @@
build_shared_libs
remove_pthread_link
misc_fixes
+ssgLoadMD2.cxx.diff
Added: people/brad-guest/unstable/trunk/plib/debian/patches/ssgLoadMD2.cxx.diff
===================================================================
--- people/brad-guest/unstable/trunk/plib/debian/patches/ssgLoadMD2.cxx.diff (rev 0)
+++ people/brad-guest/unstable/trunk/plib/debian/patches/ssgLoadMD2.cxx.diff 2008-06-30 14:53:36 UTC (rev 7625)
@@ -0,0 +1,70 @@
+--- plib-1.8.4/src/ssg/ssgLoadMD2.cxx 2002-09-02 08:05:48.000000000 +0200
++++ qcake-0.6.3/src/loadMD2.cpp 2008-03-06 15:34:08.000000000 +0100
+@@ -199,7 +199,14 @@
+
+ static void read_header()
+ {
+- fread(&header, sizeof(t_model), 1, loader_fd);
++ int *pointer;
++
++ pointer = (int *)&header;
++
++ for(int a=0;a<17;a++)
++ {
++ pointer[a] = ulEndianReadLittle32(loader_fd);
++ }
+ }
+
+ static void read_frames(int offset)
+@@ -212,25 +228,46 @@
+ for(int i=0; i<header.numFrames; i++){
+ vertices[i] = new t_vertex[header.numVertices];
+
+- fread(&frames[i], sizeof(t_frame), 1, loader_fd);
+- fread(vertices[i], sizeof(t_vertex), header.numVertices, loader_fd);
+- }
++
++ frames[i].scale[0]= ulEndianReadLittleFloat(loader_fd);
++ frames[i].scale[1]= ulEndianReadLittleFloat(loader_fd);
++ frames[i].scale[2]= ulEndianReadLittleFloat(loader_fd);
++ frames[i].translate[0]= ulEndianReadLittleFloat(loader_fd);
++ frames[i].translate[1]= ulEndianReadLittleFloat(loader_fd);
++ frames[i].translate[2]= ulEndianReadLittleFloat(loader_fd);
++ fread(frames[i].name, sizeof(char), 16, loader_fd);
++
++ fread(vertices[i], sizeof(t_vertex), header.numVertices, loader_fd);
++
++ }
+ }
+
+ static void read_uvcoords(int offset)
+ {
+ fseek(loader_fd, offset, SEEK_SET);
+
+ uvs = new t_tcoord[header.numTexCoords];
+- fread(uvs, sizeof(t_tcoord), header.numTexCoords, loader_fd);
++ for(int a=0;a<header.numTexCoords;a++)
++ {
++ uvs[a].s=ulEndianReadLittle16(loader_fd);
++ uvs[a].t=ulEndianReadLittle16(loader_fd);
++ }
+ }
+
+ static void read_triangles(int offset)
+ {
+ fseek(loader_fd, offset, SEEK_SET);
+
+ triangles = new t_triangle[header.numTriangles];
+- fread(triangles, sizeof(t_triangle), header.numTriangles, loader_fd);
++ for(int a=0;a<header.numTriangles;a++)
++ {
++ triangles[a].vertexIndices[0]=ulEndianReadLittle16(loader_fd);
++ triangles[a].vertexIndices[1]=ulEndianReadLittle16(loader_fd);
++ triangles[a].vertexIndices[2]=ulEndianReadLittle16(loader_fd);
++ triangles[a].textureIndices[0]=ulEndianReadLittle16(loader_fd);
++ triangles[a].textureIndices[1]=ulEndianReadLittle16(loader_fd);
++ triangles[a].textureIndices[2]=ulEndianReadLittle16(loader_fd);
++ }
+ }
+
+ static void read_skins(int offset)
More information about the Pkg-games-commits
mailing list