http://ftp.ksu.edu.tw/FTP/FreeBSD/distfiles/xscreensaver-4.23.tar.gz
[xscreensaver] / hacks / spotlight.c
index 2616b849a9662c0561607849bb78f8379fe85fcf..7137d6614f11ce68e03f85fcb5a213311eb6af64 100644 (file)
@@ -8,7 +8,7 @@
 /* modified from a module from the xscreensaver distribution */
 
 /*
- * xscreensaver, Copyright (c) 1992, 1993, 1994, 1996, 1997, 1998
+ * xscreensaver, Copyright (c) 1992, 1993, 1994, 1996, 1997, 1998, 2005
  * Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -115,7 +115,7 @@ init_hack (Display *dpy, Window window)
 
   /* grab screen to pixmap */
   pm = XCreatePixmap(dpy, window, sizex, sizey, xgwa.depth);
-  load_random_image (xgwa.screen, window, pm, NULL);
+  load_random_image (xgwa.screen, window, pm, NULL, NULL);
   XClearWindow(dpy, window);
   XFlush (dpy);
 
@@ -181,9 +181,9 @@ onestep (Display *dpy, Window window, Bool first_p)
     now = currentTimeInMs() + off;
 
     /* find new x,y */
-    x = ((1 + sin(((float)now) / X_PERIOD * 2. * M_PI))/2.0) 
+    x = ((1 + sin(((double)now) / X_PERIOD * 2. * M_PI))/2.0) 
       * (sizex - s/2) -s/4  + MINX;
-    y = ((1 + sin(((float)now) / Y_PERIOD * 2. * M_PI))/2.0) 
+    y = ((1 + sin(((double)now) / Y_PERIOD * 2. * M_PI))/2.0) 
       * (sizey - s/2) -s/4  + MINY;
     
     if (!first_p)