/*
** OP71PRINTF.C - yet another variation on the 'Hello World' theme.
*/

#use op71l.lib
#use op71hw.lib
#use 8x10l.lib
#use vdriver.lib

struct _fontInfo fntInfo;

main()
{
	auto int i, j, k;

	VdInit();	
	glInit();
	glXFontInit(&fntInfo, 8, 10, 0x20, 0x7F, engFont8x10);
	
	for(j = -2; j < 3; j++)
	{
		for(i = -2; i < 3; i++)
		{
			glSetPfStep(i, j);
			glBuffLock();
			glBlankScreen();
			glPrintf(OP71XS / 2, OP71YS / 2, &fntInfo, "Hello, World! %d %d", i, j);
			glBuffUnlock();
//			tdelay(1000);
		}
	}
	glSetPfStep(1, 0);
	glBlankScreen();
	glSetBrushType(GL_XOR);
	for(i = 0; i < 21; i++)
	{
		glPrintf(OP71XS / 3, OP71YS / 2, &fntInfo, "Hello, World!");
	}
	glBackLight(0);	// we're done, turn off the LCD's backlight
}
