X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=dust.c;h=5ee9e2058345365bf0c2d1d8dcbe133511d20e25;hp=3a9f2465081ffe184f2e537fd18c88c0133e0dde;hb=51d56bfe5830a41e61f4ceefb75217f647d994fe;hpb=3cfde1edc98388c11d4efbbba7c8deaf56c4b1ae diff --git a/dust.c b/dust.c index 3a9f246..5ee9e20 100644 --- a/dust.c +++ b/dust.c @@ -27,17 +27,17 @@ init_dust(void) } void -move_dust(void) +move_dust(float ticks) { int i; - float xscroll = screendx * t_frame; - float yscroll = screendy * t_frame; + float xscroll = screendx * ticks; + float yscroll = screendy * ticks; for(i=0; i= XSIZE) motes[i].x -= XSIZE; + if(motes[i].x >= XSIZE) motes[i].x -= XSIZE; else if(motes[i].x < 0) motes[i].x += XSIZE; - if(motes[i].y > YSIZE) motes[i].y -= YSIZE; + if(motes[i].y >= YSIZE) motes[i].y -= YSIZE; else if(motes[i].y < 0) motes[i].y += YSIZE; } }