X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Ffiberlamp.c;fp=hacks%2Ffiberlamp.c;h=4c594fbb99f7b36d31663953653864338e9241f7;hp=062f62ffd3e65f83b304ef88d986d19aca272302;hb=8afc01a67be4fbf3f1cc0fce9adf01b5289a21c6;hpb=3f1091236d800c43a3124c44c7da54e53f205b13 diff --git a/hacks/fiberlamp.c b/hacks/fiberlamp.c index 062f62ff..4c594fbb 100644 --- a/hacks/fiberlamp.c +++ b/hacks/fiberlamp.c @@ -1,7 +1,7 @@ /* -*- Mode: C; tab-width: 4 -*- */ /* fiberlamp --- A Fiber Optic Lamp */ -#if !defined( lint ) && !defined( SABER ) +#if 0 static const char sccsid[] = "@(#)fiberlamp.c 5.00 2000/11/01 xlockmore"; #endif @@ -59,7 +59,7 @@ ModStruct fiberlamp_description = #define SPREAD (30.0) /* Angular spread at the base */ #define SCALE (MI_WIDTH(mi)/2) /* Screen size */ -#define NODES (20) /* Number of nodes in a fiber. Variable with range +#define NODES (20L) /* Number of nodes in a fiber. Variable with range 10 .. 30, if desired. High values have stability problems unless you use small DT */ @@ -95,7 +95,7 @@ typedef struct { int init; double psi; double dpsi; - int count, nfibers; + long count, nfibers; double cx; double rx, ry; /* Coordinates relative to root */ fiberstruct *fiber; @@ -408,9 +408,9 @@ draw_fiberlamp (ModeInfo * mi) double x = fs->node[1].x - fl->cx + 0.025; double y = fs->node[1].z + 0.02; double angle = atan2(y, x) + fl->psi; - int tipcolor = (int)(MI_NPIXELS(mi)*angle/(2*M_PI)) % MI_NPIXELS(mi); - int fibercolor; - int tiplen; + long tipcolor = (int)(MI_NPIXELS(mi)*angle/(2*M_PI)) % MI_NPIXELS(mi); + long fibercolor; + long tiplen; if (tipcolor < 0) tipcolor += MI_NPIXELS(mi); tipcolor = MI_PIXEL(mi, tipcolor);