X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fdemo.c;h=fee1e7a37864548278dcfa518acff5c73aed02c7;hp=168a5440f5b133c5b8b48cb136dacf1b90bc2812;hb=73f97e0d9dc83cad4aa7b53d900ea28390afed4f;hpb=5029eb9f7a538dd58e1c66c0945784acac8cc58b diff --git a/src/demo.c b/src/demo.c index 168a544..fee1e7a 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(isalpha(c)) { + cs_font(fb, x, y, toupper(c) - 'A'); + } + x += 14; + } +} + static void change_screen(int idx) { printf("change screen %d\n", idx);