add readme and license
[oftp] / src / dos / tgfx.c
index 9818286..39e5ccc 100644 (file)
@@ -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) {