X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fbumps.c;h=5b73e7c569002079a56035bae2f705590c9021c2;hb=96a411663168b0ba5432b407a83be55f3df0c802;hp=28c58aacd5089dd6d43f010a9efea471350a132c;hpb=40eacb5812ef7c0e3374fb139afbb4f5bc8bbfb5;p=xscreensaver diff --git a/hacks/bumps.c b/hacks/bumps.c index 28c58aac..5b73e7c5 100644 --- a/hacks/bumps.c +++ b/hacks/bumps.c @@ -313,7 +313,7 @@ void InitBumpMap( SBumps *pBumps, XWindowAttributes *pXWinAttribs ) p = XCreatePixmap(pBumps->pDisplay, pBumps->Win, pXWinAttribs->width, pXWinAttribs->height, pXWinAttribs->depth); - load_random_image (pXWinAttribs->screen, pBumps->Win, p); + load_random_image (pXWinAttribs->screen, pBumps->Win, p, NULL); pScreenImage = XGetImage( pBumps->pDisplay, p, 0, 0, pBumps->iWinWidth, pBumps->iWinHeight, ~0L, ZPixmap ); XFreePixmap (pBumps->pDisplay, p); @@ -374,7 +374,7 @@ void InitBumpMap( SBumps *pBumps, XWindowAttributes *pXWinAttribs ) free( aColors ); } -/* Soften the bump map. This is to avoid pixellated-looking ridges. +/* Soften the bump map. This is to avoid pixelated-looking ridges. * |-----|-----|-----| * | 0% |12.5%| 0% | The adjacent pixels are averaged together * |-----|-----|-----| first. Then than value is averaged with @@ -442,7 +442,9 @@ void Execute( SBumps *pBumps ) if( iScreenY < 0 ) continue; else if( iScreenY >= pBumps->iWinHeight ) break; - pDOffset = &pBumps->pXImage->data[ (iLightY+pBumps->SpotLight.nLightRadius) * pBumps->pXImage->bytes_per_line ]; + /* warning: pointer targets in assignment differ in signedness + Should pDOffset be a int8? I can't tell. -jwz, 22-Jul-2003 */ + pDOffset = (int8_ *) &pBumps->pXImage->data[ (iLightY+pBumps->SpotLight.nLightRadius) * pBumps->pXImage->bytes_per_line ]; pBOffset = pBumps->aBumpMap + ( iScreenY * pBumps->iWinWidth ) + nLightXPos; for( iScreenX=nLightXPos, iLightX=-pBumps->SpotLight.nLightRadius; iLightXbytesPerPixel ) {