
#include "blit.h"
#include "font.h"

#define SCREEN_W 320
#define WIDFLAG WID320		/* blitter flags corresponding to OBJWIDTH */
#define LINEY 12		/* number of pixels per line of characters */

extern char v_screen[];
extern FNThead sysfnt[];

char	outbuf[2];
short	curs_x;
short	curs_y;

v_init()
{
	curs_x = 0;
	curs_y = 0;
	outbuf[1] = 0;
}

v_conout(c)
	short c;
{

	switch (c) {
	case 0xd:
		curs_x = 0;
		curs_y += LINEY;
		break;
	default:
		outbuf[0] = c;

		v_gtext(curs_x, curs_y, "Hello World", 
		v_screen, PIXEL16|PITCH1|WIDFLAG, sysfnt, 0x1aff, 0 );
		curs_x += 8;
		if (curs_x > (SCREEN_W/6*6)) {
			curs_x = 0;
			curs_y += LINEY;
		}
		break;
	}
}
