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


int MAP2[81][51];
extern int MAP[81][51];
void savetilemap(int hexgrid)
{


extern block bigtile[114];
extern color bigtilepal[256];
block screen2;
block emsprite2;
block virtscreen;
color screen2pal[256];
int x,y;  //coordinates
int spot; //current terrain type
int xx,yy; //pixel coordinates
int ix,iy;
FILE *sav;



wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 01%");
wtextcolor(0);
wsetscreen(virtscreen);
 
 wcls(0);
 wsetpalette(0,255,bigtilepal);

	xx=0;
	yy=0;

	     sav=fopen("temp\\tmap1.dat","rb");

		for(iy=1;iy<=50;iy++){
		  for(ix=1;ix<=80;ix++){
		    fread(&MAP[ix][iy],sizeof(int),1,sav);
		    }
		}
		fclose(sav);
	     sav=fopen("temp\\cmap1.dat","rb");

		for(iy=1;iy<=50;iy++){
		  for(ix=1;ix<=80;ix++){
		    fread(&MAP2[ix][iy],sizeof(int),1,sav);
		    }
		}
		fclose(sav);
	for(y=1;y<=12;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);           
		wsavepcx256("worldmap\\map1a.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 03%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=1;y<=12;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}

       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map1b.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);
wcls(0);

virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 06%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=1;y<=12;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map1c.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);
wcls(0);

virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 09%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=1;y<=12;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map1d.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);
wcls(0);

virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 10%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map1e.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 13%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map1f.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 16%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map1g.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 17%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map1h.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 20%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map1i.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 23%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map1j.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 26%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map1k.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 29%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map1l.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 32%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map1m.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 33%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map1n.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 34%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map1o.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 35%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map1p.pcx",screen2,bigtilepal);
wcls(0);
	xx=0;
	yy=0;
wfreeblock(screen2);

/*********MAP 2*************/

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 38%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	     sav=fopen("temp\\tmap2.dat","rb");

		for(iy=1;iy<=50;iy++){
		  for(ix=1;ix<=80;ix++){
		    fread(&MAP[ix][iy],sizeof(int),1,sav);
		    }
		}
		fclose(sav);
	     sav=fopen("temp\\cmap2.dat","rb");

		for(iy=1;iy<=50;iy++){
		  for(ix=1;ix<=80;ix++){
		    fread(&MAP2[ix][iy],sizeof(int),1,sav);
		    }
		}
		fclose(sav);
	for(y=1;y<=12;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2a.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 39%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=1;y<=12;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}

       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2b.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 40%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=1;y<=12;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2c.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 42%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=1;y<=12;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2d.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 43%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2e.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 44%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2f.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 45%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2g.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 46%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2h.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 47%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2i.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 48%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2j.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 49%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2k.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 50%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2l.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 51%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2m.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 52%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2n.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 53%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2o.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 55%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map2p.pcx",screen2,bigtilepal);
wcls(0);
	xx=0;
	yy=0;
wfreeblock(screen2);

/********MAP 3**********/

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 56%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);
	     sav=fopen("temp\\tmap3.dat","rb");

		for(iy=1;iy<=50;iy++){
		  for(ix=1;ix<=80;ix++){
		    fread(&MAP[ix][iy],sizeof(int),1,sav);
		    }
		}
		fclose(sav);
	     sav=fopen("temp\\cmap3.dat","rb");

		for(iy=1;iy<=50;iy++){
		  for(ix=1;ix<=80;ix++){
		    fread(&MAP2[ix][iy],sizeof(int),1,sav);
		    }
		}
		fclose(sav);
	for(y=1;y<=12;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);           
		wsavepcx256("worldmap\\map3a.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 58%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=1;y<=12;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}

       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map3b.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 60%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=1;y<=12;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map3c.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 61%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=1;y<=12;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map3d.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 62%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map3e.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 63%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map3f.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 65%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map3g.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 67%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map3h.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 68%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map3i.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 69%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map3j.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 70%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map3k.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 72%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map3l.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 73%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map3m.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 74%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map3n.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 75%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map3o.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 76%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map3p.pcx",screen2,bigtilepal);

wcls(0);
	xx=0;
	yy=0;
wfreeblock(screen2);
/**********MAP 4*********/
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 78%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	     sav=fopen("temp\\tmap4.dat","rb");

		for(iy=1;iy<=50;iy++){
		  for(ix=1;ix<=80;ix++){
		    fread(&MAP[ix][iy],sizeof(int),1,sav);
		    }
		}
		fclose(sav);
	     sav=fopen("temp\\cmap4.dat","rb");

		for(iy=1;iy<=50;iy++){
		  for(ix=1;ix<=80;ix++){
		    fread(&MAP2[ix][iy],sizeof(int),1,sav);
		    }
		}
		fclose(sav);
	for(y=1;y<=12;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4a.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 78%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=1;y<=12;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}

       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4b.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 79%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=1;y<=12;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4c.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 80%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=1;y<=12;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4d.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 82%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4e.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 83%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4f.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 84%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4g.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 85%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=13;y<=24;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4h.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 86%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4i.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 88%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4j.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 90%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4k.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 92%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=25;y<=36;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4l.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 93%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=1;x<=20;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4m.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 95%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=21;x<=40;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4n.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 97%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=41;x<=60;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4o.pcx",screen2,bigtilepal);
wfreeblock(screen2);
	xx=0;
	yy=0;

wcls(0);
wnormscreen();
wfreeblock(virtscreen);

wcls(0);
virtscreen=wnewblock(0,0,319,199);
wtextcolor(15);
wouttextxy(100,100,NULL,"Saving Maps 99%");
wtextcolor(0);
wsetscreen(virtscreen);
wcls(0);

	for(y=37;y<=48;y++){
		for(x=61;x<=80;x++){
			spot=MAP[x][y];

			emsprite2=wems_getdata(bigtile[spot]);
			wputblock(xx,yy,emsprite2,1);
			if(MAP2[x][y]>0){
			   emsprite2=wems_getdata(bigtile[(MAP2[x][y])]);
			   wputblock(xx,yy,emsprite2,1);
			   }
			if(hexgrid==1){
			emsprite2=wems_getdata(bigtile[19]);
			wputblock(xx,yy,emsprite2,1);
			}
			xx=xx+16;
		}
		xx=0;
		yy=yy+16;
	}
       screen2=wnewblock(0,0,319,199);
		wsavepcx256("worldmap\\map4p.pcx",screen2,bigtilepal);
wcls(0);
	xx=0;
	yy=0;
wfreeblock(screen2);
wnormscreen();
wfreeblock(virtscreen);
wcls(0);
wloadpalette("default.pal",screen2pal);
setlib(NULL);
wtextcolor(15);
wouttextxy(80,100,NULL,"Saving Legend Maps 25%");
	screen2=wloadpcx256("graphics\\1.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap1.pcx",screen2,screen2pal);
	wfreeblock(screen2);
	delay(200);

	screen2=wloadpcx256("graphics\\2.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap2.pcx",screen2,screen2pal);
	wfreeblock(screen2);
		delay(200);

	screen2=wloadpcx256("graphics\\3.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap3.pcx",screen2,screen2pal);
	wfreeblock(screen2);
		delay(200);
	screen2=wloadpcx256("graphics\\4.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap4.pcx",screen2,screen2pal);
	wfreeblock(screen2);
		delay(200);
	screen2=wloadpcx256("graphics\\5.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap5.pcx",screen2,screen2pal);
	wfreeblock(screen2);
		delay(200);
	screen2=wloadpcx256("graphics\\6.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap6.pcx",screen2,screen2pal);
	wfreeblock(screen2);
		delay(200);
	screen2=wloadpcx256("graphics\\7.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap7.pcx",screen2,screen2pal);
	wfreeblock(screen2);
		delay(200);
	screen2=wloadpcx256("graphics\\8.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap8.pcx",screen2,screen2pal);
	wfreeblock(screen2);
		delay(200);
	screen2=wloadpcx256("graphics\\9.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap9.pcx",screen2,screen2pal);
	wfreeblock(screen2);
		delay(200);
wcls(0);
wtextcolor(15);
wouttextxy(80,100,NULL,"Saving Legend Maps 50%");
	screen2=wloadpcx256("graphics\\10.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap10.pcx",screen2,screen2pal);
	wfreeblock(screen2);
		delay(200);
	screen2=wloadpcx256("graphics\\11.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap11.pcx",screen2,screen2pal);
	wfreeblock(screen2);
		delay(200);
	screen2=wloadpcx256("graphics\\12.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap12.pcx",screen2,screen2pal);
	wfreeblock(screen2);
		delay(200);
	screen2=wloadpcx256("graphics\\13.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap13.pcx",screen2,screen2pal);
	wfreeblock(screen2);
		delay(200);
wcls(0);
wtextcolor(15);
wouttextxy(80,100,NULL,"Saving Legend Maps 75%");

	screen2=wloadpcx256("graphics\\14.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap14.pcx",screen2,screen2pal);
	wfreeblock(screen2);
		delay(200);
	screen2=wloadpcx256("graphics\\15.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap15.pcx",screen2,screen2pal);
	wfreeblock(screen2);
		delay(200);
	screen2=wloadpcx256("graphics\\16.pcx",screen2pal);
	wsavepcx256("worldmap\\legmap16.pcx",screen2,screen2pal);
		delay(200);
	wfreeblock(screen2);
wcls(0);
return;
}
