X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=dust.c;h=4eeeb8b034a23f1c4ef8e2c3998801998528eb7e;hp=691649d412b821b42f83766a3af059a361b6a4c3;hb=fe549d406b589b1c3db83aeea28c911292a5968e;hpb=841f94c4182f8dff0253db9bae4922c3c9039a5f diff --git a/dust.c b/dust.c index 691649d..4eeeb8b 100644 --- a/dust.c +++ b/dust.c @@ -4,6 +4,7 @@ #include "config.h" #include "globals.h" #include "dust.h" +#include "float.h" #include "mt.h" struct dust_mote { @@ -27,16 +28,18 @@ init_dust(void) } void -move_dust(void) +move_dust(float ticks) { int i; + float xscroll = screendx * ticks; + float yscroll = screendy * ticks; + for(i=0; i= XSIZE) motes[i].x -= XSIZE; - else if(motes[i].x < 0) motes[i].x += XSIZE; - if(motes[i].y > YSIZE) motes[i].y -= YSIZE; - else if(motes[i].y < 0) motes[i].y += YSIZE; + motes[i].y = fwrap(motes[i].y, YSIZE); } }