summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Bogusz2012-01-08 11:14:37 (GMT)
committercvs2git2012-06-24 12:13:13 (GMT)
commit4592bc095778c2811706a35bd2d8889f1da028e3 (patch)
treed96549cc1a7f7869eb43377ddcb2a54be456b659
parenta0a5ac0488d9544f81a8beb9f47970430da1561e (diff)
downloadGlide_V3-DRI-4592bc095778c2811706a35bd2d8889f1da028e3.zip
Glide_V3-DRI-4592bc095778c2811706a35bd2d8889f1da028e3.tar.gz
- merged gcc4 patch and more complete no_redefine_macro patch (based on Debian patches) from Glide_V5-DRI
- dropped buggy gcc 4 parts from gcc34 patch (introduced wrong pointer arithmetic) Changed files: Glide_V3-DRI.spec -> 1.53 glide-gcc34.patch -> 1.3 glide-gcc4.patch -> 1.3 glide-no_redefine_macro.patch -> 1.2
-rw-r--r--Glide_V3-DRI.spec10
-rw-r--r--glide-gcc34.patch197
-rw-r--r--glide-gcc4.patch439
-rw-r--r--glide-no_redefine_macro.patch57
4 files changed, 491 insertions, 212 deletions
diff --git a/Glide_V3-DRI.spec b/Glide_V3-DRI.spec
index d5ed458..0ad17c6 100644
--- a/Glide_V3-DRI.spec
+++ b/Glide_V3-DRI.spec
@@ -20,7 +20,8 @@ Patch5: glide-gcc33.patch
Patch6: glide-ioctl.patch
Patch7: glide-morearchs.patch
Patch8: glide-gcc34.patch
-Patch9: glide-no_redefine_macro.patch
+Patch9: glide-gcc4.patch
+Patch10: glide-no_redefine_macro.patch
URL: http://glide.sourceforge.net/
BuildRequires: autoconf
BuildRequires: automake
@@ -88,7 +89,8 @@ lub Voodoo3.
%patch6 -p1
%patch7 -p1
%patch8 -p1
-%patch9 -p1
+%patch9 -p2
+%patch10 -p1
%build
%{__libtoolize}
@@ -136,8 +138,8 @@ gzip -9nf $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/tests/*.3df
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
diff --git a/glide-gcc34.patch b/glide-gcc34.patch
index 1d30cf9..9037860 100644
--- a/glide-gcc34.patch
+++ b/glide-gcc34.patch
@@ -131,200 +131,3 @@
FxU32
hwcInitAGPFifo(hwcBoardInfo *bInfo, FxBool enableHoleCounting)
{
---- glide3x-20010309/h3/glide3/src/gaa.c.org 2006-12-23 11:51:47.967058500 +0100
-+++ glide3x-20010309/h3/glide3/src/gaa.c 2006-12-23 12:04:56.144316500 +0100
-@@ -614,7 +614,7 @@
- e = pointers;
- if (mode)
- e = *(float **)e;
-- (float *)pointers += stride;
-+ pointers += stride;
-
- ptX = FARRAY(e, gc->state.vData.vertexInfo.offset);
- ptY = FARRAY(e, gc->state.vData.vertexInfo.offset+4);
-@@ -715,7 +715,7 @@
- if (mode)
- e = *(float **)e;
- oow = 1.0f / FARRAY(e, gc->state.vData.wInfo.offset);
-- (float *)pointers += stride;
-+ pointers += stride;
-
- ptX = FARRAY(e, gc->state.vData.vertexInfo.offset)
- *oow*gc->state.Viewport.hwidth+gc->state.Viewport.ox;
-@@ -837,9 +837,9 @@
- v1 = *(float **)v1;
- v2 = *(float **)v2;
- }
-- (float *)pointers += stride;
-+ pointers += stride;
- if (ltype == GR_LINES)
-- (float *)pointers += stride;
-+ pointers += stride;
-
- /* draw from low Y to high Y */
- if (FARRAY(v2, gc->state.vData.vertexInfo.offset+4) < FARRAY(v1, gc->state.vData.vertexInfo.offset+4)) {
-@@ -1018,9 +1018,9 @@
- v1 = *(float **)v1;
- v2 = *(float **)v2;
- }
-- (float *)pointers += stride;
-+ pointers += stride;
- if (ltype == GR_LINES)
-- (float *)pointers += stride;
-+ pointers += stride;
- owa = oowa = 1.0f / FARRAY(v1, gc->state.vData.wInfo.offset);
- owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
- }
-@@ -1032,7 +1032,7 @@
- v1 = *(float **)v1;
- v2 = *(float **)v2;
- }
-- (float *)pointers += stride;
-+ pointers += stride;
- owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
- }
-
-@@ -1366,7 +1366,7 @@
- b = *(float **)b;
- c = *(float **)c;
- }
-- (float *)pointers += stride*3;
-+ pointers += stride*3;
-
- /* move culling test to here */
- {
-@@ -1540,7 +1540,7 @@
- b = *(float **)b;
- c = *(float **)c;
- }
-- (float *)pointers += stride*3;
-+ pointers += stride*3;
- oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
- oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
- oowc = 1.0f / FARRAY(c, gc->state.vData.wInfo.offset);
-@@ -1705,7 +1705,7 @@
- if (type == kSetupFan) {
- v[0] = (mode == 0) ? pointers : *(float **)pointers;
- while (sCount--) {
-- (float *)pointers += stride;
-+ pointers += stride;
- if (mode) {
- v[1] = *(float **)pointers;
- v[2] = *((float **)pointers+1);
-@@ -1747,7 +1747,7 @@
- _grAADrawTriangles(1, type, 3, v);
- else
- _grAAVpDrawTriangles(1, type, 3, v);
-- (float *)pointers += stride;
-+ pointers += stride;
- flip = ~flip;
- }
- flip = ~flip;
---- glide3x-20010309/h3/glide3/src/gdraw.c.org 2006-12-23 12:08:15.640784250 +0100
-+++ glide3x-20010309/h3/glide3/src/gdraw.c 2006-12-23 12:09:03.163754250 +0100
-@@ -403,7 +403,7 @@
- vPtr = pointers;
- if (mode) vPtr = *(float **)vPtr;
-
-- (float *)pointers += stride;
-+ pointers += stride;
-
- GDBG_INFO_MORE(gc->myLevel, "(%f %f)\n",
- FARRAY(vPtr,gc->state.vData.vertexInfo.offset),
-@@ -492,7 +492,7 @@
- if (mode)
- vPtr = *(float **)vPtr;
- oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset);
-- (float *)pointers += stride;
-+ pointers += stride;
-
- {
- FxU32 x, y;
-@@ -617,9 +617,9 @@
- a = *(float **)a;
- b = *(float **)b;
- }
-- (float *)pointers += stride;
-+ pointers += stride;
- if (ltype == GR_LINES)
-- (float *)pointers += stride;
-+ pointers += stride;
-
- /*
- ** compute absolute deltas and draw from low Y to high Y
-@@ -779,7 +779,7 @@
- a = *(float **)a;
- b = *(float **)b;
- }
-- (float *)pointers += stride;
-+ pointers += stride;
- owa = oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
- owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
- pointers += stride;
-@@ -782,7 +782,7 @@
- (float *)pointers += stride;
- owa = oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
- owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
-- (float *)pointers += stride;
-+ pointers += stride;
- }
- else {
- owa = oowa = oowb;
-@@ -792,7 +792,7 @@
- a = *(float **)a;
- b = *(float **)b;
- }
-- (float *)pointers += stride;
-+ pointers += stride;
- owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
- }
- fay = tmp1 = FARRAY(a, gc->state.vData.vertexInfo.offset+4)
-@@ -944,7 +944,7 @@
- vPtr = pointers;
- if (mode)
- vPtr = *(float **)vPtr;
-- (float *)pointers += stride;
-+ pointers += stride;
-
- i = gc->tsuDataList[dataElem];
-
-@@ -984,7 +984,7 @@
- *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
- TRI_SETF(FARRAY(vPtr, 4)
- *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
-- (float *)pointers += stride;
-+ pointers += stride;
-
- TRI_VP_SETFS(vPtr,oow);
- }
---- glide3x-20010309/h3/glide3/src/gstrip.c.org 2006-12-23 12:13:50.669722250 +0100
-+++ glide3x-20010309/h3/glide3/src/gstrip.c 2006-12-23 12:14:04.282573000 +0100
-@@ -188,7 +188,7 @@
- vPtr = pointers;
- if (mode)
- vPtr = *(float **)vPtr;
-- (float *)pointers += stride;
-+ pointers += stride;
-
- TRI_SETF(FARRAY(vPtr, 0));
- dataElem = 0;
-@@ -228,7 +228,7 @@
- *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
- TRI_SETF(FARRAY(vPtr, 4)
- *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
-- (float *)pointers += stride;
-+ pointers += stride;
-
- TRI_VP_SETFS(vPtr, oow);
- }
---- glide3x-20010309/h3/glide3/src/distrip.c.org 2006-12-23 12:18:36.047557250 +0100
-+++ glide3x-20010309/h3/glide3/src/distrip.c 2006-12-23 12:18:46.088184750 +0100
-@@ -450,7 +450,7 @@
- else {
- while ((int)Count >= 3) {
- grDrawTriangle(*(float **)pointers, *((float **)pointers+1), *((float **)pointers+2));
-- (float *)pointers += 3;
-+ pointers += 3;
- Count -= 3;
- }
- }
diff --git a/glide-gcc4.patch b/glide-gcc4.patch
new file mode 100644
index 0000000..ded58c2
--- /dev/null
+++ b/glide-gcc4.patch
@@ -0,0 +1,439 @@
+Status: applied
+
+Index: b/glide3x/h3/glide3/src/gaa.c
+===================================================================
+--- a/glide3x/h3/glide3/src/gaa.c
++++ b/glide3x/h3/glide3/src/gaa.c
+@@ -616,7 +616,7 @@ _grAADrawPoints(FxI32 mode, FxI32 count,
+ e = pointers;
+ if (mode)
+ e = *(float **)e;
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ ptX = FARRAY(e, gc->state.vData.vertexInfo.offset);
+ ptY = FARRAY(e, gc->state.vData.vertexInfo.offset+4);
+@@ -717,7 +717,7 @@ _grAADrawPoints(FxI32 mode, FxI32 count,
+ if (mode)
+ e = *(float **)e;
+ oow = 1.0f / FARRAY(e, gc->state.vData.wInfo.offset);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ ptX = FARRAY(e, gc->state.vData.vertexInfo.offset)
+ *oow*gc->state.Viewport.hwidth+gc->state.Viewport.ox;
+@@ -842,9 +842,9 @@ _grAADrawLineStrip(FxI32 mode, FxI32 lty
+ v1 = *(float **)v1;
+ v2 = *(float **)v2;
+ }
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ if (ltype == GR_LINES)
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ /* draw from low Y to high Y */
+ if (FARRAY(v2, gc->state.vData.vertexInfo.offset+4) < FARRAY(v1, gc->state.vData.vertexInfo.offset+4)) {
+@@ -1023,9 +1023,9 @@ _grAADrawLineStrip(FxI32 mode, FxI32 lty
+ v1 = *(float **)v1;
+ v2 = *(float **)v2;
+ }
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ if (ltype == GR_LINES)
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ owa = oowa = 1.0f / FARRAY(v1, gc->state.vData.wInfo.offset);
+ owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
+ }
+@@ -1037,7 +1037,7 @@ _grAADrawLineStrip(FxI32 mode, FxI32 lty
+ v1 = *(float **)v1;
+ v2 = *(float **)v2;
+ }
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
+ }
+
+@@ -1373,7 +1373,7 @@ _grAADrawTriangles(FxI32 mode, FxI32 tty
+ b = *(float **)b;
+ c = *(float **)c;
+ }
+- (float *)pointers += stride*3;
++ pointers = (float *)pointers + stride*3;
+
+ /* move culling test to here */
+ {
+@@ -1549,7 +1549,7 @@ _grAAVpDrawTriangles(FxI32 mode, FxI32 t
+ b = *(float **)b;
+ c = *(float **)c;
+ }
+- (float *)pointers += stride*3;
++ pointers = (float *)pointers + stride*3;
+ oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
+ oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
+ oowc = 1.0f / FARRAY(c, gc->state.vData.wInfo.offset);
+@@ -1716,7 +1716,7 @@ _grAADrawVertexList(FxU32 type, FxI32 mo
+ if (type == kSetupFan) {
+ v[0] = (mode == 0) ? pointers : *(float **)pointers;
+ while (sCount--) {
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ if (mode) {
+ v[1] = *(float **)pointers;
+ v[2] = *((float **)pointers+1);
+@@ -1758,7 +1758,7 @@ _grAADrawVertexList(FxU32 type, FxI32 mo
+ _grAADrawTriangles(1, type, 3, v);
+ else
+ _grAAVpDrawTriangles(1, type, 3, v);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ flip = ~flip;
+ }
+ flip = ~flip;
+Index: b/glide3x/h3/glide3/src/gdraw.c
+===================================================================
+--- a/glide3x/h3/glide3/src/gdraw.c
++++ b/glide3x/h3/glide3/src/gdraw.c
+@@ -402,7 +402,7 @@ _grDrawPoints(FxI32 mode, FxI32 count, v
+ vPtr = pointers;
+ if (mode) vPtr = *(float **)vPtr;
+
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ GDBG_INFO_MORE(gc->myLevel, "(%f %f)\n",
+ FARRAY(vPtr,gc->state.vData.vertexInfo.offset),
+@@ -491,7 +491,7 @@ _grDrawPoints(FxI32 mode, FxI32 count, v
+ if (mode)
+ vPtr = *(float **)vPtr;
+ oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ {
+ FxU32 x, y;
+@@ -616,9 +616,9 @@ _grDrawLineStrip(FxI32 mode, FxI32 ltype
+ a = *(float **)a;
+ b = *(float **)b;
+ }
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ if (ltype == GR_LINES)
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ /*
+ ** compute absolute deltas and draw from low Y to high Y
+@@ -778,10 +778,10 @@ _grDrawLineStrip(FxI32 mode, FxI32 ltype
+ a = *(float **)a;
+ b = *(float **)b;
+ }
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ owa = oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
+ owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ }
+ else {
+ owa = oowa = oowb;
+@@ -791,7 +791,7 @@ _grDrawLineStrip(FxI32 mode, FxI32 ltype
+ a = *(float **)a;
+ b = *(float **)b;
+ }
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
+ }
+ fay = tmp1 = FARRAY(a, gc->state.vData.vertexInfo.offset+4)
+@@ -944,7 +944,7 @@ _grDrawTriangles_Default(FxI32 mode, FxI
+ vPtr = pointers;
+ if (mode)
+ vPtr = *(float **)vPtr;
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ i = gc->tsuDataList[dataElem];
+
+@@ -984,7 +984,7 @@ _grDrawTriangles_Default(FxI32 mode, FxI
+ *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
+ TRI_SETF(FARRAY(vPtr, 4)
+ *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ TRI_VP_SETFS(vPtr,oow);
+ }
+Index: b/glide3x/h3/glide3/src/gstrip.c
+===================================================================
+--- a/glide3x/h3/glide3/src/gstrip.c
++++ b/glide3x/h3/glide3/src/gstrip.c
+@@ -190,7 +190,7 @@ _grDrawVertexList(FxU32 pktype, FxU32 ty
+ vPtr = pointers;
+ if (mode)
+ vPtr = *(float **)vPtr;
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ TRI_SETF(FARRAY(vPtr, 0));
+ dataElem = 0;
+@@ -230,7 +230,7 @@ _grDrawVertexList(FxU32 pktype, FxU32 ty
+ *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
+ TRI_SETF(FARRAY(vPtr, 4)
+ *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ TRI_VP_SETFS(vPtr, oow);
+ }
+Index: b/glide3x/h3/glide3/src/distrip.c
+===================================================================
+--- a/glide3x/h3/glide3/src/distrip.c
++++ b/glide3x/h3/glide3/src/distrip.c
+@@ -450,7 +450,7 @@ GR_DIENTRY(grDrawVertexArray, void , (Fx
+ else {
+ while ((int)Count >= 3) {
+ grDrawTriangle(*(float **)pointers, *((float **)pointers+1), *((float **)pointers+2));
+- (float *)pointers += 3;
++ pointers = (float *)pointers + 3;
+ Count -= 3;
+ }
+ }
+Index: b/glide3x/h5/glide3/src/gaa.c
+===================================================================
+--- a/glide3x/h5/glide3/src/gaa.c
++++ b/glide3x/h5/glide3/src/gaa.c
+@@ -628,7 +628,7 @@ _grAADrawPoints(FxI32 mode, FxI32 count,
+ e = pointers;
+ if (mode)
+ e = *(float **)e;
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ ptX = FARRAY(e, gc->state.vData.vertexInfo.offset);
+ ptY = FARRAY(e, gc->state.vData.vertexInfo.offset+4);
+@@ -729,7 +729,7 @@ _grAADrawPoints(FxI32 mode, FxI32 count,
+ if (mode)
+ e = *(float **)e;
+ oow = 1.0f / FARRAY(e, gc->state.vData.wInfo.offset);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ ptX = FARRAY(e, gc->state.vData.vertexInfo.offset)
+ *oow*gc->state.Viewport.hwidth+gc->state.Viewport.ox;
+@@ -856,9 +856,9 @@ _grAADrawLineStrip(FxI32 mode, FxI32 lty
+ v1 = *(float **)v1;
+ v2 = *(float **)v2;
+ }
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ if (ltype == GR_LINES)
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ /* draw from low Y to high Y */
+ if (FARRAY(v2, gc->state.vData.vertexInfo.offset+4) < FARRAY(v1, gc->state.vData.vertexInfo.offset+4)) {
+@@ -1037,9 +1037,9 @@ _grAADrawLineStrip(FxI32 mode, FxI32 lty
+ v1 = *(float **)v1;
+ v2 = *(float **)v2;
+ }
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ if (ltype == GR_LINES)
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ owa = oowa = 1.0f / FARRAY(v1, gc->state.vData.wInfo.offset);
+ owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
+ }
+@@ -1051,7 +1051,7 @@ _grAADrawLineStrip(FxI32 mode, FxI32 lty
+ v1 = *(float **)v1;
+ v2 = *(float **)v2;
+ }
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
+ }
+
+@@ -1391,7 +1391,7 @@ _grAADrawTriangles(FxI32 mode, FxI32 tty
+ b = *(float **)b;
+ c = *(float **)c;
+ }
+- (float *)pointers += stride*3;
++ pointers = (float *)pointers + stride*3;
+
+ /* move culling test to here */
+ {
+@@ -1567,7 +1567,7 @@ _grAAVpDrawTriangles(FxI32 mode, FxI32 t
+ b = *(float **)b;
+ c = *(float **)c;
+ }
+- (float *)pointers += stride*3;
++ pointers = (float *)pointers + stride*3;
+ oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
+ oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
+ oowc = 1.0f / FARRAY(c, gc->state.vData.wInfo.offset);
+@@ -1734,7 +1734,7 @@ _grAADrawVertexList(FxU32 type, FxI32 mo
+ if (type == kSetupFan) {
+ v[0] = (mode == 0) ? pointers : *(float **)pointers;
+ while (sCount--) {
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ if (mode) {
+ v[1] = *(float **)pointers;
+ v[2] = *((float **)pointers+1);
+@@ -1776,7 +1776,7 @@ _grAADrawVertexList(FxU32 type, FxI32 mo
+ _grAADrawTriangles(1, type, 3, v);
+ else
+ _grAAVpDrawTriangles(1, type, 3, v);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ flip = ~flip;
+ }
+ flip = ~flip;
+Index: b/glide3x/h5/glide3/src/gdraw.c
+===================================================================
+--- a/glide3x/h5/glide3/src/gdraw.c
++++ b/glide3x/h5/glide3/src/gdraw.c
+@@ -472,7 +472,7 @@ _grDrawPoints(FxI32 mode, FxI32 count, v
+ vPtr = pointers;
+ if (mode) vPtr = *(float **)vPtr;
+
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ GDBG_INFO_MORE(gc->myLevel, "(%f %f)\n",
+ FARRAY(vPtr,gc->state.vData.vertexInfo.offset),
+@@ -554,7 +554,7 @@ _grDrawPoints(FxI32 mode, FxI32 count, v
+ vPtr = pointers;
+ if (mode) vPtr = *(float **)vPtr;
+
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ GDBG_INFO_MORE(gc->myLevel, "(%f %f)\n",
+ FARRAY(vPtr,gc->state.vData.vertexInfo.offset),
+@@ -665,7 +665,7 @@ _grDrawPoints(FxI32 mode, FxI32 count, v
+ if (mode)
+ vPtr = *(float **)vPtr;
+ oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ {
+ float fx, fy;
+@@ -802,9 +802,9 @@ _grDrawLineStrip(FxI32 mode, FxI32 ltype
+ a = *(float **)a;
+ b = *(float **)b;
+ }
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ if (ltype == GR_LINES)
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ /*
+ ** compute absolute deltas and draw from low Y to high Y
+@@ -964,10 +964,10 @@ _grDrawLineStrip(FxI32 mode, FxI32 ltype
+ a = *(float **)a;
+ b = *(float **)b;
+ }
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ owa = oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
+ owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ }
+ else {
+ owa = oowa = oowb;
+@@ -977,7 +977,7 @@ _grDrawLineStrip(FxI32 mode, FxI32 ltype
+ a = *(float **)a;
+ b = *(float **)b;
+ }
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
+ }
+ fay = tmp1 = FARRAY(a, gc->state.vData.vertexInfo.offset+4)
+@@ -1125,7 +1125,7 @@ _grDrawTriangles_Default(FxI32 mode, FxI
+ vPtr = pointers;
+ if (mode)
+ vPtr = *(float **)vPtr;
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ i = gc->tsuDataList[dataElem];
+
+@@ -1165,7 +1165,7 @@ _grDrawTriangles_Default(FxI32 mode, FxI
+ *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
+ TRI_SETF(FARRAY(vPtr, 4)
+ *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ TRI_VP_SETFS(vPtr,oow);
+ }
+Index: b/glide3x/h5/glide3/src/gstrip.c
+===================================================================
+--- a/glide3x/h5/glide3/src/gstrip.c
++++ b/glide3x/h5/glide3/src/gstrip.c
+@@ -214,7 +214,7 @@ _grDrawVertexList(FxU32 pktype, FxU32 ty
+ vPtr = pointers;
+ if (mode)
+ vPtr = *(float **)vPtr;
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ TRI_SETF(FARRAY(vPtr, 0));
+ dataElem = 0;
+@@ -254,7 +254,7 @@ _grDrawVertexList(FxU32 pktype, FxU32 ty
+ *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
+ TRI_SETF(FARRAY(vPtr, 4)
+ *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ TRI_VP_SETFS(vPtr, oow);
+ }
+Index: b/glide3x/h5/glide3/src/distrip.c
+===================================================================
+--- a/glide3x/h5/glide3/src/distrip.c
++++ b/glide3x/h5/glide3/src/distrip.c
+@@ -458,7 +458,7 @@ GR_DIENTRY(grDrawVertexArray, void , (Fx
+ else {
+ while ((int)Count >= 3) {
+ grDrawTriangle(*(float **)pointers, *((float **)pointers+1), *((float **)pointers+2));
+- (float *)pointers += 3;
++ pointers = (float *)pointers + 3;
+ Count -= 3;
+ }
+ }
+Index: b/glide3x/h5/glide3/src/glfb.c
+===================================================================
+--- a/glide3x/h5/glide3/src/glfb.c
++++ b/glide3x/h5/glide3/src/glfb.c
+@@ -1333,8 +1333,10 @@ GR_ENTRY(grLfbReadRegion, FxBool, (GrBuf
+ while(src_height--)
+ {
+ /* adjust starting alignment */
+- if (((FxU32)src)&3)
+- *((FxU16 *)dst)++=*((FxU16 *)src)++;
++ if (((FxU32)src)&3) {
++ *((FxU16 *)dst)=*((FxU16 *)src);
++ dst = ((FxU16 *)dst)+1; src = ((FxU16 *)src);
++ }
+
+ /* read in dwords of pixels */
+ if(length)
+@@ -1353,8 +1355,8 @@ GR_ENTRY(grLfbReadRegion, FxBool, (GrBuf
+ *((FxU16 *)(((AnyPtr)dst) + byte_index))=*((FxU16 *)(((AnyPtr)src) + byte_index));
+ }
+ /* adjust for next line */
+- ((FxU8 *)src)+=src_adjust;
+- ((FxU8 *)dst)+=dst_adjust;
++ src=((FxU8 *)src)+src_adjust;
++ dst=((FxU8 *)dst)+dst_adjust;
+ }
+ rv=FXTRUE;
+ /* unlock buffer */
diff --git a/glide-no_redefine_macro.patch b/glide-no_redefine_macro.patch
index 4cdc0d7..4bd3ec4 100644
--- a/glide-no_redefine_macro.patch
+++ b/glide-no_redefine_macro.patch
@@ -1,16 +1,15 @@
---- glide3x-20010309-orig/h3/glide3/src/xdraw2.inc.S 2006-06-03 00:42:40.000000000 +0000
-+++ glide3x-20010309/h3/glide3/src/xdraw2.inc.S 2006-06-03 13:09:54.000000000 +0000
-@@ -55,7 +55,8 @@
-
+--- glide3x.orig/h3/glide3/src/xdraw2.inc.S
++++ glide3x/h3/glide3/src/xdraw2.inc.S
+@@ -59,6 +59,8 @@
.file "xdraw2.inc.S"
--
-+#ifndef XDRAW2_INC_MACROS_0
-+#define XDRAW2_INC_MACROS_0
+
++#ifndef XDRAW2_FIFO_MACROS
++#define XDRAW2_FIFO_MACROS
.macro GR_FIFO_WRITE __addr __offset __data
mov \__data , \__offset(\__addr)
.endm /* GR_FIFO_WRITE */
-@@ -69,6 +70,7 @@
+@@ -72,6 +74,7 @@
.macro WRITE_MM1LOW_FIFO
movd %mm1 , (%ebp) /* store current param | previous param */
.endm /* WRITE_MM1LOW_FIFO */
@@ -18,14 +17,50 @@
#if 0
-@@ -812,9 +814,12 @@
+@@ -815,9 +818,12 @@ LOCAL(nocull):
+ #define packCol %edi
+ #define tempVal %edi
+
++#ifndef XDRAW2_FIFO_MACROS
++#define XDRAW2_FIFO_MACROS
+ .macro GR_FIFO_WRITE __addr __offset __data
+ mov \__data , \__offset(\__addr)
+ .endm /* GR_FIFO_WRITE */
++#endif
+
+ .align 4
+ LOCAL(__triBegin):
+--- glide3x.orig/h5/glide3/src/xdraw2.inc.s
++++ glide3x/h5/glide3/src/xdraw2.inc.s
+@@ -81,6 +81,8 @@
+ .file "xdraw2.inc.S"
+
+
++#ifndef XDRAW2_FIFO_MACROS
++#define XDRAW2_FIFO_MACROS
+ .macro GR_FIFO_WRITE __addr __offset __data
+ #ifdef HAL_CSIM
+ pushad
+@@ -121,6 +123,7 @@
+ movd %mm1 , (%ebp) /* store current param | previous param */
+ #endif
+ .endm /* WRITE_MM1LOW_FIFO */
++#endif
+
+
+ #if 0
+@@ -867,6 +870,8 @@ LOCAL(nocull):
#define packCol %edi
#define tempVal %edi
-+#ifndef XDRAW2_INC_MACROS_1
-+#define XDRAW2_INC_MACROS_1
++#ifndef XDRAW2_FIFO_MACROS
++#define XDRAW2_FIFO_MACROS
.macro GR_FIFO_WRITE __addr __offset __data
+ #ifdef HAL_CSIM
+ pushad
+@@ -884,6 +889,7 @@ LOCAL(nocull):
mov \__data , \__offset(\__addr)
+ #endif
.endm /* GR_FIFO_WRITE */
+#endif