X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fantspotlight.c;h=a129b7994dc15cfe178dfd958f71572ccc495056;hp=d84982a244718a8fec2d1c49307fe4e00d3c22d8;hb=96a411663168b0ba5432b407a83be55f3df0c802;hpb=bbd0773f2adde4927a6196361d4061e70bf48cd9 diff --git a/hacks/glx/antspotlight.c b/hacks/glx/antspotlight.c index d84982a2..a129b799 100644 --- a/hacks/glx/antspotlight.c +++ b/hacks/glx/antspotlight.c @@ -357,6 +357,7 @@ void build_ant(void) { ant->direction = 0.0; ant->velocity = 0.02; ant->material = MaterialGray5; + ant->step = 0; find_goal(); } @@ -479,6 +480,8 @@ void draw_antspotlight_strip(ModeInfo *mi) { ant->position[0] += ant->velocity * cos(ant->direction); ant->position[2] += ant->velocity * sin(-ant->direction); ant->step += 10*ant->velocity; + while(ant->step > 2*Pi) + ant->step -= 2*Pi; } void reshape_antspotlight(ModeInfo * mi, int width, int height) { @@ -625,7 +628,7 @@ void get_snapshot(ModeInfo *modeinfo) { if(MI_IS_WIREFRAME(modeinfo)) return; - ximage = screen_to_ximage(modeinfo->xgwa.screen, modeinfo->window); + ximage = screen_to_ximage(modeinfo->xgwa.screen, modeinfo->window, NULL); qw = QW; qh = QH; tw = modeinfo->xgwa.width;