X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fdemo.c;h=e2b815526acd301af1fbf942f4efeeb68bd8789c;hp=168a5440f5b133c5b8b48cb136dacf1b90bc2812;hb=feef1d0ecc88f41adbd4781767afd05a0f381f85;hpb=5029eb9f7a538dd58e1c66c0945784acac8cc58b diff --git a/src/demo.c b/src/demo.c index 168a544..e2b8155 100644 --- a/src/demo.c +++ b/src/demo.c @@ -19,7 +19,7 @@ int fb_width = FB_WIDTH; int fb_height = FB_HEIGHT; int fb_bpp = 16; -uint16_t *fb_pixels, *vmem_back, *vmem_front; +uint16_t *fb_pixels, *vmem; unsigned long time_msec; int mouse_x, mouse_y; unsigned int mouse_bmask; @@ -102,7 +102,7 @@ void demo_draw(void) scr_update(); scr_draw(); - draw_mouse_pointer(vmem_front); + draw_mouse_pointer(vmem); ++nframes; } @@ -164,6 +164,18 @@ void draw_mouse_pointer(uint16_t *fb) } } +void cs_puts(void *fb, int x, int y, const char *str) +{ + while(*str) { + int c = *str++; + + if(c > ' ' && c < 128) { + cs_font(fb, x, y, c - ' '); + } + x += 9; + } +} + static void change_screen(int idx) { printf("change screen %d\n", idx);