X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Ftunnel.c;h=63f0f9feff3a3b51be8559eb77e717797328b75a;hp=13eea708f5afc2a8b752b2628ce971d26047a1d8;hb=5d9ec41cc62ebddf5d406511714e561e88884987;hpb=f48bebd0c67210cd8b56e7d491b4942971e34ed1 diff --git a/src/tunnel.c b/src/tunnel.c index 13eea70..63f0f9f 100644 --- a/src/tunnel.c +++ b/src/tunnel.c @@ -27,8 +27,6 @@ static void draw_tunnel_range(unsigned short *pixels, int xoffs, int yoffs, int static int count_bits(unsigned int x); static int count_zeros(unsigned int x); -static unsigned int *gen_test_image(int *wptr, int *hptr); - static struct screen scr = { "tunnel", init, @@ -184,11 +182,13 @@ static void draw(void) int starty = i * num_lines; int resty = starty + draw_lines; int rest_lines = num_lines - draw_lines; - draw_tunnel_range((unsigned short*)fb_pixels, xoffs, yoffs, starty, draw_lines, time_msec); + draw_tunnel_range(vmem_back, xoffs, yoffs, starty, draw_lines, time_msec); if(rest_lines) { - memset((unsigned short*)fb_pixels + resty * fb_width, 0, rest_lines * fb_width * 2); + memset(vmem_back + resty * fb_width, 0, rest_lines * fb_width * 2); } } + + swap_buffers(0); } static void tunnel_color(int *rp, int *gp, int *bp, long toffs, unsigned int tpacked, int fog) @@ -264,6 +264,7 @@ static int count_zeros(unsigned int x) return num; } +/* static unsigned int *gen_test_image(int *wptr, int *hptr) { int i, j; @@ -287,3 +288,4 @@ static unsigned int *gen_test_image(int *wptr, int *hptr) *hptr = ysz; return pixels; } +*/