/****************************************************/ /***** FuturePicture loader (FCP) V1.0 ************/ /****************************************************/ int loadfcp(char *fname) { int multiple=0; int pz; int format; int x,y,a,b,c,d; int cnt,cntm; int minx,miny,maxx,maxy,xo,yo,cols; int infocnt=0; int style; int z,zm=1; int plane4; long l; char far *filebuf; unsigned u; filebuf=halloc(32768L,1L); #ifndef AOLOAD printf("\nLoading and uncompressing picture (FCP): "); #endif if(filebuf==NULL) { printf("Out of memory.\n"); return(1); } if(setback255) memset(pic2,255,64000); { /* header */ f1=fopen(fname,"rb"); if(f1==NULL) return(3); setvbuf(f1,filebuf,_IOFBF,32768); a=getc(f1); if(a!='F') return(2); a=getc(f1); if(a!='C') return(2); a=getc(f1); if(a!='P') return(2); a=getc(f1); if(a!=0x1a) return(2); a=getc(f1); if(a!=0x10) return(2); b=getc(f1); pics=getw(f1); fread(picpos,4,pics,f1); if(b&1) { fread(pal,256*3,1,f1); } if(pics>1) { multiple=1; #ifndef AOLOAD printf("\n\nFCP file contains multiple pictures.\n" "Press Space to view next with animation\n" " Enter to view next with flipping\n" " 'S' to select picture\n\n" "Press any key to start."); getch(); reg.x.ax=0x13; int86(0x10,®,®); #endif viewpal(0); } /* pic */ for(pz=0;pzbx2) bx2=maxx-minx; if(maxy-miny>by2) by2=maxy-miny; #endif if(format&16) { plane4=4; zm=4; } else plane4=1; for(z=0;z