X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fdos%2Ftgfx.c;h=39e5ccc8561accbe39e30d610276ffc06b40dd38;hb=6120587cce15206faa7a38207961a89110de3bcd;hp=98182860319bb7b8318801a1c044c176361c7722;hpb=14156fa6d891446da30854a562d62652fb5d30b9;p=oftp diff --git a/src/dos/tgfx.c b/src/dos/tgfx.c index 9818286..39e5ccc 100644 --- a/src/dos/tgfx.c +++ b/src/dos/tgfx.c @@ -11,6 +11,18 @@ static unsigned short *framebuf = (unsigned short*)0xb8000; #define UPD_ATTR attr = (fgcol << 8) | (bgcol << 12) +void tg_init(void) +{ +} + +void tg_cleanup(void) +{ +} + +void tg_redraw(void) +{ +} + void tg_clear(void) { tg_rect(0, 0, 0, 80, 25, 0); @@ -56,12 +68,18 @@ void tg_setcursor(int x, int y) void tg_text(int x, int y, const char *fmt, ...) { va_list ap; - char buf[128], *ptr; - unsigned short *fbptr = framebuf + y * 80 + x; va_start(ap, fmt); - vsprintf(buf, fmt, ap); + tg_vtext(x, y, fmt, ap); va_end(ap); +} + +void tg_vtext(int x, int y, const char *fmt, va_list ap) +{ + char buf[256], *ptr; + unsigned short *fbptr = framebuf + y * 80 + x; + + vsprintf(buf, fmt, ap); ptr = buf; while(*ptr) {