# HG changeset patch # User John Tsiombikas # Date 1363410653 -7200 # Node ID 0f984156753ea8b3798cef254cbd223112fb4563 # Parent ba868d348de8064eda1a4740c3b703a3d2b56d6d fixed the jerkiness diff -r ba868d348de8 -r 0f984156753e src/tunnel.c --- a/src/tunnel.c Sat Mar 16 06:39:52 2013 +0200 +++ b/src/tunnel.c Sat Mar 16 07:10:53 2013 +0200 @@ -89,7 +89,7 @@ } colrange = palm_color_range(); - init_timer(120); + init_timer(under_windows ? 0 : 120); start_time = get_msec(); return 0; @@ -113,8 +113,7 @@ unsigned long msec = get_msec() - start_time; unsigned int i; - unsigned char voffs = msec >> 3; - unsigned char uoffs = msec >> 6; + unsigned char offs = msec >> 3; unsigned char *fbptr = fbuf; unsigned long *uptr = umap; @@ -123,8 +122,8 @@ for(i=0; i<64000; i++) { unsigned long u = *uptr++; unsigned long v = *vptr++; - unsigned long tx = ((((unsigned long)(u - uoffs) << 3) & 0xff) * tex->width) >> 8; - unsigned long ty = (((unsigned long)(v + voffs) & 0xff) * tex->height) >> 8; + unsigned long tx = ((((unsigned long)((u << 3) - offs)) & 0xff) * tex->width) >> 8; + unsigned long ty = (((unsigned long)(v + offs) & 0xff) * tex->height) >> 8; unsigned long base = tex->pixels[ty * tex->width + tx]; long zcue_shift = colrange - (v >> 6);