Status: applied diff -urN tmp/h3/glide3/src/gaa.c glide3x/h3/glide3/src/gaa.c --- tmp/h3/glide3/src/gaa.c 2004-12-22 08:35:39.401766000 +0100 +++ h3/glide3/src/gaa.c 2004-12-22 08:36:20.783475256 +0100 @@ -616,7 +616,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ b = *(float **)b; c = *(float **)c; } - (float *)pointers += stride*3; + pointers = (float *)pointers + stride*3; /* move culling test to here */ { @@ -1549,7 +1549,7 @@ 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 @@ 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 @@ _grAADrawTriangles(1, type, 3, v); else _grAAVpDrawTriangles(1, type, 3, v); - (float *)pointers += stride; + pointers = (float *)pointers + stride; flip = ~flip; } flip = ~flip; diff -urN tmp/glide3x/h3/glide3/src/gdraw.c h3/glide3/src/gdraw.c --- tmp/glide3x/h3/glide3/src/gdraw.c 2004-12-22 08:37:34.381286000 +0100 +++ h3/glide3/src/gdraw.c 2004-12-22 13:47:39.613861416 +0100 @@ -402,7 +402,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ vPtr = pointers; if (mode) vPtr = *(float **)vPtr; - (float *)pointers += stride; + pointers = (float *)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 = (float *)pointers + stride; TRI_VP_SETFS(vPtr,oow); } diff -urN tmp/glide3x/h3/glide3/src/gstrip.c h3/glide3/src/gstrip.c --- tmp/glide3x/h3/glide3/src/gstrip.c 2004-12-22 08:37:34.385286000 +0100 +++ h3/glide3/src/gstrip.c 2004-12-22 14:19:46.151983104 +0100 @@ -190,7 +190,7 @@ 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 @@ *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); } diff -urN tmp/glide3x/h3/glide3/src/distrip.c h3/glide3/src/distrip.c --- tmp/glide3x/h3/glide3/src/distrip.c 2004-12-22 14:21:00.772639000 +0100 +++ h3/glide3/src/distrip.c 2004-12-22 14:26:15.773751592 +0100 @@ -450,7 +450,7 @@ else { while ((int)Count >= 3) { grDrawTriangle(*(float **)pointers, *((float **)pointers+1), *((float **)pointers+2)); - (float *)pointers += 3; + pointers = (float *)pointers + 3; Count -= 3; } } diff -urN tmp/glide3x/h5/glide3/src/gaa.c h5/glide3/src/gaa.c --- tmp/glide3x/h5/glide3/src/gaa.c 2004-12-22 14:27:15.453678000 +0100 +++ h5/glide3/src/gaa.c 2004-12-22 14:37:32.272908088 +0100 @@ -628,7 +628,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ b = *(float **)b; c = *(float **)c; } - (float *)pointers += stride*3; + pointers = (float *)pointers + stride*3; /* move culling test to here */ { @@ -1567,7 +1567,7 @@ 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 @@ 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 @@ _grAADrawTriangles(1, type, 3, v); else _grAAVpDrawTriangles(1, type, 3, v); - (float *)pointers += stride; + pointers = (float *)pointers + stride; flip = ~flip; } flip = ~flip; diff -urN tmp/glide3x/h5/glide3/src/gdraw.c h5/glide3/src/gdraw.c --- tmp/glide3x/h5/glide3/src/gdraw.c 2004-12-22 15:35:28.326467000 +0100 +++ h5/glide3/src/gdraw.c 2004-12-22 15:43:54.196563680 +0100 @@ -472,7 +472,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ vPtr = pointers; if (mode) vPtr = *(float **)vPtr; - (float *)pointers += stride; + pointers = (float *)pointers + stride; i = gc->tsuDataList[dataElem]; @@ -1165,7 +1165,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 = (float *)pointers + stride; TRI_VP_SETFS(vPtr,oow); } diff -urN tmp/glide3x/h5/glide3/src/gstrip.c h5/glide3/src/gstrip.c --- tmp/glide3x/h5/glide3/src/gstrip.c 2004-12-22 15:44:13.520625000 +0100 +++ h5/glide3/src/gstrip.c 2004-12-22 15:47:32.305406096 +0100 @@ -214,7 +214,7 @@ 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 @@ *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); } diff -urN tmp/glide3x/h5/glide3/src/distrip.c h5/glide3/src/distrip.c --- tmp/glide3x/h5/glide3/src/distrip.c 2004-12-22 15:52:37.342033000 +0100 +++ h5/glide3/src/distrip.c 2004-12-22 15:56:03.639671472 +0100 @@ -458,7 +458,7 @@ else { while ((int)Count >= 3) { grDrawTriangle(*(float **)pointers, *((float **)pointers+1), *((float **)pointers+2)); - (float *)pointers += 3; + pointers = (float *)pointers + 3; Count -= 3; } } diff -urN tmp/glide3x/h5/glide3/src/glfb.c h5/glide3/src/glfb.c --- tmp/glide3x/h5/glide3/src/glfb.c 2004-12-22 16:06:23.017511000 +0100 +++ h5/glide3/src/glfb.c 2004-12-22 16:18:44.005864376 +0100 @@ -1333,8 +1333,10 @@ while(src_height--) { /* adjust starting alignment */ - if (((AnyPtr)src)&3) - *((FxU16 *)dst)++=*((FxU16 *)src)++; + if (((AnyPtr)src)&3) { + *((FxU16 *)dst)=*((FxU16 *)src); + dst = ((FxU16 *)dst)+1; src = ((FxU16 *)src); + } /* read in dwords of pixels */ if(length) @@ -1353,8 +1355,8 @@ *((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 */