
#include <stdio.h>
#include <wgt4.h>
#include <stdlib.h>
#include <math.h>
#include <dos.h>

int oldmode;
int newmode;

wgtfont font;
block screen;


color screencol[256];


main()
{
int x,y,xx,yy;
char c[12];
char file[12];
int num;


oldmode=wgetmode();
vga256();
newmode=wgetmode();
font=wloadfont("tiny.wfn");
wcls(255);
wsetpalette(0,255,screencol);
num=9;
 wtextcolor(0);
     xx=0;
     /*
 for(x=1;x<=160;x++){
     itoa(x,c,10);


     wouttextxy(xx,180,font,c);
     xx=xx+16;
     if(xx>304) {
		itoa(num,file,10);
		screen=wnewblock(0,0,319,199);
		wsavepcx256(file,screen,screencol);
		xx=0;
		num++;
		wcls(255);
		}
 } */
 yy=0;
 wcls(255);

 for(y=1;y<=96;y++){
	itoa(y,c,10);

	wouttextxy(300,yy,font,c);
	yy=yy+16;
	if(yy>184){
		itoa(num,file,10);
		screen=wnewblock(0,0,319,199);
		wsavepcx256(file,screen,screencol);
		yy=0;
		num++;
		wcls(255);
		}
 }

wsetmode(oldmode);
wfreefont(font);
wfreeblock(screen);

return 0;
}
