} else {
t = MAX(begin_at(st), TERRAIN_LENGTH/4);
/*t = TERRAIN_LENGTH/4; dt = 2; */
- dt = (t >= 3*TERRAIN_LENGTH/4 ? 1 : 2);
+ /*dt = (t >= 3*TERRAIN_LENGTH/4 ? 1 : 2);*/
i = (st->nearest -t + TERRAIN_LENGTH) % TERRAIN_LENGTH;
render_block (st, d, st->tunnelend_gc, t);
}
speedmine_reshape (Display *dpy, Window window, void *closure,
unsigned int w, unsigned int h)
{
+ struct state *st = (struct state *) closure;
+ st->width = w;
+ st->height = h;
+ if (st->dbuf != st->window) {
+ XWindowAttributes xgwa;
+ XGetWindowAttributes (st->dpy, st->window, &xgwa);
+ XFreePixmap (dpy, st->dbuf);
+ st->dbuf = XCreatePixmap (st->dpy, st->window,
+ st->width, st->height, xgwa.depth);
+ }
}
static Bool