I can't test this till I get home later, but just off the top of my head,
try this:

> while (pos_x < width) {
>    /* clear screen to default color */
>    ggiSetGCForeground(vis, ggiMapColor(vis, &col));
>    ggiFillscreen(vis);
>    draw_cross(vis, pos_x, pos_y, fcol);

x = GGI_RP_DONTCARE;
y = GGI_RP_SYNC;

>    ggiWaitRayPos(vis, &x, &y);

fprintf (stderr, "Raypos at %i, %i\n", x, y);

>    ggiFlush(vis);
>    /* update position */
>    pos_x+=vx;
>    if(pos_x>=width) {
>       pos_x=0; i++;
>    }
>    if(i>10)
>      break;
> }

Run with 2> /tmp/err to keep the printf's from burning time.  See if the
values outputted are what you'd expect.  I haven't really tested WaitRayPos
too thoroughly.

--
Brian

Reply via email to