/* generate an XImage of from[][][] and draw it on the screen */
-void plain_draw(int k)
+static void plain_draw(int k)
{
int i, j;
for(i = 0 ; i < 2*radius+speed+2; i++) {
* it should be possible to use the from[][] to speed it up
* (once I figure out the algorithm used :)
*/
-void reflect_draw(int k)
+static void reflect_draw(int k)
{
int i, j;
int cx, cy;
else {
int x = xy_coo[k].x + cx + (lx * rsq / dist);
int y = xy_coo[k].y + cy + (ly * rsq / dist);
- if (x < 0 || x > xgwa.width ||
- y < 0 || y > xgwa.height)
+ if (x < 0 || x >= xgwa.width ||
+ y < 0 || y >= xgwa.height)
XPutPixel( buffer_map, j, i, black_pixel );
else
XPutPixel( buffer_map, j, i,
}
/* make xy_coo[k] grow/shrink */
-void swamp_thing(int k)
+static void swamp_thing(int k)
{
if (xy_coo[k].r >= radius)
xy_coo[k].r_change = -abs(xy_coo[k].r_change);
draw(k);
}
- XSync(dpy, True);
+ XSync(dpy, False);
+ screenhack_handle_events (dpy);
if (delay) usleep(delay);
}