X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=dust.c;h=4eeeb8b034a23f1c4ef8e2c3998801998528eb7e;hp=5ee9e2058345365bf0c2d1d8dcbe133511d20e25;hb=fe549d406b589b1c3db83aeea28c911292a5968e;hpb=51d56bfe5830a41e61f4ceefb75217f647d994fe diff --git a/dust.c b/dust.c index 5ee9e20..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 { @@ -32,13 +33,13 @@ 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); } }