Skip site navigation (1)Skip section navigation (2)
Date:      20 Oct 2002 23:19:06 -0400
From:      "Brian K. White" <brian@aljex.com>
To:        ports@FreeBSD.org
Subject:   FreeBSD Port: xripple-1.0
Message-ID:  <1035170352.24689.7.camel@amdemon>

next in thread | raw e-mail | index | archive | help

--=-SvYjAHug4trRhuUd0JDb
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

attached is a tiny patch to a tiny program of tiny importance :)

put in /usr/ports/games/xripple/files and xripple gets command line
options for delay and height

Lets you slow it down so it can be used on todays fast hardware,
and make it some other height besides 64 pixels if you want.

-- 
Brian K. White  --  brian@aljex.com  --  http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx  Linux SCO  Prosper/FACTS AutoCAD  #callahans Satriani

--=-SvYjAHug4trRhuUd0JDb
Content-Disposition: attachment; filename=patch-aa
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; name=patch-aa; charset=ISO-8859-1

--- xrp.c.orig	Wed Jul 10 08:47:30 1996
+++ xrp.c	Sun Oct 20 23:02:10 2002
@@ -2,6 +2,7 @@
 /* This Code is Copyright (C) 1996 by the Rasterman ...... It's small, sim=
ple*/
 /* and does the job well... read the REAME file!!!!!                      =
   */
 /*************************************************************************=
****/
+/* 10/20/2002 - brian@aljex.com - added command line opts -d delay -y heig=
ht */
=20
 #include <stdio.h>
 #include <unistd.h>
@@ -11,6 +12,8 @@
=20
 /* DEFINES */
 #define M_PI_2          1.57079632679489661923
+#define WATER_DELAY     0
+#define WATER_HEIGHT    64
=20
 Display *disp;
 Window Root;=20
@@ -25,7 +28,9 @@
 int width;
 int height;
 int waterh;
+int waterd;
 int depth;
+int c;
=20
 OpenWindow(int h)
 {
@@ -119,12 +124,32 @@
 	}
       XCopyArea(disp,pmap,Root,gc,0,0,width,waterh,0,height-waterh);
       XSync(disp,0xff);
+      if (waterd) usleep (waterd);
     }
 }
=20
 main(int argc, char **argv)
 { =20
-  waterh=3D64;
+
+  waterh=3DWATER_HEIGHT;
+  waterd=3DWATER_DELAY;
+
+  while ((c =3D getopt(argc, argv, "d:y:")) !=3D EOF) {
+    switch (c) {
+        case 'd':
+            waterd =3D atoi(optarg);
+            break;
+        case 'y':
+            waterh =3D atoi(optarg);
+            break;
+        case '?':
+            fprintf(stderr, "\tusage: %s [-d delay] [-y height]\n",argv[0]=
);
+            fprintf(stderr, "\tdefaults: delay=3D%d  height=3D%d\n",waterd=
,waterh);
+	    exit(1);
+    }
+  }
+
   OpenWindow(waterh);
   doit();
+
 }

--=-SvYjAHug4trRhuUd0JDb--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1035170352.24689.7.camel>